Critical fixes: - Screen RAM relocated from to (VIC register collision) - RST8 preserved in vic_setup_mcm() (raster IRQ line 311 stability) - random source armed with NOISE waveform (WAIT duration variety) - Makefile now has real file rule (run-vice works from clean) - .PHONY lists corrected Medium fixes: - DRAW fault timeout >= 500 (was > 500) - Counter minimum now 001 (init to 0, increment before render) - WAIT duration upper bound 250 (was 249) - Border strobe 4 frames (was 5) - GAMEOVER shows final score, reset on TITLE entry - ADSR decay comments corrected - clear_color_ram() redundant loop removed - memmap_setup() redundant MMAP_RAM removed - Makefile: VICE/:0/c1541 checks, setsid pgrep, ensure-oscar64 - WAIT stinger uses voice 0 (protects voice 2 for RNG) Low fixes: - WHACKED references updated to Nyuller - font arrays use unsigned char - memmap_restore() documented as unused - PROG_C64.md banking table corrected - Makefile: clean @ prefix, help docs, OPT guard - Audio schedule off-by-one corrected (+1 frame/note)
nyuller
A C64 programming project using Oscar64
as the cross-compiler. Oscar64 is checked in as a git submodule under
./oscar64/.
Layout
.
├── oscar64/ # Oscar64 cross-compiler (git submodule)
├── build/ # Build output (gitignored)
├── docs/c64/ # Low-level C64 reference (memory map, VIC, CIA, SID, …)
├── src/ # Your C code
│ └── *.c, *.h
├── Makefile # Build + run targets (gnu make)
├── OSCAR64.md # Notes on the Oscar64 compiler internals
└── PROG_C64.md # Notes on programming the C64 hardware
First-time setup
# 1. Clone with submodules:
git clone --recurse-submodules <this-repo-url>
# Or, if you already cloned without --recurse-submodules:
git submodule update --init --recursive
Building
make # show help with all targets
make compile # compile → build/nyuller.prg (-O1)
make run # compile + run in oscar64 emulator (headless, fast)
make play # compile + launch VICE x64 in background
make kill # kill any detached VICE
make OPT=O3 # release build (auto-ZP, outliner, aggressive inlining)
make clean # remove build/ artifacts
make will build the oscar64 compiler automatically the first time
(it runs make -C make compiler inside ./oscar64/ if
./oscar64/bin/oscar64 doesn't exist yet).
Run make help for the full list of targets with descriptions.
Default test tool is the oscar64 built-in emulator (make run): it
runs headless, needs no ROMs, no display, and is fast. Every Verify
step in tasks.md uses this.
VICE 3.9 is installed at /usr/bin/ (x64, x64sc, x128,
xvic, xpet) and is available via make run-vice / make run-vice-cycle.
It is a GUI emulator and needs a real X11 / Wayland display to render — it
won't produce useful screenshots in this headless environment.
Use it from a real terminal session for interactive play-testing
and cycle-exact validation of raster IRQ and SID timing; don't
expect to script it.
Documentation
PROG_C64.md— how the C64 hardware actually works, from a low-level programming perspective. Start here if you want to understand what's going on under the hood.OSCAR64.md— how the Oscar64 compiler works internally, plus a C64- specific section on how to use it well (memory model, bank switching, raster IRQs, common mistakes).docs/c64/— downloaded reference material: the full Commodore 64 Programmer's Reference Guide text, Christian Bauer's canonical VIC-II paper, and per-chip reference notes.