Reversing Choplifter
blondihacks.com
blondihacks.com
> What was amazing though is that all throughout all the code that handles scrolling and clipping, vertical parameters are supported.
Possibly the vertical parameters were either 1) part of the "library" the author had created but not needed for Choplifter, 2) to allow for offsetting the world on other (6502-based) platforms or 3) maybe intended for "bumping" the display when the chopper crashed?
Sounds both tedious and fun (the way solving a logic puzzle is "fun").
(A little surprised to find that Quinn does more than just work on steam engines as I have watched her YouTube channel for some time now — watching her building on her metal lathe and mill.)
Quinn is a full-spectrum powerhouse.
[1] https://web.archive.org/web/20130714200334/http://www.robotr...
Same! Her Youtube channel is the best resource I know for the hobbyist machinist. What a breadth of knowledge. I don't know how old she is, but would guess she probably wasn't even born when this game came out, so I'm astounded to learn she has decades of experience with Apple II dev.
--
Tangent, but curious if anyone knows why I'm seeing a handful of ' ' / U+FFFC OBJECT REPLACEMENT CHARACTERs peppered throughout the post on Linux FF? From their position at the end of sentences I figured they were emojis my system is missing, but I pulled it up on my phone and there's nothing there - or more accurately, it seems iOS Webkit just renders U+FFFC as a blank space. Emojis that got garbled by her CMS perhaps?
The availability of the Ghidra reverse engineering tool suite, has made this a very accessible hobby if you have any sort of knowledge of low level languages.
If you frequently snapshot memory during normal gameplay and then, for every byte of memory, check whether it gets modified at all, you’ll probably spot many of those inline parameters to subroutines fairly easily, as small areas of memory that see updates inside a sea of static code, likely preceded by a RTS.
If, in addition to looking whether things get modified, you look at what values they take and how they get modified, you likely can spot things such as the score (it’s a fairly safe bet that is stored as a multi-byte number in contiguous memory, either as BCD or binary) or number of lives left (gets decreased during gameplay)
On current hardware, you probably can also add code that hunts for correlations between what happens on screen and what’s in memory. Those might help you to find a correlation between a memory location and the flight height of the chopper, for example.
It likely also is possible to detect, say, the code for shooting by frequently sampling the program counter, comparing a set of samples from flying around without ever shooting with one of flying around while shooting constantly.
Given today’s powerful hardware, there’s a lot of automaton that can be done on this.
I can even envision using modern AI (“there’s a helicopter on screen. What memory locations seem to store its height and orientation?”) for reverse engineering 8-bit games.
It then tries to play the game, choosing inputs that increase the values that should be increasing (move right, gain lives), or tries not to decrease the values that are decreasing (don't die).
[0]: https://en.wikipedia.org/wiki/Choplifter [1]: https://www.arcade-museum.com/Videogame/choplifter
Speaking of games which load fully into memory, there was a peripheral card called the Wildcard[4] which would snapshot memory to disk, making it trivial to make "backup" copies of such games. A handful of in-memory games would thus check periodically that the original disk was still present.
[1]: https://en.wikipedia.org/wiki/Rescue_Raiders
[2]: https://www.youtube.com/watch?v=F8_XsRYTO-0
[3]: https://groups.google.com/g/comp.emulators.apple2/c/JwoKZKYQ...
"However the Apple II disk drive is very fast, so unlike the Commodore 64, single-load games went away quickly. C64 games did a lot of work to stay single-load since the C64 drive is so slow, but on the Apple II, running back to the disk to load your title screen, menu system, or new levels was no big deal."
It needs to be on iOS, but in the meantime, for the web:
> However in terms of pure fun, Choplifter remained hard to beat for sixteen years...
I want to know what happened in 1998 that made Choplifter stop being one of the best Apple II games.
My favorite part of the story was the latent assertions looking for the bug. Any new code I write is peppered with these, though only active in debug builds. I've never learned to enjoy stepping through a debugger.
There's an urban legend that Nasir Gebelli wrote his most popular games with the tiny mini-assembler in the Apple ][ ROM, opcode by opcode.
Ultima I was written in Applesoft BASIC with portions in assembly.
https://en.wikipedia.org/wiki/Ultima_I:_The_First_Age_of_Dar...
Wizardry was written in Apple Pascal.
As someone who spent too much time in junior high playing with Apple II+ computers, I have a lot of respect for the level of fanaticism that went into this disassembly work.