You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Daniel Covington edaa8a397d chopper: water bases with helipads, fewer enemies 1 week ago
.claude Make every example buildable and verified; rewrite AGENTS.md and README. 1 week ago
examples Make every example buildable and verified; rewrite AGENTS.md and README. 1 week ago
lib Add the c64 toolchain: build, run, headless test, live monitor, templates. 1 week ago
newLang Move the topic skills to .claude/skills so Claude Code discovers them. 1 week ago
projects chopper: water bases with helipads, fewer enemies 1 week ago
reference Add the c64-workflow skill and retire the c64os debug examples. 1 week ago
samples Bring the existing cc65 projects under c64 and stop tracking intermediates. 1 week ago
skills Move the topic skills to .claude/skills so Claude Code discovers them. 1 week ago
skirmish-game Bring the existing cc65 projects under c64 and stop tracking intermediates. 1 week ago
templates Add the c64 toolchain: build, run, headless test, live monitor, templates. 1 week ago
tools Make every example buildable and verified; rewrite AGENTS.md and README. 1 week ago
vim Bring the existing cc65 projects under c64 and stop tracking intermediates. 1 week ago
.gitattributes Bring the existing cc65 projects under c64 and stop tracking intermediates. 1 week ago
.gitignore Bring the existing cc65 projects under c64 and stop tracking intermediates. 1 week ago
AGENTS.md Make every example buildable and verified; rewrite AGENTS.md and README. 1 week ago
CLAUDE.md Updated Agents.md 4 weeks ago
README.md Make every example buildable and verified; rewrite AGENTS.md and README. 1 week ago
c64.cmd Add the c64 toolchain: build, run, headless test, live monitor, templates. 1 week ago

README.md

C64 DevSetup

A workbench for writing Commodore 64 and C128 software, set up for AI coding agents and the people working with them. One command builds a program, runs it headlessly in VICE, and prints what the C64 screen shows, so changes are checked on the (emulated) machine rather than assumed.

> c64 new invaders -Template c
created projects\invaders from templates\c
> c64 test projects/invaders
built projects\invaders\build\invaders.prg  $0801-$0B27  (807 bytes)
+----------------------------------------+
|invaders                                |
|READY TO GO                             |
+----------------------------------------+
PASS  invaders  [d7ff, 3.1s]  artifacts: projects\invaders\build\test\invaders

Requirements

  • Windows with PowerShell 7 (pwsh)
  • cc65 (cl65, ca65, ld65)
  • VICE 3.x (x64sc, x128, c1541, petcat), e.g. winget install VICE-Team.VICE.GTK3

c64 doctor finds the tools on PATH, in Program Files, or in WinGet's package folder, and says what is missing. Set C64_TOOLS_PATH (semicolon-separated folders) to point it somewhere else.

Commands

Command Does
c64 doctor Check the toolchain
c64 new <name> [-Template c\|asm\|basic] Create projects/<name> with a passing self-test
c64 build <project\|file> Build .prg, plus .lbl (VICE labels), .map, and optionally .d64
c64 run <project\|file\|prg\|d64> [-Monitor] [-FromDisk] [-Disk x.d64] Autostart in VICE
c64 test <...> [-Expect TEXT] [-Until label] [-AfterJiffies n] [-Keys "x\n"] [-Disk x.d64] Headless run: prints the screen, PASS/FAIL, exit code 0/1
c64 mon "r" "m .label" Query a program started with run -Monitor
pwsh tools/regress.ps1 Regression suite for templates, projects, and examples

A project is a folder with c64project.json (see templates/). Any single .c, .s, .asm, or .bas file also works as a target.

Layout

AGENTS.md / CLAUDE.md     agent entry point (CLAUDE.md includes AGENTS.md)
c64.cmd                   command wrapper -> tools/c64.ps1
tools/                    C64Tools.psm1 (build, run, test, monitor), c64.ps1, regress.ps1
lib/                      c64test.h / c64test.inc: report test results via $D7FF
templates/                c, asm, basic project skeletons
projects/                 new programs
.claude/skills/           topic skills: c64-workflow, 6510-assembly, memory-map, graphics-vic2,
                          sound-sid, interrupts, kernal-routines, disk-io-1541,
                          basic-programming, compiler-design, vice-emulator, powerc
reference/                register, opcode, Kernal, memory, DOS, and VICE references;
                          Power C disk and manual; powerc-re/ (Power C improvements)
examples/                 single-file examples in BASIC, ca65, and cc65 C; Power C disks
skirmish-game/            tactical game in ca65 assembly
samples/                  kernal-os-skeleton (OS shell), cc65-mouse-driver-demo
vim/                      vi clone (Power C on the C64, cc65 on the C128)
newLang/                  Nova128: OO language and on-machine compiler for the C128

How testing works

c64 test starts x64sc (or x128) minimized in warp mode, injects the program, and waits for a trigger:

  • $D7FF store (default): the program writes its result: 0 = pass, otherwise a failure code. lib/c64test.h and lib/c64test.inc wrap it; BASIC uses POKE 55295,0. On real hardware the store does nothing.
  • -Until <label>: execution reaches a label from the build's .lbl file.
  • -AfterJiffies <n>: after n Kernal IRQs, for programs you don't want to modify.

At the trigger it saves RAM, I/O, the decoded text screen, and a screenshot to build/test/<name>/, then checks -Expect strings. BASIC errors fail immediately with the error name and line number.

Sources

The topic skills were compiled from The Anatomy of the Commodore 64, The Machine Language Book and The Advanced Machine Language Book for the Commodore 64, COMPUTE!‘s Mapping the Commodore 64, COMPUTE!‘s VIC-20 and Commodore 64 Tool Kit (BASIC and Kernal), The Anatomy of the 1541 Disk Drive, The Complete Commodore 64 ROM Disassembly, Compiler Design and Implementation (64 and 128), COMPUTE!‘s SpeedScript, Invaluable Utilities for the Commodore 64, and the VICE 3.10 manual.

Powered by TurnKey Linux.