target-zx

Configures z88dk compilation and packaging for ZX Spectrum 48/128 targets.

1.1k|206|Updated Mar 16, 2016
One-click install
npx skills add https://github.com/z88dk/z88dk --skill target-zx-z88dk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: target-zx
Source: https://github.com/z88dk/z88dk/tree/main/.agents/skills/target-zx
Command: npx skills add https://github.com/z88dk/z88dk --skill target-zx-z88dk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building software for the ZX Spectrum 48/128 with z88dk requires choosing the correct C library (classic vs newlib), disk filesystem drivers, and output packaging format, and picking the wrong combination produces broken binaries or missing filesystem support. ## Core Features & Use Cases - Target Configuration Guidance: Distinguishes the +zx target (Spectrum 48/128) from +zxn (Spectrum Next), including default CLIB, CPU flags, and appmake behavior. - Library and Filesystem Selection: Explains classic vs newlib selection and how to link real filesystems (-lesxdos, -lp3) instead of the default -lndos stubs. - Packaging Subtypes: Covers TAP, WAV, SNA, ROM, DOT, and +3 output formats via -subtype and -create-app. - Use Case: Compile a C game for the Spectrum 128 with esxDOS disk access and package it as a DOT command using zcc +zx -lesxdos -subtype=dot -create-app. ## Quick Start Ask the assistant to compile a C source file for the ZX Spectrum 48K using z88dk and package it as a TAP file with zcc +zx -create-app.

Frequently Asked Questions about target-zx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compile a C program for ZX Spectrum with z88dk?

Use the zcc front end with the +zx target: zcc +zx -vn hi.c -o hi -create-app. This links the classic default library and produces a TAP file loadable on a Spectrum 48/128.

What is the difference between z88dk +zx and +zxn targets?

The +zx target builds for the Spectrum 48/128 with the classic library and standard Z80 CPU, while +zxn targets the Spectrum Next with newlib sdcc_iy and the -mz80n CPU flag. Next-specific subtypes like nex and dotn must not be used with +zx.

How do I use esxDOS or +3 disk filesystems in z88dk Spectrum programs?

Link a real filesystem driver on the command line, such as -lesxdos or -lp3, which is searched before the default -lndos stubs. Never place -lndos before a real driver, or file operations will use the stub implementations.

Does z88dk +zx support the newlib C library?

Yes, select newlib with -clib=new, -clib=sdcc_ix, or -clib=sdcc_iy, which uses the zx_crt.asm.m4 CRT and the -lzx library. The classic library remains the default and main path for Spectrum development.

What output formats can z88dk produce for the ZX Spectrum?

The +zx target supports TAP (default), wav and turbo audio loaders, SNA snapshots, raw bin, ROM and IF2 cartridges, esxDOS DOT/DOTX commands, and +3 loaders. Choose the format with -subtype and build it with -create-app.