Your spectrum game is created using the fase.bat file as we discussed earlier, but the actual batch file calls a number of programs which build each individual section. This entry is a summary of these programs.
So I’m going to drill into the ../lib/bin directory and grab the options from the programs found in it.
There are 10 programs here with no documentation
Time to change that, at least for now.
GenTape.exe
GenTape v0.21, a Tape File Generator by Antonio Villena, 12 May 2014
GenTape [] []
[ basic
| hdata
| data| pilot| pulse ..| pause
| pure
| turbo
| stop48
| plug-xxx-N .. ]
Target file, between TAP, TZX or WAV file
Up to 10 chars name between single quotes or in hexadecimal
In decimal, first BASIC line to execute
In hexadecimal, address of the binary blockHexadecimal string or filename as data origin of that block
Length of zero/one/syncs/pilot pulses at 3.528MHz clock
Duration of pilot/pause after block in milliseconds
Number of pulses in the sequence of pulses
Length of X-th pulse in the sequence at 3.528MHz clock
External generator, must exists xxx.exe and accept N params
stop48 Only TZX. Signal end of tape on 48K machines
WAV options:
Sample frequency, 44100 or 48000. Default is 44100
Possible values are: mono (default), stereo or stereoinv
GenTmx.exe
GenTmx v1.11, MAP file (Mappy) to TMX (Tiled) by Antonio Villena, 11 Nov 2013
Map2Tmx
Screen width
Screen height
Generated output file
Example: GenTmx 5 4 15 10 map.tmx
Png2Rcs.exe
Png2Rcs v1.11. Image to ZX Spectrum RCS screen by AntonioVillena, 11 Nov 2013
Png2Rcs [output_attr]
256×64, 256×128 or 256×192 png file
ZX spectrum output in RCS format
If specified, attributes here
Example: Png2Rcs loading.png loading.rcs
sjasmplus.exe
sjasmplus [options] sourcefile(s)
Option flags as follows:
–help Help information (you see it)
-i or -I or –inc=
Include path
–lst= Save listing to
–lstlab Enable label table in listing
–sym= Save symbols list to
–exp= Save exports to (see EXPORT pseudo-op)
–raw= Save all output to ignoring OUTPUT pseudo-ops
Note: use OUTPUT, LUA/ENDLUA and other pseudo-ops to control output
Logging:
–nologo Do not show startup message
–msg=error Show only error messages
–msg=all Show all messages (by default)
–fullpath Show full path to error file
Other:
–reversepop Enable reverse POP order (as in base SjASM version)
–dirbol Enable processing directives from the beginning of line
–dos866 Encode from Windows codepage to DOS 866 (Cyrillic)
step1.exe
step2.exe
step3.exe
These 3 provide no DOS documentation or help
TmxCompress.exe
TmxCompress v1.12b, Map compressor by Antonio Villena, 18 Nov 2013
TmxCompress
Origin .TMX file
Generated binary compressed map
xm2tritone.exe
xm2tritone converter by Shiru (shiru@mail.ru) 03’11
Usage: xm2tritone filename.xm filename.asm
zx7b.exe
ZX7 Backwards compressor v1.0 by Einar Saukas/AntonioVillena, 28 Dec 2013
zx7b
Raw input file
Compressed output file
Example: zx7b Cobra.scr Cobra.zx7b
With that out of the way, kinda, we look at our toolchain build order in our batch file.
*note it’s a little more complex than what is listed below.
Png2Rcs is called first, converting the loading screen from a PNG
zx7b is then called to compress both the screen data and the color attributes.
GenTmx is called to convert a mappy file to a TMX file.
TmxCompress is called to compress the maps
sjasmplus is then called to work some assembler magic for the music player.
Zx7b is called to compress the music player
xm2tritone is another player, I believe for 48k beeper music.
Step1.exe is called, however, this program is not documented, so it must be magical. Looking with my handy hex editor, it looks as if this deals with graphics.
sjasmplus is then called again for the music player, perhaps for a second song
Zx7b is called to compress the music player
sjasmplus is called to work on files engine0.asm, engine1.asm and engine2.asm
step2.exe is called. Again, no documentation, but it appears to deals with binaries of maps, music and graphics.
Zx7b is called to compress block1.bin and block2.bin.
The program is compiled with
zcc +zx -zorg=32772 -O3 -vn main.c -o build\main.bin -lndos
which creates a bin file, almost ready to use but not quite yet.
zx7b build\main.bin build\main.zx7b
is now called, compressing the bin file even smaller.
step3.exe is called an undocumented program
sjasmplus is called to create a loader with the command
sjasmplus asm\loader.asm
Finally, the build is created with the series of commands
if exist build\player.zx7b (
lib\bin\gentape game.tap ^
basic 'game' 0 build\loader.bin ^
data build\engine.zx7b ^
data build\player.zx7b
) else (
lib\bin\gentape game.tap ^
basic 'game' 0 build\loader.bin ^
data build\engine.zx7b
)
Rather boring notes below
when you compile, the following files are altered, meaning they are the output of the build
fase gfx
loader.bin
nulo.bin
main.bin
ndefload.asm
main.zx7b
engine.zx7b
zcc_opt.def
engine2.bin
engine1.bin
engine0.bin
bullet.bin
block2.bin
block1.bin
temp.rcs
loading.rcs
define.h
temp.atr
loading.atr
music.asm
defmap.asm
defload.asm
define.asm
temp.rcs.zx7b
temp.atr.zx7b
player.zx7b
music.zx7b
loading.rcs.z7b
loading.atr.zx7b
fase config
engine2.bin
engine1.bin
engine0.bin
block2.bin
block1.bin
define.h
defload.asm
block2.zx7b
block1.zx7b
as well as
main.zx7b
engine.zx7b
nulo.bin
main.bin
loader.bin
ndefload.asm
zcc_opt.def