/ Directory / Playground / Gearsystem
● Community drhelius ⚡ Instant

Gearsystem

by drhelius · drhelius/Gearsystem

Debug Sega Master System / Game Gear ROMs with an AI pair — set breakpoints, inspect VRAM, and walk disassembly conversationally.

Gearsystem is drhelius's long-running, well-regarded Sega Master System / Game Gear / SG-1000 emulator. Recent versions embed an MCP server that exposes the debugger (CPU breakpoints, memory inspection, disassembly, VRAM/palette views) to AI agents. Useful for retro homebrew development and ROM reverse-engineering of code you own.

Why use it

Key features

Live Demo

What it looks like in practice

gearsystem.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "gearsystem": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/drhelius/Gearsystem"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "gearsystem": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/drhelius/Gearsystem"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "gearsystem": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/drhelius/Gearsystem"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "gearsystem": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/drhelius/Gearsystem"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "gearsystem",
      "command": "TODO",
      "args": [
        "See README: https://github.com/drhelius/Gearsystem"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "gearsystem": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/drhelius/Gearsystem"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add gearsystem -- TODO 'See README: https://github.com/drhelius/Gearsystem'

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use Gearsystem

Debug a homebrew Master System ROM that crashes on title screen

👤 Retro homebrew developers ⏱ ~30 min advanced

When to use: Your WLA-DX build runs fine in your head but Gearsystem freezes on the title screen.

Prerequisites
  • Gearsystem built with MCP enabled — Clone drhelius/Gearsystem and build per MCP_README.md
  • The ROM and its .sym symbol file — Output of your assembler (WLA-DX, asm6 etc.)
Flow
  1. Launch headless and set a breakpoint at the crash point
    Launch Gearsystem MCP with my ROM. Set a CPU breakpoint at the label init_vdp and run.✓ Copied
    → Execution halts at the breakpoint
  2. Inspect CPU and VRAM state
    Show me the Z80 registers and the first 32 bytes of VRAM. Anything look wrong for this point in init?✓ Copied
    → Register dump + observations about expected vs actual
  3. Step through and watch a specific memory region
    Add a memory-access breakpoint on $C000 and step until something writes there.✓ Copied
    → Stops at the offending instruction

Outcome: A root cause (e.g. VDP register written before VRAM is safe) with the exact instruction address.

Pitfalls
  • Symbols not loaded — addresses are opaque — Make sure .sym matches the exact ROM build; rebuild to align if needed
  • Timing bug only repros on real hardware, not emulator — Emulator has limits; for bus timing edge cases, test on a real SMS
Combine with: filesystem

Reverse-engineer a ROM you own to document its memory map

👤 Preservationists and devs documenting their own or public-domain ROMs ⏱ ~60 min advanced

When to use: You're writing a tech analysis article or disassembly and need a memory map.

Flow
  1. Run the ROM and inspect at key moments
    Boot the ROM, break at VBlank, dump WRAM at $C000-$DFFF. Then run one frame and dump again.✓ Copied
    → Two WRAM snapshots for diffing
  2. Identify likely variables by diffing
    Compare the two snapshots. Which addresses changed? What are they likely to be (counters, pointers, sprite positions)?✓ Copied
    → Hypothesized variable map with justification

Outcome: A first-pass memory map you can refine by hand.

Pitfalls
  • Reverse-engineering commercial copyrighted ROMs you don't own is a legal gray area — Only use this on ROMs you own or that are in the public domain. Don't publish RAM maps for commercial ROMs without considering fair-use rules in your jurisdiction

Automate a smoke test for your ROM on every commit

👤 Homebrew devs with a CI pipeline ⏱ ~25 min intermediate

When to use: You want 'boots to title screen without crashing' as a CI gate.

Flow
  1. Script the MCP session
    Write a script that launches Gearsystem MCP headless, runs my ROM for 600 frames, and returns non-zero if the CPU halted on an invalid opcode.✓ Copied
    → Shell script with clear exit codes
  2. Wire into CI
    Wrap that in a GitHub Actions workflow that runs on every push to main.✓ Copied
    → Working CI step

Outcome: A smoke test that catches regressions before you manually load the ROM.

Combine with: github

Combinations

Pair with other MCPs for X10 leverage

gearsystem + github

Debug and commit a fix in one flow

Reproduce issue #12 in my ROM, find the faulting address, open a PR with a one-liner fix in src/vdp.asm.✓ Copied
gearsystem + filesystem

Read the .sym file alongside the debugger to translate addresses to labels

Load ./build/game.sym and tell me the label at address $03A7.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
run (none) Resume execution after a break free (local)
pause (none) Halt to inspect free
step n?: int Single-step instructions free
set_breakpoint address: hex, kind: cpu|read|write Watch for a PC hit or memory access free
read_memory address: hex, length: int Inspect WRAM / VRAM / cart regions free
disassemble address: hex, instructions: int Read code around a PC free
get_registers (none) Any inspection moment free
dump_vram start?: hex, length?: int Graphics debugging free

Cost & Limits

What this costs to run

API quota
None — fully local process
Tokens per call
Memory dumps can be large; narrow ranges keep responses small
Monetary
Free, GPL-3.0 licensed
Tip
Ask for small memory windows (16-64 bytes) unless you actually need a full page.

Security

Permissions, secrets, blast radius

Credential storage: None needed
Data egress: Runs locally; MCP server binds to stdio or chosen HTTP port

Troubleshooting

Common errors and fixes

MCP flags not recognized

Your build was compiled without MCP support. Rebuild with the flag enabled per MCP_README.md.

Verify: gearsystem --help | grep mcp
Breakpoint never hits

Symbol resolution likely off; try using a raw address instead of a label. Confirm ROM is actually loaded.

Verify: Use get_registers to confirm PC is moving
HTTP transport refused connection

Check the port isn't in use and the emulator started with --mcp-http --mcp-http-port 7777.

Verify: curl http://127.0.0.1:7777/

Alternatives

Gearsystem vs others

AlternativeWhen to use it insteadTradeoff
EmuliciousYou want a full GUI debugger for Game Boy/SMS/etc.No MCP; human-driven only
BizHawkMulti-system TAS/debuggingLua-scripted rather than MCP

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills