Ghidra: Difference between revisions

From Luigi's Mansion 2 Modding Wiki
m (small adjustements abouts screenshots and page organisation)
m (changed "dark moon" to "2" and corrected minor typos)
Line 1: Line 1:
In this guide you will see how to use ghidra to view and edit luigi mansion dark moon code and then rebuild it.
In this guide you will see how to use ghidra to view and edit luigi mansion 2 code and then rebuild it.


== Exefs.elf file ==
== Exefs.elf file ==
Line 10: Line 10:
[[File:ScreenGhidra1.png|thumb|center]]
[[File:ScreenGhidra1.png|thumb|center]]
Double click on the exefs.elf and ghidra will open a new window and propose to analyse the file, click yes and then analyse:
Double click on the exefs.elf and ghidra will open a new window and propose to analyse the file, click yes and then analyse:
[[File:ScreenGhidra2.png|thumb|center]]Then press ctrl+a on the code, right click and choose dissasemble - ARM right click another and dissasemble - THUMB, these process will take something like 10 minutes so wait.
[[File:ScreenGhidra2.png|thumb|center]]Then press ctrl+a on the code, right click and choose dissasemble - ARM, right click another time and choose dissasemble - THUMB, these processes will take something like 10 minutes so wait.


When all of this is done modify code and enjoy!
When all of this is done modify code and enjoy!


== Rebuild code.bin ==
== Rebuild code.bin ==
In order to use the file ingame you have to rebuild it to do this press O in the code editor and choose those settings.[[File:ScreenGhidra3.png|thumb|center]]
In order to use the file ingame you have to rebuild it to do this press O in the code editor and choose these settings.[[File:ScreenGhidra3.png|thumb|center]]

Revision as of 11:28, 8 June 2024

In this guide you will see how to use ghidra to view and edit luigi mansion 2 code and then rebuild it.

Exefs.elf file

In construction

Opening the file in ghidra

First you need to download ghidra on this page https://github.com/NationalSecurityAgency/ghidra when its download run the file "ghidra_run.bat" then click on file and choose "New project" like on this screenshot:

Choose non shared project and whatever name you want, when the project is created slide the exefs.elf in ghidra and choose those settings:

Double click on the exefs.elf and ghidra will open a new window and propose to analyse the file, click yes and then analyse:

Then press ctrl+a on the code, right click and choose dissasemble - ARM, right click another time and choose dissasemble - THUMB, these processes will take something like 10 minutes so wait.

When all of this is done modify code and enjoy!

Rebuild code.bin

In order to use the file ingame you have to rebuild it to do this press O in the code editor and choose these settings.