mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Fix ARM9 entrypoint on decrypting encrypted FIRMs
... this makes decrypted N3DS NATIVE_FIRM, AGB_FIRM, TWL_FIRM bootable.
This commit is contained in:
parent
21c1ae30fe
commit
0221839299
@ -908,6 +908,10 @@ u32 DecryptFirmFile(const char* orig, const char* dest) {
|
||||
// write back FIRM header
|
||||
fvx_lseek(&file, 0);
|
||||
memcpy(firm.dec_magic, dec_magic, sizeof(dec_magic));
|
||||
// see: https://github.com/AuroraWright/Luma3DS/blob/master/source/firm.c#L349
|
||||
// and: https://github.com/AuroraWright/Luma3DS/blob/master/source/firm.c#L424
|
||||
// and: https://github.com/AuroraWright/Luma3DS/blob/master/source/firm.c#L463
|
||||
firm.entry_arm9 = (firm.sections[3].offset) ? 0x801301C : 0x0801B01C;
|
||||
if (fvx_write(&file, &firm, sizeof(FirmHeader), &btr) != FR_OK) {
|
||||
fvx_close(&file);
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user