From c93a97f8d7904e5ce3eff3546d0dc2ab565357ea Mon Sep 17 00:00:00 2001 From: Aurora Date: Fri, 2 Sep 2016 14:27:56 +0200 Subject: [PATCH 1/2] mcuReboot now checks for isFirmlaunch --- source/firm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/firm.c b/source/firm.c index 18f7097..2447e02 100755 --- a/source/firm.c +++ b/source/firm.c @@ -75,10 +75,10 @@ void main(void) //Determine if this is a firmlaunch boot if(launchedFirmTidLow[5] != 0) { - if(needConfig == CREATE_CONFIGURATION) mcuReboot(); - isFirmlaunch = true; + if(needConfig == CREATE_CONFIGURATION) mcuReboot(); + //'0' = NATIVE_FIRM, '1' = TWL_FIRM, '2' = AGB_FIRM firmType = launchedFirmTidLow[7] == u'3' ? SAFE_FIRM : (FirmwareType)(launchedFirmTidLow[5] - u'0'); @@ -238,9 +238,9 @@ static inline u32 loadFirm(FirmwareType *firmType, FirmwareSource firmSource) if(!isN3DS && *firmType == NATIVE_FIRM) { - //We can't boot < 3.x EmuNANDs if(firmVersion < 0x18) { + //We can't boot < 3.x EmuNANDs if(firmSource != FIRMWARE_SYSNAND) error("An old unsupported EmuNAND has been detected.\nLuma3DS is unable to boot it"); From eba56d0f644a9a565bced8e76b4f5295884fe782 Mon Sep 17 00:00:00 2001 From: Aurora Date: Fri, 2 Sep 2016 15:40:28 +0200 Subject: [PATCH 2/2] Save 4 bytes as we are space constrained on N3DS --- injector/source/CFWInfo.h | 2 +- patches/svcGetCFWInfo.s | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/injector/source/CFWInfo.h b/injector/source/CFWInfo.h index 30b4781..cc9eb6b 100644 --- a/injector/source/CFWInfo.h +++ b/injector/source/CFWInfo.h @@ -16,4 +16,4 @@ typedef struct __attribute__((packed)) u32 config; } CFWInfo; -int svcGetCFWInfo(CFWInfo *info); \ No newline at end of file +void svcGetCFWInfo(CFWInfo *info); \ No newline at end of file diff --git a/patches/svcGetCFWInfo.s b/patches/svcGetCFWInfo.s index edded7d..945cb58 100644 --- a/patches/svcGetCFWInfo.s +++ b/patches/svcGetCFWInfo.s @@ -35,7 +35,6 @@ cmp r0, r2 blo loop - mov r0, #0 bx lr .pool