geargrafx-romhacking — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited geargrafx-romhacking (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Hack, modify, and translate TurboGrafx-16, PC Engine, and SuperGrafx ROMs using the Geargrafx emulator as an MCP server. Search memory for game variables, create cheats, find text strings for translation, locate sprite data, and reverse engineer data structures — all through MCP tool calls. Use save states as checkpoints and fast forward to reach specific game states.
IMPORTANT — Check before installing: Before attempting any installation or configuration, you MUST first verify if the Geargrafx MCP server is already connected in your current session. Call debug_get_status — if it returns a valid response, the server is active and ready.
Only if the tool is not available or the call fails, you need to help install and configure the Geargrafx MCP server:
Run the bundled install script (macOS/Linux):
bash scripts/install.shThis installs Geargrafx via Homebrew on macOS or downloads the latest release on Linux. It prints the binary path on completion. You can also set INSTALL_DIR to control where the binary goes (default: ~/.local/bin).
Alternatively, download from GitHub Releases or install with brew install --cask drhelius/geardome/geargrafx on macOS.
Configure your AI client to run Geargrafx as an MCP server via STDIO transport. Example for Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"geargrafx": {
"command": "/path/to/geargrafx",
"args": ["--mcp-stdio"]
}
}
}Replace /path/to/geargrafx with the actual binary path from the install script. Add --headless before --mcp-stdio on headless machines.
PC Engine hardware documentation is available in the references/ directory. Load them into your context when you need data formats, memory layout, or hardware details.
| Reference | File | Load when... |
|---|---|---|
| HuC6280 CPU | references/huc6280_cpu.md | CPU registers, MPR mapping, timer, I/O, opcode reference |
| Instruction Set | references/huc6280_instructions.md | Opcode reference, addressing modes, cycle counts |
| PSG | references/huc6280_psg.md | 6-channel sound: waveform, noise, LFO, DDA |
| HuC6270 VDC | references/huc6270_vdc.md | BAT, sprites, scroll, DMA, VRAM layout |
| HuC6260 VCE | references/huc6260_vce.md | Palette, dot clock, color format |
| HuC6202 VPC | references/huc6202_vpc.md | Video Priority Controller (SuperGrafx): window, priority |
| Memory Map | references/memory_map.md | Full memory map: MPR pages, I/O, WRAM, VRAM, ROM banking |
Memory search is the primary tool for ROM hacking. It uses a capture → change → compare cycle to isolate memory addresses holding game values.
1. memory_search_capture → snapshot current memory state
2. (change the value in-game using controller_button, fast forward, etc.)
3. memory_search → compare against snapshot to find changed addresses
4. Repeat 2-3 until only a few candidates remain
5. read_memory / write_memory → verify and modify the found addressesmemory_search supports these operators: <, >, ==, !=, <=, >=
Compare types:
previous — compare current value to last captured snapshot (most common)value — compare current value to a specific numberaddress — compare current value to value at another addressData types: hex, signed, unsigned
1. memory_search_capture → snapshot with 3 lives
2. Lose a life in-game (play or use controller_button)
3. memory_search (operator: <, compare: previous) → values that decreased
4. memory_search_capture → snapshot with 2 lives
5. Lose another life
6. memory_search (operator: <, compare: previous) → narrow further
7. Or use: memory_search (operator: ==, compare: value, value: 1)
→ find addresses holding exactly 1
8. write_memory on the candidate address to set lives to 99
9. get_screenshot to verify the change took effectScore values are often stored as multi-byte (16-bit little-endian on HuC6280):
1. memory_search_capture → snapshot at score 0
2. Score some points in-game
3. memory_search (operator: >, compare: previous) → values that increased
4. memory_search_capture
5. Score more points
6. memory_search (operator: >, compare: previous) → narrow down
7. read_memory on candidates — look for values matching current score
8. write_memory to set a custom scoreFor 16-bit values: the low byte is at address N, high byte at N+1 (HuC6280 is little-endian).
Use fast forward to speed through gameplay when you need to trigger in-game changes:
set_fast_forward_speed (4 = unlimited)
toggle_fast_forward → enable
(play through the game section)
toggle_fast_forward → disableThis is essential when you need to reach specific game states without waiting in real-time.
Save states are critical for ROM hacking — they let you save your position and retry modifications:
select_save_state_slot (1-5) → pick a slot
save_state → save current state
(try modifications)
load_state → revert if something breaksUse different slots for different game states (e.g., slot 1 = start, slot 2 = boss fight, slot 3 = specific level).
list_save_state_slots shows all slots with ROM name, timestamp, and screenshot availability.
The emulator also records continuous snapshots into a rewind ring buffer. Use get_rewind_status to check availability, then rewind_seek to jump to any recorded point without manual save/load. This is especially useful for quickly reverting after a failed memory write — pause, seek back a few snapshots, and retry.
To find text strings for translation or modification:
read_memory across ROM scanning for known byte patternsmemory_find_bytes to search for specific byte sequences across memoryset_breakpoint (type: read) to confirm they're used for renderingget_screenshot to correlate displayed text with memory contentslist_sprites to see all 64 sprites with position, size, pattern, and palette infoget_sprite_image to capture individual sprite images as PNGget_huc6270_registers to find BAT address, sprite attribute table settingsread_memory on VRAM and SAT areas to analyze tile and sprite dataget_screenshot before/after modifications to see visual changesReference the VDC hardware docs (references/huc6270_vdc.md) for BAT and sprite format details.
debug_pause → get_disassembly around code that loads dataread_memory at the target addresses to dump the table contentsadd_memory_bookmark to mark discovered data regionsadd_symbol to label data table entry points for future reference1. Find the address using the search loop (above)
2. Set a write breakpoint: set_breakpoint (type: write) on the address
3. debug_continue → when it hits, get_disassembly to see the decrement code
4. Note the instruction (e.g., DEC $0042 or STA $0042)
5. Option A: Periodically write_memory to reset the value (simple poke cheat)
6. Option B: Identify the decrement routine for a NOP patchUse add_memory_watch on discovered addresses. Watches appear in the emulator's GUI memory editor, letting you monitor values as the game runs — useful for verifying cheats work across different game situations.
The most powerful cheat-finding technique:
set_breakpoint (type: write) on that addressdebug_continue — the emulator stops when the game writes to that addressget_huc6280_status + get_disassembly reveals the exact code modifying the valueget_call_stack shows what triggered the writeget_screenshot of a screen with textread_memory to dump the font/character table from VRAM tilesadd_symbol to label the font table and rendering routineread_memory with large rangesmemory_find_bytes to search for known byte patternsadd_memory_bookmark to mark each string locationROM hacking translations must fit within existing space:
read_memory to determine how much space each string occupieswrite_memory to patch translated strings into memoryget_screenshot to verify renderingsave_state before each change so you can load_state if it breaksUse list_memory_areas to get the full list with IDs and sizes. Common areas:
| Area | Description | Use |
|---|---|---|
| WRAM | Working RAM (8KB, 32KB on SGX) | Game variables, state, stack |
| ZP | Zero Page ($0000-$00FF) | Fast variables: lives, health, score, position |
| ROM | Game ROM | Code and static data |
| CARD RAM | HuCard RAM | Extra RAM on some cards |
| BRAM | Backup RAM (2KB) | Save data, high scores |
| PALETTES | VCE color table (512 bytes) | Color palette data |
| VRAM | VDC video RAM (64KB) | Tiles, BAT, sprite patterns |
| SAT | Sprite Attribute Table (512 bytes) | Sprite positions, sizes, patterns |
| CDROM RAM | CD-ROM working RAM | CD game data |
| ADPCM | ADPCM sample RAM (64KB) | Voice/sample playback data |
| ARCADE | Arcade Card RAM | Arcade Card game data |
Zero Page ($0000-$00FF) is the most common location for game variables (lives, health, score, position) because HuC6280 zero page addressing is faster.
Keep your hacking session organized:
add_memory_bookmark — mark discovered data regions, variable locations, string tablesadd_memory_watch — track values that change during gameplayadd_symbol — label addresses in disassembly for readabilityadd_disassembler_bookmark — mark code routines you've identifiedUse list_memory_bookmarks, list_memory_watches, list_symbols, list_disassembler_bookmarks to review.
Changes made via write_memory to ROM areas are applied to the emulator's in-memory copy only — they are not persisted to the ROM file on disk. To create a permanent patch, use command-line tools (e.g., a binary patch script) to apply the discovered modifications to the actual ROM file.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.