Reverse engineering by David Thomas, 2023-2026
Project started: March 2023
This is an in-progress disassembly of the ZX Spectrum conversion of Chase H.Q. by Ocean Software.
Note: I'm currently working on the 128K version of the game over on the 128k branch. I've also started porting the game logic to C.
In this repository is a SkoolKit control file which you can use to disassemble the game. This disassembles the game when it's in a "pristine" just-loaded state. See below for how to make a pristine snapshot and instructions on how to drive SkoolKit. I've provided a Makefile to automate the required steps.
The current disassembly output is available here.
To find out how it works! (and maybe one day we could make new levels...)
- Install SkoolKit:
pip3 install skoolkit- Download and convert the game into a .z80 format snapshot:
make pristineYou'll see:
Downloading https://worldofspectrum.net/pub/sinclair/games/c/ChaseH.Q..tzx.zip
Extracting Chase HQ - Side 1.tzx
Program: CHASE HQ
Fast loading data block: 23755,3870
Data (514 bytes)
Data (6914 bytes)
Data (19074 bytes)
Data (16130 bytes)
Data (4 bytes)
Data (6898 bytes)
Tape finished
Simulation stopped (PC at start address): PC=23372
Writing chase-hq.z80
Build a skool file like so:
make skoolA skool file is a high-level assembly listing from which we can generate regular assembly listings, or HTML cross-referenced disassemblies. Generated files are put in a directory called 'build' by default. You can edit the skool file and turn it back into another control file like so:
make ctlThis makes it easy to pull your changes back into the main control file by doing:
cp build/ChaseHQ.ctl ChaseHQ.ctlOr you can diff the two to be more selective in your staging.
The more detailed the control file gets the better our explanation of the game is!
Build an assembly listing like so:
make asmI usually edit with the control, skool and assembly files all open so I can check the impact of my changes:

Build a tap or z80 file for loading into emulators or real Spectrums like so:
make tap # or z80- Option (1) is to run the game in the Spectrum Analyser interactive disassembler and look for clues.
- Option (2) is to stare at the code really hard until it makes sense.
You will probably have to do both.
See https://youtu.be/ZcoFi4T4tsU for a short video of me running the game in Spectrum Analyser to find out how it builds its back buffer up.
If you're not interested in the workings of the game but just playing it then a nice byproduct is POKEs to make the game easier, harder, or just different:
-
Infinite Credits
POKE 39998,166 -
Infinite Time
POKE 39937,0 -
1 Hit To Capture
POKE 46351,62 -
Infinite Turbos
POKE 45221,0 -
Affect Car Spawn Rate
POKE 23834,<spawn rate> --20is the default for Stage 1.10would spawn twice as often. -
Set Level Colour
POKE 23796,<attribute byte> --112is black on yellow, as for Stage 1.96would give black on green.
POKE 23797,<attribute byte> -
Increase Maximum Speed The word at 45461 sets the non-boosted maximum speed. The default internal value is 360 (which gives a max speed readout of 294). So you could try 450:
POKE 45461,194
POKE 45462,1
To restore the default of 360:
POKE 45461,104
POKE 45462,1
(Turbo speed is 695).
- Wider Roads (although they lean leftwards...)
POKE 52382,169--217is the default.237would give thin roads.
Spectrum Computing forums thread: https://spectrumcomputing.co.uk/forums/viewtopic.php?p=113633
Play Chase H.Q. online: http://torinak.com/qaop#!chasehq
My previous disassembly project: https://github.com/dpt/The-Great-Escape
