← ClaudeAtlas

z88dklisted

Compile C (and Z80 assembly) for the ZX Spectrum with the z88dk cross-compiler: drive the `zcc` compiler driver, pick the `+zx` / `+zxn` (Spectrum Next) / `+ts2068` (Timex) target, choose the compiler (sccz80 vs zsdcc) and C library (new/sdcc_iy vs classic), and produce a runnable `.tap`/`.tzx`/`.sna` with `-create-app` / `z88dk-appmake`. Use this WHENEVER the user wants to write a Spectrum game/demo/tool in C instead of BASIC, "compile C for the Spectrum", build a `.tap`/`.sna` from C, use the ZX C library (conio/console, graphics & plotting, software sprites, bifrost/nirvana multicolour, keyboard/joystick input, beeper/AY sound, 128K banking, calling the ROM), mix C with inline `__asm`/`#pragma`, or asks which startup/clib/optimisation flags to pass to zcc. Then load and verify the result with the `zesarux-control` skill. Also trigger on Polish phrasings like "skompiluj C na spectrum z88dk", "zbuduj .tap z kodu C", "napisz grę w C na ZX Spectrum", "biblioteka graficzna z88dk", "sprite'y/dźwięk AY w C na spe
dtz-labs/zx-skills · ★ 0 · Web & Frontend · score 72
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`):