Merge master into developer

This commit is contained in:
Aurora 2016-08-31 19:54:12 +02:00
commit 3608799dff
3 changed files with 8 additions and 8 deletions

View File

@ -227,8 +227,8 @@ void main(void)
patchNativeFirm(firmVersion, nandType, emuHeader, isA9lh); patchNativeFirm(firmVersion, nandType, emuHeader, isA9lh);
break; break;
case SAFE_FIRM: case SAFE_FIRM:
case NATIVE_FIRM2X: case NATIVE_FIRM1X2X:
if(isA9lh) patch2xNativeAndSafeFirm(); if(isA9lh) patch1x2xNativeAndSafeFirm();
break; break;
default: default:
//Skip patching on unsupported O3DS AGB/TWL FIRMs //Skip patching on unsupported O3DS AGB/TWL FIRMs
@ -262,10 +262,10 @@ static inline u32 loadFirm(FirmwareType *firmType, FirmwareSource firmSource)
//We can't boot < 2.x SysNANDs and < 3.x EmuNANDs //We can't boot < 2.x SysNANDs and < 3.x EmuNANDs
if(firmVersion < 0x18) if(firmVersion < 0x18)
{ {
if(firmSource != FIRMWARE_SYSNAND || firmVersion < 9) if(firmSource != FIRMWARE_SYSNAND)
error("An old unsupported NAND has been detected.\nLuma3DS is unable to boot it"); error("An old unsupported EmuNAND has been detected.\nLuma3DS is unable to boot it");
if(BOOTCONFIG(5, 1)) error("SAFE_MODE is not supported on 2.x FIRM"); if(BOOTCONFIG(5, 1)) error("SAFE_MODE is not supported on 1.x/2.x FIRM");
*firmType = NATIVE_FIRM2X; *firmType = NATIVE_FIRM2X;
} }
@ -399,7 +399,7 @@ static inline void patchLegacyFirm(FirmwareType firmType)
if(firmType == TWL_FIRM && CONFIG(5)) patchTwlBg((u8 *)firm + section[1].offset); if(firmType == TWL_FIRM && CONFIG(5)) patchTwlBg((u8 *)firm + section[1].offset);
} }
static inline void patch2xNativeAndSafeFirm(void) static inline void patch1x2xNativeAndSafeFirm(void)
{ {
u8 *arm9Section = (u8 *)firm + section[2].offset; u8 *arm9Section = (u8 *)firm + section[2].offset;

View File

@ -50,6 +50,6 @@ typedef struct firmHeader {
static inline u32 loadFirm(FirmwareType *firmType, FirmwareSource firmSource); static inline u32 loadFirm(FirmwareType *firmType, FirmwareSource firmSource);
static inline void patchNativeFirm(u32 firmVersion, FirmwareSource nandType, u32 emuHeader, bool isA9lh); static inline void patchNativeFirm(u32 firmVersion, FirmwareSource nandType, u32 emuHeader, bool isA9lh);
static inline void patchLegacyFirm(FirmwareType firmType); static inline void patchLegacyFirm(FirmwareType firmType);
static inline void patch2xNativeAndSafeFirm(void); static inline void patch1x2xNativeAndSafeFirm(void);
static inline void copySection0AndInjectSystemModules(FirmwareType firmType); static inline void copySection0AndInjectSystemModules(FirmwareType firmType);
static inline void launchFirm(FirmwareType firmType); static inline void launchFirm(FirmwareType firmType);

View File

@ -50,5 +50,5 @@ typedef enum FirmwareType
TWL_FIRM = 1, TWL_FIRM = 1,
AGB_FIRM = 2, AGB_FIRM = 2,
SAFE_FIRM = 3, SAFE_FIRM = 3,
NATIVE_FIRM2X = 4 NATIVE_FIRM1X2X = 4
} FirmwareType; } FirmwareType;