65 lines
2.1 KiB
Markdown
65 lines
2.1 KiB
Markdown
# 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 by `make` if you modify libc sources).
|
|
* **`runtime/`** — crt0 variants and runtime helpers (assembled per-build).
|
|
* **`toolchain/mkexe/`** — host utility that packs SDCC's `.ihx` into a SprintEXE.
|
|
* **`tests/` + `testkit/`** — SDK regression programs and host tests.
|
|
* **`app.mk`** — standalone application build/run rules.
|
|
* **`docs/{en,ru}/`** — this documentation.
|
|
|
|
## First build
|
|
|
|
```sh
|
|
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:
|
|
|
|
```sh
|
|
make sdcc # downloads SDCC 4.5 if not vendored
|
|
```
|
|
|
|
## Build your own program
|
|
|
|
```sh
|
|
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_HOME`
|
|
containing `sprinter` (new MAME.HT) or `mame.arm` (legacy), `roms/`, DSS
|
|
floppy and system CHD. `make floppy`
|
|
creates a local SDK test disk; `make run MAME_HOME=/path/to/runtime` mounts it.
|
|
* **Real Sprinter:** copy `.exe` to a floppy or HDD partition that DSS can
|
|
see, then `RUN HELLO` from the shell.
|
|
|
|
## Next steps
|
|
|
|
* Read `sprinter_cc.md` for compiler flags.
|
|
* Read `memory_modes.md` when you start needing more than 14 KB of code.
|
|
* See `examples.md` for SDK tests and the separate Examples project.
|
|
* See `headers.md` for the public API surface.
|