drhelius/gearlynx/gearlynx-romhacking
- community
Checking that the SKILL.md file is still in the repository.
Hack, modify, and translate Atari Lynx ROMs using the Gearlynx 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 Lynx game, patch game behavior, create ROM hacks, discover hidden content, change sprites or graphics, find text strings, apply Game Genie style codes, do infinite lives or health hacks, search for score or item counters, or reverse engineer data structures in Atari Lynx games. Also use for any ROM hacking, memory poking, or game modification task involving Gearlynx.
Install
npx vskill@latest install drhelius/gearlynx/gearlynx-romhackingSKILL.md
Atari Lynx ROM Hacking with Gearlynx
Overview
Hack, modify, and translate Atari Lynx ROMs using the Gearlynx 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 Gearlynx MCP server is already connected in your current session. In the default mode, call debug_get_status directly. If Gearlynx 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 Gearlynx MCP server:
Installing Gearlynx
Run the bundled install script (macOS/Linux):
This installs Gearlynx 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/gearlynx on macOS.
Connecting as MCP Server
Configure your AI client to run Gearlynx as an MCP server via STDIO transport. For Claude Code:
For Codex:
Replace /path/to/gearlynx with the actual binary path from the install script. Add --headless before --mcp-stdio on headless machines.
Hardware Documentation (References)
Atari Lynx 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... | |
|---|---|---|---|
| General Overview | references/lynx1_general_overview.md | System specs, feature set, overall architecture | |
| Hardware Overview | references/lynx2_hardware_overview.md | System block diagram: CPU, Mikey, Suzy, RAM, cart | |
| Hardware Quirks | references/lynx3_software_hardware_perniciousness.md | Unsafe register operations, hardware gotchas to avoid when patching | |
| CPU/ROM | references/lynx4_cpu_rom.md | 65C02 cycle timing, CPU sleep, ROM mapping, opcode reference | |
| Display | references/lynx5_display.md | Frame rate, pen/palette colors, display buffer addresses | |
| Sprite/Collision | references/lynx6_sprite_collision.md | SCB format, sprite types, collision depository, sprite data layout | |
| Audio/ROM Cart | references/lynx7_audio_tape_romcart.md | 4 audio channels, ROM cart banking (BANK0/BANK1, AUDIN) | |
| Timers/Interrupts | references/lynx8_timers_interrupts.md | 8 timer channels, linking, reload, IRQ sources | |
| UART | references/lynx8a_uart.md | ComLynx serial port, UART registers, baud rate | |
| Other Hardware | references/lynx9_other_hardware.md | Hardware multiply/divide, parallel port | |
| System Reset | references/lynx10_system_reset.md | Reset/power-up sequence, savegame EEPROM, NVRAM | |
| System Bus Interplay | references/lynx11_system_bus_interplay.md | Bus masters, page mode, DMA timing | |
| Hardware Addresses | references/hardware_addresses.md | 64K memory map, Mikey/Suzy register addresses ($FC00-$FCFF, $FD00-$FDFF) | |
| Interrupts & CPU Sleep | references/irq_interrupts_cpu_sleep.md | IRQ vector, interrupt enable/status bits, CPU sleep (JAM) | |
| Sprite Engine | references/sprite_engine.md | Display init, double-buffering, VIDBAS/COLLBAS macros |
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 6502):
For 16-bit values: the low byte is at address N, high byte at N+1 (6502 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 — Lynx games often use custom character maps, not ASCII
read_memoryacross ROM banks (Bank 0, Bank 0A, Bank 1, Bank 1A) 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
get_frame_bufferto capture the current visual state (VIDBAS or DISPADR)get_suzy_registersto find sprite control block (SCB) addresses, VIDBAS pointer- Set read breakpoints on sprite data addresses to find the rendering code
read_memoryon the sprite data area to analyze the packed pixel formatget_screenshotbefore/after modifications to see visual changes
Reference the Sprite/Collision hardware docs (references/lynx6_sprite_collision.md) for SCB structure 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 AAAA:VV format:
AAAAis a 16-bit RAM address. Cheats write the 64 KB RAM directly, not through the Suzy, Mikey or ROM overlays.- Lynx games run from RAM, so code patches are RAM codes too. Use
AAAA?CC:VVto write only when the current byte isCC, which avoids patching code that has been swapped out. VV: 1-2 hex digits, 3 decimal digits (231), or 4 hex digits for a 16-bit little-endian value (270Fwrites0Fthen27).- 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 and are rewritten every frame.
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_6502_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 display buffer areas
- Trace back to find the character mapping table
read_memoryto dump the font/character tableadd_symbolto label the font table and rendering routine
2. Find String Data
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 85 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/gearlynx-romhacking/SKILL.md
Popularity
- Repository stars
- 70
- Repository forks
- 8
- 7-day trend score
- 21
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/gearlynx/gearlynx-romhacking)