Hacker News new | ask | show | jobs
by mike986 3673 days ago
can yours be used to reverse engineering SNES games? Feed it the rom and have it split out c code?
1 comments

Absolutely, although some 6502 code is more friendly than others. SNES code can be very optimised compared to C64 code.

If you make sure the binary starts at address 0, and put in the right entry point (which will be somewhere in the SNES ROM), then it should decompile it fine.

Your first step will be to use the left-hand portion of the window to disassemble the NES ROM, and then once assembly files have been created, you decompile them on the right of the window. (this is all in the documentation of course).

How close is the SNES 65C816(-ish) code to NES 6502(-ish) code supported in the demo version of the program? I understand that they're from the same family, but I'd expect some incompatible extensions in the more-advanced chip, at least.
I haven't done any work on 65C816. Just 6502 so far.

It should be possible to make a 'CPU module' for the decompiler which takes into account the features of the 65C816 (such as 16-bit registers).

How do you deal with self-modifying code? My old FORTRAN compiler generated that 8080 target