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…
Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
21–30 of 83 posts
Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#22I 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…
Most games will have been written in a higher level language first (like C or C++) and then compiled into assembly. With matching decomp, we write C, compile it to assembly, and see how much it matches the retail assembly. Using this we can write C that we theorise is almost identical to how it would have been written originally. There are things lost during the compilation process (like comments, function names, etc…
Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#23Earlier quoted context omitted.
Most games will have been written in a higher level language first (like C or C++) and then compiled into assembly. With matching decomp, we write C, compile it to assembly, and see how much it matches the retail assembly. Using this we can write C that we theorise is almost identical to how it would have been written originally. There are things lost during the compilation process (like comments, function names, etc…
I suspect LLMs would do a good first pass with function naming.
Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#24Earlier quoted context omitted.
AI is being used in many retro game decomp projects! One of the reasons I went down the path of learning decomp myself was because AI had hit a wall. Matching decomp is quite a bit harder than just normal decomp as even simple things like using an if/else instead of a terney actually change the assembly. AI did an amazing job of getting to 95% matches on nearly all functions, but once it got to that tail end, it star…
I say this every time it comes up, but polluting a decomp project with AI generated code is risky, imho. What makes decomp legal (in the US) is that it’s a creative transformation performed by a human and the resulting copyright of the code that just happens to compile to the same binary is owned by the person doing the decompiling. USPTO and court precedent is leaning heavily toward LLM output not being transformati…
Nicalis and Take-Two have both gone after decompilation projects, also. In particular, Nicalis has gone after a decompilation of Cave Story, but not a black box reimplementation of the same, while Take-Two ended up suing a decompilation developer (albeit settled out of court). However, in some jurisdictions, even clean reimplementations have failed - see Tetris v. Xio.
(I am not a lawyer either, etc etc, but that's my understanding)
Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#25Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#26I like decomp, but it makes me nervous. Like how safe is it to decompile a game and publish it to like github with all the symbols, addresses, etc..
Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#27Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#28Dumb 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…
Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#29Seems like a cool idea, but I can't even complete the first task. The compiler service seems to be broken, since in both lessons and the playground I just get "Could not write source: No space left on device (os error 28)".
Re: Show HN: Decomp Academy – Learn to decompile GameCube games into matching C
#30Earlier quoted context omitted.
I say this every time it comes up, but polluting a decomp project with AI generated code is risky, imho. What makes decomp legal (in the US) is that it’s a creative transformation performed by a human and the resulting copyright of the code that just happens to compile to the same binary is owned by the person doing the decompiling. USPTO and court precedent is leaning heavily toward LLM output not being transformati…
Does it being a creative transformation rob the derivative work status? Personally, I'd liken the process of decompilation to that of translating a book from one language to another - the copyright on the original work does not become void merely because the process of translation requires extensive creativity. Nicalis and Take-Two have both gone after decompilation projects, also. In particular, Nicalis has gone aft…
CSE2 was distributing binaries as well.
So was SM64 decomp and Nintendo told them to stop, they did and continued to share their source code.
Tetris v. Xio is unrelated to reverse engineering or decompilation.