PET PROJECT
A set of tools, skills, and an MCP that let AI agents write and debug Commodore PET software — BASIC and 6502 assembly — on the VICE emulator.
── WHAT IS IT ──
The Commodore PET was where a generation learned to program. PET Project brings it back — not just for nostalgia, but as a place an AI agent can actually build, run, and debug real 8-bit software end to end.
It drives the open-source VICE emulator through a clean command line (every command speaks JSON) and an MCP server, and includes the machine knowledge — skills, memory maps, a tested cookbook — that an agent needs to get it right.
── CAPABILITIES ──
Boot any PET model (2001–8296) headless, in warp, with a disk attached.
Assemble 6502 with cc65 or tokenize BASIC; load and RUN in one step.
Symbolic breakpoints and watchpoints, single-step, memory and register inspection.
Block until screen text appears, memory hits a value, or a checkpoint fires.
Create images, copy files in and out, attach and boot — via c1541.
Identify the ROM set and disassemble live memory with symbol annotations.
Boot, load, feed input, assert on screen / memory / registers. CI-ready.
~30 MCP tools plus skills, memory maps, and a tested recipe cookbook.
── QUICK START ──
Needs Python 3.11+, VICE 3.5+, and the cc65 suite.
# macOS
brew install vice cc65
pip install -e .
Then drive an emulated PET:
pet session start --model pet4032 # boot a PET 4032 pet run game.s # assemble + load + RUN pet screen # read the screen as text pet break add start # symbolic breakpoint pet wait --break # block until it fires pet step 5 && pet reg # single-step, inspect
Every command takes --json — the interface an agent uses.
── USE WITH AN AI AGENT ──
Any agent with a shell needs zero setup — the CLI plus --json
is the whole integration. For MCP-native clients, pet-tools-mcp exposes
the same operations. Pick your agent:
- Install the skills:
mkdir -p .claude/skills && cp -R skills/* .claude/skills/ - Optional MCP:
claude mcp add pet-tools -- pet-tools-mcp - Ask for what you want — e.g. paste a prompt from
demos/.
No CLAUDE.md edits needed — installed skills load on demand.
- Add the MCP:
codex mcp add pet-tools -- pet-tools-mcp - In
AGENTS.md: “For PET work, first read skills/pet-development/SKILL.md and docs/cli.md.” - Paste a prompt from
demos/.
- Add the standard
mcpServersblock to.cursor/mcp.json. - Add a rule (
.cursor/rules/pet.mdc) pointing at skills/pet-development/SKILL.md. - Paste a prompt from
demos/.
- Add the
mcpServersblock to.gemini/settings.json. - Add the read-the-skill one-liner to
GEMINI.md. - Paste a prompt from
demos/.
- MCP store → Manage MCP Servers → View raw config → add the
mcpServersblock. - Add the read-the-skill one-liner to
AGENTS.md. - Paste a prompt from
demos/.
── DEMOS: TRY IT! ──
Ready-to-paste prompts, graded from a first BASIC program up to Snake in assembly. Each is validated by handing it to a real agent and confirming the result. 01–04 pass on the first attempt.
| # | Demo | Language | Status |
|---|---|---|---|
| 01 | Guess the number | BASIC | [OK] passed |
| 02 | Bouncing ball | BASIC | [OK] passed |
| 03 | Sieve benchmark | BASIC + asm | [OK] passed (asm 93x faster than BASIC) |
| 04 | Snake | 6502 assembly | [OK] passed |
| 05 | Debug hunt | BASIC + debugger | [ ] queued |