How does one decompile a game?
Gaming
Sub for any gaming related content!
Rules:
- 1: No spam or advertising. This basically means no linking to your own content on blogs, YouTube, Twitch, etc.
- 2: No bigotry or gatekeeping. This should be obvious, but neither of those things will be tolerated. This goes for linked content too; if the site has some heavy "anti-woke" energy, you probably shouldn't be posting it here.
- 3: No untagged game spoilers. If the game was recently released or not released at all yet, use the Spoiler tag (the little โ ๏ธ button) in the body text, and avoid typing spoilers in the title. It should also be avoided to openly talk about major story spoilers, even in old games.
It's a long grueling process of reverse-engineering. I don't know the details, but from what I know you can see the values of things and how they work from the outside, then they figure out what each value is and then re-implement it by trying to rewrite the source code. The github says this:
This is a WIP decompilation of The Legend of Zelda: Ocarina of Time. The purpose of the project is to recreate a source code base for the game from scratch, using information found inside the game along with static and/or dynamic analysis.
Not an expert, but from my understanding of how this worked for the Mario 64 project:
- Take the ROM and run it through a disassembler.
- Rewrite (by hand) the assembly in C, one function at a time, with the goal of producing a bit-for-bit identical instructions when compiled using the same tool chain as was used by the Nintendo devs back in the day.
- Since you now have a reconstructed version of the C source code, you can easily do with it what you can do with any C codebase, like port it to PC or add features, that would be difficult or impossible to do with the MIPS assembly.
I wish Zeldaret didn't post the decompilation on GitHub; Nintendo is going to file a cease and desist letter and the project will be gone.
They won't. The decompilation is entirely legal and doesn't provide any assets, you need the rom of the game (assumedly dumped legally) to be able to compile it this. The super mario 64 decompilation project is still up and has been finished for over a year.
Oh. ok.
You can also play OoT on the Switch