Force A9LH detection is not needed anymore
This commit is contained in:
parent
be6ee894f9
commit
e7b8a0ef39
@ -408,7 +408,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
|
|||||||
case 0x0004001000027000LL: // KOR MSET
|
case 0x0004001000027000LL: // KOR MSET
|
||||||
case 0x0004001000028000LL: // TWN MSET
|
case 0x0004001000028000LL: // TWN MSET
|
||||||
{
|
{
|
||||||
if(CONFIG(5))
|
if(CONFIG(4))
|
||||||
{
|
{
|
||||||
static const u16 verPattern[] = u"Ver.";
|
static const u16 verPattern[] = u"Ver.";
|
||||||
const u32 currentNand = BOOTCONFIG(0, 3);
|
const u32 currentNand = BOOTCONFIG(0, 3);
|
||||||
@ -543,7 +543,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if(CONFIG(4))
|
if(CONFIG(3))
|
||||||
{
|
{
|
||||||
u32 tidHigh = (progId & 0xFFFFFFF000000000LL) >> 0x24;
|
u32 tidHigh = (progId & 0xFFFFFFF000000000LL) >> 0x24;
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ void configureCFW(const char *configPath)
|
|||||||
|
|
||||||
const char *singleOptionsText[] = { "( ) Autoboot SysNAND",
|
const char *singleOptionsText[] = { "( ) Autoboot SysNAND",
|
||||||
"( ) SysNAND is updated (A9LH-only)",
|
"( ) SysNAND is updated (A9LH-only)",
|
||||||
"( ) Force A9LH detection",
|
|
||||||
"( ) Use second EmuNAND as default",
|
"( ) Use second EmuNAND as default",
|
||||||
"( ) Enable region/language emu. and ext. .code",
|
"( ) Enable region/language emu. and ext. .code",
|
||||||
"( ) Show current NAND in System Settings",
|
"( ) Show current NAND in System Settings",
|
||||||
|
@ -46,8 +46,8 @@ bool loadSplash(void)
|
|||||||
|
|
||||||
//Don't delay boot if no splash image is on the SD
|
//Don't delay boot if no splash image is on the SD
|
||||||
if(fileRead(fb->top_left, "/luma/splash.bin") +
|
if(fileRead(fb->top_left, "/luma/splash.bin") +
|
||||||
fileRead(fb->bottom, "/luma/splashbottom.bin") != 0)
|
fileRead(fb->bottom, "/luma/splashbottom.bin") != 0) return true;
|
||||||
return true;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,24 +93,15 @@ void main(void)
|
|||||||
firmType = NATIVE_FIRM;
|
firmType = NATIVE_FIRM;
|
||||||
|
|
||||||
//Determine if booting with A9LH
|
//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
|
//Determine if the user has an updated sysNAND
|
||||||
if(a9lhBoot || CONFIG(2))
|
updatedSys = isA9lh ? CONFIG(1) : false;
|
||||||
{
|
|
||||||
isA9lh = true;
|
|
||||||
updatedSys = CONFIG(1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
isA9lh = false;
|
|
||||||
updatedSys = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
newConfig = (u32)isA9lh << 3;
|
newConfig = (u32)isA9lh << 3;
|
||||||
|
|
||||||
//If it's a MCU reboot, try to force boot options
|
//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
|
//Always force a sysNAND boot when quitting AGB_FIRM
|
||||||
if(CFG_BOOTENV == 7)
|
if(CFG_BOOTENV == 7)
|
||||||
@ -149,7 +140,7 @@ void main(void)
|
|||||||
pressed = HID_PAD;
|
pressed = HID_PAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(a9lhBoot && !CFG_BOOTENV && pressed == SAFE_MODE)
|
if(isA9lh && !CFG_BOOTENV && pressed == SAFE_MODE)
|
||||||
{
|
{
|
||||||
nandType = FIRMWARE_SYSNAND;
|
nandType = FIRMWARE_SYSNAND;
|
||||||
firmSource = FIRMWARE_SYSNAND;
|
firmSource = FIRMWARE_SYSNAND;
|
||||||
@ -165,7 +156,7 @@ void main(void)
|
|||||||
loadPayload(pressed);
|
loadPayload(pressed);
|
||||||
|
|
||||||
//If screens are inited or the corresponding option is set, load splash screen
|
//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;
|
nbChronoStarted = 2;
|
||||||
chrono(0);
|
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,
|
/* If we're booting emuNAND the second emuNAND is set as default and B isn't pressed,
|
||||||
or vice-versa, boot the second emuNAND */
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
/* 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) */
|
if the matching option was enabled (keep it as last) */
|
||||||
u32 numPatches = firmType == TWL_FIRM ? (sizeof(twlPatches) / sizeof(patchData)) :
|
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;
|
const patchData *patches = firmType == TWL_FIRM ? twlPatches : agbPatches;
|
||||||
|
|
||||||
//Patch
|
//Patch
|
||||||
|
Reference in New Issue
Block a user