gearboy-debugging — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited gearboy-debugging (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.
Debug Game Boy, Game Boy Color, and Super Game Boy games using the Gearboy emulator as an MCP server. Control execution (pause, step, breakpoints), inspect the SM83 CPU and hardware (LCD, APU, SGB, sprites), read/write memory, disassemble code, trace instructions, and capture screenshots — all through MCP tool calls.
IMPORTANT — Check before installing: Before attempting any installation or configuration, you MUST first verify if the Gearboy 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 Gearboy MCP server:
Run the bundled install script (macOS/Linux):
bash scripts/install.shThis installs Gearboy 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/gearboy on macOS.
Configure your AI client to run Gearboy as an MCP server via STDIO transport. Example for Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"gearboy": {
"command": "/path/to/gearboy",
"args": ["--mcp-stdio"]
}
}
}Replace /path/to/gearboy with the actual binary path from the install script. Add --headless before --mcp-stdio on headless machines.
load_media → get_media_info → get_cpu_status → get_screenshotStart every session by loading the ROM, confirming it loaded correctly (MBC type, ROM/RAM size, CGB/SGB flags), then checking CPU state and taking a screenshot to understand the current game state. If a .sym or .noi file exists alongside the ROM, symbols are loaded automatically.
Load additional symbols with load_symbols or add individual labels with add_symbol. Gearboy supports RGBDS, GBDK-2020, WLA-DX, no$gmb, SDCC/NoICE (.noi), EQU, and generic symbol formats.
Always call debug_pause before inspecting state. While paused:
get_cpu_status — registers A, F, B, C, D, E, H, L, SP, PC, flags Z/N/H/C, IME, halt state, CGB double speedget_disassembly with a start/end address rangeget_call_stack — current subroutine hierarchyread_memory with area name (ROM0, ROM1, VRAM, RAM, WRAM0, WRAM1, WRAM, OAM, IO, HIRAM) and address/lengthUse breakpoints to stop execution at points of interest:
| Breakpoint Type | Tool | Use Case |
|---|---|---|
| Execution | set_breakpoint (type: exec) | Stop when PC reaches address |
| Read | set_breakpoint (type: read) | Stop when memory address is read |
| Write | set_breakpoint (type: write) | Stop when memory address is written |
| Range | set_breakpoint_range | Cover an address range (exec/read/write) |
| IRQ | toggle_irq_breakpoints | Break on VBlank, LCD STAT, Timer, Serial, or Joypad interrupts |
Breakpoints support 3 memory area types: rom_ram, vram, and io.
Important: Read/write breakpoints stop with PC at the instruction after the memory access.
Manage breakpoints with list_breakpoints and remove_breakpoint.
After hitting a breakpoint or pausing:
| Action | Tool | Behavior |
|---|---|---|
| Step Into | debug_step_into | Execute one SM83 instruction, enter subroutines |
| Step Over | debug_step_over | Execute one instruction, skip CALL instructions |
| Step Out | debug_step_out | Run until RET/RETI returns from current subroutine |
| Step Frame | debug_step_frame | Execute until next VBlank |
| Run To | debug_run_to_cursor | Continue until PC reaches target address |
| Continue | debug_continue | Resume normal execution |
After each step, call get_cpu_status and get_disassembly to see where you are.
The trace logger records CPU instructions interleaved with hardware events (LCD, APU, I/O, bank switching). Start the trace logger from the emulator's debugger window, then:
set_trace_log with enabled: true to start recording (optionally filter event types)set_trace_log with enabled: false to stop (entries are preserved)get_trace_log to read recorded entriesTracing is essential for understanding timing-sensitive code, interrupt handlers, and hardware interaction sequences.
get_rewind_status reports whether rewind is enabled, how many snapshots are available, total capacity, and how many seconds are currently buffered.rewind_seek jumps to a specific buffered snapshot. The emulator must be paused first.Typical flow:
debug_pauseget_rewind_statusrewind_seek to an earlier snapshotget_cpu_status and get_disassembly to inspect the restored pointdebug_continue or keep stepping from thereget_lcd_registers — all LCD registers: LCDC, STAT, SCY, SCX, LY, LYC, DMA, BGP, OBP0, OBP1, WY, WX with decoded bit fields. CGB registers: KEY1, VBK, HDMA, BCPS, BCPD, OCPS, OCPD, SVBKget_lcd_status — current LCD mode (0-3), screen enabled, LY, LYC match, CGB infoget_apu_status — all 4 audio channels: Square 1 (with sweep), Square 2, Wave, Noise: volume, frequency, envelope, duty cycle, wave RAM, panning, master volumeget_sgb_status — SGB active flag, mask mode, multiplayer state (player count/current), last command code/data, transfer countdown/destination, border animation state, effective palettes (4×4 colors as hex), and attribute map (20×18 palette assignments)read_memory: SGB_TILES (border tile patterns), SGB_MAP (border tilemap), SGB_BPAL (border palettes), SGB_SPAL (system palettes), SGB_ATF (attribute files), SGB_AMAP (attribute map), SGB_EPAL (effective palettes)list_sprites — all 40 OAM sprites: position, tile index, attributes (priority, X/Y flip, palette, CGB bank)get_sprite_image — individual sprite rendered as PNGget_screenshot — current rendered frame as PNGUse screenshots after stepping or continuing to see the visual impact of changes.
Use list_memory_areas to get the full list:
| Area | Description |
|---|---|
| ROM0 | ROM bank 0 (fixed, $0000-$3FFF) |
| ROM1 | Switchable ROM bank ($4000-$7FFF) |
| VRAM | Video RAM — tiles and tile maps ($8000-$9FFF) |
| RAM | Cartridge external RAM ($A000-$BFFF) |
| WRAM0 | Work RAM bank 0 ($C000-$CFFF) |
| WRAM1 | Switchable Work RAM bank 1-7 on CGB ($D000-$DFFF) |
| WRAM | Full Work RAM ($C000-$DFFF) |
| OAM | Object Attribute Memory — sprite table ($FE00-$FE9F) |
| IO | I/O registers ($FF00-$FF7F) |
| HIRAM | High RAM ($FF80-$FFFE) |
When SGB mode is active, additional areas are available:
| Area | Description |
|---|---|
| SGB_TILES | Border tile patterns — 256 tiles × 32 bytes (8192 bytes) |
| SGB_MAP | Border tilemap — 32×32 entries × 2 bytes (2048 bytes) |
| SGB_BPAL | Border palettes — 4 sub-palettes × 16 colors × 2 bytes (128 bytes) |
| SGB_SPAL | System palettes — 512 palettes × 4 colors × 2 bytes (4096 bytes, from PAL_TRN) |
| SGB_ATF | Attribute files — 45 files × 90 bytes (4050 bytes, from ATTR_TRN) |
| SGB_AMAP | Attribute map — 20×18 palette assignments (360 bytes) |
| SGB_EPAL | Effective palettes — 4 palettes × 4 colors × 2 bytes (32 bytes) |
WRAM and HIRAM are the most common locations for game variables (lives, health, score, position).
toggle_irq_breakpoints to enable breaking on the target IRQ (VBlank, LCD STAT, Timer, Serial, Joypad)debug_continue to run until the IRQ firesget_cpu_status + get_disassembly to see the handler codeget_call_stack to see how deep you areadd_symbol to label the handler address and any subroutines it callsThe Game Boy interrupt vectors are at fixed addresses: VBlank=$0040, LCD STAT=$0048, Timer=$0050, Serial=$0058, Joypad=$0060.
debug_pause → get_lcd_registers — check LCDC (enable bits), SCX/SCY (scroll), WX/WY (window)get_lcd_status — verify LCD mode, LY positionread_memory on VRAM to inspect tile data and tile mapslist_sprites — check OAM for incorrect positions, tiles, or attributesget_screenshot to see the current visual stateset_breakpoint at the subroutine entry pointdebug_continue → when hit, get_cpu_statusdebug_step_into / debug_step_overadd_symbol for the routine and any called subroutinesadd_disassembler_bookmark to mark interesting locationsadd_memory_watch on the variable's address — watches are visible in the emulator GUIset_breakpoint (type: write) on that addressget_disassembly reveals what code is modifying itget_call_stack shows the call chain leading to the writetoggle_irq_breakpoints to break on Timer or VBlankget_trace_log to see the interleaved CPU + hardware eventsget_lcd_registers to check timer and LCD timing configurationFor Game Boy Color games:
get_cpu_status — check if CGB double speed mode is activeget_lcd_registers — inspect CGB-specific registers (KEY1, VBK, HDMA, BCPS/BCPD, OCPS/OCPD, SVBK)read_memory on VRAM with bank selection to inspect both VRAM bankslist_sprites — check CGB-specific attributes (VRAM bank, CGB palette)For Super Game Boy games:
get_sgb_status — check if SGB is active, inspect mask mode, command state, transfer statusget_media_info — verify is_sgb flag in ROM headerread_memory on SGB_TILES / SGB_MAP / SGB_BPAL to inspect border tile data, tilemap, and palettesread_memory on SGB_SPAL to inspect system palettes loaded via PAL_TRNread_memory on SGB_ATF to inspect attribute files loaded via ATTR_TRNget_sgb_status → check effective_palettes and attribute_map for game colorizationget_screenshot to see the rendered SGB output (256×224 with border)add_symbol liberally to label addresses you've identified — makes disassembly readableadd_disassembler_bookmark for code locations and add_memory_bookmark for data regionsadd_memory_watch for variables you're tracking across stepssave_state / load_state to snapshot and restore emulator state at interesting pointsget_screenshot after significant changes~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.