Terranigma – Decompilation
Hey everyone!
Time for a proper update on the Terranigma project. This time I want to talk about how it actually works behind the scenes, because I think the story is more interesting than another batch of screenshots.
Where this started
It started with curiosity. I wanted to understand how this game works. Not “roughly”, not “well enough to change an item name”, but really understand it, down to the individual bytes. Terranigma came out in 1995 and nobody left us documentation. What exists is a 4 MB cartridge full of machine code, and the only honest way in is to read it and to watch it run.
So I built myself a set of little Lua listeners that sit inside the Mesen 2 emulator and write down what the game does, frame by frame, while it plays. That habit is the reason this took two years instead of two months. It’s also the reason I trust the result.
It came out of a mistake, by the way. Early on I wrote a value into the ROM based on a very reasonable assumption, and it quietly gave a completely unrelated item the wrong sprite. I didn’t notice for a while. That’s the worst kind of bug: it doesn’t crash, it just makes the game a little bit wrong, forever, and nobody can tell you why.
The parts that fought back
Walking
You’d think walking is trivial. It is not. The original has four separate collision checkers, one per direction, and each one handles ramps, sliding along walls, corners and diagonal steps slightly differently. Getting it “close enough” would have been a weekend. Getting it exactly right took weeks of recording the original frame by frame and holding my version against it.
It now matches across more than five thousand recorded frames, position for position, with zero deviations. If Ark slides one pixel differently than he did in 1995, a test goes red and I get to find out why.
The chests, or: how a treasure chest drove me up the wall
This one I have to tell properly, because I lost more evenings to it than to anything else.
You’d expect a table somewhere. Chest number 12 contains 300 gems, chest 13 contains a Sword, done. That’s not how it works. The chests are baked into the loading stream of the map itself, sitting in the same list as every NPC, every door and every invisible trigger. The loader walks that list, and mixed in between the entries are marker bytes that mean things like “the rest of this depends on a flag” or “run this script now”. Hit the wrong marker and the loader jumps somewhere else entirely.
And then there’s my favourite detail. One of those jumps can point past the end of the list, where a second, completely separate list is waiting. That’s how the game changes a whole village in the endgame: the loader simply reads a different set of objects, and none of it is visible unless you follow the jump. For a long time my tools read the first list, stopped at the end marker like any sane program would, and silently ignored everything behind it. Twenty-one flags in the game had no visible source at all because of that.
The chest list itself is just as cheerful. Entries are 7, 9 or 11 bytes long depending on whether they carry a condition, and the tile that marks a chest was documented for years as “closed door”. It isn’t. It’s a chest. Whether a chest is already open isn’t stored anywhere near the chest either, it’s a single bit in one big field of flags, and that same field decides whether an NPC exists, whether a door is passable, and whether the path out of the village has appeared yet.
Once I finally had it, the reward was a bit absurd: Ark walks up to a cupboard in the elder’s house, presses A, and gets exactly the same amount of money he got in 1995, with the same jingle, and the second time nothing happens at all. Weeks of work for a cupboard. Worth it.
The fog in Crysta
I noticed the fog scrolled along when you walked, which it doesn’t do in the original. I was fairly sure my code was right, and it was. The problem was my recording: I had only ever watched the fog while Ark stood still, and while the camera isn’t moving, two completely different rules produce identical numbers. The moment I recorded it while walking, the answer fell out in a single line.
Damage isn’t random
Everyone assumes there’s a dice roll in there. There isn’t. The variation you see comes from the frame counter, of all things. The actual random number generator only gets used for status effects and critical hits. I stared at that for a while before I believed it.
Sixteen villagers
For months, Ark walked straight through the people of Crysta. Not because of the collision code, but because one single instruction in the game’s own script language had been translated as “does nothing”. That instruction is what makes a character occupy a tile. One line, and suddenly sixteen villagers stand exactly where they stand in the original, for a thousand frames straight.
There’s a lot of this. Ark was drawn in front of tree crowns instead of behind them, and it turned out he doesn’t have the priority I assumed: the ground he’s standing on raises it. The inventory screen isn’t a list, it’s a little room with furniture and a hand-written table of which piece of furniture is next to which. Story progression has no quest system whatsoever. It’s one big set of bits, and everything hangs off them.
None of this is glamorous. Most days are reading assembly, recording, comparing, being wrong, and reading again. But that’s exactly why I’m confident about the result. It isn’t “feels like Terranigma”. It’s the same rules, written in modern code.
Where it’s going
The port is coming along steadily, and the plan hasn’t changed:
- Native PC port and Enhanced Edition with quality-of-life features, targeted for the end of 2026.
- Definitive Edition planned for around summer 2027, with more content and balancing, while always staying true to what makes this game special.
- German first, then English, then Japanese, with faithful translations based on the original Japanese script.
Everything now lives here
All news now lives on diemilchgebendekuh.de. That’s where I’ll post development updates from now on, and that’s where the PC port will be released when it’s ready. Everything stays free and accessible, as always.
I’m looking for testers
I genuinely cannot play this game through fifty more times by myself and catch everything. If you enjoy poking at things until they break, I’d love to have you. German-speaking testers are especially useful right now since the German version comes first, but honestly, if you’re interested, just get in touch.
A note on the Terranigma announcement by Clear River Games
I’ve been asked quite a few times about my thoughts on the recent Terranigma announcement by Clear River Games, so I wanted to briefly address it here.
I’m still somewhat conflicted about the way the game was presented. From what has been shown so far, the release appears to be a fairly straightforward emulator-based version with some additional overlay features. From a technical perspective, these kinds of features are not particularly difficult to implement. They really aren’t.
What concerns me more is how the announcement was handled. The trailer initially featured music from a composer based in Germany, Martin Denk, without his permission. After he reached out, he apparently received neither a response nor an apology, and the music was later quietly replaced with the original tracks.
I personally find this kind of approach difficult to support. At the same time, I can’t deny that I’m happy to see this masterpiece becoming officially accessible to a much wider audience. It’s a conflicting feeling.
My own port is based on the original Japanese version and is being developed independently of the Clear River Games release. As for whether owning their version should be a requirement for using my port, that’s something I still need to think about carefully. At the moment, I’m leaning towards not making it a requirement.
I’ll share more details as development progresses.
Thanks for reading all of this, and thank you for the support. It means a lot. ❤️
Best regards,
DieMilchgebendeKuh


