mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 05:32:47 +00:00
Automatically show the bootmenu on ntrboot
This commit is contained in:
parent
85e584c2d5
commit
d6919eba22
@ -9,6 +9,9 @@
|
||||
// see: https://www.3dbrew.org/wiki/OTP_Registers#Plaintext_OTP
|
||||
#define IS_DEVKIT ((*(vu8*) (0x01FFB800+0x19)) != 0x0)
|
||||
|
||||
// check first 8 byte of NTRBOOT blowfish data (0x6A0 in DTCM)
|
||||
#define IS_NTRBOOT ((*(vu64*) (0x300086A0)) == 0xBFEFD1CD2683A24E)
|
||||
|
||||
// see: https://3dbrew.org/wiki/CONFIG11_Registers
|
||||
// (also returns true for sighaxed systems, maybe change the name later?)
|
||||
#define IS_A9LH ((*(vu32*) 0x101401C0) == 0)
|
||||
|
@ -1584,8 +1584,9 @@ u32 GodMode(bool is_b9s) {
|
||||
u32 cursor = 0;
|
||||
u32 scroll = 0;
|
||||
|
||||
bool bootloader = !is_b9s && IS_SIGHAX; // only when installed to FIRM
|
||||
bool bootmenu = bootloader && CheckButton(BOOTMENU_KEY);
|
||||
bool bootloader = !is_b9s && IS_SIGHAX; // only when installed to FIRM / on NTRBOOT
|
||||
bool ntrboot = bootloader && IS_NTRBOOT;
|
||||
bool bootmenu = bootloader && (ntrboot || CheckButton(BOOTMENU_KEY));
|
||||
bool godmode9 = !bootloader;
|
||||
FirmHeader* firm_in_mem = (FirmHeader*) DIR_BUFFER;
|
||||
if (bootloader) { // check for FIRM in FCRAM, but prevent bootloops
|
||||
@ -1601,7 +1602,7 @@ u32 GodMode(bool is_b9s) {
|
||||
|
||||
|
||||
ClearScreenF(true, true, COLOR_STD_BG);
|
||||
SplashInit(bootmenu ? "bootmenu mode" : bootloader ? "bootloader mode" : NULL);
|
||||
SplashInit(ntrboot ? "ntrboot mode" : bootmenu ? "bootmenu mode" : bootloader ? "bootloader mode" : NULL);
|
||||
u64 timer = timer_start(); // show splash
|
||||
|
||||
if ((sizeof(DirStruct) > 0x78000) || (N_PANES * sizeof(PaneData) > 0x10000)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user