Ref files
In the src subdirectory there are several ref files containing data
required to generate the non-code parts of the HTML versions of the
disassemblies:
The ref files are formatted into sections separated by section names inside
square brackets, like this:
The contents of each section found in the ref files are described below.
[AnimatoryStates]
The AnimatoryStates section contains descriptions of the animatory states
in the game. These descriptions are used on the ‘Animatory states’ page. Each
line in the section has the form:
where:
- N is the animatory state number (0-127)
- description is the description of the animatory state
One other line that may appear is:
which defines the text that will appear at the top of the ‘Animatory States’
page.
[AnimatoryStateTileInfo]
The AnimatoryStateTileInfo section contains the HTML source for the text at
the top of the ‘Animatory state tiles’ page.
[Bug:*:*]
Each Bug:*:* section defines an entry on the ‘Bugs’ page. The section names
and contents take the form:
[Bug:anchor:title]
First paragraph.
Second paragraph.
...
where:
- anchor is the name of the HTML anchor for the entry
- title is the title of the entry
Paragraphs should be separated by blank lines.
[Changelog:*]
Changelog:* sections appear only in changelog.ref. Each one defines an
entry in the changelog for the Skool Disassemblies. The section names and
contents take the form:
[Changelog:title]
Intro text.
First top-level item.
First subitem.
Second subitem.
First subsubitem.
Second top-level item.
...
where title is the title of the entry, and the intro text and top-level
items are separated by blank lines. Lower-level items are created by using
indentation, as shown.
If the intro text is a single hyphen (-), it will not be included in the
final HTML rendering.
[Characters]
The Characters section contains the names of the characters in the game.
Each line has the form:
where:
- N is the character’s number
- name is the character’s name
The information in this section is used on the lessons pages, the ‘Personal
timetables’ page, and the ‘Character buffers’ page.
[CharBuf:*]
Each CharBuf:* section defines an entry for a character buffer byte (or set
of bytes) on the ‘Character buffers’ page. The section names and contents take
the form:
[CharBuf:bytes]
Description 1.
Description 2.
...
where bytes is some text indicating the bytes being described
(e.g. 105,106), and the individual descriptions are separated by blank
lines.
[Config]
The Config section contains configuration parameters in the format:
Recognised parameters are:
- SkoolFile - the name of the main skool file to use if not given on the
skool2html.py command line; if not specified, the
skool file with the same base name as the ref file will be used
- SkoolClass - the name of the Python class to use for the game; if not
specified, the generic SkoolGame will be used
- SkoolWriterClass - the name of the Python class to use for writing the
HTML disassembly of the game; if not specified, the generic SkoolWriter
will be used
- GameDir - the root directory of the game’s HTML disassembly; if not
specified, the base name of the skool or ref file given on the
skool2html.py command line will be used
[Fact:*:*]
Each Fact:*:* section defines an entry on the ‘Trivia’ page. The section
names and contents take the form:
[Fact:anchor:title]
First paragraph.
Second paragraph.
...
where:
- anchor is the name of the HTML anchor for the entry
- title is the title of the entry
Paragraphs should be separated by blank lines.
[Features]
The Features section contains parameters in the form:
where:
- name is the name of a feature that may be included in the HTML
disassembly
- value is 1 if the feature should be included, 0 otherwise
Recognised feature names are:
- AnimatoryStates - the ‘Animatory states’ page
- AnimatoryStateTiles - the ‘Animatory state tiles’ page
- CharacterBuffers - the ‘Character buffers’ page
- Graphics - the ‘Other graphics’ page
- GraphicGlitches - the ‘Graphic glitches’ page
- InitialAnimatoryStates - the ‘Initial animatory states and locations’
page
- KeypressTable - the ‘Keypress table’ page
- Lessons - the lessons pages and the ‘Personal timetables’ page
- PlayArea - the ‘Play area’ page
- PlayAreaTiles - the ‘Play area tiles’ page
If there is no entry for a given feature in this section, it will not be
included in the HTML disassembly.
[Font]
The Font section appears only in csc.ref; it defines the font that will
be used to print the numbers on the play area image. Each line in the section
has the form:
N=byte1,byte2,byte3[,byte4]
where:
- N is the ASCII code of a digit (48-57)
- byte1, byte2 etc. define the bitmap for the font character; each byte
value corresponds to a pixel column in the bitmap
If the numbers on the play area image in the Contact Sam Cruise disassembly
look familiar, that’s because they were copied from the font in the Skool
games.
[Game]
The Game section contains parameters in the form:
Universally recognised parameter names are:
- CharBufDesc - the text that appears at the top of the ‘Character buffers’
page
- CharBufferBaseByte - the LSB of the address of the first byte of each
character’s buffer
- FontAddress - the base address of the skool font
- Game - the name of the game
- LogoAddress - the base address of the game logo graphic data
- MaxCharacter - the highest character number in the game
- MaxLesson - the highest lesson number in the game
- MinCharacter - the lowest character number in the game
- MinLesson - the lowest lesson number in the game
- SkoolWidth - the width of the skool (in character squares)
- TapAddressTable - the address of the data table containing the command
list addresses
- TimetableAddress - the address of the main timetable
- TitlePrefix - the prefix to use before the name of the game in the title
of the disassembly (default: ‘The complete’)
- TitleSuffix - the suffix to use after the name of the game in the title
of the disassembly (default: ‘RAM disassembly’)
Parameter names recognised only by the ContactSamCruise class (and thus
used only in csc.ref) are:
- LogoAttr - the attribute byte to use for the game logo
- LogoData - the graphic data bytes for the game logo
[Glossary:*]
Each Glossary:* section defines an entry on the ‘Glossary’ page. The
section names and contents take the form:
[Glossary:term]
Definition.
where term is the term being defined in the entry. The definition should be
a single paragraph.
[GraphicGlitch:*:*]
Each GraphicGlitch:*:* section defines an entry on the ‘Graphic glitches’
page. The section names and contents take the form:
[GraphicGlitch:anchor:title]
First paragraph.
Second paragraph.
...
where:
- anchor is the name of the HTML anchor for the entry
- title is the title of the entry
Paragraphs should be separated by blank lines.
[Info]
The Info section contains release and copyright information. Each line has
the form:
where name is one of the following:
- Copyright - the text written to the bottom line of the footer of every
page of the HTML disassembly; its intended purpose is to define a copyright
message
- Release - the text written to the top line of the footer of every page of
the HTML disassembly; its intended purpose is to define a message indicating
the release name and version number
[KeypressRoutines]
The KeypressRoutines section defines the purposes of the keypress handling
routines as they appear on the ‘Keypress table’ page. Each line in the section
takes the form:
where:
- address is the address of the keypress handling routine
- purpose is the purpose of the routine (e.g. ‘Left’, ‘Right’)
[KeytableDetails]
The KeytableDetails section contains the HTML source for the text at the
top of the ‘Keypress table’ page.
[Lessons]
The Lessons section defines the names of the lessons as they appear on the
lesson pages and the lesson index page. Each line has the form:
where:
- N is the lesson number
- name is the name of the lesson
[MapDetails]
The MapDetails section defines the text (if any) that appears at the top of
the memory map pages. Each line has the form:
where X is one of:
- d (data memory map)
- r (routines memory map)
- t (messages memory map)
[OtherCode:*]
Each OtherCode:* section defines a secondary disassembly that will appear
under ‘Other code’ on the main disassembly home page. The section names take
the form:
where asm_id is a unique ID for the secondary disassembly. The unique ID
may be used by the #R macro when referring to routines or data
blocks in the secondary disassembly from another disassembly.
Each OtherCode:* section contains parameters in the form:
Recognised parameters are:
- Header - the header text that will appear on each routine or data block
disassembly page in the secondary disassembly
- Index - the filename of the home page of the secondary disassembly
- Path - the directory that will contain the secondary disassembly files
- Source - the skool file from which to generate the secondary
disassembly
- Title - the title of the secondary disassembly (as it will appear under
‘Other code’ on the main disassembly home page)
[Paths]
The Paths section defines the locations of the various files and
directories in the HTML disassembly. Each line has the form:
where:
- ID is the ID of the file or directory
- path is the path of the file or directory relative to the root directory
of the disassembly
Recognised file IDs and their default values are:
- AnimatoryStates - the ‘Animatory states’ page (default:
graphics/as.html)
- AnimatoryStateTiles - the ‘Animatory state tiles’ page (default:
graphics/astiles/astiles.html)
- Bugs - the ‘Bugs’ page (default: reference/bugs.html)
- CharacterBuffers - the ‘Character buffers’ page (default:
buffers/cbuffer.html)
- DataMap - the ‘Data’ memory map page (default: maps/data.html)
- Facts - the ‘Trivia’ page (default: reference/facts.html)
- GameIndex - the disassembly home page (default: index.html)
- GameStatusBuffer - the ‘Game status buffer’ page (default:
buffers/gbuffer.html)
- Glossary - the ‘Glossary’ page (default: reference/glossary.html)
- GraphicGlitches - the ‘Graphic glitches’ page (default:
graphics/glitches.html)
- Graphics - the ‘Other graphics’ page (default: graphics/graphics.html)
- InitialAnimatoryStates - the ‘Initial animatory states and locations’
page (default: graphics/asstart.html)
- Keys - the ‘Keypress table’ page (default: tables/keys.html)
- LessonIndex - the ‘Lessons’ page (default: lessons/index.html)
- Logo - the game logo image (default: images/logo.png)
- MemoryMap - the ‘Everything’ memory map page (default: maps/all.html)
- MessagesMap - the ‘Messages’ memory map page (default: maps/messages.html)
- PersonalTimetables - the ‘Personal timetables’ page (default:
lessons/timetables.html)
- PlayArea - the ‘Play area’ page (default: graphics/playarea.html)
- PlayAreaTiles - the ‘Play area tiles’ page (default:
graphics/patiles/patiles.html)
- Pokes - the ‘Pokes’ page (default: reference/pokes.html)
- RoutinesMap - the ‘Routines’ memory map page (default:
maps/routines.html)
- SpeechBubble - the speech bubble image (default: images/bubble.png)
Recognised directory IDs and their default values are:
- AnimatoryStateImagePath - the directory in which animatory state images
(created by the #ASIMG macro) will be placed (default:
images/animatory_states)
- AnimatoryStateTilesPath - the directory in which animatory state tile
images (created by the #ASTILE macro) will be placed
(default: graphics/astiles)
- BoxImagePath - the directory in which box images (created by the
#BOX macro) will be placed (default: images/boxes)
- JavaScriptPath - the directory in which to store the JavaScript file
(default: ..)
- LessonsPath - the directory in which lesson pages will be created
(default: lessons)
- MutableImagePath - the directory in which mutable images (created by the
#MUTABLE macro) will be placed (default: images/mutables)
- PlayAreaTilesPath - the directory in which play area tile images (created
by the #PATILE macro) will be placed (default:
graphics/patiles)
- ScreenshotImagePath - the directory in which screenshot images (created
by the #SCR macro) will be placed (default: images/scr)
- SkoolImagePath - the directory in which play area images (created by the
#SKOOL macro) will be placed (default: images/skool)
- StyleSheetPath - the directory in which to store the CSS file (default:
..)
- UDGImagePath - the directory in which UDG images (created by the
#UDG macro) will be placed (default: images/udgs)
Other recognised IDs are:
- JavaScript - the base name of the JavaScript file to use (default:
skool.js)
- StyleSheet - the base name of the CSS file to use (default: style.css)
The JavaScript and CSS files will be searched for by name in the current
directory (from which skool2html.py is run) and the src subdirectory, and
copied to the directories defined by the JavaScriptPath and
StyleSheetPath parameters (see above).
[PlayAreaTileInfo]
The PlayAreaTileInfo section contains the HTML source for the text at the
top of the ‘Play area tiles’ page.
[Poke:*:*]
Each Poke:*:* section defines an entry on the ‘Pokes’ page. The section
names and contents take the form:
[Poke:anchor:title]
First paragraph.
Second paragraph.
...
where:
- anchor is the name of the HTML anchor for the entry
- title is the title of the entry
Paragraphs should be separated by blank lines.
[TapInfo]
The TapInfo section contains information about the command lists in the
game. This information is used while parsing a skool file to identify
references to routines used by the command lists.
The section contains four different types of entry: MaxTap, NumParams,
Controller and TerminalCommand.
A MaxTap entry has the form:
where N is the number of the highest-numbered command list. There should be
only one MaxTap entry in the section.
A NumParams entry has the form:
where:
- address is the address of a primary command routine (found in a command
list)
- N is the number of bytes taken up by the primary command’s parameters
There may be any number of NumParams entries in the section. If there is no
NumParams entry for a particular primary command routine, that command
routine is assumed to accept no parameters.
A Controller entry has the form:
where address is the address of a primary command routine that places the
address of a continual subcommand routine into a character’s buffer.
There may be any number of Controller entries in the section.
A TerminalCommand entry has the form:
TerminalCommand=address[,N]
where:
- address is the address of a primary command routine that terminates a
command list (that is, it cannot be followed by any further commands)
- N is the value that the primary command’s parameter (if any) must have
for the command to be terminal
There may be any number of TerminalCommand entries in the section.