From b3d25ce64a2ec48a0e7131a35bd3b3505a330461 Mon Sep 17 00:00:00 2001 From: Aurora Date: Sat, 26 Mar 2016 17:28:47 +0100 Subject: [PATCH] Better commenting --- source/firm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/firm.c b/source/firm.c index a7f21ce..06dee07 100755 --- a/source/firm.c +++ b/source/firm.c @@ -176,7 +176,7 @@ static void loadEmu(u8 *proc9Offset){ //No emuNAND detected if(!emuHeader) error("No emuNAND has been detected"); - //Copy the emuNAND patch + //Copy emuNAND code void *emuCodeOffset = getEmuCode(arm9Section, section[2].size, proc9Offset); memcpy(emuCodeOffset, emunand, emunand_size); @@ -225,9 +225,12 @@ void patchFirm(void){ //Patch FIRM reboots, not on 9.0 FIRM as it breaks firmlaunchhax if(mode){ - //Read reboot code from SD + //Calculate offset for the firmlaunch code void *rebootOffset = getReboot(arm9Section, section[2].size); + //Calculate offset for the fOpen function u32 fOpenOffset = getfOpen(proc9Offset, rebootOffset); + + //Copy firmlaunch code memcpy(rebootOffset, reboot, reboot_size); //Put the fOpen offset in the right location