Live data from Hacker News

Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

decomp-academy.dev

61–70 of 83 posts

Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

#61
post #60

Interesting exercise. Why does 1/1 matching to original asm matter, though? Maintaining same timing as original game?

Being absolutely sure that your code behaves the same as the original game, so that you have a strong baseline to go from.

Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

#62
post #60

Interesting exercise. Why does 1/1 matching to original asm matter, though? Maintaining same timing as original game?

Having a baseline "this builds XYZ exactly as it shipped" is just the strongest possible guarantee that it's a fully accurate decomp with no surprises or bugs. Obviously you can have an interesting, useful decomp that works either way but it's much harder to prove that it's perfectly faithful.

Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

#63
The browser-first approach is a bigger deal than it sounds. Every time I've looked at reverse engineering, I got stuck somewhere between "install this ancient compiler" and "patch this SDK". Being able to just open a tab and start experimenting removes a huge amount of friction.

Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

#64

I recently heard that Super Mario 64 (N64) modding community reverse engineered the game enough to recreate more-or-less accurate C code that can be compiled in binaries to execute on many popular target architectures. Have you managed to get beloved games into modifiable C code? Or is it more common to invest a lot of work to document assembly language functions? I know some old assembly but no idea what is involved…

Mario 64 was byte for byte decompiled to C. It was helped by using the Debug symbols accidentally(?) compiled into the final version of the game. Otherwise they reference rips of the original game.

> It was helped by using the Debug symbols accidentally(?) compiled into the final version of the game.

Don't think this was the case, what helped was it being compiled without optimizations.

Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

#66

Hi OP, I would be careful if you profit from this project in anyway. Nintendo is not a company that takes reverse engineering of their hardware or games lightly. You will probably hear from their lawyers next week :(

No plans to profit at all from this!

Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

#68

This was interesting, but actually trying to contribute to decomp.me was still really hard! I found a lot of code that seemed perfect except for instructions slightly out of order, or dead pop statements after the logical end of the function. I wasn't able to actually fix anything :( Also, I wish there were a guide about how to start from nothing on a new GC game. That's more interesting to me than putting the finish…

There will deffo be a lesson on how to setup a decomp project from scratch! This is far from finished, there's opportunity to add so much more. I'd argue that I'd rather teach the user the basics of matching first before diving into setting a project, as setting up the splits.txt or symbols.txt might be quite a leap for a beginner. Feel free to keep checking in once a week and the lesson will appear :)

Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

#69

Dumb question about reverse engineering binaries: is there a way to only do it piecemeal? I'm eventually waiting for LLMs and harnesses to get good enough to reverse engineer BFME (old Lord of the Rings game that still has an active modding community), but it's a multi GB sized game that would have to be done in bite-sized pieces. Basically; can you reverse engineer in bite sized pieces, and recompile/customize their…

Most of those GB are probably data rather than executable code, it might not be quite as bad as you're imagining.

Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

#70

Earlier quoted context omitted.

Most decomp projects (that I know of) are Ship of Theseus style projects where the minimum unit is a function, give or take alignment requirements and quirks of the compiler. On the MIPS side, tools like Splat and SPIM can help identify function and even source file boundaries, generate inline ASM C files[0], and write linker scripts to build a matching binary. You can then go through and replace the ASM functions on…

Interesting when you mention Ship of Theseus, I never thought of that but I wonder if that is where the name “Ship of Harkinian” comes from?

It has a double meaning actually! The ship of Theseus reference like you noted and the “Harkinian” part being the name of the king of Hyrule from the CDI games. One of his lines is “Enough! My ship sails in the morning” [0] so the project is also a reference to his actual ship. (Referenced in the projects FAQ [1])

[0] https://youtu.be/JmxGLo_itEY?is=x85epFYBcPeRDxxh

[1] https://www.shipofharkinian.com/faq

Post reply on HN