(Draft 2 (possibly incomplete).) |
m (Draft 3 (still possibly incomplete).) |
||
| Line 2: | Line 2: | ||
=== File — exefs.elf === | === File — exefs.elf === | ||
<small>[Under construction.]</small> | <small>''[Under construction.]''</small> | ||
=== Opening Files in Ghidra === | === Opening Files in Ghidra === | ||
First, you need to download [https://github.com/NationalSecurityAgency/ghidra ''Ghidra'']. Once downloaded, run the ''ghidra_run.bat'' file and choose "New Project". | First, you need to download [https://github.com/NationalSecurityAgency/ghidra ''Ghidra'']. Once downloaded, run the ''ghidra_run.bat'' file and choose "New Project". | ||
[[File:ScreenGhidra0.png|frameless|337x337px]] | [[File:ScreenGhidra0.png|frameless|337x337px]] | ||
Choose a non-shared project and whatever name you want, when the project is created, drag and drop the ''exefs.elf'' into Ghidra and choose the settings below. | Choose a non-shared project and whatever name you want, when the project is created, drag and drop the ''exefs.elf'' into Ghidra and choose the settings below. | ||
[[File:ScreenGhidra1.png|frameless]] | [[File:ScreenGhidra1.png|frameless]] | ||
Double-click ''exefs.elf'' and Ghidra will proceed to open a new window, and propose to analyze the file. Click "Yes". | Double-click ''exefs.elf'' and Ghidra will proceed to open a new window, and propose to analyze the file. Click "Yes". | ||
[[File:ScreenGhidra2.png|frameless]] | [[File:ScreenGhidra2.png|frameless]] | ||
Then press Ctrl+A in the code editor window, right-click, and choose "disassemble - ARM". Right-click a second time and choose "disassemble - THUMB". These processes will take about 10 minutes. | Then press Ctrl+A in the code editor window, right-click, and choose "disassemble - ARM". Right-click a second time and choose "disassemble - THUMB". These processes will take about 10 minutes. | ||
| Line 18: | Line 24: | ||
To use the file in-game, you must rebuild it. To initiate this process, press O in the code editor window and choose the settings below. | To use the file in-game, you must rebuild it. To initiate this process, press O in the code editor window and choose the settings below. | ||
[[File:ScreenGhidra3.png|frameless]] | [[File:ScreenGhidra3.png|frameless]] | ||
Revision as of 12:00, 8 June 2024
In this guide, you will learn how to use Ghidra for viewing and editing Luigi's Mansion 2's code for rebuilding.
File — exefs.elf
[Under construction.]
Opening Files in Ghidra
First, you need to download Ghidra. Once downloaded, run the ghidra_run.bat file and choose "New Project".
Choose a non-shared project and whatever name you want, when the project is created, drag and drop the exefs.elf into Ghidra and choose the settings below.
Double-click exefs.elf and Ghidra will proceed to open a new window, and propose to analyze the file. Click "Yes".
Then press Ctrl+A in the code editor window, right-click, and choose "disassemble - ARM". Right-click a second time and choose "disassemble - THUMB". These processes will take about 10 minutes.
When complete, feel free to edit the code however you like!
Rebuild code.bin
To use the file in-game, you must rebuild it. To initiate this process, press O in the code editor window and choose the settings below.