FAQ: Difference between revisions

No change in size ,  19 July 2018
Line 65: Line 65:
"It turned out that the reason we couldn't figure it out for so long was because the devs used the "-g" flag in the final version of the game, It's the same compiler for US, PAL(?), J, Shindou. The -g flag is for debugging, it basically disables a bunch of optimizations. You're not supposed to ship games with that kind of flag, even Nintendo told developers to be careful not to but they did. And that's really, really good for us since lack of optimization simplifies decompilation a ton. But they removed it in the Shindou version, which is why the game runs faster. Once you have the decompiler, you just start writing C code based on the assembly code, which we've been doing for a long time, but then you have to make the code match, meaning it compiles into the same assembly code and that is sort of trial and error, but once you learn how the compiler works, it becomes pretty routine.
"It turned out that the reason we couldn't figure it out for so long was because the devs used the "-g" flag in the final version of the game, It's the same compiler for US, PAL(?), J, Shindou. The -g flag is for debugging, it basically disables a bunch of optimizations. You're not supposed to ship games with that kind of flag, even Nintendo told developers to be careful not to but they did. And that's really, really good for us since lack of optimization simplifies decompilation a ton. But they removed it in the Shindou version, which is why the game runs faster. Once you have the decompiler, you just start writing C code based on the assembly code, which we've been doing for a long time, but then you have to make the code match, meaning it compiles into the same assembly code and that is sort of trial and error, but once you learn how the compiler works, it becomes pretty routine.


We get the assembly code from the rom. We used a hacking tool to help split it into assembly and assets, and to do some preprocessing on the assembly code. Worth noting for anyone who doesn't know much coding, when the stuff is decomped it loses nearly all labels, comments, etc. So getting back the logic and formulas is only part of the battle, you still have to go through and make the code readable.
We get the assembly code from the rom. We used a hacking tool to help split it into assembly and assets, and to do some preprocessing on the assembly code. Worth noting for anyone who doesn't know much coding, when the stuff is decomped it loses nearly all labels, comments, etc. So getting back the logic and formulas is only part of the battle, you still have to go through and make the code readable."


- bad boot"
- bad boot