{"slug": "game-boy-roms-recompiling-game-boy-games-for-the-sega-master-system-using-ai", "title": "Game Boy ROMs: Recompiling Game Boy games for the Sega Master System using AI", "summary": "Damian McMillan built gb2sms, a static recompiler that converts Game Boy ROMs into Sega Master System cartridge images, and it runs Tetris on Master System hardware at full speed with instruction-level synchronization. The pipeline combines a ROM disassembler, SM83-to-Z80 instruction translation and a hardware I/O shim, with DeepSeek V4.1 Flash handling initial translation and Claude Opus 5.5 handling debugging via custom Mesen emulator tools for memory-write monitoring and lockstep comparison against Game Boy emulators. McMillan reported sound fidelity gaps because the Game Boy wave channel has no direct Master System equivalent, and noted that a self-written test harness produced a false positive when implementation and test tool shared the same incorrect tile and palette assumptions.", "body_md": "## Who did what\n\nThe 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.\n\n## What was done\n\nDamian 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.\n\nDamian 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).\n\n## Discussion\n\n[Your library](https://reversedwithai.com/library)\n\n## Sources\n\nSources reviewed · Added\n\nAn AI model drafted this entry from the sources above. Checked against the sources on 28 Nov 2026. The figures are the author's. [How entries are checked.](https://reversedwithai.com/about#method) [Something wrong? Tell me.](https://reversedwithai.com/policy#takedown)", "url": "https://wpnews.pro/news/game-boy-roms-recompiling-game-boy-games-for-the-sega-master-system-using-ai", "canonical_source": "https://reversedwithai.com/p/game-boy-roms-13d030c8", "published_at": "2026-11-27 04:01:42+00:00", "updated_at": "2026-11-28 10:15:18.233205+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "large-language-models"], "entities": ["Damian McMillan", "gb2sms", "Game Boy", "Sega Master System", "DeepSeek V4.1 Flash", "Claude Opus 5.5", "Mesen", "Tetris"], "also_reported_by": [], "takeaway": "Pairing DeepSeek V4.1 Flash for bulk SM83-to-Z80 translation with Claude Opus 5.5 for debugging silent failures worked, but a test harness built by the same developer as the implementation shared its wrong tile and palette assumptions and produced a false positive.", "recommendation": {"advice": "Validate recompiler output against an independent reference rather than a harness you wrote alongside the implementation; McMillan's shared-assumption harness passed while tile and palette formats were wrong.", "playbook": "output-verification", "playbook_url": "https://wpnews.pro/playbooks/output-verification"}, "alternates": {"html": "https://wpnews.pro/news/game-boy-roms-recompiling-game-boy-games-for-the-sega-master-system-using-ai", "markdown": "https://wpnews.pro/news/game-boy-roms-recompiling-game-boy-games-for-the-sega-master-system-using-ai.md", "text": "https://wpnews.pro/news/game-boy-roms-recompiling-game-boy-games-for-the-sega-master-system-using-ai.txt", "jsonld": "https://wpnews.pro/news/game-boy-roms-recompiling-game-boy-games-for-the-sega-master-system-using-ai.jsonld"}}