Professional Documents
Culture Documents
N64 Decompiling With Ghidra RetroReversing
N64 Decompiling With Ghidra RetroReversing
Retro Reversing
So you should be able to run the script ghidraRun (contains .bat on windows)
and it should start up Ghidra.
On the GitHub page you need to either select clone or Download as zip , we
would suggest just downloading the zip for now.
You only need to clone if you are planning on contributing, but even then you
would probably fork first and then clone.
If the N64 Loader option doesn’t appear for you then you probably don’t have
JDK 12 or higher, you can either install JDK12 or build the plugin yourself on
jdk11 which is what I did and works just fine :)
These names are not very helpful and we know that the games were compiled
with a version of the Official Nintendo 64 SDK, so if we could find those
libraries in the binary then we can give them useful names and help start
solving the puzzle.
https://www.retroreversing.com/n64-decompiling 2/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
However currently the plugin ApplySig.py doesn’t work with the N64 Loader
due to the addresses as it gives the following error:
In order to get ApplySig to work you need a patch to ApplySig from user
celophi which is available here: Update ApplySig.py by celophi · Pull Request
#7 · NWMonster/ApplySig · GitHub
To run it you need to put the script in your home/ghidra_scripts folder and run
the “Script Manager” tool, select the checkbox beside ApplySig then click the
green run icon.
It will then ask for the *.sig file to open, make sure to select one of the sig files
that you downloaded earlier 2 .
If there are any errors with the parsing of the C files then you will need to
locate the generated file called: CParserPlugin.out . Normally it is generated
in the current users home directory so you can run:
cat ~/CParserPlugin.out
https://www.retroreversing.com/n64-decompiling 3/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
Setting up the memory map
By default the ghidra loader only loads the .rom, .ram and .boot, but there is
much more to the N64 memory map than these sections, and in fact your game
will use its own sections too. So it is important you know your way around the
Memory Map editor which can be viewed by selecting: Window -> Memory Map .
Show entries
10 Search:
References
1. N64 ROM Decompiling With Ghidra - N64LoaderWV - YouTube ↩
2. Assembler Games N64 Signatures ↩
0
https://www.retroreversing.com/n64-decompiling 4/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
Angry Sad
LOG IN WITH
OR SIGN UP WITH DISQUS ?
Name
TABLE OF CONTENTS
https://www.retroreversing.com/n64-decompiling 5/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
References
RECOMMENDED CONTENT
n64
https://www.retroreversing.com/n64-decompiling 6/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
n64
https://www.retroreversing.com/n64-decompiling 7/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
n64
Maestro64
https://www.retroreversing.com/n64-decompiling 8/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
Mario Kart 64
https://www.retroreversing.com/n64-decompiling 9/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 10/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
n64
https://www.retroreversing.com/n64-decompiling 11/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 12/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 13/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 14/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 15/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 16/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 17/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
n64
https://www.retroreversing.com/n64-decompiling 18/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 19/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
n64
https://www.retroreversing.com/n64-decompiling 20/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 21/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 22/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 23/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
Super Mario 64
https://www.retroreversing.com/n64-decompiling 24/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
https://www.retroreversing.com/n64-decompiling 25/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
n64
n64
n64
https://www.retroreversing.com/n64-decompiling 26/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
tutorial
https://www.retroreversing.com/n64-decompiling 27/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
tutorial
https://www.retroreversing.com/n64-decompiling 28/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
tutorial
https://www.retroreversing.com/n64-decompiling 29/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
tutorial
https://www.retroreversing.com/n64-decompiling 30/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
tutorial
https://www.retroreversing.com/n64-decompiling 31/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
tutorial
https://www.retroreversing.com/n64-decompiling 32/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
tutorial
https://www.retroreversing.com/n64-decompiling 33/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
Retro Reversing
ghidra
ABOUT RETROREVERSING
"The best way to get the right answer on the internet is not to ask a question; it's to
post the wrong answer." - Cunningham's Law
https://www.retroreversing.com/n64-decompiling 34/35
1/25/2020 N64 Decompiling with Ghidra · RetroReversing
https://www.retroreversing.com/n64-decompiling 35/35