z88dklisted
Install: claude install-skill dtz-labs/zx-skills
# z88dk — C and assembly for the ZX Spectrum
z88dk is a C cross-compiler toolchain for Z80 machines. This skill is about
producing working ZX Spectrum (48K/128K), Spectrum Next (`+zxn`) and Timex
(`+ts2068`) programs in C, then turning them into a loadable `.tap`/`.sna`.
The toolchain has a lot of moving parts (two compilers, several C libraries,
many `-startup` crt0 variants). **Read `references/toolchain.md` before your
first build** — picking the wrong `-clib`/`-startup` combo is the #1 reason a
build links but crashes or prints nothing. The local install here is **z88dk
v2.4 (Oct 2025)**.
This skill writes and builds the program. To **load and run** the resulting
`.tap`/`.sna` in an emulator, screenshot it and debug at the Z80 level, hand off
to the **`zesarux-control`** skill (`load_file` → `get_screen` → registers /
breakpoints). For hand-written Z80, pair with a **`z80-assembly`** skill if one
exists. For Timex/ULAplus video tricks see **`zx-special-screen-modes`**, and
for AY tunes **`zx-ay-music`**.
## Workflow
1. **Choose the target and toolset.** `+zx` for 48K/128K Spectrum, `+zxn` for
the Next, `+ts2068` for Timex. Then decide the **C library** and **compiler**
(these are coupled — see `references/toolchain.md`):
- **newlib + zsdcc** (`-clib=sdcc_iy -compiler=sdcc`): the modern default for
games/graphics. Best optimiser, the bifrost/nirvana/sp1 sprite engines live
here. Needs an explicit `-startup=N`.
- **newlib + sccz80** (`-clib=new`):