Adubbz / Ghidra-Switch-Loader

Nintendo Switch loader for Ghidra
ISC License
281 stars 43 forks source link

[Feature Request] Allow changing the base address of NROs, NSOs, and NXOs #56

Open M1CR0H4CK3R opened 1 month ago

M1CR0H4CK3R commented 1 month ago

I want to set an external reference to the main NSO from within an NRO of a game, but because the base address of the 2 files is shared, it ends up just flat out not loading the file whatsoever. I want to be able to set the base address of the main NSO to 0x7100000000 and the NRO's base address to 0xB400000000, so that the 2 files can intermingle in ghidra. Can this be allowed? It would make stepping through the code of this game a lot easier, as shifting registers is used heavily in the game, and keeping note of every affected registers' contents between 2 different files is extremely difficult.

masagrator commented 1 month ago
and the NRO's base address to 0xB400000000

You must choose address that is lower than 0x8000000000 (39-bit address limitation) and that will fit executable.

M1CR0H4CK3R commented 1 month ago
and the NRO's base address to 0xB400000000

You must choose address that is lower than 0x8000000000 (39-bit address limitation) and that will fit executable.

The problem is that SwitchLoader currently does not allow choosing the base address, and always sets it to 0x7100000000. I want to be able to customize it per file.