Dreadcastle · 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 64tass (assembler), VICE (emulator (x64sc)) and Python 3 (build, tests and verifier). Open a terminal in the folder and type:
x64sc -pal -autostartprgmode 1 -joydev2 1 -autostart releases/dreadcastle-1.0.prgCheck 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- Joystick in port 2; -joydev2 1 puts it on the numeric keypad: 4 left, 6 right, 8 up, 2 down, 0 Fire.
- To build and play a step, open PowerShell in its folder, for example chain/01-village-at-night, and type .\tools\run-game.ps1 -Mode Play. Without PowerShell, the README of the repository gives the same stages by hand.
- Each step folder in chain/ has its own copy of every source and tool it needs, and builds on its own. variants/ holds the 37 experiments of the book, each with a README, and CHAPTERS.md says which step and experiments go with each chapter.
- Built with 64tass 1.60.3243 and tested in VICE 3.10 on a PAL C64 with a 6581 SID.
Chapter by chapter
| Ch. | Title | Folder | Download |
|---|---|---|---|
| 1 | Your workshop | chain/01-village-at-night/ | |
| 2 | Memory and the VIC-II | chain/01-village-at-night/ | |
| 3 | The level on screen | chain/01-village-at-night/ | |
| 4 | The raster and the HUD | chain/01-village-at-night/ | |
| 5 | Smooth scrolling | chain/02-scrolling/ | |
| 6 | Oscar walks | chain/03-oscar/ | |
| 7 | Jumps and solid ground | chain/03-oscar/ | |
| 8 | The bat | chain/04-bat/ | |
| 9 | Heirlooms, the gate and the night | chain/05-heirlooms-and-gate/ | |
| 10 | The enemies | chain/06-enemies/ | |
| 11 | The Count's staff | chain/07-staff/ | |
| 12 | Packed levels and the castle | chain/09-castle/ | |
| 13 | Tom Darkfang | chain/10-tom/ | |
| 14 | The fight with Tom | chain/10-tom/ | |
| 15 | The SID and the music | chain/11-music/ | |
| 16 | States, title and menu | chain/12-title-and-ends/ | |
| 17 | The tally, dawn and victory | chain/12-title-and-ends/ | |
| 18 | Effects, jingles and the disk | chain/13-complete/ | |
| 19 | Reading and checking the game | chain/13-complete/ | |
| 20 | Glossary and index | — |