The Beam, Not a Buffer
There is no frame buffer. Every line is redrawn 50 times a second by steering an electron beam, and the beam takes time to move.
From an empty folder to a cartridge you can sell — C and 6809 assembly for the Vectrex, with every number in the text measured against a ROM that really ran.
// What this book is
Most retro programming books assert. This one measures. Every technical claim was verified against a real build before it went into the text, every figure comes from a program that actually ran, and the tools that do the measuring were written before the first chapter — because a claim you cannot check is a claim you should not make.
There is no frame buffer. Every line is redrawn 50 times a second by steering an electron beam, and the beam takes time to move.
The budget that hurts is not memory but the 30,000 cycles in a frame. Overrun it and the screen flickers — visibly, every time.
About 950 bytes are yours. An entity is eight bytes, not a struct with thirty-two — and that reaches into every data structure.
C for the shape of the game, hand-written assembly where cycles decide. The book shows exactly where the line falls, and why.
Vector Siege is the spine: fifteen stages from a cartridge that prints its own name to a finished shooter. Every stage holds 50 Hz.
It ends where a hobby project usually stops: verified on hardware, in a box, with an overlay — a cartridge you can actually sell.
// A few things the tools measured
None of these are estimates. Each came out of vecdump, the
headless emulator written before chapter one.
set_scale. One line more than doubles what you can draw.// Read a sample
The printed edition, as printed: the cover, the full table of contents, and then a complete chapter — Measuring and debugging, the one that builds the habit the rest of the book depends on. Turn the pages with the arrows, your keyboard, or by clicking the outer edge of a page.
Cover, contents and pages 28–33 of the printed edition, shown at reading size. The full book runs to 230 pages.
// The interactive edition
The book also reads in a browser — and there it runs.
Twenty-one chapters carry the ROM they describe, and the machine beside
the text is the same vecx core the book measures with,
compiled to WebAssembly. The numbers you watch tick over are produced by
the code that produced the numbers in the text.
The sample below is the real thing, not a mock-up: the book's own cover, its complete table of contents, and chapter 05 — Measuring and debugging — with that chapter's cartridge running beside the text. Press Run.
There is an Android edition as well, built for the Pixel Fold: half-fold it and the Vectrex stands on the upper leaf while the book runs down the side, with the controller on the flat leaf. The demo carries the same sample chapter, the cover and the contents, and every stage of Vector Siege is playable beside them — fifteen cartridges, from the one that boots to the finished game, with sound.
// What comes with it
The book is not a set of listings to retype. It comes with the complete source for every chapter that ships code, the reference game at every stage, and the measuring tools the whole book is built on — the same ones that produced every number in the text. Nothing is held back for a "pro edition"; there is no such thing.
Makefile and the figures measured from that exact code.vecdump, vecshot, vecplay, vectest — the headless emulator and the acceptance checks, source included.A chapter is one directory holding its text, its code and its figures, so the three cannot drift apart. Build it, change a number, measure it again and see the figure move:
cd chapters/04-your-first-cartridge
make # build the cartridge
make test # the seven acceptance checks
make shot # render what the beam actually drew
You need the free CMOC and lwtools toolchain, both covered in chapter 03. Verified with cmoc 0.1.98 and lwtools 4.24.
// What is inside
// Get the book
The manuscript is finished — 230 pages, 40 chapters, and a game that grows across all of them. The printed edition and the interactive edition are being prepared for release.