SkoolKit

Spectrum game disassembly toolkit

SkoolKit 2.0: Now with rounded corners

Load? Save? Start? Where?

SkoolKit 2.0 is ready for release, so I have released it. Grab a copy from the download page.

It hasn’t been long since the previous release, but there have been many changes under the hood (as the saying goes). Before I list the main ones, though, a little history. SkoolKit 1.x supported four different types of macro and directive in skool and ref files (the ‘source’ files for a disassembly): skool macros, ASM directives, skool directives, and ref file macros. That’s a large number of macros and directives to remember the purposes of, differences between, and syntax for. SkoolKit 2.0, on the other hand, supports only two types of macro and directive: skool macros and ASM directives. All instances of and support for skool directives and ref file macros are gone. Trust me: you won’t miss them.

Continuing the quest for simplification, support for five (yes, five) of the skool macros has disappeared: #ASM, #LOAD, #SAVE, #START and #PT. But again, trust me: you won’t miss them. Anything they could do can now be done by the enhanced #R macro.

Simplification was not the only goal for 2.0, however. Clarification was high on the priority list as well. To that end, load.skool, save.skool and start.skool - which confusingly used to serve as source files for code in both Skool Daze and Back to Skool - have been split into separate files for each game. Also on the clarification front, the mysteries of the ref files have now been exposed: every section that may appear in a ref file is fully documented in the user manual.

In other documentation news, the user manual has been tidied up a bit. There’s now a separate page describing each of the commands that ship with SkoolKit: bin2tap.py, skool2asm.py, skool2ctl.py, skool2html.py, and sna2skool.py. And the ‘Disassembly DIY’ page - which was previously a rather feeble and disorganised attempt at explaining how SkoolKit could be used to develop a disassembly of some game other than Skool Daze or Back to Skool - should now be much more accessible and useful. It even includes tips on using skool2ctl.py to create a control file from a skool file, in case you ever (understandably) supposed that that was a completely pointless and backward thing to do.

No one complained about it - so I suppose no one actually noticed - but owing to a cockup by my incompetent release manager (that is, me) the loading code, save code, and startup code disassemblies for Contact Sam Cruise that were promised in 1.4 never actually made it into the tarball and zip archive. Let me dwell on this blunder no further other than to say that the omission has been rectified in SkoolKit 2.0.

Last and most definitely least - because SkoolKit is not just for skools any more, remember - the Skool Disassemblies have seen a minor update in celebration of the SkoolKit 2.0 release. As usual, you can browse these disassemblies online, or download a copy for offline viewing, or download SkoolKit and build a copy yourself. Full instructions are (still, despite the skool de-emphasis) included.

Well, that’s about it. Now go forth and disassemble.

SkoolKit: Not just for skools

Disassembling Miss Daisy

SkoolKit 1.4 is ready for release on this here internet. Get your copy from the download page.

As a reminder to those who have forgotten what it is, or as news to those who have never heard of it, SkoolKit is a collection of utilities that enable you to disassemble a Spectrum game (or, indeed, a non-game) into a format known as a skool file. And what’s the point of that? Well, from this skool file you can create a browsable disassembly in HTML format, or an assemblable disassembly in ASM format. So the skool file is - from start to finish as you develop it - the common ‘source’ for both the reader-friendly HTML version of your disassembly, and the developer- and assembler-friendly ASM version of your disassembly.

As a kind of showcase of SkoolKit’s capabilities, the source files for the Skool Disassemblies are included with it. As a reminder to those who have forgotten what they are, or as news to those who have never heard of them, the Skool Disassemblies are disassemblies of Skool Daze and Back to Skool, created with the help of SkoolKit. You can either browse the online HTML version of the Skool Disassemblies, or download a copy for offline viewing. Or you can download SkoolKit and build a copy yourself. Full instructions are included.

So what’s new in 1.4? First of all, some work has been done on the incomplete Contact Sam Cruise disassembly, which is also included with SkoolKit. Full disassemblies of the loading code (the code that loads the game), save code (the code that saves the game to tape), and startup code (the code that runs immediately after the game has loaded, and is later removed) have been added. Second of all, the Skool Disassemblies have been updated to version 20101111. For details of the changes to the Skool Disassemblies, see the changelog.

I think it goes without saying that the world needs more disassemblies of Spectrum games. So do your bit: download SkoolKit today and get disassembling.

Adventures with assemblers

pasmo is grate

Since SkoolKit 1.0 was released, I have touted it as a tool for creating ASM versions of the Skool Disassemblies, but have neglected to mention which assemblers (if any) will work with the ASM files that SkoolKit generates. Until now, that is. No longer do you have to stumble around the internet looking for assemblers that will give you a working version of Skool Daze from skool_daze.asm (or, indeed, a working version of Back to Skool from back_to_skool.asm). I’ve done that for you, you lazy basts.

For the impatient, the short answer is: use pasmo. It’s what I’ve always used, it’s simple to use, and it just works.

If pasmo is not your bag, however, then SjASMPlus works wells too. The only slightly awkward thing about SjASMPlus is that it doesn’t seem possible to feed it a plain ASM file and get a binary file out the other end. Instead you have to create a separate source file that INCLUDEs skool_daze.asm or back_to_skool.asm, and contains a SAVEBIN directive to save a binary file.

The third and final option is z80asm, the assembler that comes with z88dk. The two slightly awkward things about using z80asm are that (a) the plain versions of skool_daze.asm and back_to_skool.asm must be modified slightly first, and (b) the ORG address must be explicitly given on the z80asm command line (the ORG directive in the ASM file seems to be ignored).

For further details of these three assemblers and example usages, see the new documentation on supported assemblers. Also, don’t forget to grab the latest version (1.3.1) of SkoolKit.

In case you were wondering, I didn’t stop at these three assemblers, but they were the only three I found that worked with an acceptable minimum level of effort. I also looked at crasm and tpasm, but they seem unable to cope with DEF{B,M,S,W} directives, which rules them out. z80asm (not the one that comes with z88dk) doesn’t seem to like label arithmetic (such as DEFB LABEL%256). And sjasm gives a cryptic C++ error message every time I run it (on Debian squeeze).

So there it is. If you have been successfully using SkoolKit with an assembler other than pasmo, SjASMPlus, or z80asm (of z88dk), let me know, and I’ll mention it in the documentation.