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.
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
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.