31 lines
1.0 KiB
Markdown
31 lines
1.0 KiB
Markdown
# Programs and examples
|
|
|
|
The SDK release includes its regression programs in `tests/`: `hello`,
|
|
`cat`, `gfx_demo`, `bgitest` and others. They exercise compiler, libc,
|
|
graphics and Sprinter runtime behavior. Build them with `make`; `make floppy`
|
|
packs them into a local `build/media/toolkit-tests.img`.
|
|
|
|
Larger demonstrations (`balls`, `mdview`, `mdview2`, `rpgwalk`, `scroll`,
|
|
`space`) are published in the separate Examples project. Clone it separately
|
|
and point it at this installed SDK:
|
|
|
|
```sh
|
|
export SPRINTER_ROOT=/path/to/sprinter-c
|
|
cd /path/to/Examples
|
|
pyenv exec python -m pip install -r requirements.txt
|
|
make
|
|
```
|
|
|
|
For your own program, use the SDK's `app.mk`:
|
|
|
|
```makefile
|
|
SPRINTER_ROOT ?= /path/to/sprinter-c
|
|
EXAMPLE := my_app
|
|
include $(SPRINTER_ROOT)/app.mk
|
|
```
|
|
|
|
`make floppy` creates an image under the application's `build/media/`.
|
|
For an emulator launch, set `MAME_HOME` to a prepared MAME runtime with
|
|
`mame.arm`, `roms/` and `IMG/`; `MAME_BIN`, `MAME_ROMPATH`, `MAME_DSS_IMAGE`,
|
|
`MAME_SYSTEM_HDD_IMAGE` and `MAME_BIOS` can override each part.
|