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.d64

Check 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.TitleFolderDownload
1Your workshopchain/01-the-canyons/
2Memory, the VIC-II and the interruptschain/01-the-canyons/
3The canyons on screenchain/01-the-canyons/
4Smooth scrollingchain/02-scrolling/
5Stars in parallaxchain/02-scrolling/
6The three shipschain/03-the-ships/
7The Varkonchain/04-the-varkon/
8The multiplexer and the shotschain/04-the-varkon/
9Hits and scorechain/05-hits-and-score/
10Weapons and capsuleschain/06-weapons-and-capsules/
11The SID: music and effectschain/07-the-sid/
12The boss enginechain/08-siege-crawler/
13The Siege Crawler and STAGE CLEARchain/08-siege-crawler/
14The Shield Corechain/09-shield-core/
15Phases from the diskchain/10-the-disk/
16The Graveyard Wardenchain/11-graveyard-warden/
17The Varkon Corvettechain/12-varkon-corvette/
18Varkon-Omega and the Defense Turret Arraychain/13-defense-turret-array/
19The Core and the Super-Computer’s housechain/14-super-computer/
20The Super-Computer: rings and plateschain/14-super-computer/
21The Super-Computer: turrets, fans and corechain/14-super-computer/
22The escape and the victorychain/15-the-escape/
23Title, choice and the stateschain/16-the-states/
24Reading and checking the gamechain/17-complete/
25Glossary and index—