bin2tap.py converts a binary file produced by an assembler (see Supported assemblers) into a TAP file that can be loaded into an emulator. For example:
$ ./bin2tap.py game.bin
will create a file called game.tap. By default, the origin address (the address of the first byte of code or data) and the start address (the first byte of code to run) are set to 65536 minus the length of game.bin. These defaults can be changed by passing options to bin2tap.py. Run it with no arguments to see the list of available options:
Usage: ./bin2tap.py [options] file.bin
Options:
-o ORG Set the origin (default: 65536 - length of file.bin)
-s START Set the start address to JP to (default: ORG)
-t TAPFILE Set the TAP filename (default: file.tap)
skool2asm.py converts a skool file into an ASM file that can be fed to an assembler (see Supported assemblers). For example, to create an ASM file for Skool Daze, open a terminal window, change to the directory containing SkoolKit, and enter this command:
$ ./skool2asm.py src/sd.skool > sd.asm
A few seconds later, an ASM file for Skool Daze will be ready: sd.asm.
To create an ASM file for Back to Skool:
$ ./skool2asm.py src/bts.skool > bts.asm
skool2asm.py supports many options; run it with no arguments to see a list:
Usage: ./skool2asm.py [options] <skoolfile>
Options:
-q Be quiet (don't show timings)
-v Be verbose (show instruction substitutions)
-w Suppress warnings
-e Write processed lines to stderr (implies -w)
-d Use CR+LF to end lines (default line terminator is LF)
-t Use tab to indent instructions (default indentation is 2 spaces)
-l Use lower case (default is upper case, e.g. 'LD A,(HL)')
-iN Set instruction field width to N (default=23)
-fN Apply fixes:
N=0: None (default)
N=1: @ofix only
N=2: @ofix and @bfix
N=3: @ofix, @bfix and @rfix (implies -r)
-c Create default labels for unlabelled instructions
-s Use safe substitutions (@ssub)
-r Use relocatability substitutions too (@rsub) (implies -f1)
See ASM modes and directives for a description of the @ssub and @rsub substitution modes, and the @ofix, @bfix and @rfix bugfix modes.
skool2ctl.py converts a skool file into a control file. For example:
$ ./skool2ctl.py src/sd.skool > sd.ctl
In addition to block types and addresses, sd.ctl will contain block titles, block descriptions, registers, mid-block comments, block end comments, sub-block types and addresses, and instruction-level comments. However, note that ASM directives are lost in the conversion.
To limit the types of information included in the control file, run skool2ctl.py using the -w option:
Usage: ./skool2ctl.py [options] <skoolfile>
Options:
-wX Write only these elements, where X is one or more of:
b = block types and addresses
t = block titles
d = block descriptions
r = registers
m = mid-block comments and block end comments
s = sub-block types and addresses
c = instruction-level comments
skool2html.py converts a skool file (and its associated ref file, if one exists) into a browsable disassembly in HTML format.
By default, skool2html.py operates on the skool and ref files for Skool Daze and Back to Skool. Thus:
$ ./skool2html.py disassemblies
will generate the HTML versions of the Skool Disassemblies in the disassemblies directory (which will be created if it doesn’t already exist).
To make it operate on another skool file, use the -f option. For example:
$ ./skool2html.py -f game.skool game-disassembly
will convert the file game.skool into a bunch of HTML files in the game-disassembly directory. If game.ref also exists, that will be used to provide further information to the conversion process.
To make skool2html.py operate on a ref file, use the -r option. For example:
$ ./skool2html.py -r game.ref game-disassembly
In this case, the skool file declared in the [Config] section of game.ref will be used; if no skool file is declared in game.ref, game.skool will be used if it exists.
skool2html.py supports several other options; run it with no arguments to see a list:
Usage: ./skool2html.py [options] <output-dir>
Options:
-V Show SkoolKit version number and exit
-q Be quiet
-s Write Skool Daze files only
-b Write Back to Skool files only
-r FILE Use this ref file
-f FILE Use this skool file
-wX Write only these files, where X is one or more of:
b = Bugs
C = Changelog
c = Character buffers
d = Disassembly files
G = Game status buffer
g = Graphics files
h = Home page
i = Disassembly index
k = Keypress table
L = Lessons and personal timetable index
m = Memory maps
o = Other code
p = Pokes
t = Trivia
y = Glossary
For example, to write only the disassembly files and memory maps for Skool Daze:
$ ./skool2html.py -s -wdm disassemblies
sna2skool.py converts a binary (raw memory) file or a 48K SNA or Z80 snapshot into a skool file. For example:
$ ./sna2skool.py game.z80 > game.skool
Now game.skool can be converted into a browsable HTML disassembly using skool2html.py, or into an assembler-ready ASM file using skool2asm.py.
sna2skool.py supports several options; run it with no arguments to see a list:
Usage: ./sna2skool.py [options] file.[sna|z80|bin]
Options:
-c FILE Use FILE as the control file (default is file.ctl)
-g FILE Generate a control file in FILE
-s ADDR Specify the address at which to start disassembling
-o ADDR Specify the origin address of file.bin (default: 65536 - length)
-t Show ASCII text in the comment fields
-r Suppress addition of comments listing entry point referrers
-n N Set the max number of bytes per DEFB statement to N (default=8)
-m M Group DEFB blocks by addresses that divide M
-z Write bytes with leading zeroes in DEFB statements
-l L Set the max number of characters per DEFM statement to L (default=66)
-a Output plain ASM
Although sna2skool.py can be used to create an ASM file directly from a snapshot by using the -a option, in general it is a better idea to use sna2skool.py to create a skool file first, and then use skool2asm.py to convert the skool file to an ASM file (because skool2asm.py provides many formatting options that sna2skool.py doesn’t, and it will automatically reduce skool macros).