Games Exposed

General software. From trouble with the Banyan Tree to OCP Art Studio, post any general software chat here. Could include game challenges...
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Games Exposed

Post by luny »

Every now and then I tend to get the urge to dissemble and describe the inner workings of a famous game using the brilliant
Skootkit (https://skoolkit.ca/). I keep getting that urge again, but I'm holding off until I finish my current project (I have a knack of leaving projects unfinished due to the enthusiasm switching to other things). So in the mean time I was wondering:

1. Does anyone here have an interest in such things? I tend to do these for my own curiosity, but do publish the results (For example http://www.luny.co.uk/index.php?page=83) for anyone to see.

2. Does anyone have ideas of the games they'd like to see? I tend to go for the bigger games that might have interesting data structures, that fans could change and make their own scenes up (For instance, Pyjyamarama, Tir Na Nog and Dun Darach).
I code to live (Job) and I live to code (Retro). One of them has to give!
User avatar
Morkin
Bugaboo
Posts: 3277
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Games Exposed

Post by Morkin »

The whole exercise took me so flippin' long (Avalon disassembly) that I felt I couldn't NOT publish it. I think if I wasn't going to, I would've probably left it incomplete. There are so many routines outside the game itself (like menus, LOAD and SAVE routines, even the code sheet input) that I started thinking "...can I really be bothered with this bit?"...

I like reading other people's disassemblies, but I tend to cherry pick and just look at certain routines or data of interest. When I twigged that people generally won't read a lot of it, and disassemblies are of fairly niche interest to an already nice interest group(!), I decided I'd try to pack the 'reference' section with things for people who may be interested in the game, rather than 'code heads'.

I did start a disassembly of a popular Speccy shmup beforehand but got a bit bored, and thought I'd try something a bit meatier/challenging instead. It was a good choice I think - a game I had no idea how it was all put together and knew it'd have a lot to it. It was a game I liked too, which helped. The game engine is very organised and structured, you could create your own mini 'Avalon' game with it if you wanted - you just need to supply objects, a map, and list of 'interactions'.
My Speccy site: thirdharmoniser.com
User avatar
ketmar
Manic Miner
Posts: 713
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: Games Exposed

Post by ketmar »

Zynaps. we need more good 25 FPS shmups! ;-)
dfzx
Manic Miner
Posts: 683
Joined: Mon Nov 13, 2017 6:55 pm
Location: New Forest, UK
Contact:

Re: Games Exposed

Post by dfzx »

I'd love to see more disassemblies, I can learn a lot from them. But I'd ask for simpler games, perhaps from earlier in the life of the industry. Even disassembled, I can rarely make head or tail of the complex code, tricks and data structures of the games that were written when the programmers started to know their way around the machine.

Something like Space Raiders... Smooth, flicker free, good sound, spot on collision detection... I'd like to see how that was done in 16K in 1982.
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: Games Exposed

Post by luny »

Morkin wrote: Wed May 04, 2022 9:43 am The whole exercise took me so flippin' long (Avalon disassembly) that I felt I couldn't NOT publish it. I think if I wasn't going to, I would've probably left it incomplete. There are so many routines outside the game itself (like menus, LOAD and SAVE routines, even the code sheet input) that I started thinking "...can I really be bothered with this bit?"...

I like reading other people's disassemblies, but I tend to cherry pick and just look at certain routines or data of interest. When I twigged that people generally won't read a lot of it, and disassemblies are of fairly niche interest to an already nice interest group(!), I decided I'd try to pack the 'reference' section with things for people who may be interested in the game, rather than 'code heads'.

I did start a disassembly of a popular Speccy shmup beforehand but got a bit bored, and thought I'd try something a bit meatier/challenging instead. It was a good choice I think - a game I had no idea how it was all put together and knew it'd have a lot to it. It was a game I liked too, which helped. The game engine is very organised and structured, you could create your own mini 'Avalon' game with it if you wanted - you just need to supply objects, a map, and list of 'interactions'.
My original aim was to find out which games were 'editable'. Most tend to have a bit of hard coded logic in the code, for instance Tir Na Nog has code for where the water fall is and it can't be moved by simply changing the data. I agree with you about people wanting to now how without trawling through the code and do try to add as many comments, images and references as you have. Wanted! Monty Mole, being my first, I worked out the code but never published it (skoolkit wasn't around then or I wasn't aware of it.). So that is just a bunch to webpages holding tables and info.
I code to live (Job) and I live to code (Retro). One of them has to give!
catmeows
Manic Miner
Posts: 718
Joined: Tue May 28, 2019 12:02 pm
Location: Prague

Re: Games Exposed

Post by catmeows »

Definitely. I usually find time to read the diassembly.
I have even list od games I'm waiting for.
I would like to see Starquake, Firelord and Chaos, where I'm interested in beeper magic.
And I would like to see any of later Freescape games.
Proud owner of Didaktik M
User avatar
ketmar
Manic Miner
Posts: 713
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: Games Exposed

Post by ketmar »

oh, and i also want Brian Bloodaxe "physics" code. i still want to create a proper remake of it (yes, i LOVE this game! ;-). long time ago i decoded room/items format, but never got to the actual playsim code.
User avatar
Morkin
Bugaboo
Posts: 3277
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Games Exposed

Post by Morkin »

catmeows wrote: Wed May 04, 2022 10:58 am.
I would like to see Starquake, Firelord and Chaos, where I'm interested in beeper magic.
Yeah, those are good choices. I'd definitely love to see a disassembly of Chaos - for some reason I might have thought someone would've done it by now.
My Speccy site: thirdharmoniser.com
User avatar
spider
Dynamite Dan
Posts: 1099
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Re: Games Exposed

Post by spider »

@luny , I very much enjoy reading the disassemblies as I'm sure many others who have not posted here do to. 8-)

It can also help with learning in a way, seeing a small routine that a programmer may write in a different way to others, a bit like say using a FOR/NEXT vs an IF/ELSE .

I did have a suggestion list on WOS many moons ago but I can't find it now.

I am aware there's more 'skoolkit' disassembled games than listed , although some may not be there due to not being complete or partial perhaps, I'm not sure.
User avatar
TMD2003
Rick Dangerous
Posts: 2043
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: Games Exposed

Post by TMD2003 »

The other day, while having a run through Blood n' Guts with my new joystick, I thought about disassembling it, on the off-chance I might be able to confirm, once and for all, all the locations where viruses and white blood cells do and don't appear.

I'd like to think that by this stage I could tell an opcode from a block of graphics...
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Ralf
Rick Dangerous
Posts: 2289
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Games Exposed

Post by Ralf »

Some of the games I would like to see decompiled:

- Zynaps
- Renegade
- Green Beret
- Chase H.Q.
- Robocop
- Bomb Jack
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: Games Exposed

Post by luny »

for those that want an older game, I've uploaded Ground Attack http://www.luny.co.uk/Remake/groundattack/index.html, which I did some time ago.
I code to live (Job) and I live to code (Retro). One of them has to give!
User avatar
Lee Bee
Dynamite Dan
Posts: 1297
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Games Exposed

Post by Lee Bee »

I love this kind of thing - especially looking at extracted sprite sets! :-) Great work with Dun Darach, Luny! (I've just PM'd you with a little question.)
User avatar
ketmar
Manic Miner
Posts: 713
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: Games Exposed

Post by ketmar »

btw, i tried Zynaps once or twice, and failed. it looks quite… strange inside, like a pile of code generated by some macros or even DSL. and it seems to be a kind of multitasking OS there. at least if i remember it right, it was almost a decade ago.

(yet i managed to get into Firefly, extract its rendering engine, heavily comment it, and make it mostly reusable, so i have at least *some* expirience. that's why i want to see Zynaps dis…sected. ;-)
User avatar
spider
Dynamite Dan
Posts: 1099
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Re: Games Exposed

Post by spider »

If you wanted some random suggestions from me (probably not!) as these are probably/maybe not quite what would be seen as popular candidates...

In no particular order:

Turmoil
Space Raiders
Worst Things Happen At Sea
Slippery Sid
Motos
Booty

I was going to say Ant Attack and Tech Ted but the latter does exist (unsure if its going to be updated more) and the former I have seen in a text file I'm sure.
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: Games Exposed

Post by luny »

These have all been great suggestions and I will consider all very carefully, However, sadly it does take up time doing this sort of thing, so I will have to pick and choose as and when. But keep up the debate and give me some good justifications on why each game should be done. As with Zynaps, that it sounds a hard one with some unusual code in it. Anything that exposes some unique coding techniques or data structures are a bonus if I can explain how they work. This will go a long way for those wanting to learning how to write such code for games.

So keep 'em coming, it's at least worth documenting everyone's expectations here, if only I end up doing just a few. Of course with certain games I could limit the areas I annotate, such as clever screen copies or bitmap blitters. It'll all be worth doing by the sounds of your 'votes'.

Thanks all so far.
I code to live (Job) and I live to code (Retro). One of them has to give!
User avatar
Jbizzel
Dynamite Dan
Posts: 1537
Joined: Mon May 04, 2020 4:34 pm
Location: Hull
Contact:

Re: Games Exposed

Post by Jbizzel »

SIM city :)
User avatar
ketmar
Manic Miner
Posts: 713
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: Games Exposed

Post by ketmar »

luny wrote: Wed May 04, 2022 9:28 pm As with Zynaps, that it sounds a hard one with some unusual code in it.
it definitely is, 25 FPS horizontal scrolling shooter is not something we'll see often on the Speccy! ;-)

also, i've found one (sadly, only one) file from my attemts to understand it. not much, but may help a little.
Spoiler
#85ca: main frame update entry point?

#86ce: we'll come here 18 times a frame; it seems to do sound too

#86d9: we'll come here from somewhere, this draws attributes
seems that attrs are separate from the tile bitmaps
tiles keep scrolling even if attrs are garbled
yet sprite rendering seems to use on-screen attrs, because
garbled attrs prevets sprite rendering


#8694: this seems to be the part of the code to clear the stars
i.e. clear bitmap where the moving stars are, or something
it has a fun effect of moving attribute with old bitmap data if cleared

#879d: part of the frame tiles rendering?


#86e9: seems to be the code to erase the old sprites and such
poke 0x86e9 0xc3
poke 0x86ea 0x38
poke 0x86eb 0x87


if we patch the 4 following subroutines, it seems to completely block
rendering of tile bitmaps. yet attrs are still moving.

#8745: partial tile rendering
poke 0x8745 0xc3
poke 0x8746 0x94
poke 0x8747 0x87

#879e: partial tile rendering
poke 0x879e 0xc3
poke 0x879f 0xdd
poke 0x87a0 0x87

#87e7: partial tile rendering
poke 0x87e7 0xc3
poke 0x87e8 0x16
poke 0x87e9 0x88

#8820: partial tile rendering
poke 0x8820 0xc3
poke 0x8821 0x3f
poke 0x8822 0x88
User avatar
spider
Dynamite Dan
Posts: 1099
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Re: Games Exposed

Post by spider »

More thoughts, although these are (myself at least) not personally hugely into them for their inner workings, the fact they have separate stages may mean they could be worth a look:

Beach Head
Agent X

Oh meant to add "180" and "Scrabble" to the list in my previous post too, but I guess that might be a bit boring. :D
jimmy
Drutt
Posts: 36
Joined: Sun Nov 24, 2019 9:06 pm

Re: Games Exposed

Post by jimmy »

spider wrote: Thu May 05, 2022 2:08 pm Oh meant to add "180" and "Scrabble" to the list in my previous post too, but I guess that might be a bit boring. :D
Yes please to both of these. I looked into both to see if they would fit into a 16K cartridge - currently they don't :-( However 180 is close, and I can say that it has 2 screen$ embedded in it:
  • $6000-$77FF = dartboard bitmap (no ATTR)
  • $DD00-$EFFF = bar screen (with ATTR)
Scrabble would be good to do as then it could be provided with alternate dictionaries. Modern compression methods could allow >11000 words. A French version was released.

I looked at Agent X to see if all levels could be squeezed using ZX0 into 48K. It's close, but each part of the game seems to use different areas for buffers - meaning there's not enough safe memory to store the other parts. (The plan was to rotate the game parts in memory and decompress what was required at the start of each level). Part 2 of the game is the biggest taking up 17350 bytes, which ZX0 can compress to 7294 bytes. My calculations suggest that all 4 parts of the game compressed would still take up 22142 bytes.

Another game I'd like to see done is Turbo Esprit, so the map format can be decoded and new cities built (I tried to work this out myself, but didn't get very far apart from a grid city with traffic lights on every intersection)

There is a partial Everyone's a Wally disasembly out there, and it would be good to see that finished too.

A good disassembly should re-assemble correctly and it should also work when assembled at a different address (say +256 to ensure any page references are dealt with)

Other games worth considering are Dan Dare, Finders Keepers, Mugsy II, Popeye, Starion, Starstrike and Tapper.
User avatar
spider
Dynamite Dan
Posts: 1099
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Re: Games Exposed

Post by spider »

Good suggestions there too @jimmy

I was aware of the dartboard as its pixels are stored at the start, and did not bother to search for the bar, figuring that would likely be the same. There is a bit of oddness in how it 'sets' 501 for a CPU player iirc, human ones are a simple LD HL but anyway that's off topic here.

I do agree also on Tapper and Finders Keepers and possibly PopEye, I do have these three still. I assume you mean the large colourful DKTronics (iirc) Popeye ? , the others I've not really played to any extent to be worthwhile me commenting on.

Oh yes I think I've seen the E.A.Wally disassembly somewhere too at one point.
AndyC
Dynamite Dan
Posts: 1408
Joined: Mon Nov 13, 2017 5:12 am

Re: Games Exposed

Post by AndyC »

I was always curious about doing something like this with one of the Dizzy titles. Maybe Treasure Island or Fantasy World, although never really had the time to sit down and try it out.
User avatar
luny
Manic Miner
Posts: 222
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: Games Exposed

Post by luny »

I tend to sit in the living room with a laptop, so as not to be too unsociable with the family during that time in the evening when there is nothing on the tele and everybody are doing their own thing. But it does eat up time, or rather in my take awhile if I only spend the odd hour each day. Sometimes you get into a flow where an area makes sense and it all fits together.
I code to live (Job) and I live to code (Retro). One of them has to give!
User avatar
Lee Bee
Dynamite Dan
Posts: 1297
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Games Exposed

Post by Lee Bee »

No DISASSEMBLING this, though!

Image
User avatar
spider
Dynamite Dan
Posts: 1099
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Re: Games Exposed

Post by spider »

A couple more thoughts, perhaps some earlyish titles:

Horace Goes Skiing***
Penetrator
Kokotoni Wilf

*** Possibly the first game released with a headerless loader (sort of)
Post Reply