Let's talk about PZX
SkoolKit 9.3 has been released. To get a copy, please head over to the download page, the Python Package Index, or GitHub.
As if introducing support for RZX files in SkoolKit 9.2 wasn’t enough, 9.3 continues on the new file format bandwagon by introducing support for PZX files. In case you’re not aware, PZX is a tape file format that’s much simpler than TZX, and leaves no room for ambiguity about where one pulse ends and the next begins. Which is quite important for a computer whose tape-loading routines are all about those ‘edges’ between pulses (and in some cases about whether those pulses are high or low, another topic on which PZX is unambiguous).
So now that you are aware, you will no doubt want to convert your entire
collection of TAP and TZX files to PZX format. And you can do that safe in the
knowledge that SkoolKit 9.3 has you covered: tapinfo.py
can show information
on the blocks in a PZX file, and tap2sna.py
can LOAD that same PZX file. On
top of that, bin2tap.py
can now write PZX files too.
In other news, sna2skool.py
has finally gained the ability to disassemble
some of the more obscure ‘undocumented’ instructions in the Z80 assembly
language, such as ‘IN F,(C)’, ‘OUT (C),0’ and ‘RLC (IX+d),B’. It can also now
disassemble ED6B0000 to ‘LD HL,(0)’ if you want it to, along with a batch of
other variant opcode sequences, such as ED4E to ‘IM 0’, or ED4C to ‘NEG’. This
new feature is disabled by default, though, for good reasons. One is that your
assembler might not recognise some of these instructions, which will be a
problem if you want to run it on the output of skool2asm.py
. Another is that
your assembler probably won’t assemble instructions with variant opcode
sequences back to the original byte values.
But if you want to enable this feature despite these dangers, you can set the
Opcodes
configuration parameter for sna2skool.py
to one or more of the
following values in a comma-separated list:
ED63
- LD (nn),HLED6B
- LD HL,(nn)ED70
- IN F,(C)ED71
- OUT (C),0IM
- IM 0/1/2 variantsNEG
- NEG variantsRETN
- RETN variantsXYCB
- RLC (IX+d),B etc.ALL
- all of the above
One other potential danger with instructions that have variant opcode sequences
is that skool2asm.py
and skool2html.py
won’t assemble them back to their
original byte values, thus creating a discrepancy between the internal memory
snapshot derived from the skool file and the snapshot that was used to create
the disassembly. To work around this, the new @bytes
directive can be used to
remove any ambiguity. Whenever sna2skool.py
encounters an instruction with a
variant opcode sequence, it will automatically insert a @bytes
directive. For
example:
@bytes=$ED,$4E
$8000 NEG ; This assembles to ED4E (not ED44)
On a completely different note (pun intended), trace.py
can now write a WAV
file after code execution has completed. This means, for example, that you
could create a WAV file of the Fairlight theme tune like this:
$ tap2sna.py https://worldofspectrum.net/pub/sinclair/games/f/Fairlight48V1.tzx.zip fairlight.z80
$ trace.py --stop 49217 fairlight.z80 fairlight.wav
And that’s just some of the news. Information on the the other new features and bug fixes in SkoolKit 9.3 can be found in the changelog. After you’re done reading that, grab a copy of 9.3 and unleash it on your new collection of PZX files.