drhelius/geargrafx/geargrafx-romhacking
- community
Checking that the SKILL.md file is still in the repository.
Hack, modify, and translate TurboGrafx-16 / PC Engine / SuperGrafx ROMs using the Geargrafx emulator MCP server. Provides workflows for memory searching, value discovery, cheat creation, data modification, sprite/text finding, and translation patching. Use when the user wants to create cheats, find game values in memory, modify ROM data, translate a PC Engine game, patch game behavior, create ROM hacks, discover hidden content, change sprites or graphics, find text strings, do infinite lives or health hacks, search for score or item counters, or reverse engineer data structures in TurboGrafx-16 or PC Engine games. Also use for any ROM hacking, memory poking, or game modification task involving Geargrafx.
Install
npx vskill@latest install drhelius/geargrafx/geargrafx-romhackingSKILL.md
TurboGrafx-16 / PC Engine ROM Hacking with Geargrafx
Overview
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.
MCP Server Prerequisite
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. In the default mode, call debug_get_status directly. If Geargrafx was intentionally started with --mcp-router, call get_tool_info with {"name":"debug_get_status"}, then call execute_tool with {"name":"debug_get_status","arguments":{}}. A valid response from either workflow means the server is active and ready.
Only if neither workflow is available or the call fails, you need to help install and configure the Geargrafx MCP server:
Installing Geargrafx
Run the bundled install script (macOS/Linux):
This 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.
Connecting as MCP Server
Configure your AI client to run Geargrafx as an MCP server via STDIO transport. For Claude Code:
For Codex:
Replace /path/to/geargrafx with the actual binary path from the install script. Add --headless before --mcp-stdio on headless machines.
Hardware Documentation (References)
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 |
Core Technique: Memory Search
Memory search is the primary tool for ROM hacking. It uses a capture → change → compare cycle to isolate memory addresses holding game values.
The Search Loop
Search Operators and Types
memory_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 address
Data types: hex, signed, unsigned
Example: Finding the Lives Counter
Example: Finding a Score Counter
Score values are often stored as multi-byte (16-bit little-endian on HuC6280):
For 16-bit values: the low byte is at address N, high byte at N+1 (HuC6280 is little-endian).
Fast Forward for Efficiency
Use fast forward to speed through gameplay when you need to trigger in-game changes:
This is essential when you need to reach specific game states without waiting in real-time.
Save States as Checkpoints
Save states are critical for ROM hacking — they let you save your position and retry modifications:
Use 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.
Rewind as an Alternative
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.
Finding and Modifying Game Data
Text and String Discovery
To find text strings for translation or modification:
- Determine the character encoding — PC Engine games often use custom character maps stored in VRAM tiles, not ASCII
read_memoryacross ROM scanning for known byte patterns- Use
memory_findwithtextfor literal strings orhex_bytesfor encoded byte sequences - Set read breakpoints on suspected text addresses with
set_breakpoint(type: read) to confirm they're used for rendering get_screenshotto correlate displayed text with memory contents
Sprite and Graphics Data
list_spritesto see all 64 sprites with position, size, pattern, and palette infoget_sprite_imageto capture individual sprite images as PNGget_huc6270_registersto find BAT address, sprite attribute table settingsread_memoryon VRAM and SAT areas to analyze tile and sprite data- Set read breakpoints on sprite data addresses to find the rendering code
get_screenshotbefore/after modifications to see visual changes
Reference the VDC hardware docs (references/huc6270_vdc.md) for BAT and sprite format details.
Data Tables and Structures
debug_pause→get_disassemblyaround code that loads data- Look for LDA/LDX/LDY instructions with absolute or indexed addressing — these point to data tables
read_memoryat the target addresses to dump the table contentsadd_memory_bookmarkto mark discovered data regionsadd_symbolto label data table entry points for future reference
Creating Cheats
Infinite Lives / Health
Cheat Codes
Cheats use the de facto PC Engine format AAAAAA:VV:
AAAAAAis a 21-bit physical address:bank << 13 | (address & 0x1FFF). The offset in thePHYSICALmemory area is the cheat address.- Work RAM (bank
$F8):1F+ 4-digit offset, e.g. WRAM$0042(zero page) →1F0042. On SuperGrafx, work RAM extends to1F7FFF. - CD RAM (banks
$80-$87):100000-10FFFF. Super CD RAM (banks$68-$7F):0D0000-0FFFFF. Backup RAM (bank$F7):1EE000-1EE7FF. - HuCard ROM (banks
$00-$7F): bank from the MPR mapping the CPU address (get_huc6280_status) or the disassembly bank. ROM codes patch the ROM; System Card BIOS banks on CD games are rejected. - Codes with a bank byte + CPU address (e.g.
F82042) are also accepted. VV: 1-2 hex digits, 3 decimal digits (231), or 4 hex digits for a 16-bit little-endian value (03E7writesE7then03).AAAAAA?CC:VVwrites only when the current byte isCC. Join several codes with+.
Use add_cheat, remove_cheat and list_cheats to apply and test cheats; they appear in the emulator's Cheats window. Check active in the result: a valid code that targets unmapped or BIOS memory is not applied.
Watching Values in Real-Time
Use 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.
Write Breakpoint Technique
The most powerful cheat-finding technique:
- Find the variable address via memory search
set_breakpoint(type: write) on that addressdebug_continue— the emulator stops when the game writes to that addressget_huc6280_status+get_disassemblyreveals the exact code modifying the valueget_call_stackshows what triggered the write- You now know exactly where and how the game manages that variable
Translation Workflow
1. Identify the Font System
get_screenshotof a screen with text- Find text rendering code by setting read breakpoints on VRAM areas
- Trace back to find the character mapping table
read_memoryto dump the font/character table from VRAM tilesadd_symbolto label the font table and rendering routine
2. Find String Data
- Look for sequential text bytes in ROM using
read_memorywith large ranges - Use
memory_findwithtextfor literal strings orhex_bytesfor known byte patterns - Cross-reference with the character table to decode strings
add_memory_bookmarkto mark each string location
3. Measure Space Constraints
ROM hacking translations must fit within existing space:
read_memoryto determine how much space each string occupies- Check for string terminators (commonly $00, $FF, or length-prefixed)
- If the translation is longer, look for unused ROM space or abbreviate
4. Apply and Test
write_memoryto patch translated strings into memoryget_screenshotto verify renderingsave_statebefore each change so you canload_stateif it breaks- Test all screens that display modified text
Memory Map Quick Reference
Use list_memory_areas to get the full list with IDs and sizes. Common areas:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/geargrafx-romhacking/SKILL.md
Popularity
- Repository stars
- 220
- Repository forks
- 14
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. 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
[](https://verified-skill.com/skills/drhelius/geargrafx/geargrafx-romhacking)