Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Daniel Covington fae73342d2 Add petcube: a see-through rotating cube in PETSCII quarter blocks il y a 1 semaine
.claude c64 test: VICE diagnostics, hex jiffy count, native C128 smoke test il y a 1 semaine
examples Make every example buildable and verified; rewrite AGENTS.md and README. il y a 1 semaine
lib Add the c64 toolchain: build, run, headless test, live monitor, templates. il y a 1 semaine
newLang Move the topic skills to .claude/skills so Claude Code discovers them. il y a 1 semaine
projects Add petcube: a see-through rotating cube in PETSCII quarter blocks il y a 1 semaine
reference Add the c64-workflow skill and retire the c64os debug examples. il y a 1 semaine
samples Bring the existing cc65 projects under c64 and stop tracking intermediates. il y a 1 semaine
skills Move the topic skills to .claude/skills so Claude Code discovers them. il y a 1 semaine
skirmish-game Bring the existing cc65 projects under c64 and stop tracking intermediates. il y a 1 semaine
templates Add the c64 toolchain: build, run, headless test, live monitor, templates. il y a 1 semaine
tools c64 test: VICE diagnostics, hex jiffy count, native C128 smoke test il y a 1 semaine
vim Bring the existing cc65 projects under c64 and stop tracking intermediates. il y a 1 semaine
.gitattributes Bring the existing cc65 projects under c64 and stop tracking intermediates. il y a 1 semaine
.gitignore Bring the existing cc65 projects under c64 and stop tracking intermediates. il y a 1 semaine
AGENTS.md c64 test: VICE diagnostics, hex jiffy count, native C128 smoke test il y a 1 semaine
CLAUDE.md Updated Agents.md il y a 4 semaines
README.md c64 test: VICE diagnostics, hex jiffy count, native C128 smoke test il y a 1 semaine
c64.cmd Add the c64 toolchain: build, run, headless test, live monitor, templates. il y a 1 semaine

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 against the 40-column VIC-II screen. On a native C128, use the 40-column display for text assertions. The runner does not decode the 80-column VDC screen. The regression suite includes a native C128 build and 40-column text assertion. C64 BASIC errors fail immediately with the error name and line number.

If VICE exits before the trigger, check result.json for emulatorExitCode and look in vice.log, vice.stdout.log, and vice.stderr.log for startup details. The redirected output files may be empty on Windows. Run VICE from a Windows session that allows desktop applications if it exits immediately inside a sandbox.

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.