Game Decompilation Projects

This has become a really thriving scene lately. Super Mario 64 has native ports to stuff like Vita and Dreamcast, there’s probably-definitive Zelda LttP/OoT ports on PC now… real good stuff


Super Mario World - GitHub - snesrev/smw: Smw
Link to the Past - GitHub - snesrev/zelda3
Super Metroid - GitHub - snesrev/sm: early version





many more examples, mostly in very early WIP states: Decompiled Retail Console Games · RetroReversing


image

image

20 Likes

GTA3 and GTAVC were both completely reverse-engineered, then Take 2 filed a DMCA or some shit so you can only find those in back alley-esque discord servers. githubs were nuked

3 Likes

https://papermar.io/

papermario is an ongoing project to reverse-engineer the source code for Paper Mario on the Nintendo 64. The game’s assembly code is manually decompiled into C source code. The project also extracts game assets (such as backgrounds, sprites, maps, and text) from an original game copy into more modern formats. The C code and assets can then be recompiled to create a 1-to-1 (“matching”) copy of the game.

2 Likes

Sonic stuff:


more active decompilation projects, might dig up links later:

Diddy Kong Racing (N64)
Fire Emblem: The Sacred Stones (GBA)
Sonic Advance 2 (GBA)
Super Mario Galaxy (Wii)

4 Likes

2672/2721 functions decompiled (98.20%, 49 left)

0x35b9c0/0x76b014 bytes of data not in blobs (45.27%, 0x40f654 left)

2 Likes

To me, one of the more interesting ones from a technical perspective is this project to create a compiler for the language used to make the PS2 Jak and Daxter games, GOAL:

98% of the game code is in GOAL and the “goal” here is to run this code on modern platforms unmodified.

7 Likes

Completely unaware of this scene but coming across the MK64 HD Pack has me hyperventilating

3 Likes
1 Like

I wonder about the possibilities of this but the most obvious would be modding, right? Like, people could play with the source code, change the physics or add levels? Maybe add mouse support to Perfect Dark? Sounds exciting to me anyway.

It has all sorts of uses! I think like, having the original source is ideal, but for games where we don’t have that it’s the next best thing. You’re definitely right that it’s a boon to anyone who wants to mod the game—as a random example, people have done many variants on the game Brogue (as you can see here or in various forum threads and such) since it’s FOSS. Brogue is also now fan-maintained because the original developer got tired of working on it, so people are still making improvements to the central game, which is also greatly facilitated by having source code; I guess you could call that another genre of modding but in some ways it just gives the game a whole different atmosphere (i.e. something that could be continuously worked-on by many people over decades, which I think is kind of more natural for software in a way, instead of like a traditional artwork like a painting or something that becomes “done” and then is fixed). Having the source is also extremely useful for anyone who wants to understand how a game works…I guess to continue the Brogue theme, most of the contributions I’ve made to the Brogue wiki are the result of my reading and experimenting with its source code, and I’ve learned to play the game much better from doing thing like that, but also as a game developer I’ve learned cool things about statistical game design and procedural map generation from it as well. I would even say like, if you do game programming and/or design of any sort, reading other people’s game code is one of the most helpful things you can do to hone your skills.

EDIT: I guess, for a concrete example of the kind of detailed analysis that having the source code facilitates, there’s also the recent Wumpus thread.

EDIT 2: I guess I also just want to highlight, if you enjoy playing a game at all on some level, I think it can further enhance your appreciation of the game to read its source. It’s not so different from reading the score for a piece of music you like(EDIT 3:), or the script for a movie you enjoy, or that sort of that. It gives you a different perpsective—a more abstract one where you can see underlying patterns that might have been hard to perceive directly in the resulting media, and also a more precise one where you can see exactly what the developer/composer/scriptwriter specified for it. Having that kind of understanding increases the surface area of the firmament upon which your enjoyment of the piece of media can arise, so to speak. :stuck_out_tongue_winking_eye:

5 Likes

I once tried to modify Chocolate Doom to add light gun support, but I couldn’t get it to work. But it was cool looking at and browsing the C code. Not sure how close it is to the original source code.

2 Likes

I want Final Match Tennis decompiled so I can look at how the best video game tennis physics were made.

2 Likes

That’s a cool project all the same. :smiley: If you’re curious to compare them, I was looking at chocolate-doom/chocolate-doom/src/ and id-Software/DOOM/linuxdoom-1.10 just as casual points of comparison…I’m not 100% sure that’s the ideal way to it at a glance, but at least from that angle they do look fairly close to me? It seems to me like, as you would expect I think, a lot of Chocolate Doom is just going through the Doom sources and making the I/O more portable on modern systems. (Of course, that may have been exactly the parts of the codebase you were working with.)

I’ll have to try that game. :yum: