Force A9LH detection is not needed anymore

This commit is contained in:
Aurora 2016-07-18 18:51:04 +02:00
parent be6ee894f9
commit e7b8a0ef39
5 changed files with 12 additions and 22 deletions

View File

@ -408,7 +408,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
case 0x0004001000027000LL: // KOR MSET
case 0x0004001000028000LL: // TWN MSET
{
if(CONFIG(5))
if(CONFIG(4))
{
static const u16 verPattern[] = u"Ver.";
const u32 currentNand = BOOTCONFIG(0, 3);
@ -543,7 +543,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
}
default:
if(CONFIG(4))
if(CONFIG(3))
{
u32 tidHigh = (progId & 0xFFFFFFF000000000LL) >> 0x24;

View File

@ -40,7 +40,6 @@ void configureCFW(const char *configPath)
const char *singleOptionsText[] = { "( ) Autoboot SysNAND",
"( ) SysNAND is updated (A9LH-only)",
"( ) Force A9LH detection",
"( ) Use second EmuNAND as default",
"( ) Enable region/language emu. and ext. .code",
"( ) Show current NAND in System Settings",

View File

@ -46,8 +46,8 @@ bool loadSplash(void)
//Don't delay boot if no splash image is on the SD
if(fileRead(fb->top_left, "/luma/splash.bin") +
fileRead(fb->bottom, "/luma/splashbottom.bin") != 0)
return true;
fileRead(fb->bottom, "/luma/splashbottom.bin") != 0) return true;
return false;
}

View File

@ -93,24 +93,15 @@ void main(void)
firmType = NATIVE_FIRM;
//Determine if booting with A9LH
bool a9lhBoot = !PDN_SPI_CNT;
isA9lh = !PDN_SPI_CNT;
//Determine if A9LH is installed and the user has an updated sysNAND
if(a9lhBoot || CONFIG(2))
{
isA9lh = true;
updatedSys = CONFIG(1);
}
else
{
isA9lh = false;
updatedSys = false;
}
//Determine if the user has an updated sysNAND
updatedSys = isA9lh ? CONFIG(1) : false;
newConfig = (u32)isA9lh << 3;
//If it's a MCU reboot, try to force boot options
if(a9lhBoot && CFG_BOOTENV)
if(isA9lh && CFG_BOOTENV)
{
//Always force a sysNAND boot when quitting AGB_FIRM
if(CFG_BOOTENV == 7)
@ -149,7 +140,7 @@ void main(void)
pressed = HID_PAD;
}
if(a9lhBoot && !CFG_BOOTENV && pressed == SAFE_MODE)
if(isA9lh && !CFG_BOOTENV && pressed == SAFE_MODE)
{
nandType = FIRMWARE_SYSNAND;
firmSource = FIRMWARE_SYSNAND;
@ -165,7 +156,7 @@ void main(void)
loadPayload(pressed);
//If screens are inited or the corresponding option is set, load splash screen
if((PDN_GPU_CNT != 1 || CONFIG(7)) && loadSplash())
if((PDN_GPU_CNT != 1 || CONFIG(6)) && loadSplash())
{
nbChronoStarted = 2;
chrono(0);
@ -188,7 +179,7 @@ void main(void)
/* If we're booting emuNAND the second emuNAND is set as default and B isn't pressed,
or vice-versa, boot the second emuNAND */
if(nandType != FIRMWARE_SYSNAND && (CONFIG(3) == !(pressed & BUTTON_B))) nandType = FIRMWARE_EMUNAND2;
if(nandType != FIRMWARE_SYSNAND && (CONFIG(2) == !(pressed & BUTTON_B))) nandType = FIRMWARE_EMUNAND2;
}
}

View File

@ -157,7 +157,7 @@ void applyLegacyFirmPatches(u8 *pos, FirmwareType firmType)
/* Calculate the amount of patches to apply. Only count the boot screen patch for AGB_FIRM
if the matching option was enabled (keep it as last) */
u32 numPatches = firmType == TWL_FIRM ? (sizeof(twlPatches) / sizeof(patchData)) :
(sizeof(agbPatches) / sizeof(patchData) - !CONFIG(6));
(sizeof(agbPatches) / sizeof(patchData) - !CONFIG(5));
const patchData *patches = firmType == TWL_FIRM ? twlPatches : agbPatches;
//Patch