travelsonic / Dance-Dance-Revolution-Game-Engine

Research into the workings of Konami's famous dance simulation music game.
5 stars 0 forks source link

Regarding debug symbols for MAX engine games #1

Open abelbriggs1 opened 3 years ago

abelbriggs1 commented 3 years ago

Hi,

I noticed that root670 over on ZIV managed to extract the DWARF symbols by using the Codewarrior disassembler.

Unfortunately, Codewarrior only ever supported DWARF1 symbols, and I've been searching around for a way to import DWARF1 into reverse engineering tools, but neither IDA Pro or Ghidra seem to support it (only DWARF2 onwards).

Have you found any way to automatically import the symbols they dumped?

Thanks.

travelsonic commented 3 years ago

I've not yet found a way, trust me when I say I am just as frustrated by this struggle to get either IDA or Ghidra to read this, it'd make things SO MUCH easier.

Right now, I've settled for going through the debugging data, and first making it so each reference was easy to follow (each user_definedtype DIE number replaced with appropriate (function, variable, or whatever) names, for instance), and manually making the data structures in IDA, GHidra, labeling functions, etc, but there HAS to be an easier way. ~~

travelsonic commented 3 years ago

OK, for individual data structures, I had some luck with running the ELF executables through dwarf2cpp, creating a source file with the specific data structures, and parsing said file in GHidra- it's still a pain in the ass though

travelsonic commented 2 years ago

Hi,

I noticed that root670 over on ZIV managed to extract the DWARF symbols by using the Codewarrior disassembler.

Unfortunately, Codewarrior only ever supported DWARF1 symbols, and I've been searching around for a way to import DWARF1 into reverse engineering tools, but neither IDA Pro or Ghidra seem to support it (only DWARF2 onwards).

Have you found any way to automatically import the symbols they dumped?

Thanks.

OK, there IS a dwarf1 plugin, but it only has releases for 9.2.1 and 9.2.2 https://github.com/rafalh/ghidra-dwarf1 It doesn't manually add local variables, but will create data structures, and function definitions - but I've not quite figured out how to work around it kinda crapping out partway (leaving functions defined in the debugging data undefined). It DOES help a lot though (especially after remembering to add a memory mapping first for the game's RAM, which my stupid ass forgot to do first... 😂😂)