Cryptmorrow ZX · the code
Every step of the game
The sources and the programs, in folders named exactly as the book names them. Free to use in your own work, commercial or not, under the MIT licence.
Build and play
You need sjasmplus (assembler), Fuse (emulator) and Python 3 (build, tests and verifier). Open a terminal in the folder and type:
fuse --machine 48 --tape releases/cryptmorrow-zx-1.0.tap --auto-loadCheck everything
From the top folder of the full download, this assembles every source again and compares the result with the reference bytes:
python verify.py- --machine 128 gives a 128K with its AY chip, and the music. On the title, up and down choose the sound, left and right the controls (Kempston, keys or Sinclair); FIRE starts. Keys: Q up, A down, O left, P right, SPACE fire.
- To build and play a step, open a command prompt in its folder, for example chain/01-first-room, and type python tools/run_game.py: it builds the data, assembles the game with sjasmplus, makes the tape and opens it in Fuse.
- Each step folder in chain/ has its own copy of every source and tool it needs, and builds on its own. variants/ holds the 22 experiments of the book, each with a README, and CHAPTERS.md says which step and experiments go with each chapter.
- Built with sjasmplus 1.24.0 and tested in Fuse 1.6.0 and in the book's test bench, on the 48K and the 128K.
Chapter by chapter
| Ch. | Title | Folder | Download |
|---|---|---|---|
| 1 | Your workshop | chain/01-first-room/ | |
| 2 | The Z80, memory and the screen | chain/01-first-room/ | |
| 3 | The tile engine | chain/01-first-room/ | |
| 4 | Text, torches and the frame | chain/01-first-room/ | |
| 5 | Software sprites | chain/02-explorer/ | |
| 6 | The explorer | chain/02-explorer/ | |
| 7 | The dungeon and the HUD | chain/03-dungeon/ | |
| 8 | Objects, doors and the portal | chain/04-objects-doors/ | |
| 9 | The enemies | chain/05-combat/ | |
| 10 | The blade and the damage | chain/05-combat/ | |
| 11 | The AY and the music | chain/06-sound/ | |
| 12 | The beeper, the effects and the sound modes | chain/06-sound/ | |
| 13 | The title and its big letters | chain/07-title-and-ends/ | |
| 14 | States, menu and end screens | chain/07-title-and-ends/ | |
| 15 | The tape | chain/08-complete/ | |
| 16 | Reading and checking the game | chain/08-complete/ | |
| 17 | Glossary and index | — |