SkoolKit 9.6 has been released. To get a copy, please head over to the download page, the Python Package Index, or GitHub.

Although tap2sna.py has recently transformed into something that’s actually easy to use (thanks to the introduction of a Z80 instruction set simulator in SkoolKit 8.7), it still lacks a couple of abilities that would make it even more useful: loading from two tape files (as when side 1 and side 2 are in separate files), and simulating keypresses while a tape is loading. Until now, that is.

If you do happen to be trying to load one of those annoying games that require both sides of a tape that are in two different files, you can now do the natural thing and supply each filename as an argument:

$ tap2sna.py side1.pzx side2.pzx

And if you happen to be trying to load one of those even more annoying games that require you to stop the tape for no good reason at some point in the middle of a load, and then press a key and start the tape again to continue loading, the new --press option is there to help. For example:

$ tap2sna.py --press 5:ENTER more-annoying-game.tap

This will stop the tape when block 5 is reached, simulate pressing the ENTER key until the row containing that key has been read, and then resume playing the tape. If more than one keypress is required before the tape can resume playing, don’t worry: --press can simulate as many as are needed.

And as a bonus, if you happen to be trying to load one of those annoyingest games of all that require you to stop the tape at some point and do some fast-forwarding before continuing the load - yes, such games, though rare, do exist - then the new --tape-skip option comes to the rescue. It can fast forward over one or more blocks like this:

$ tap2sna.py --tape-skip 4-5 annoyingest-game.tzx

In other tape-related news, 12 new tape-sampling loop accelerators have been added, and tap2sna.py can now accelerate both types of ‘DEC A’ delay loop (the more common one that ends with ‘JR NZ’, and the less common one that ends with ‘JP NZ’) at the same time, instead of just one or the other exclusively.

But if all of that fails to capture your interest, perhaps SkoolKit 9.6’s new component - the RST handler - can fail to capture it even more. As its name suggests, it handles RST instructions, which means it can alert its consumer - sna2ctl.py or sna2skool.py - that a byte or word argument follows. To activate the RST handler, use the new --handle-rst option:

$ sna2ctl.py --handle-rst --org 0 some-rom.bin

By default, the stock RST handler recognises the byte argument of ‘RST $08’ instructions, and nothing else - which is useful (if at all) only for the 48K ROM. But it can be configured to recognise the byte or word argument of any RST instruction by setting the RSTHandlerConfig configuration parameter in the [skoolkit] section of skoolkit.ini, in case you’re interested in disassembling some other ROM.

When used with sna2ctl.py, the RST handler inserts B (byte) and W (word) sub-block directives as appropriate immediately after the RST instructions of interest. But if you want to bypass the control file stage and go straight to disassembling a ROM image, you can activate the RST handler thus:

$ sna2skool.py --handle-rst --org 0 some-rom.bin

When used with sna2skool.py, the RST handler inserts DEFB and DEFW statements as appropriate immediately after the RST instructions of interest. Note that the RST handler only needs to be invoked once on any ROM image or snapshot; if you use it with sna2ctl.py to generate a control file, and then again with sna2skool.py on that same control file, confusion will result - both for sna2skool.py and for you. You have been warned.

For details of the other new features that have nothing to do with loading tapes or recognising the arguments of RST instructions, visit the changelog. Once you’re done there, grab a copy of 9.6 and see how much quicker tap2sna.py is now at loading Basil or Lone Wolf.