tutorial · commodore 64 · mac
How to make a Commodore 64 game on a Mac
The tools you need, from the bare minimum to what it takes to measure, all free. Writing a C64 game today doesn't mean working on a C64: you write on the Mac, you test in an emulator, and the real C64, if you have one, is the final check. This is the chain Ruote Fumanti was built with.
The editor is just the place where the code gets written. To get to a file the C64 will load you need a few other pieces, and most of them install with Homebrew, the macOS package manager, in a single command:
Write, build, test
With these four you write, build with one command and test the game.
| what | what it's for, and with what |
|---|---|
| Editor | writing the assembly: Visual Studio Code with the VS64 extension (source), which understands ACME, KickAssembler and cc65 and hooks into VICE for debugging |
| Assembler | turning the .asm source into a .prg file: ACME, the one used for Ruote Fumanti. Alternatively KickAssembler (needs Java) or ca65, inside cc65 |
| Emulator | testing the game, pausing it, reading memory with the monitor: VICE, x64sc in particular, the most accurate. VICE also brings c1541, which builds .d64 disk images |
| Cruncher | getting a single small file that unpacks itself: Exomizer |
The work cycle is always the same: write in VS Code, build with ACME, crunch with Exomizer, open the .prg in VICE.

VS Code on the game folder: sources in src/ on the left, native.asm on the right, open at the routine that scrolls the road, the one told in how the road scrolls.

make rebuilds everything: ACME assembles, Exomizer crunches. At the bottom the memory map: 61 KB of game become a 24 KB file that unpacks itself.

the PRG in VICE (x64sc), on track 3. Bottom left, the thing that matters: 50.1 frames a second.
What you need beyond the code
| what | what it's for, and with what |
|---|---|
| Scripting | generating data and tables, converting graphics, checking the build: Python, with Pillow to read and write images |
| Automation | rebuilding everything with one command: make, which comes with Apple's command line tools (xcode-select --install), or VS Code tasks |
| Versions | going back, comparing, losing nothing: Git |
| Sprite | drawing sprites within the C64's limits: Spritemate, which runs in the browser (source) |
| Characters | the character set, tiles and levels: VChar64, also for Mac |
| Images | screens and pictures in the C64's colours and resolutions: Multipaint |
| Music | composing for the SID: GoatTracker 2 (there's a Mac version), or SID-Wizard, which runs inside the C64 or the emulator |
Spritemate with Ruote Fumanti's fifteen jump sprites: the car in seven sizes, each with two wheel phases, plus the shadow. If sprites are new to you, they're explained from scratch in C64 sprites.
Music doesn't have to go through a tracker: in Ruote Fumanti the tune is written as text, one line per voice, and a Python script turns it into SID data.
To measure instead of eyeballing
This is the part that separates "it seems to work" from "it works, and it can be shown".
| what | what it's for, and with what |
|---|---|
| CPU in Python | testing pieces of code without opening the emulator: load the program, call a routine, check the registers: py65 |
| Scripted emulator | letting a program drive the game, reading memory every frame, counting dropped frames, taking screenshots: the remote monitor of VICE (-remotemonitor option), driven from Python |
| Video | clips for the game page, with audio recorded by the emulator: FFmpeg |
| Second emulator | making sure the game doesn't only work in VICE: VirtualC64, native on Mac |
| Real C64 | the final test, with a flash cartridge such as Kung Fu Flash, or an Ultimate 64 |

py65 tests the M and F keys and the engines without opening the emulator: the keyboard is fake, the code is the game's real code. Every line is a check, and at the bottom FALLITE 0, zero failures.

VICE's monitor, driven by a script, halts the game mid-race: the CPU registers, the scrolling code disassembled, and the variables' memory. The instructions from $14f5 down are the .fine routine seen from inside the machine.

the 1.0.2 measurements: dropped frames out of 3000, how long the police car stays on you, and what happens at the end of the track.
The four terminal screenshots are rebuilt as images from the commands' real output; the others are direct captures of the programs.
Getting it to the people who play it
Three levels
- to start VS Code, ACME, VICE, Exomizer
- for a real game plus Python, make, Git, and editors for sprites, characters and music
- to know it works py65, scripted VICE, a second emulator, and a real C64 when you can