🍌bananary analysis 🍌
Find a file
2024-07-09 16:17:39 -04:00
3.3.5a chore(symbol): recompile symbols 2024-07-09 16:10:02 -04:00
script fix(script): concatenate symbol source files correctly, by using 'awk 1' instead of 'cat' 2024-07-09 16:17:39 -04:00
.gitignore chore(binana): add files 2024-07-07 03:00:06 -04:00
README.md feat(include): add some gx device headers 2024-07-08 15:26:09 -04:00

binana

This repository hosts some work related to studying the original game binaries.

You can use the information here to get a headstart when working on the Whoa project.

Header files

To make reverse engineering easier, C header files matching the original memory layout are provided.

Importing headers

To use these headers in Ghidra,

  1. go to File > Parse C Source....
  2. Select clib.prf as your parse configuration, and clear all source files and input paths.
  3. Add the header <game version>/include/main.h to the Source files to parse combo box.
  4. Add the path to <game version>/include to the Include paths combo box.
  5. press Parse to Program.

TODO: equivalent guide for IDA Pro.

Maintaining headers

Headers should be restricted at all times to the C programming language only. C++ syntax will break type analysis.

To convert C++ namespaces, use double-underscores. For instance:

void Name::Space::Thing();

should become:

void Name__Space__Thing();

Symbol files

Symbol files are text files that map function names and data labels to addresses.

In this repo, script/compile-symbols is used to concatenate our organized symbol files into one big file (<game version>/symbol/main.sym).

To import this file to your Ghidra project,

  1. go to Window > Script Manager
  2. In the table view, lookup ImportSymbolsScript.py
  3. Run the script
  4. Enter the path to <game version>/symbol/main.sym

To refresh the main.sym file after changing one of the constituent symbol files:

script/compile-symbols <game version>