int main(){ Initialize(); DrawString(TOP_SCREEN, "SUPPORT THE ORIGINAL, NOT THE IMITATION!", 75, 240-10, GREY, BLACK); //7.X Keys stuff File KeyFile; if(FileOpen(&KeyFile, "/slot0x25KeyX.bin", 0)){ u8 keyX[16]; FileRead(&KeyFile, keyX, 16, 0); FileClose(&KeyFile); setup_aeskeyX(0x25, keyX); DrawString(TOP_SCREEN, " NewKeyX ", 0, 240-8, GREEN, BLACK); }else{ if(GetSystemVersion() < 3){ ConsoleInit(); print("WARNING:\n\nCannot find slot0x25KeyX.bin.\nSome titles decryption will fail,\nand some some EmuNANDs will not boot.\n\nPress A to continue...\n"); ConsoleShow(); WaitForButton(BUTTON_A); } DrawString(TOP_SCREEN, " NewKeyX ", 0, 240-8, RED, BLACK); } DrawString(TOP_SCREEN, " EmuNAND ", 0, 240-16, checkEmuNAND() ? GREEN : RED, BLACK); //That's the Main Menu initialization, easy and cool MenuInit(&MainMenu); MenuShow(); while (true) { DrawString(TOP_SCREEN, "[SELECT] Reboot", 349-18*8, 181-24-8, RED, BLACK); DrawString(TOP_SCREEN, "[START] Shutdown", 349-18*8, 181-24, RED, BLACK); u32 pad_state = InputWait(); if(pad_state & BUTTON_DOWN) MenuNextSelection(); if(pad_state & BUTTON_UP) MenuPrevSelection(); if(pad_state & BUTTON_A) MenuSelect(); if(pad_state & BUTTON_SELECT) returnHomeMenu(); if(pad_state & BUTTON_START) ShutDown(); TryScreenShot(); MenuShow(); } FSDeInit(); return 0; }
int main(){ if (Initialize()) while (1); //7.X Keys stuff File KeyFile; const char *keyfile = "/slot0x25KeyX.bin"; if(FileOpen(&KeyFile, keyfile, 0)){ uint8_t keyX[16]; FileRead(&KeyFile, keyX, 16, 0); FileClose(&KeyFile); setup_aeskeyX(0x25, keyX); }else{ if (sysver < 7) { ConsoleInit(); ConsoleSetTitle(strings[STR_WARNING]); print(strings[STR_ERROR_OPENING], keyfile); print(strings[STR_WARNING_KEYFILE]); print(strings[STR_PRESS_BUTTON_ACTION], strings[STR_BUTTON_A], strings[STR_CONTINUE]); ConsoleShow(); WaitForButton(BUTTON_A); } } //That's the Main Menu initialization, easy and cool OpenAnimation(); MenuInit(&MainMenu); MenuShow(); while (true) { uint32_t pad_state = InputWait(); if (pad_state & (BUTTON_DOWN | BUTTON_RIGHT | BUTTON_R1)) MenuNextSelection(); //I try to support every theme style if (pad_state & (BUTTON_UP | BUTTON_LEFT | BUTTON_L1)) MenuPrevSelection(); if (pad_state & BUTTON_A) { OpenAnimation(); MenuSelect(); } if (pad_state & BUTTON_SELECT) { fadeOut(); ShutDown(); } if (pad_state & BUTTON_START) { fadeOut(); returnHomeMenu(); } TryScreenShot(); MenuShow(); } FSDeInit(); return 0; }
int main(){ Initialize(); //7.X Keys stuff File KeyFile; if(FileOpen(&KeyFile, "/slot0x25KeyX.bin", 0)){ u8 keyX[16]; FileRead(&KeyFile, keyX, 16, 0); FileClose(&KeyFile); setup_aeskeyX(0x25, keyX); }else{ if(GetSystemVersion() < 3){ ConsoleInit(); ConsoleSetTitle(" WARNING"); print("WARNING:\n\nCannot find slot0x25KeyX.bin. If\nyour firmware version is less than\n7.X, some titles decryption will\nfail, and some EmuNANDs will not\nboot.\n\nPress A to continue...\n"); ConsoleShow(); WaitForButton(BUTTON_A); } } //That's the Main Menu initialization, easy and cool MenuInit(&MainMenu); MenuShow(); while (true) { u32 pad_state = InputWait(); if (pad_state & (BUTTON_DOWN | BUTTON_RIGHT | BUTTON_R1)) MenuNextSelection(); //I try to support every theme style if (pad_state & (BUTTON_UP | BUTTON_LEFT | BUTTON_L1)) MenuPrevSelection(); if(pad_state & BUTTON_A) MenuSelect(); if(pad_state & BUTTON_SELECT) ShutDown(); if(pad_state & BUTTON_START) returnHomeMenu(); TryScreenShot(); MenuShow(); } FSDeInit(); return 0; }