cybersorcerer/c64u/c64-knowledge

Claude Code and agent skill by cybersorcerer/c64u

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Commodore 64 hardware and toolchain reference - memory map and banking, VIC-II, CIA keyboard/joystick/timers, SID, PETSCII and screen codes, 6502 opcodes and cycle counts, graphics and bitmap formats, disk image layout, BASIC pitfalls, Kick Assembler syntax, REU/RAM Expansion programming, and the Ultimate Command Interface. Use when writing, reviewing, or debugging C64 code in BASIC or 6502 assembly, when picking register addresses or bit values, when counting cycles for raster timing, when converting text to screen codes or images to bitmaps, or when computing SID frequencies.

Install

npx vskill@latest install cybersorcerer/c64u/c64-knowledge

SKILL.md

C64 Knowledge

Grounding for C64 programming and for driving real hardware through the c64u CLI.

How to use this skill

Read one reference file - the one that covers the register or subsystem at hand. Do not read them all; each is a standalone quickref.

QuestionRead
Zero page, $01 banking, KERNAL entry points, I/O layout, VIC bank selectreferences/memory-map.md
Screen modes, sprites, raster IRQs, $D011/$D018 bits, PAL vs NTSC timingreferences/vic-ii.md
Keyboard matrix, joysticks, CIA timers, interrupt masks, serial busreferences/cia.md
Voice registers, waveforms, ADSR, filter, frequency formulareferences/sid.md
Screen codes vs PETSCII, control codes, colour RAM, text outputreferences/petscii.md
Opcodes, addressing modes, cycle counts, page-crossing penaltiesreferences/opcodes.md
Bitmap addressing, image conversion, charsets, sprite data pipelinesreferences/graphics-pipeline.md
PRG load address, D64/D71/D81 layout, BAM, directory entriesreferences/disk-formats.md
Tokenizer, line format, quote mode, variable-name traps, memory limitsreferences/basic-pitfalls.md
Directives, macros, pseudocommands, segments, BasicUpstart2, CLI optionsreferences/kickassembler.md
REC registers $DF00-$DF0A, STASH/FETCH/SWAP/VERIFY, detection, DMA trapsreferences/reu.md
Talking to the Ultimate from a running C64 program: UCI registers, targets, DOS/network/control commandsreferences/uci.md

references/opcodes.md is generated from the disassembler's own table in tools/c64u; regenerate it with make -C skills/c64-knowledge opcodes rather than editing it.

For driving real hardware with the c64u CLI, use the c64u-cli skill instead.

Working code

examples/ holds assembled-and-runnable Kick Assembler sources.

Do not read `examples/` to answer a question. The reference files carry the register tables and the rules; the examples exist to be built and run. Open one only when:

  • the user asks for working code or a starting point,
  • you need to modify or debug that specific program,
  • a reference file explicitly points at it and the register table alone did not settle the question.

Preferring build then run over read keeps them out of context entirely.

FileShows
examples/hello-border.asmSmallest useful program: upstart line, border flash
examples/raster-irq.asmRaster interrupt under $01 = $35, hardware vector at $FFFE
examples/sprite-setup.asmSprite pointer, position, colour, X MSB
examples/sid-note.asmTriangle note with best-practice ADSR, PAL/NTSC frequency pick
examples/charset-copy.asmCopy character ROM to RAM, repoint $D018
examples/hires-bitmap.asm320x200 bitmap mode, colour map, plotted sine curve
examples/uci-identify.asmFull Ultimate Command Interface round trip from the C64 side
examples/reu-detect.asmProbe for a RAM Expansion Unit without triggering a DMA
examples/reu-screen-stash.asmSave and restore screen RAM through STASH/FETCH

Toolchain

Assemble with Kick Assembler (Java):

sh
java -jar KickAss.jar program.asm -o program.prg

Run on the connected C64 Ultimate:

sh
c64u runners run-prg-upload program.prg # upload and start
c64u machine read-mem 0400 --length 16 # verify what the program changed
c64u machine reset # back to a clean BASIC

The c64u-cli skill covers the CLI itself - all commands, verified workflows, and the limits that catch people out.

Rules that prevent most C64 bugs

  1. Check the video standard before any timing or pitch maths. $02A6 holds 1 for

PAL, 0 for NTSC. SID frequency values and raster line counts differ between them. See references/vic-ii.md and references/sid.md.

  1. Screen RAM stores screen codes, not PETSCII. $FFD2 takes PETSCII; a direct

sta $0400 takes a screen code. They are different encodings. See references/petscii.md.

  1. Banking out ROM means banking out the IRQ handler. Any write to $01 that removes

the KERNAL must be wrapped in sei / cli, with the hardware vector at $FFFE set up first. See references/memory-map.md.

  1. Acknowledge VIC interrupts. A raster IRQ that does not clear $D019 fires forever.
  2. Derive REU command bytes from the bit fields, not from copied constants. Published

listings disagree on the unused bits. See references/reu.md.

Sources

Written from the Commodore 64 Programmer's Reference Guide, Mapping the Commodore 64 (Sheldon Leemon), the Kick Assembler manual (Mads Nielsen), the REU article at retro-programming.de, and the Ultimate Documentation (Gideon Zweijtzer) for the Command Interface. No text was copied from those sources; register values and protocol behaviour were checked against real hardware where possible.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cybersorcerer/c64u/c64-knowledge/badge)](https://verified-skill.com/skills/cybersorcerer/c64u/c64-knowledge)

Something wrong with this skill or its page? Tell us.