Rely on b9s key setup if the 0xBEEF magic is found

This commit is contained in:
d0k3 2017-08-18 18:52:42 +02:00
parent 2cc94be6b4
commit 564f403f4c
4 changed files with 5 additions and 6 deletions

View File

@ -1620,7 +1620,7 @@ u32 SplashInit() {
return 0;
}
u32 GodMode() {
u32 GodMode(bool is_b9s) {
const u32 quick_stp = (MAIN_SCREEN == TOP_SCREEN) ? 20 : 19;
u32 exit_mode = GODMODE_EXIT_REBOOT;
@ -1648,7 +1648,7 @@ u32 GodMode() {
InitSDCardFS();
AutoEmuNandBase(true);
InitNandCrypto(true);
InitNandCrypto(!is_b9s);
InitExtFS();
GetDirContents(current_dir, "");

View File

@ -5,4 +5,4 @@
#define GODMODE_EXIT_REBOOT 0
#define GODMODE_EXIT_POWEROFF 1
u32 GodMode();
u32 GodMode(bool is_b9s);

View File

@ -4,13 +4,12 @@
void main(int argc, char** argv)
{
(void) argc; // unused for now
(void) argv; // unused for now
// Screen on
ScreenOn();
// Run the main program
if (GodMode() == GODMODE_EXIT_REBOOT) Reboot();
if (GodMode(argc) == GODMODE_EXIT_REBOOT) Reboot();
else PowerOff();
}

View File

@ -169,7 +169,7 @@ bool InitNandCrypto(bool init_full)
LoadKeyFromFile(slot0x05KeyY, 0x05, 'Y', NULL);
// part #4: AGBSAVE CMAC KEY (set up on A9LH and SigHax)
if (IS_A9LH || IS_SIGHAX)
if (init_full && (IS_A9LH || IS_SIGHAX))
LoadKeyFromFile(NULL, 0x24, 'Y', NULL);
// part #5: FULL INIT