From c36ad54bcb9479c13ab5f207a8ab9e38cd8fa91b Mon Sep 17 00:00:00 2001 From: TuxSH Date: Thu, 4 Aug 2016 11:16:28 +0200 Subject: [PATCH] Always load firmware.bin when it exists. --- source/firm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/firm.c b/source/firm.c index 6b07a8d..9b1700f 100755 --- a/source/firm.c +++ b/source/firm.c @@ -271,13 +271,15 @@ void main(void) static inline u32 loadFirm(FirmwareType firmType) { section = firm->section; + bool externalFirmExists = getFileSize("/luma/firmware.bin") != 0; //Load FIRM from CTRNAND, unless it's an O3DS and we're loading a pre-5.0 NATIVE FIRM u32 firmVersion = firmRead(firm, (u32)firmType); - if(!isN3DS && firmType == NATIVE_FIRM && firmVersion < 0x25) + if(firmType == NATIVE_FIRM && ((!isN3DS && firmVersion < 0x25) || externalFirmExists)) { - if(!fileRead(firm, "/luma/firmware.bin") || (((u32)section[2].address >> 8) & 0xFF) != 0x68) + //Always load the external firmware file if it exists + if((!fileRead(firm, "/luma/firmware.bin") || (((u32)section[2].address >> 8) & 0xFF) != 0x68) && (!isN3DS && firmVersion < 0x25)) error("An old unsupported FIRM has been detected.\nCopy firmware.bin in /luma to boot"); //No assumption regarding FIRM version