gmc64 CLAUDE.md

An engineering reference for GMC64, a browser-based recreation of the 1985 Commodore 64 GameMaker program for building and editing C64-style games.

In plain words
What is it for?
Use it when working on the editor, sprite and scene tools, music, game movement, or PRG, SPR, SND, SNG, and PIC files stored on D64 disk images.
Why use it?
It gives developers the project’s file formats, coordinate rules, architecture, and other details needed to change the recreation without breaking compatibility with original GameMaker files.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/needlestack/gmc64/claude-md
Clone the repo
git clone --depth 1 https://github.com/needlestack/gmc64
Per session 11,120 This file is loaded in full into every session.
When invoked 11,120 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.11120 $0.11120
Opus 5 $0.05560 $0.05560
Sonnet 5 $0.02224 $0.02224
Haiku 4.5 $0.01112 $0.01112

Measured 2d ago against content hash be75fd0f7e7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gmc64 CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 919 lines

How it starts

The opening of the file, as written. The whole thing — 919 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GMC64 Technical Documentation

A faithful, modern recreation of Garry Kitchen's GameMaker (Activision, 1985).

gmc64 lets you build, run, and edit C64-style games in the browser, with original-format .PRG, .SPR, .SND, .SNG, and .PIC files stored on D64 disk images. Files round-trip cleanly with the original 1985 GameMaker disk running on real C64 hardware.

This document is the internal engineering reference — architecture, file formats, gotchas, and recipes for working in the codebase. Reader-facing overview lives in README.md.

Quick Reference

Item Value
Music tempo gmMusic.BASE_BPM = 140 (tempo 80 = 140 BPM)
Screen resolution 320×200 native, CSS scales to display
Coordinate system GM fat pixels: X 12-171, Y 50-249 → 320×200: (x-12)*2, y-50
Movement formula X: speed / 46, Y: speed / 31.5 at 60fps (C64 pixels aren't square)
Animation formula frame_skip = 32 - animSpeed
File separator / not . (PETSCII): PLAYER/SPR not PLAYER.SPR

Project Structure

├── editor.html          Program editor/runner (AST-based VM)
├── sprite-maker.html    Sprite editor
├── scene-maker.html     Scene editor
├── sound-maker.html     Sound effect editor
├── music-maker.html     Music editor
├── js/
│   ├── gmRuntime.js     VM execution, sprites, collision
│   ├── gmParser.js      Bytecode → AST parsing
│   ├── gmSprite.js      Sprite parsing/rendering
│   ├── gmScene.js       Scene parsing (indexed pixel buffer)
│   ├── gmSound.js       Sound effects (Web Audio + SID emulation)
│   ├── gmMusic.js       Music playback (3-channel)
│   ├── gmDisk.js        D64 disk + localStorage persistence
│   ├── gmEditor.js      Instruction editor UI
│   ├── gmOpcodes.js     Opcode definitions
│   ├── gmCharset.js     C64 font rendering
│   ├── gmTools.js       Shared utilities
│   ├── d64lib.js        Pure D64/1541 disk parsing
│   ├── c64lib.js        C64 palette, PETSCII decoding
│   ├── c64Screen.js     320×200 canvas wrapper
│   ├── gif.js           GIF library (jnordberg/gif.js)
│   └── gifWorkerBlob.js GIF worker as inline blob (avoids file:// security restrictions)
├── css/
│   └── gm-ui.css        Master stylesheet (C64 colors, fonts, components)
├── tests/
│   ├── *.test.js        Vitest test files
│   ├── generate-golden-*.js  Golden file generators
│   ├── golden/          Golden snapshot files (JSON)
│   └── disks/           Test D64 disk images
├── tools/
│   ├── screenshot.js    Puppeteer screenshot utility
│   └── hex-viewer.html  Hex dump viewer
└── docs/
    ├── TODO.md          Future improvements
    └── references/      Reference materials

Read the full file on GitHub · 919 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 919 lines · 11,120 tokens per session scan A be75fd0f7e7d

Subscribe to this mod's changes

gmc64 CLAUDE.md is an instructions file published in the GitHub repository needlestack/gmc64 (11 stars, last pushed 1mo ago), licensed MIT. It adds 11,120 tokens to every session, about $0.0556 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.