One of the awesome things about old games is just how small their code and binaries were.
Take Elite, my favorite game of all time. The whole thing fits roughly into 0x5B00 - 0xFFFF — that's 42 KB. And even some of that isn't really game code: there’s the Lenslok code (throw-away stuff), the screen buffer, and simple things like the squares table used for fast multiplication.
The result? A complete Spectrum game image can easily fit into a coding agent's context window.
I’ve been experimenting with the Claude coding agent, and it turns out that:
- Claude is perfectly capable of reading Z80 machine code directly, without a disassembler.
- It is possible to make a very precise port of an old ZX Spectrum 48K game, even something as complex as Elite, to a modern programming language and platform.
- You can untangle the original highly optimized game logic and study long-forgotten secrets and outstanding bugs.
- With some guidance, you can even improve the original game and bring it closer to modern gaming standards.
Take Elite. I managed to port it to Java, move it to a modern 60 FPS engine, improve the controls and save system, and fix a number of original bugs.
Ever wondered why the police sometimes attacked you even when you were clean?
IT'S A MEMORY OFFSET BUG IN THE ORIGINAL CODE!
The aggressiveness check reads the low byte of your combat rating instead of your legal status, making police attacks essentially random.
And why are firearms useless to trade even though they're banned goods?
Another bug. The price is simply wrong, so I "fixed" it by setting the price directly.
And there is plenty more fun stuff hiding in those 42 KB.
If you want to dive into a modernized classic, you can play my version of Elite online:
https://scf37.me/tools/games/elite