2.1 KiB
2.1 KiB
Getting started
What's in the tarball
After extracting sprinter-c-v1.0-<host>.tar.gz you've got:
bin/sprinter-cc— the C → SprintEXE driver (a bash script).third_party/sdcc/— vendored SDCC 4.5 used for the C → Z80 step.libc/include/— headers your programs include.lib/sprinter.lib— the Sprinter target libc (prebuilt; rebuilt bymakeif you modify libc sources).runtime/— crt0 variants and runtime helpers (assembled per-build).toolchain/mkexe/— host utility that packs SDCC's.ihxinto a SprintEXE.tests/+testkit/— SDK regression programs and host tests.app.mk— standalone application build/run rules.docs/{en,ru}/— this documentation.
First build
cd sprinter-c-v1.0-<host>
make all # rebuild tools, libraries and SDK tests
If make complains about a missing SDCC binary, fetch it once:
make sdcc # downloads SDCC 4.5 if not vendored
Build your own program
cat > hello.c <<EOF
#include <stdio.h>
int main(void) {
puts("Hello, Sprinter!");
return 0;
}
EOF
bin/sprinter-cc -o hello.exe hello.c
hello.exe is now a valid SprintEXE you can run on Sprinter / MAME / any
ESTEX DSS shell.
Running on hardware or in an emulator
The release does not include the MAME emulator or the Sprinter ROM / DSS / HDD images — those are large and have their own licensing. To test:
- MAME: install a build with the Sprinter driver and prepare
MAME_HOMEcontainingsprinter(new MAME.HT) ormame.arm(legacy),roms/, DSS floppy and system CHD.make floppycreates a local SDK test disk;make run MAME_HOME=/path/to/runtimemounts it. - Real Sprinter: copy
.exeto a floppy or HDD partition that DSS can see, thenRUN HELLOfrom the shell.
Next steps
- Read
sprinter_cc.mdfor compiler flags. - Read
memory_modes.mdwhen you start needing more than 14 KB of code. - See
examples.mdfor SDK tests and the separate Examples project. - See
headers.mdfor the public API surface.