Spectrum game disassembly toolkit

In your 0xFACE

@keep it real

SkoolKit 6.2 has been released. As always, copies are available from the download page, the Python Package Index, the Ubuntu PPA, and the Fedora copr repo.

Back in SkoolKit 2.0.6, you may remember, support for hexadecimal numbers began to appear, with control files being the first to allow numbers in either base 10 or base 16. Since then, hexadecimal has established a firm foothold as a first class number base in SkoolKit’s feature set: 2.1.1 saw and gain the ability to convert a disassembly to hexadecimal, and in 4.3 it became possible to render address anchors and disassembly page filenames in hexadecimal. Today, 6.2 continues that tradition by adding support for hexadecimal numbers to SkoolKit’s command options wherever an address, byte, length, step, offset or range limit value is expected. So, for example, you can now do stuff like this:

$ --start 0x8000 --end 0xf800 game.z80 > game.skool
$ --poke 0x9f43,0xff --reg pc=0xc33f game.z80 hacked.z80

In other command-related news, has picked up the --reg and --state options (for setting the value of a register or hardware state attribute). And can now read a binary (raw memory) file when the --binary option is used, and with a specific origin address when the --org option is used. And, and all now sport the --show-config option (for showing configuration parameter values).

Enough about commands. Among the ASM directives, @nolabel is now processed in HTML mode. (This change should have been made back in SkoolKit 3.4 - when support was added for labels in HTML mode - but better late than never.) And the @keep directive is now also applied to instructions that have been replaced by an @isub, @ssub or @rsub directive. This change could affect the output of on an existing disassembly, preventing the substitution of a label for an address in @isub, @ssub or @rsub mode. For example, in SkoolKit 6.1 and earlier, the instruction at 31898 below would be replaced by LD DE,31861%256*256+62 in @ssub mode, and then ‘31861’ would be replaced by a label (if there is one) because the @keep directive is not applied in @ssub mode:

@ssub=LD DE,31861%256*256+62
31898 LD DE,30014

But in 6.2, this @keep directive (originally intended to prevent a label from being substituted for the value ‘30014’) is applied in @ssub mode, and prevents a label from being substituted for ‘31861’. The fix is to use the @keep directive’s new ability to specify the values to keep:

@ssub=LD DE,31861%256*256+62
31898 LD DE,30014

Now, in @ssub mode, ‘31861’ will be replaced by a label, as desired.

And that’s it for the main new features in this release. For details of all the other changes, the changelog is at your service.

Horace and the disassembly

Arriving just in time for Christmas, a new disassembly has just been added to the gallery here at The complete Hungry Horace RAM disassembly.

This disassembly began life as a bare-bones control file back in SkoolKit 4.1.1 (version 20140920), and was recently ‘completed’ by adding annotations to all the routines, data blocks and text blocks. There are no ‘Bugs’, ‘Pokes’ or ‘Trivia’ pages yet, but you can expect them to appear in the next update.

Of course, the disassembly is also available in downloadable form, and a hexadecimal version can be browsed at GitHub too. There’s never been a better time to find out what makes Horace and the park guards tick!

Skool files to screenshots

SkoolKit 6.1

SkoolKit 6.1 has been released. As is the custom on occasions like this, copies are available from the download page, the Python Package Index, the Ubuntu PPA, and the Fedora copr repo.

The main new feature in this release is support for changing the default behaviour of, and via a configuration file: skoolkit.ini. For example, if you always use the --hex option with, you could place the configuration parameter Base=16 in the [skool2asm] section in skoolkit.ini, and save some time by never having to type --hex on the command line again. But what if you want to run without the implied --hex option once in a while? That’s where the new --ini option comes in: just run --ini Base=0 and it will override the Base=16 parameter in skoolkit.ini.

One other benefit of having configuration in skoolkit.ini is that you can now define, via various parameters, the format of the comments that uses to list the callers of entry points in routines when generating a skool file from a control file, and also the format of the titles it uses for untitled blocks. As far as I’m aware, this removes the last bit of hard coded text from the SkoolKit codebase, and leaves it to the discretion of the user to define.

Next up comes support for arithmetic expressions in instruction operands when converting base and assembling. For example, in earlier versions, LD A,32768/256 would be (partially) converted to LD A,$8000/256 when the --hex option of or was used, but now it is fully converted to LD A,$8000/$100. Also in earlier versions, would fail to assemble LD A,32768/256, but now it handles such instructions just fine.

And finally among the noteworthy new features, can now read skool files. This means that if you’ve mislaid the snapshot that you originally used to generate your skool file, you need not worry: can automatically build a snapshot from your skool file on the fly so that you don’t have to.

For details of all the other changes and bugs fixed in this release, check the changelog. After that, go grab a copy of 6.1, create your ideal skoolkit.ini, and enjoy the brevity of all your, and commands from here on out.