Jump to content

itaych's Photo


Member Since 4 Oct 2007
OFFLINE Last Active Feb 3 2017 7:51 PM

Posts I've Made

In Topic: Mark Reid's Getaway! design documents and APX correspondence

Fri Feb 3, 2017 7:33 PM

Is there somewhere you can put some signature bytes that won't change with any future releases you make?
Or I could check for the bytes that you changed for, say, the dead-end bug because I bet that's not likely to change.


I think you're missing the point of what I'm doing here. I'm not releasing new binary versions of the game, why would I do that? These releases play exactly like the original. The idea is that you take my updated source code, replace the file getaway.plf with your own map, build, and release the xex file. Things like checking signature bytes are hacks intended for cases where the source is not available, that's no longer the case here. Also you'd need to change a couple of equates in the source code to move the hideout, there is no code that scans for the "H". (I added these equates, before them the hideout location was, well, hidden - in various "magic numbers".)

Another interesting bug that Wade found: it crashes if people are too close to the road. He discovered you needed spacing:

The characters used for people happen to be part of the set of characters that the cars are allowed to drive on. This is because the game allows driving on any character in the range $7x, which includes the blank road (1 char), the gas station, hideout, dollars, prizes, stoplights and roadblocks (2 chars each). However this leaves 3 additional unrelated characters, which happen to be the graphics for people. The hang (an endless loop, not a crash) occurred because, since that character is interpreted as a road, you created an invisible dead end when placing these characters adjacent to a real road.


The solution is to change the code to allow driving only on the correct characters. It's a little uglier and takes a few more cycles, but the game isn't exactly starved for CPU time. The fix is attached.

In Topic: Mark Reid's Getaway! design documents and APX correspondence

Fri Feb 3, 2017 9:11 AM

This one won't crash if a cop or van hits a dead end, allowing more flexibility in level design. Enjoy :)

In Topic: Mark Reid's Getaway! design documents and APX correspondence

Fri Feb 3, 2017 7:56 AM

Here is another version. This includes my previous patch, plus allows for changing the hideout location, which was previously hard-coded. This should aid people who are editing the map.

In Topic: Mark Reid's Getaway! design documents and APX correspondence

Sun Jan 29, 2017 5:29 PM

Woops, there's a bug in my "clean" version (Getaway_20170129). The source contains a routine RNSPOT that picks an empty spot on the map on which to place a prize, roadblock etc. This routine is hard-coded to suit a fixed playfield address, regardless of the value of PLYFLD. It will only work correctly for PLYFLD=$3000, which is the case in the "pirate_executable" only. In the cleaned up version it's moved to $4000.

There are two ways to fix this:

Method one is to remove these two lines just under the RNSPOT label:

       SBC #$10
This is actually what Mark's code in disk M11 (where PLYFLD=$4000) looks like. It will work, but personally I don't like it as it will still break if PLYFLD is moved again.
Method two is a patch. Replace this code:
RNSPOT LDA RANDOM     ;pick spot
       AND #~00111111
       ORA #~01000000
       SBC #$10
       STA TEMP+1
with this:
RNSPOT LDA RANDOM     ; pick spot
       AND #~00111111 ; hi offset $00-3F
       ADC #>PLYFLD   ; add base of map address
       STA TEMP+1


...and that should work for any PLYFLD location.

In Topic: Mark Reid's Getaway! design documents and APX correspondence

Sat Jan 28, 2017 6:38 PM

I've managed to get the sources to Getaway to build! :) The sources are apparently not the final version that was distributed; to get a precise match with the released binary I had to mix code from disks M11 and M14, as well as make some small changes based on the binaries. The binaries I based myself on were a pirated executable version that circulated in the early 80's, as well as the image 'M25 - Getaway 1.1' from this archive. They are nearly identical; the only difference between them is that the disk image loads data at $1000 so it would fit in a 32K machine, but an executable can't load to that address without overwriting critical DOS code; so the executable version loads at $2b00 then adds some code that copies everything to the right place before jumping to the start location.


The archive that builds to a file identical to the pirated executable is named "Getaway_20170128_pirate_executable.zip".


Once I got that working, I got rid of all the garbage that was needed for creating the 100% identical binary. With code locations taken from the M11 version the game now won't fit in 32K but the relocation nonsense is not needed anymore, making things a lot simpler. Also, some garbage data that was present in the original binaries (the boot sector, plus the padding between the game code and the playfield data) could be removed.


The result of this cleanup is named "Getaway_20170129.zip".


Both archives behave the same: Extract them wherever you like. On a Windows machine, download the ATasm assembler and copy its binary (atasm.exe) to the 'build' subdirectory and double click the file build.bat. The result will be generated in 'bin'. Non Windows users should build ATasm for their platform, and use the build command in the build.bat file.