pgarba / SwitchIDAProLoader

Loader for IDA Pro to support the Nintendo Switch NRO binaries
191 stars 23 forks source link

[Error] Fatal error before kernel init #3

Closed PredatorCZ closed 6 years ago

PredatorCZ commented 6 years ago

Using IDA 7.0, shows every time I try to load main, sdk or subsdk files. Tested on Mario Kart8, Xenoblade 2, Monster Hunter XX.

Do I need to set anything specific?

pgarba commented 6 years ago

So far I verified all binaries in the SDK and had no problems with them. I will try to look into the game binaries too.

pgarba commented 6 years ago

How did you extract the binaries from the xci ?

PredatorCZ commented 6 years ago

hactool for both xci and nca, you will need keys, they are on net, binaries are in section 0 of nca

pgarba commented 6 years ago

I just tested with IDA 7.1 on Wonderboy and Mario Odyssey both. Both worked for me.

Did you rename the loader to "Switch64.dll" and copied it to the "loaders" directory ?

pgarba commented 6 years ago

Ok got the problem...

Mario Kart is an ARM 32 binary. Didn't even know that the Switch supports 32bit binaries.

PredatorCZ commented 6 years ago

Thank you for looking into this. I suppose it's adress size related problem then.

pgarba commented 6 years ago

Yes, all structs I reverse engineered are 64bit. I need to create a 32bit IDA loader and RE the 32bit structs

PredatorCZ commented 6 years ago

Instead of recreating each struct, wouldn't be better to use typedefs and switch them with macro? So if you'll need to edit some of them, you dont need to do each thing for both architectures. I don't want to be annoying, just want to help.

pgarba commented 6 years ago

Thats what I'm doing but sometimes the entries are different for 32bit and 64bit. so its a little bit more work then just makeing the types 32bit.

PredatorCZ commented 6 years ago

Hello, It has been a few days. Just checking the state.

pgarba commented 6 years ago

Hey,

I'm at the RECON right now. When I'm back home I think I will find some time to fix it.

pgarba commented 6 years ago

Sorry that it took me that long. Should befixed now!

PredatorCZ commented 6 years ago

Thank you very much.