Programs written for the Commodore 64 in BASIC and Assembler https://c64.p20.dev
Find a file
2026-10-07 21:59:45 +02:00
code-breaker Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
lunar-lander Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
memory-matrix Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
meteor-dodge Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
music-box Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
pixel-painter Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
public Add clean program page URLs 2026-10-07 21:59:45 +02:00
robot-maze Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
starfield Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
stock-trader Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
submarine-hunt Add first C64 BASIC program collection 2026-10-07 20:03:59 +02:00
.dockerignore Add Docker WASM VICE program runner 2026-10-07 20:39:47 +02:00
.env Enrich program cards and serve local library 2026-10-07 21:10:17 +02:00
compose.yaml Enrich program cards and serve local library 2026-10-07 21:10:17 +02:00
Dockerfile Enrich program cards and serve local library 2026-10-07 21:10:17 +02:00
programs.json Enrich program cards and serve local library 2026-10-07 21:10:17 +02:00
README.md Add clean program page URLs 2026-10-07 21:59:45 +02:00
server.mjs Add clean program page URLs 2026-10-07 21:59:45 +02:00

C64 BASIC Collection

Ten small, polished programs for the Commodore 64, written entirely in stock Commodore BASIC V2. The collection mixes arcade action, puzzles, simulations, creative tools, sound, and visual effects. No cartridge, BASIC extension, or machine-language payload is required.

Programs

Program Type Controls Description Run locally
Meteor Dodge Arcade A, D, Q Dodge falling meteors and build your score. Run program
Code Breaker Logic 0-9, Q Deduce a four-digit secret in ten guesses. Run program
Submarine Hunt Strategy Row, Column, Q Find three hidden submarines with limited sonar shots. Run program
Lunar Lander Simulation 0-9, Q Choose engine burns and touch down gently. Run program
Memory Matrix Memory 1, 2, 3, 4, Q Repeat a growing sequence of flashing quadrants. Run program
Robot Maze Puzzle W, A, S, D, Q Navigate a freshly generated maze to its exit. Run program
Music Box Music A-K, 1, 2, 3, Q Play the SID chip as a small computer keyboard. Run program
Pixel Painter Creative Cursor keys, Space, C, Q Draw character-cell pictures on the screen. Run program
Stock Trader Simulation B, S, W, Q Trade a volatile stock over twenty market days. Run program
Starfield Demo 1, 2, 3, Q Watch and control a layered animated starfield. Run program

Running the programs

Start the local browser app with Docker Compose:

docker compose up --build -d

Open http://localhost:8134, or click a Run program link in the table. The app runs the VICE x64sc core through WebAssembly and downloads the selected PRG through its own backend, avoiding browser CORS restrictions. Click inside the emulator to enable keyboard input and sound. Direct keyboard input is enabled by default, mouse locking is disabled, and moving the pointer anywhere over the emulator reveals its control bar.

Docker Compose mounts this repository read-only at /programs, and the app serves PRG files from that local mount. There is no runtime dependency on the Git server and no browser CORS boundary. Add a program to programs.json and place its PRG in the referenced path; it appears after clicking Refresh list without rebuilding the image. The default host port is configured as 8134 in .env.

Each directory contains an editable, line-numbered .bas listing and a matching tokenized .prg file. The PRGs use the normal C64 BASIC load address, $0801.

On a Commodore 64, transfer a PRG to disk or another supported medium, then use:

LOAD"METEOR-DODGE.PRG",8
RUN

Substitute the filename and device number as needed. In VICE or another C64 emulator, drag a PRG into the emulator window or use its autostart command.

Source format

The .bas files are plain ASCII for comfortable reading and editing on a modern computer. They use uppercase BASIC V2 keywords and avoid embedded control-code glyphs. Their corresponding .prg files contain the tokenized PETSCII program that the C64 loads directly.

All programs are self-contained and designed for an ordinary PAL or NTSC Commodore 64. Randomized programs seed BASIC's random-number generator from the machine clock, so every session is different.