
C64 Assembly
From the MOS 6510 to a Complete Game
Programming the Commodore 64, byte by byte
On Amazon
The Amazon link for this book is coming soon.
The code
The code will be published here together with the book.
From the first byte to a complete game
A complete path to learning Commodore 64 Assembly and turning the foundations of the MOS 6510 into real video games.
From memory to interrupts, from raster timing to sprites, from the SID to asset management: every topic is developed through progressive examples, exercises, and practical projects — and the last chapter brings them together in Final Fortress, the complete game.
From beginner to C64 developer, byte by byte.
Inside the book
- MOS 6510, memory, and Assembly language
- VIC-II, raster, sprites, scrolling, and collisions
- SID, music, and sound effects
- Joystick, game loop, debugging, and optimization
- Loaders, cartridges, and release qualification
- Complete final project: Final Fortress
Contents
29 chapters
Twenty-nine chapters, from the first byte to the complete game
01The machine behind the blue screen
A practical map of the computer you are about to control.
02Assemble, load, debug
Turn readable source into a repeatable C64 program.
03Registers, flags, addresses
Make every operand and branch a deliberate choice.
04Arithmetic, bits, loops
Turn bytes into counters, positions, masks and repeatable work.
05Stack, subroutines, interfaces
Build routines that can call, return, cooperate and grow.
06Interrupts, raster, frame timing
Let hardware choose the moment without surrendering control.
07Pointers, tables, data structures
Turn raw bytes into collections a game can reason about.
08Modules, state machines, dispatch
Divide one game into contracts that can grow without losing control.
09Screen memory, characters, display modes
Turn addresses, patterns and color nibbles into a game world the VIC-II can display.
10Hardware sprites, animation, collisions
Give the game independent actors, timed motion and collision rules the hardware cannot invent for you.
11Scrolling, raster splits, moving worlds
Move the camera without letting memory ownership, timing or the HUD drift with it.
12Sprite multiplexing, culling, slot schedules
Turn eight physical channels into a deterministic display service for a crowded game world.
13SID voices, waveforms, envelopes, sound services
Turn game events into owned, timed and testable sound without scattering SID writes through the codebase.
14Music drivers, patterns, tempo
Turn note data into a portable three-voice performance with explicit timing, ownership and room for game effects.
15Game loops, input, entity state
Turn frame tokens and control snapshots into a coherent world that updates, collides, sounds and renders deterministically.
16Level data, rooms, progression
Turn authored maps into validated, persistent and transactionally loaded game spaces.
17Enemy behavior and AI
Build opponents that sense, decide and act predictably inside a fixed frame budget.
18Projectiles, weapons and combat
Turn fire intent into bounded projectiles, deterministic hits and readable consequences.
19HUD, score, lives and game flow
Turn committed gameplay into a readable, complete play session.
20Menus, options and persistence
Build the recoverable front end around a finished play session.
21Profiling and frame budgets
Measure first; optimize only the frame that needs it.
22Fixed-point and lookup tables
Keep the fraction; publish only the precision the screen needs.
23Object pools and spatial partitions
Bound the population; spend exact work only on plausible contacts.
24Memory layout, overlays and bank-aware assets
Give every byte an owner, a lifetime and a visible publication point.
25Multi-load assets and scene transactions
Load privately, prove the bytes, publish once.
26Compression and safe decompression
Pack on the host, bound every byte, publish only proof.
27Fastloaders and compatibility boundaries
Accelerate the transport; preserve the contract.
28Cartridges and release qualification
Map the ROM, test the candidate, archive the proof.
29Final Fortress: the complete game
Integrate the contracts. Survive the wave. Return cleanly.
Errata
Corrections
No errors have been reported for this edition yet.
Found a mistake? Write to info@codeandbooksweb.com, with the page number and what it should say.