logoalt Hacker News

Porting my 1993 Amiga game to Godot, with an LLM reading the 68000 assembly

117 pointsby rabahstoday at 2:28 PM42 commentsview on HN

These are my notes from porting my Amiga game, which I originally built in Baghdad in 1993 in MC68000 assembly, to Godot, using Claude Fable 5 during last July holiday. It took an evening! Getting the feel right and shipping it took a few more weekends and evenings.

I spent the last few weeks analyzing what Claude did, feeding it my 33 years of memory of how I built the game, my notes and the git repos. It wrote the first draft of the article, and I edited line by line over a week. The screenshots of my 1993 map editor is the first I have run it since then. The one thing I never verified myself is the 108-byte explanation.

"Before starting everything, the model assembled the code using vasm on my Mac, and kept going till the binary is byte-identical to the binaries I had in my original game. Even after that, the there was mismatch of about 108 bytes. I originally used AsmOne which assembles into memory, and the game saved into the disk by saving that memory after running the game. So the original shipped files are a snapshot of the game that had already been running, not clean asm-one output."

Please post any questions. I am also releasing the original game for free.


Comments

mattjoycetoday at 9:19 PM

A few weeks ago I downloaded a memory dump of a zx81 game, and ask Claude to build it in Go. It nailed it. Converted the binary back to basic and then to go. My idea was that the game would be unknown to llm training and perhaps a nice bench.

What a crazy thing it is to be first at the advent of personal computing, and then in the inflection point where AI treats that first experience as archeology.

TacticalCodertoday at 9:37 PM

> I spent the last few weeks analyzing what Claude did, feeding it my 33 years of memory of how I built the game, my notes and the git repos. It wrote the first draft of the article, and I edited line by line over a week.

Sooooo cool! I did something similar a few months ago: had the old source code (and executable files) of a game I wrote in 1991 (PC DOS) and a few notes in source code and, well, my old memories of how things worked. I didn't know how to compile it anymore but with the help of LLMs I managed to get it compiling again.

Since then I found about 8 pages of handwritten notes I took back in the days and I did immediately scan them and I added them to the repo.

Now my PC DOS from 1991/1992 does compile again and, well, I really should blog post about it one of these days (if only I had a blog...).

btbuildemtoday at 6:54 PM

> one copy of the Amiga Hardware Reference Manual

aka The Book... my, this brings back dusty memories

Babylonian Twins has such strong "Gods: Into the Wonderful" vibes, I wonder if that game was an inspiration for you

https://www.lemonamiga.com/game/gods-into-the-wonderful

https://www.youtube.com/watch?v=1kAXGjUwHyA

show 1 reply
glimshetoday at 9:30 PM

Great work! I'm planning to do that to another forgotten game (not mine) and it's great to see that this is now quite possible.

robvirentoday at 6:24 PM

I'm actually glad to see it stumbled in a few areas. Always surprised to see how much it gets right though. I had always hoped the rather obscure parts of computer history and games would be this incredibly difficult area for Agents to mine.

The amount of non standard hackish and obtuse things that had to be done to implement things in the past feel impossibly complicated to touch today. Lots of people made it up as they went along and used the hardware in ways no one expected. Reminds me of Tim Follin doing the audio for Plock on SNES and Miamoto being shocked the audio was real. It would be so interesting to see what we could learn about development of the past from agentic insights into how code was constructed. I love stuff like this an appreciate the in depth post.

hedgehogtoday at 3:01 PM

This is fantastic. It would be interesting to have Claude Code export an engineering guide for doing similar ports, including descriptions of the tooling it built to do it. I've done some reversing from binary but never with results this good.

show 1 reply
ericdtoday at 6:27 PM

Wow, that's gorgeous for something written in assembly, running in 512k, nice work!

coder-pmtoday at 7:52 PM

Hmm did you ever run the game port against the original one in UAE? With the same inputs? Or is it just "it plays right when I play it"? That 108 byte delta is puzzling...

show 2 replies
a2ff6eeb0today at 6:37 PM

> Please post any questions.

Since Claude did the port, wrote the article, and apparently understands it better than you do at this point, can we ask Claude? Is there a git repo we can point Claude at to interrogate it on the way things were done? Maybe you can share the transcripts you used to port it?

It's marvelous that software can be written with minimal human input, but I guess I'm confused about why I would talk to the human that prompted the AI, rather than the AI that did the work.

show 1 reply
Sharlintoday at 8:06 PM

What I'm interested in is performance and memory use. How many times less efficient is the 2010 port compared to the original? What about this new one?

sgttoday at 6:51 PM

Very cool! Wish you had released it back then

show 1 reply
byakotoday at 6:54 PM

porting a 93 game with an llm reading 68k assembly while i'm over here struggling to refactor last month's javascript. we are not the same. seriously cool project though

saadyousfitoday at 9:09 PM

[flagged]

mattbruvtoday at 6:17 PM

I really tried to start reading this because I am interested in the idea, but the obvious AI writing prose is just so off-putting that I can't force myself to continue reading it without my eyes rolling into the back of my head. I'm not against using AI to code, but if you're actually passionate about the project and want to share it with others, you should use your own words.

show 3 replies
lstoddtoday at 7:00 PM

What's the point though? If you got the stuff it's better run in UAE. If you have none I don't trust you and therefore think the Amiga name is misleading. To gain trust here show some code running in UAE.

There is no point in "porting to Godot" because either you port Amiga stuff to UAE-likes or FPGAs or you in fact advertise "AN AI REWROTE MY CRAP GWBASIC GAME FROM 93 LOL". Lol. Which is riduculous.

and people will just laugh.

also 68k asm is actually human-readable compared to x86.

show 2 replies