<!-- Canonical page: https://reversedwithai.com/p/game-boy-roms-13d030c8 -->
Canonical page: https://reversedwithai.com/p/game-boy-roms-13d030c8

# Recompiling Game Boy games for the Sega Master System using AI

> A static recompiler pipeline for porting Game Boy ROMs to Sega Master System hardware.

Damian McMillan developed a static recompiler to port Game Boy ROMs to the Sega Master System. Using DeepSeek V4.1 Flash for translation and Claude Opus 5.5 for debugging, the project successfully runs Tetris on Master System hardware.

## Key facts

- Target: Game Boy ROMs
- Category: Games and mods
- Platform: Sega Master System
- Models: DeepSeek V4.1 Flash, Claude
- Tools: gb2sms, Mesen, Emulicious
- Outcome: Partial
- Time spent (author-reported): one weekend
- Checks: Source available: not reported; Repro steps: not reported; Real hardware: not reported; Verified by others: not reported
- Author: Damian McMillan
- Added: 2026-11-27
- Updated: 2026-11-27
- Sources reviewed: 2026-11-28 (editor)

## What was done

Damian McMillan developed a static recompiler, gb2sms, to convert Game Boy ROMs into Sega Master System cartridge images. The pipeline utilizes a ROM disassembler, SM83-to-Z80 instruction translation, and a shim layer for hardware-specific I/O. DeepSeek V4.1 Flash performed initial translation tasks, including instruction decoding and tile format conversion. Claude Opus 5.5 handled complex debugging, which involved writing custom tools for the Mesen emulator to monitor memory writes and perform lockstep comparisons against Game Boy emulators. The recompiler successfully runs Tetris, maintaining full speed and instruction-level synchronization. Limitations include sound fidelity issues, as the Game Boy's wave channel lacks a direct Master System equivalent, and ongoing challenges with games that utilize features like the window layer or specific STAT interrupts. The author reports that debugging was difficult for the AI models, noting that DeepSeek V4.1 Flash struggled with iterative hypothesis testing, while Claude Opus 5.5 was effective for finding bugs that caused silent failures. The project is documented at [https://dmcmillan.co.uk/blog/recompiling-game-boy-games-for-the-sega-master-system](https://dmcmillan.co.uk/blog/recompiling-game-boy-games-for-the-sega-master-system).

## Human work and limitations

The author notes that a self-written test harness led to a false positive where both the implementation and the test tool shared the same incorrect assumptions about tile and palette formats, highlighting the risk of using a reference model created by the same developer as the implementation.

## AI use in the original source

- "Adventures in AI: Recompiling Game Boy Games for the Sega Master System | Damian McMillan" ([source](https://dmcmillan.co.uk/blog/recompiling-game-boy-games-for-the-sega-master-system))
- "Adventures in AI: Recompiling Game Boy Games for the…" ([source](https://dmcmillan.co.uk/blog/recompiling-game-boy-games-for-the-sega-master-system))

Excerpts checked against the source on 2026-11-27.

## Sources

- [Write-up](https://dmcmillan.co.uk/blog/recompiling-game-boy-games-for-the-sega-master-system)
- [Discussion](https://news.ycombinator.com/item?id=50588718)

Figures are reported by the author and not measured by this site, except the commit history. Entry drafted with AI from the linked sources and checked against them.

Cite as: Damian McMillan (2026). Recompiling Game Boy games for the Sega Master System using AI. Reversed with AI. https://reversedwithai.com/p/game-boy-roms-13d030c8
