Cryptmorrow MSX · 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), openMSX (emulator, with the free C-BIOS) and Python 3 (build, tests and verifier). Open a terminal in the folder and type:
openmsx -machine C-BIOS_MSX1_EU -cart releases/cryptmorrow-msx-1.0.romCheck 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- The arrow keys move the explorer and SPACE strikes; -machine C-BIOS_MSX1 gives the machine at 60 Hz instead of 50. On the title, up and down choose MUSIC, SOUND FX or SILENT, and FIRE starts the game.
- 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 (on Windows, if python is not found, try py). Work on a copy of a step, never on the step itself.
- 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, 14 guided variants and 8 “Where it breaks” versions, 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 openMSX 21.0 with C-BIOS 0.29, at 50 and at 60 Hz, not on a real MSX. The tests also need SkoolKit 10.1 (pip install skoolkit).
- fase0/cbios is a copy of C-BIOS 0.29, the free BIOS, under its own BSD licence; everything else in the repository is under the MIT licence.
Chapter by chapter
| Ch. | Title | Folder | Download |
|---|---|---|---|
| 1 | Your workshop | chain/01-first-room/ | |
| 2 | The Z80, the slots and the VDP | chain/01-first-room/ | |
| 3 | The tile engine | chain/01-first-room/ | |
| 4 | Text, torches and the frame | chain/01-first-room/ | |
| 5 | Hardware 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 PSG and the music | chain/06-sound/ | |
| 12 | 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 cartridge | chain/08-complete/ | |
| 16 | Reading and checking the game | chain/08-complete/ | |
| 17 | Glossary and index | — |