Ghidra: Difference between revisions

From Luigi's Mansion 2 Modding Wiki
(corrected an mistake with subheaders)
m (small adjustements abouts screenshots and page organisation)
Line 6: Line 6:
== Opening the file in ghidra ==
== 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:
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:
 
[[File:ScreenGhidra0.png|center|thumb|337x337px]]
 
Choose non shared project and whatever name you want, when the project is created slide the exefs.elf in ghidra and choose those settings:
[[File:ScreenGhidra1.png|thumb]]
[[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:
 
[[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.
 
, choose non shared project and whatever name you want, when the project is created slide the exefs.elf in ghidra and choose those settings:
 
 
 
 
 
 
 
 
[[File:ScreenGhidra2.png|thumb]]
Double click on the exefs.elf and ghiadra will open a new window and purpose to analyse the file say:
 
 
 
 
 
 
 
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.


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 ==
[[File:ScreenGhidra3.png|thumb]]
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 those settings.

Revision as of 13:46, 7 June 2024

In this guide you will see how to use ghidra to view and edit luigi mansion dark moon 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 and dissasemble - THUMB, these process 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 those settings.