Spectrum game disassembly toolkit

Plotting along

SkoolKit 8.3 has been released. To get a copy, please head over to the download page, the Python Package Index, the Ubuntu PPA, or the Fedora copr repo.

For the first time since SkoolKit 2.0.5, this release brings with it a new image macro: #PLOT. Unlike the other image macros, though, #PLOT is less (in fact, not at all) about building an image from graphic data, and more (in fact, totally) about modifying an existing frame that’s already been built. With it you can set, reset or flip a single bit in a frame, which enables you to fix it up however you like before writing the image file. This provides an alternative to modifying the graphic data itself (using #POKES) before creating the frame in the first place. And I suppose for dedicated artists who prefer drawing from scratch, it offers the opportunity to paint pixels wherever they like on a completely blank frame.

Still in the image macro department, #UDGARRAY* now has the ability to specify, for each frame in an animated image, the coordinates at which to draw that frame (relative to the top-left corner of the first frame). This is particularly useful in images where only a small region is actually animated, and the second or later frames can therefore be smaller than the first.

Elsewhere in the macro department, every macro that takes integers anywhere in its parameter string now accepts replacement fields where those integers are expected. In 8.2, only the SMPL macros accepted replacement fields, but now that all the other macros do too, there’s no longer any need to use #EVAL (if that’s what you were doing) to get around that deficiency.

So much for macros, image or otherwise. 8.3 does of course boast other new features, such as the ability of to show the entire contents of header and data blocks in a TAP or TZX file (instead of just the first few and last few bytes in each block, as teasingly done in earlier versions). For details on that and the other changes in this release, head over to the changelog. And after that, why not whip out your artist’s beret and paintbrush and give #PLOT a whirl?

A node here, an edge there

SkoolKit 8.2 has been released. Please pop along to the download page, the Python Package Index, the Ubuntu PPA, or the Fedora copr repo to pick up a copy (no mask required).

First up in the list of new features worth talking about is the ability of to produce call graphs. Supplied with a snapshot and a control file, it will spit out a DOT file that can be converted into an image by Graphviz (for example). So if you’ve ever longed for a pictorial representation of which routine calls what in your favourite game, 8.2 might be just what you were looking for.

Still on the subject of, that command has also picked up the ability to read raw memory files, and to read configuration from skoolkit.ini. And still on the subject of call graphs, the new @refs directive (not to be confused with the old !refs skool directive in SkoolKit 1.x) may come in handy for declaring relationships between routines that cannot deduce on its own, i.e. where one indirectly jumps to another.

Elsewhere, the family of SMPL macros has grown by three: #LET defines an integer or string variable that can be accessed via a replacement field; #FORMAT performs a Python-style string formatting operation on a format string containing replacement fields; and #DEFINE defines a new skool macro.

“But we already have @replace for creating new macros!” I hear some of you cry. That is indeed true, and you may carry on using @replace for that purpose, if you wish. But I would urge you to consider using #DEFINE as well, for two reasons in particular. First, with #DEFINE you can define a new macro named #ONE, say, and then define another new macro (#TWO, say) in terms of #ONE. (Try doing that with @replace; it’s tricky, if not impossible.) Second, macros defined by #DEFINE accept replacement fields in their integer arguments, which means you can easily use variables defined by #LET in their parameter strings. If that’s not enough to at least make you want to learn more about the power of #DEFINE, then I don’t know what is.

Finally, the image macros (#FONT, #SCR, #UDG and #UDGARRAY, in case you’d forgotten) now have tindex and alpha parameters for specifying an alternative transparent colour and opaqueness factor on a per-image basis (overriding the defaults). Meaning that even unmasked images can now be given a transparent background.

Of course there are other changes in this release, but we’re out of time here, so you should head over to the changelog if you’re interested. When you’re done, I strongly recommend taking #DEFINE for a spin, and seeing whether it really can put @replace to shame.

All the modes

SkoolKit 8.1 has been released. Whenever you’re ready, please head over to the download page, the Python Package Index, the Ubuntu PPA, or the Fedora copr repo to pick up a copy.

After the fanfare of 8.0, SkoolKit 8.1 is a relatively quiet release with some modest enhancements across the board. First on that list of enhancements is the ability of to parse a skool file in @rsub or @rfix mode (via the aptly named --rsub and --rfix options). So now can parse a skool file in any of the possible modes, which means you may no longer have to reach for an assembler in order to build a bugfixed TAP file of your favourite game. Well, that’s the plan, anyway.

Second on the arbitrarily ordered list of enhancements is again, this time with its new --data option, which makes it process @defb, @defs and @defw directives. This enables manipulation of the memory snapshot derived from a skool file beyond the ability of any assembler operating on the output of Perhaps now the only reason to reach for an assembler is to place it in a drawer, out of the way of the actually useful tools cluttering your desktop.

Still on the subject of @defb, @defs and @defw, these directives no longer require an address parameter. If that parameter is omitted, it defaults either to the address of the next instruction, or to the address immediately after the last byte of the previous @defb, @defs or @defw directive attached to the same instruction. After you’ve let that idea sink in, I hope you’ll agree that it makes sense.

Last on the list of enhancements I will be giving air time to today is the humble register name field (in the register section of a skool file entry header) and its ability to contain whitespace and skool macros (which will be expanded). In earlier versions this field was limited to a single, space-free sequence of characters in which macro-like tokens were ignored. But now, by the use of a special syntax, you can go crazy and place such strings as B, C or #R49152 there.

To see what other changes are lurking in this release, I suggest giving the changelog a quick scan. After that, why not grab a copy of 8.1 and see if that trusty assembler of yours really can be put to bed?