TITLE=Commodore 64 ROUTE=/platforms/c64 LOCALE=en MODIFIED=1792409344 URL=https://wiki.teletypegames.org/platforms/c64 L=1 #63 The Commodore 64 is the classic 8-bit home computer. Our C64 projects are 6502 assembly, assembled by bACME0 into a c.prg0 file and tested in the bVICE0 emulator (cx64sc0). bACME:0 https://sourceforge.net/projects/acme-crossass/ bVICE: https://vice-emu.sourceforge.io bTools repository0: https://git.teletypegames.org/build/c64-tools bProjects built with this btoolchain:0 Teletype Games C64 Demo, Rabbit Scooter — C64, Blessing of Ra bSibling platform:0 the 1Commodore Plus/4 uses the same ACME toolchain. r────────────────────────────────────────────────────────────────────────────── 1Makefile 1════════ All c.asm0 files live in the project root. cmain.asm0 is the single entry point and c!src0-includes the rest. p project-root/ p ├── main.asm # entry point, includes the others p ├── defs.asm p ├── common.asm p ├── metadata.json # catalog metadata + version p ├── Makefile p └── README.md 2Variables 2───────── t┌──────────┬────────────────────────────────────────┬────────────────┐ t│h Variable t│h Description t│h Default t│ t├──────────┼────────────────────────────────────────┼────────────────┤ t│0 cPROJECT0 t│0 Name used in artifacts and the catalog t│0 — t│ t│0 cASM0 t│0 Assembler binary t│0 cacme0 t│ t│0 cEMU0 t│0 Emulator binary t│0 cx64sc0 t│ t│0 cSRC0 t│0 Entry point t│0 cmain.asm0 t│ t│0 cTARGET0 t│0 Output program t│0 c$(PROJECT).prg0 t│ t│0 cMETADATA0 t│0 Metadata file t│0 cmetadata.json0 t│ t└──────────┴────────────────────────────────────────┴────────────────┘ 2metadata.json 2───────────── p { p "name": "example", p "title": "Example C64 Game", p "author": "Teletype Games", p "desc": "Short description of the game.", p "site": "https://git.teletypegames.org/games/example", p "license": "MIT", p "version": "1.0.0" p } cname0 bmust match0 cPROJECT0. cversion0 drives the pipeline's version step. The rest goes into the game catalog. 2Targets 2─────── p make deps # brew install acme vice (macOS only) p make build # assemble main.asm -> .prg, only when an .asm cha» p nged p make run # build, then launch in VICE p make clear # remove the .prg and CI artifacts p make rebuild # clear + build p make rebuildrun # clear + build + run 2VS Code 2─────── Copy cexample-tasks.json0 to c.vscode/tasks.json0. It wraps the same targets, with cbuild0 as the default build task (cCmd+Shift+B0). 2Generated artifacts 2─────────────────── t┌───────────────────────────────────┬─────────────────────────────┐ t│h File t│h Description t│ t├───────────────────────────────────┼─────────────────────────────┤ t│0 c.prg0 t│0 The assembled program t│ t│0 c-.prg0 t│0 Versioned release copy (CI) t│ t│0 c-.metadata.json0 t│0 Versioned metadata (CI) t│ t└───────────────────────────────────┴─────────────────────────────┘ 2Requirements 2──────────── Local only: cmake0, cacme0, and cx64sc0 from VICE for crun0. Example Makefile: https://git.teletypegames.org/build/c64-tools/src/branch/master/example- makefile.make r────────────────────────────────────────────────────────────────────────────── 1Pipeline 1════════ The pipeline is not in the game repo. Woodpecker asks the update server, and WarpEngine serves the whole config from c/build/config0 (template clib/warp_engine/ci/woodpecker/platforms/c64/pipeline.yaml.erb0). The repo needs three things: p # .woodpecker.yaml p platform: c64 p name: rabbit # only when the software name differs from the repo name • cmetadata.json • the capplication_token0 Woodpecker secret: a WarpEngine ApplicationToken with cupdate0 + cupload0 scopes The builder and the player image come from the update server's CI adapter config (cplatforms:0 in the WarpEngine initializer). Preview the served pipeline: p curl "https://teletypegames.org/build/config?platform=c64" 2Steps 2───── t┌─────────────┬──────────────────────────────────────────────────────────────┐ t│h Step t│h What it does t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 1. version t│0 read the version from cmetadata.json0, add the branch name on t│ t│0 t│0 development branches, write c.version0 t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 2. build t│0 assemble with ACME in the cc64-builder0 image, producing t│ t│0 t│0 c-.prg0 and t│ t│0 t│0 c-.metadata.json0 t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 3. package t│0 ccommodore-pack c640 in the ccommodore-player0 image: t│ t│0 t│0 c-.html.zip0 (EmulatorJS page with the t│ t│0 t│0 self-hosted cvice_x64sc0 core), plus c-linux-x64.zip0, t│ t│0 t│0 c-win-x64.zip0 and c-mac-universal.zip0 (yapeSDL with a launcher t│ t│0 t│0 that sets the machine type and autostarts the c.prg0) t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 4. artifact t│0 cPOST /build/upload0 for all six files, cX-Update-Secret0 header t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 5. publish t│0 cPOST /build/publish?platform=c640 t│ t└─────────────┴──────────────────────────────────────────────────────────────┘ 2Result 2────── The server reads the uploaded metadata, creates or updates the catalog entry, and registers five assets on the release: the c.prg0 as the downloadable cartridge, the EmulatorJS page as the web-playable build (the catalog's "Play in browser" button, served from c/file/-/0), and the three yapeSDL bundles as the Linux, Windows and macOS downloads. Since WarpEngine 0.11 the two Commodore platforms expect the same asset kinds; earlier releases carry only the cartridge until they are rebuilt.