Skip to content

Latest commit



49 lines (37 loc) · 4.1 KB

File metadata and controls

49 lines (37 loc) · 4.1 KB

The ZX Spectrum Programmer's Z88DK Getting Started Guide

The ZX Spectrum Programmer's Z88DK Getting Started Guide consists of a series of documents written to assist Spectrum developers who want to write programs in 'C' using the Z88DK development toolset. The reader is expected to know the 'C' programming language, but otherwise the series starts from the very beginning.

The articles lean towards Spectrum games development, and they are designed to be read in sequence:

Article Covers
Getting Started The Z88DK toolset, compiler command line
Hello World Text, stdio, CRTs
Simple Graphics Simple graphics, screen addressing, line drawing example
Input Devices Keyboard, scancodes, joysticks
Multiple Files Multiple file builds, list files
Some Details Memory map, pragmas
BiFrost The BiFrost multicolour library
Interrupts Z80 Mode 2 interrupts

A complementary series of documents covers the SP1 sprite library, which is an excellent basis for Spectrum games written with Z88DK:

Article Covers
SP1, Getting Started Getting started with SP1
SP1, Masked Sprites Masked sprites
SP1, Animated Sprites Animated sprites
SP1, Bigger Sprites Bigger sprites, colour
SP1, Collision Detection Detecting collisions between sprites

These documents are a work in progress. Comments and suggestions are welcome in the Z88DK Sinclair ZX forum.

Further Reading Covers
The author's Github project Example code from this guide with pre-compiled TAP files and occasionally some further work and extensions.
Wonky One Key An SP1-based game written by the author of this guide, uses lots of the techniques covered.
The Virus Another game written by the author of this guide.
Jordi Sesmero's SP1 Tutorial Another tutorial on using the SP1 library, covers more topics than this guide albeit in less detail. Contains a nice Pacman example.
Antonio Mateus's SP1 Examples A selection of SP1 examples, including a nice Breakout clone which uses tiles.

And of course, the Programming Forum at Spectrum Computing, where many of the best Spectrum developers are always ready to discuss everything to do with programming the ZX Spectrum.

Derek Fountain, January, 2023