Starbraze II · 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 -default -pal -drive8type 1541 -drive8truedrive +busdevice8 -autostart-warp -joydev2 1 -autostart releases/starbraze2-1.0.d64Check 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. Keep the disk in drive 8: from level 3 on, the game reads its levels from it.
- To build and play a step, open PowerShell in its folder, for example chain/01-the-canyons, 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 51 experiments of the book, 34 guided variants and 17 “Where it breaks” versions, 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.
Chapter by chapter
| Ch. | Title | Folder | Download |
|---|---|---|---|
| 1 | Your workshop | chain/01-the-canyons/ | |
| 2 | Memory, the VIC-II and the interrupts | chain/01-the-canyons/ | |
| 3 | The canyons on screen | chain/01-the-canyons/ | |
| 4 | Smooth scrolling | chain/02-scrolling/ | |
| 5 | Stars in parallax | chain/02-scrolling/ | |
| 6 | The three ships | chain/03-the-ships/ | |
| 7 | The Varkon | chain/04-the-varkon/ | |
| 8 | The multiplexer and the shots | chain/04-the-varkon/ | |
| 9 | Hits and score | chain/05-hits-and-score/ | |
| 10 | Weapons and capsules | chain/06-weapons-and-capsules/ | |
| 11 | The SID: music and effects | chain/07-the-sid/ | |
| 12 | The boss engine | chain/08-siege-crawler/ | |
| 13 | The Siege Crawler and STAGE CLEAR | chain/08-siege-crawler/ | |
| 14 | The Shield Core | chain/09-shield-core/ | |
| 15 | Phases from the disk | chain/10-the-disk/ | |
| 16 | The Graveyard Warden | chain/11-graveyard-warden/ | |
| 17 | The Varkon Corvette | chain/12-varkon-corvette/ | |
| 18 | Varkon-Omega and the Defense Turret Array | chain/13-defense-turret-array/ | |
| 19 | The Core and the Super-Computer’s house | chain/14-super-computer/ | |
| 20 | The Super-Computer: rings and plates | chain/14-super-computer/ | |
| 21 | The Super-Computer: turrets, fans and core | chain/14-super-computer/ | |
| 22 | The escape and the victory | chain/15-the-escape/ | |
| 23 | Title, choice and the states | chain/16-the-states/ | |
| 24 | Reading and checking the game | chain/17-complete/ | |
| 25 | Glossary and index | — |