Porting my 1993 Amiga game to Godot, with an LLM reading the 68000 assembly
TL;DR Highlight
An LLM read 72,758 lines of 68000 assembly and rebuilt the game byte-identical to the original
Who Should Read
A developer who must port an undocumented legacy codebase to a new platform
Core Mechanics
- 34,000 lines of C++ ported overnight
- The control test moved the 2010 C++ engine to Godot 4.
- A playable character appeared 21 minutes in, and export finished by 02:15.
- Tuning the game feel took three more days.
- Assembly rebuild matched shipped bytes
- 72,758 lines across 26 files of 68000 assembly were reassembled with vasm.
- The work continued until output was byte-identical to the shipped binaries.
- After that, every claim could be checked by comparing bytes.
- Level format solved in one pass
- A year earlier, an older model needed several rounds and hints.
- This time it read the drawing code, derived width and height, and got all five maps right first try.
- Compared with 2020 captures, the final diff was zero pixels.
- Same tick rate and own physics kept
- Drag is multiplied by 0.85 every frame, so a different tick changes the feel.
- The modern build stays at 60 Hz and the 1993 rebuild at 50 Hz.
- The hand-written 150-line collision routine was carried over instead of CharacterBody2D.
- Hidden rules recovered from code
- Map cell property bits were reconstructed from the draw and collision routines.
- It found that doors are drawn by runtime code, not stored in the map.
- When a sprite sheet had two valid readings, it asked instead of guessing.
- Only part of the checking was automated
- CLI flags like --level, --drive and --screenshot let it play on its own.
- The modern port had no image comparison, and a human looked at screenshots.
- Nothing automated checked whether the game felt right.
Community Reactions
- Experience porting many retro games
- A commenter ported Robin Hood, Syndicate, Populous and others to WebGL/WebGPU.
- Some were source ports and some were full reverse-engineering jobs.
- Unknown binaries as a benchmark
- A commenter had Claude convert a zx81 memory dump to BASIC and then Go, and it worked.
- They chose it because the game is likely absent from training data.
- Question about replay-based verification
- A commenter asked whether the port was compared with the original in UAE using identical inputs.
- The 108-byte difference also puzzled them.
- Not a one-shot for everyone
- A commenter porting Moonbase Commander to JS said it took considerable steering.
- Another got a 1991 PC DOS game compiling again with LLM help.
How to Apply
- Reproduce a legacy build byte for byte
- Today, build an old project with current tools and diff it against the shipped binary.
- Show the differing regions to an LLM and have it explain the cause.
- List tick and unit constants before porting
- Grep for per-frame decay constants and fixed tick values.
- Lock the new platform to the same tick rate and carry the values over unchanged.
- Add headless CLI flags for agents
- Add flags for loading a level, scripted input, state dump and screenshot.
- Let the agent read that output and verify on its own.
- Reverse ambiguous formats from the reading code
- Give an LLM the routine that reads the undocumented format and have it name each field.
- If two readings fit, make it ask, then compare results against existing captures.
Try It
# Paste into Claude Code (simplified version of the article's method: reversing an undocumented legacy format)
You are a reverse engineer reading undocumented legacy code.
Target file: {{source file that reads the format}}
Data sample: {{data file}}
Rules:
1. Find the routine that reads the data first. Derive the structure from that code.
2. Tabulate the meaning of each field's bits/bytes, citing the code lines that support it.
3. If more than one reading is possible, do not guess; ask me.
4. After writing the parser, build a verification script that compares against the existing output {{reference output}}.
Next: if there is a mismatch, list hypotheses and verify them one by one.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques