/gameframe:re-observefrom gameframe
Runs original games in emulators (DOSBox-X, 86Box, Wine, console emulators) to capture frames, state, inputs, calls, file reads, and sound as measured evidence. Builds a queryable object model for tests and agents.
Ships in gameframe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Static reading says what the code could do; a run of the original says what it does. This
skill gets the original running somewhere you can watch, drive and capture it, and turns what
you see into evidence labelled measured. Details and tables are in docs/observe/.
Read docs/games/README.md and the family page for your game. Write the answers in
docs/FINDINGS.md: who drives (a stream, a simulation, an environment, turns), the time
model, how exact the interface must be. They decide what to capture.
| The game | Run it in | For |
|---|---|---|
| One function of a Windows x64 binary | tools/emu/pe_emu.py | exact results in tests (re-emulate) |
| One routine of a DOS program | tools/emu/dos_emu | the same, 16-bit |
| A whole DOS program, headless | tools/emu/dos_env | frames, memory and demos in scripts; keys from env.keys |
| A DOS program with a window | DOSBox-X (debugger, file log), scripted with tools/dos/dbx_control.py | breakpoints, memory, fileio_trace.py |
| A DOS or Windows 3.x/9x game that depends on its PC hardware | 86Box, with a recorded machine profile | the configured CPU, BIOS, chipset, buses, sound cards and resource assignments (docs/observe/86box.md) |
| A Windows game | Wine (WINEDEBUG=+relay), a Windows machine or VM, or a PC streamed to you | API calls, screenshots, debuggers, RenderDoc |
| A console or arcade game | an emulator with a debugger (Mesen, bsnes, Dolphin, PCSX2, MAME) | memory, input movies, frame advance |
Prefer headless, scripted runs for evidence. Use windowed runs to see what happens and where to
look. docs/observe/running-the-original.md has the full table.
Use DOSBox-X for fast DOS runs that need its debugger or file log. Use 86Box when the question depends on a particular PC, BIOS, expansion bus, guest Windows version or card resource setting. Record the 86Box release, machine profile, guest OS, card model, I/O ports, IRQ, DMA and driver version with each capture. Treat the result as an observation of that 86Box build and profile, not as physical-hardware evidence. Keep 86Box source out of a source-blind implementation task; pass the behavior description and its setup conditions to the implementation stage.
Before the first run, list what the game needs and the modules that provide it
(docs/harness/README.md):
./gameframe run needs game/ # cpu, os, api, lib, drm, media: each with its evidence
./gameframe run harness plan game/ --script derived/harness.sh # a runtime, the layers, the gaps
Read the script, set its variables, then run it. A need marked NO MODULE is a gap. When a
change around the game makes it run (a client, a decoder, a setting), write that change as a
module from docs/harness/modules/_template.md: in the project, or in GameFrame when any game
with that need could use it. Check modules with ./gameframe run harness check.
To record a whole run as the reference for a port, read docs/observe/recording.md:
tools/live/memrec.py records named values from the game's memory, memlog.py reads them
back, and the replay checks every sample with a window (tools/verify/replay.py, re-verify).
In a 3D game, tools/triage/axes.py reads such a recording over the level's vertices and names
the up axis, its sign and the handedness, before any viewer or editor relies on them.
Before the first run, ask what is known about the game's era and the system you run it on:
./gameframe advise windows-9x directdraw wine or ./gameframe advise dos dosbox. Old games
assumed hardware that modern systems refuse (port I/O, 16-bit desktops, short mode lists, a CD
in the drive). The context entries list the checks to make first, such as
./gameframe run insns GAME.EXE '^(in|out|cli|sti)' for privileged instructions. When a run
fails, pass the error text or the log's tail to ./gameframe advise -.
In an emulator, start every run from a save state, record the inputs as a movie, and have a
script dump the game's memory after each frame. Those dumps are ground truth for
tools/verify/ramdiff.py. Search Data Crystal, The Cutting Room Floor and TASVideos for RAM
maps and mechanics before measuring (docs/observe/emulators.md).
For every capture, write next to it the game version (hash), settings, seed, and the inputs
or demo, so it can be made again. Keep captures in ignored folders (derived/): they are game
material.
| Capture | How |
|---|---|
| Frames | video memory in the emulator; screenshots; screencapture -l of a window |
| State | memory dumps at chosen points; the game's own saves; tools/triage/memscan.py finds a value's address across dumps, tools/triage/pointerpaths.py a chain of pointers that finds it in every run, tools/formats/markers.py where a file's fields land (docs/observe/memory.md) |
| Frames | tools/formats/rawimage.py turns a dump of video memory into a PNG in the original's mode and palette |
| Inputs | the game's demo or replay files; breakpoints on input reads |
| Driving a game under Wine | tools/live/winput.py run --prefix PREFIX window TITLE key enter ... sends keys as scancodes, mouse moves and clicks from inside Wine. It needs no macOS permission |
| Where to click | tools/live/align.py find REF.png NOW.png --point X,Y --check out.png lines up a known picture of the screen (a frame from the port, an earlier capture) with a capture of the window now, frame and scale included, and gives the click point in the capture. Look at out.png before clicking. When the screen changed too much (score below 0.5), tools/llm/locate.py NOW.png --find "the Exit button" asks a selected vision model, local or paid |
| Calls and random draws | tools/emu/call_trace.py; debugger traces |
| File reads | tools/dos/fileio_trace.py on DOSBox-X logs; Process Monitor; Wine's WINEDEBUG=+file (docs/observe/system-calls.md) |
| Calls to the system | Wine's relay log, strace, a proxy library (docs/observe/system-calls.md) |
| What it draws | apitrace or RenderDoc captures of the draw calls; dgVoodoo 2 for older APIs (docs/observe/drawing.md) |
| Network messages | Wireshark captures, then tools/formats/pcap.py and tools/formats/fields.py (docs/observe/network.md) |
| The code for one action | coverage of two runs, with and without the action, compared by tools/triage/coverdiff.py (docs/observe/debuggers.md) |
| Values at a moment | a debugger or an emulator's GDB stub, with memory breakpoints (docs/observe/debuggers.md) |
| Sound | the chip's register writes; WAV recordings |
Fill a table in docs/FINDINGS.md of every input from outside, with the address of each read:
controls, clocks and timers, random seeds, configuration and files, the command line and
environment, hardware detection, window messages, network. Search for them with the
signatures in docs/observe/inputs.md (interrupts, ports, API imports). Then design the port's
input record: one per frame or per command, the only way the rules receive anything from
outside.
List every screen: how to reach it, the code or layout that draws it, its states, inputs, what
it changes, its text and font, and its captures. Find screens by playing, by following the code
from the main menu, and by listing layout and string data. Capture each state with the inputs
that reached it. docs/observe/ui.md has the fields and how to rebuild data-driven and coded
interfaces.
Give the original and the port the same model, named with the original's names: the interface
tree, the world's entities and fields, and the session (loop, frame, pause, seed). Add entry points as
the work needs them: query, input (as the player), commands, time (step, run n), state in and
out, trace, capture. Entry points only read or act as a player would; tests, scripts and agents use
nothing else. docs/observe/object-model.md has the rules and examples from three ports.
docs/FINDINGS.md: the kind of game, the inputs table, the screen inventory.--help or no arguments and runs nothing. It writes
into a new folder or refuses to overwrite one, so checking its usage never truncates a capture
that took a quarter of an hour.labels/) for every variable and function the captures name.docs/LEGAL.md, docs/preservation/law/), then follow
the user's decision.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
game-emulation, reverse-engineering, game-analysis, dosbox, 86box, wine
npx claudepluginhub tanepiper/game-frame --plugin gameframe16 skills in this plugin
/re-browseBuild and grow a resource viewer for a game - first the catalogue (tools/formats/catalog.py, a static HTML page and JSON manifest of every file, its kind, entropy, hex and what the Python decoders make of it, with pictures), then the project's own viewer app on the port's readers (pictures, palettes, sound, 3D models, text, hex; native and browser; a file output mode for agents). Use at the start of a project, right after the inventory, and after every new decoder, so the person and the agent can check decoded content by looking at it./re-cleanroomRun a source-visible specification and source-blind implementation workflow when a project wants independent reimplementation from a neutral behavior contract./re-emulateRun individual functions from a game's Windows x64 binaries (tools/emu/pe_emu.py), 32-bit x86 Windows binaries (tools/emu/pe32_emu.py) or 16-bit DOS/NE programs (tools/emu/dos_emu/) under the Unicorn emulator to capture exact ground truth for chosen inputs, and record the calls they make (random draws) with call_trace.py. Use for anything a reimplementation must match bit for bit - random number generators, maths, procedural generation, simulation steps, pathfinding, parsers - instead of trusting the pseudocode./re-formatDecode a game's data files - package/archive containers, compressed entries, resource and asset formats, save games - by finding the code that reads them, prototyping a decoder with tools/formats/reader.py, proving it against every file of its type with validate.py (all bytes consumed), then porting it. Use when a file type is not yet understood or a decoder fails on some files./re-ghidraDecompile a game's binaries with Ghidra in headless mode and work with the result as text - the full export (decomp.c, functions, strings, imports, exports), queries with decomp_query.py, one-off decompiles of functions Ghidra missed, vtable and reference listings, constants read from the binary, and checks against the disassembly. Use whenever you need pseudocode for a native binary, including 16-bit DOS (MZ) and NE programs./re-inventoryFirst look at a game's files (Windows PE, or DOS MZ/NE/LE executables) - which binaries hold the game's own code, which engine and middleware it uses, whether it is native, managed, scripted or packed, which data containers and save files exist - and record it in docs/FINDINGS.md; then read the manual and the program's long strings into docs/lore.md, which says what each system is for. Use at the start of a project, or when a new binary or file type turns up.Other plugins' skills for the same job