From 8445199ebac1998f3469dbfbf6ad841233bad73f Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Wed, 28 Nov 2012 18:41:35 +0100 Subject: [PATCH] black-list v65280 of IOS254, add option to choose if bootmii boot2 is installed (and ability to boot it) --- installer/wad/0001000154484246.tmd | Bin 592 -> 592 bytes main/source/Menus/menu_settings_file.cpp | 19 +++++++++++++++++++ main/source/Menus/menus.h | 1 + main/source/Prompts/prompt_end.cpp | 15 ++++++++++----- main/source/Tools/SelectIos.cpp | 17 ++++++++++------- main/source/Tools/load.cpp | 3 +++ main/source/Tools/save.cpp | 1 + main/source/main.cpp | 9 ++++++++- main/source/main.h | 1 + updates | 5 +++++ 10 files changed, 58 insertions(+), 13 deletions(-) diff --git a/installer/wad/0001000154484246.tmd b/installer/wad/0001000154484246.tmd index 1ae72187eca96f494aa1ac42c0f9a5e2fb04653d..6dc9fc2bddd7c7978a66d6583ef5d66b016c07d6 100644 GIT binary patch delta 35 tcmV+;0Nnr31kePq6#^G01%O!WEBv;@$@ynR*XfaPTBQ$^Z%dOb0wfpL4~GB% delta 35 rcmcb>a)D)oD3iF_{|27kDgJx^P0ovK77}R8FYB|g^jJArhe-th0A3B9 diff --git a/main/source/Menus/menu_settings_file.cpp b/main/source/Menus/menu_settings_file.cpp index 04da1cc..e496acc 100644 --- a/main/source/Menus/menu_settings_file.cpp +++ b/main/source/Menus/menu_settings_file.cpp @@ -28,6 +28,7 @@ int temp_device_icon; int temp_wiiload_ios; int temp_wiiload_ahb; bool temp_sdgecko; +bool temp_bootmii_boot2; bool temp_navigation; string temp_device_dat; @@ -55,6 +56,7 @@ int MenuSettingsFile() childlock = 1; bool navigation = Options.navigation; bool sdgecko = Options.sdgecko; + bool bootmii_boot2 = Options.bootmii_boot2; string device_dat; if(Settings.device_dat == "sd1") @@ -76,6 +78,7 @@ int MenuSettingsFile() sprintf(options.name[i++], tr("Wiiload IOS")); sprintf(options.name[i++], tr("Wiiload IOS Reload")); sprintf(options.name[i++], tr("SD Gecko")); + sprintf(options.name[i++], tr("BootMii in Boot2")); sprintf(options.name[i++], tr("Childlock")); sprintf(options.name[i++], tr("Navigation key exchange")); sprintf(options.name[i++], tr("Display")); @@ -211,6 +214,10 @@ int MenuSettingsFile() sdgecko = 1; break; + case BOOTMII_BOOT2: + bootmii_boot2 = 1; + break; + case STORAGE_DEVICE: device_dat = "USB"; sprintf (options.value[STORAGE_DEVICE], device_dat.c_str()); @@ -293,6 +300,10 @@ int MenuSettingsFile() sdgecko = 0; break; + case BOOTMII_BOOT2: + bootmii_boot2 = 0; + break; + case STORAGE_DEVICE: device_dat = "SD"; sprintf (options.value[STORAGE_DEVICE], device_dat.c_str()); @@ -323,6 +334,7 @@ int MenuSettingsFile() temp_wiiload_ahb = wiiload_ahb; temp_device_dat = device_dat; temp_sdgecko = sdgecko; + temp_bootmii_boot2 = bootmii_boot2; temp_navigation = navigation; /******************************************************************************/ @@ -382,6 +394,7 @@ int MenuSettingsFile() else childlock = 1; sdgecko = temp_sdgecko; + bootmii_boot2 = temp_bootmii_boot2; navigation = temp_navigation; } else @@ -443,6 +456,11 @@ int MenuSettingsFile() else sprintf (options.value[SDGECKO], tr("Yes")); + if(!bootmii_boot2) + sprintf (options.value[BOOTMII_BOOT2], tr("No")); + else + sprintf (options.value[BOOTMII_BOOT2], tr("Yes")); + if(!navigation) sprintf (options.value[NAVIGATION], tr("No")); else @@ -515,6 +533,7 @@ int MenuSettingsFile() Options.wiiload_ahb = wiiload_ahb; device_dat = options.value[STORAGE_DEVICE]; Options.sdgecko = sdgecko; + Options.bootmii_boot2 = bootmii_boot2; Options.navigation = navigation; Options.network = Options.temp_network; Options.wifigecko = Options.temp_wifigecko; diff --git a/main/source/Menus/menus.h b/main/source/Menus/menus.h index 19f9907..c644810 100644 --- a/main/source/Menus/menus.h +++ b/main/source/Menus/menus.h @@ -31,6 +31,7 @@ enum WIILOAD_IOS, WIILOAD_AHB, SDGECKO, + BOOTMII_BOOT2, CHILDLOCK, NAVIGATION, DISPLAY, diff --git a/main/source/Prompts/prompt_end.cpp b/main/source/Prompts/prompt_end.cpp index 506b584..5a65e12 100644 --- a/main/source/Prompts/prompt_end.cpp +++ b/main/source/Prompts/prompt_end.cpp @@ -54,7 +54,9 @@ endPrompt() GuiImage systemmenuImgOver(&btn_over); GuiImage shutdownImgOver(&btn_over); - GuiText bootmiiTxt(tr("Launch BootMii"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255}); + GuiText bootmiiTxt(tr("Launch BootMii (IOS)"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255}); + if(get_bootmii() == 3) + GuiText bootmiiTxt(tr("Launch BootMii (Boot2)"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255}); GuiButton bootmii(btn.GetWidth(), btn.GetHeight()); bootmii.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); bootmii.SetPosition(0, 75); @@ -67,7 +69,7 @@ endPrompt() GuiButton hbf(btn.GetWidth(), btn.GetHeight()); hbf.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); hbf.SetPosition(0, 90); - if(get_bootmii()) + if(get_bootmii() != 0) hbf.SetPosition(0, 140); hbf.SetLabel(&hbfTxt); hbf.SetImage(&hbfImg); @@ -78,7 +80,7 @@ endPrompt() GuiButton systemmenu(btn.GetWidth(), btn.GetHeight()); systemmenu.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); systemmenu.SetPosition(0, 180); - if(get_bootmii()) + if(get_bootmii() != 0) systemmenu.SetPosition(0, 205); systemmenu.SetLabel(&systemmenuTxt); systemmenu.SetImage(&systemmenuImg); @@ -102,7 +104,7 @@ endPrompt() promptWindow.Append(&dialogBoxImg); promptWindow.Append(&titleTxt); - if(get_bootmii()) + if(get_bootmii() != 0) promptWindow.Append(&bootmii); promptWindow.Append(&systemmenu); promptWindow.Append(&shutdown); @@ -122,7 +124,10 @@ endPrompt() if(bootmii.GetState() == STATE_CLICKED) { - set_bootmii(2); + if(get_bootmii() == 3) + set_bootmii(4); + else + set_bootmii(2); menu = MENU_EXIT; stop = true; } diff --git a/main/source/Tools/SelectIos.cpp b/main/source/Tools/SelectIos.cpp index c9aef08..d567a93 100644 --- a/main/source/Tools/SelectIos.cpp +++ b/main/source/Tools/SelectIos.cpp @@ -209,11 +209,8 @@ bool IsKnownStub(u32 noIOS, s32 noRevision) if (noIOS == 254 && noRevision == 2) return true; if (noIOS == 254 && noRevision == 3) return true; if (noIOS == 254 && noRevision == 260) return true; - - // BootMii As IOS is installed on IOS254 rev 31338 - if (noIOS == 254 && noRevision == 31338) return true; - - // NAND Emu + if (noIOS == 254 && noRevision == 65280) return true; + // NAND Emu (to avoid freeze when accessing this IOS) if (noIOS == 253 && noRevision == 65535) return true; return false; @@ -308,7 +305,6 @@ bool listIOS() // Skip bootmii IOS if (titleID == 254) { - bootmii = 1; continue; } @@ -352,7 +348,11 @@ bool listIOS() } if(!isStub) + { + if(titleID == 254) + bootmii = 1; ioslist.push_back(titleID); + } } std::sort( ioslist.begin(), ioslist.end() ); // sortieren @@ -413,7 +413,10 @@ void set_priiloader(int choice) int get_bootmii() { - return bootmii; + if(Options.bootmii_boot2) + return 3; + else + return bootmii; } void set_bootmii(int choice) diff --git a/main/source/Tools/load.cpp b/main/source/Tools/load.cpp index 11ef8ec..1ff6a5f 100644 --- a/main/source/Tools/load.cpp +++ b/main/source/Tools/load.cpp @@ -106,6 +106,9 @@ void load() if(get_setting(source, "sdgecko") != "") Options.sdgecko = atoi(get_setting(source, "sdgecko").c_str()); + if(get_setting(source, "bootmii_boot2") != "") + Options.bootmii_boot2 = atoi(get_setting(source, "bootmii_boot2").c_str()); + if(get_setting(source, "network") != "") { Options.network = atoi(get_setting(source, "network").c_str()); diff --git a/main/source/Tools/save.cpp b/main/source/Tools/save.cpp index c4e3bf5..0926e44 100644 --- a/main/source/Tools/save.cpp +++ b/main/source/Tools/save.cpp @@ -102,6 +102,7 @@ void save() save_settings << "quick_start = \"" << Options.quick_start << "\"" << endl; save_settings << "show_all = \"" << Options.show_all << "\"" << endl; save_settings << "sdgecko = \"" << Options.sdgecko << "\"" << endl; + save_settings << "bootmii_boot2 = \"" << Options.bootmii_boot2 << "\"" << endl; save_settings << "navigation = \"" << Options.navigation << "\"" << endl; save_settings << "network = \"" << Options.network << "\"" << endl; save_settings << "wifigecko = \"" << Options.wifigecko << "\"" << endl; diff --git a/main/source/main.cpp b/main/source/main.cpp index cfc3b45..d5ae127 100644 --- a/main/source/main.cpp +++ b/main/source/main.cpp @@ -174,6 +174,7 @@ DefaultOptions() Options.quick_start = 0; Options.show_all = 1; Options.sdgecko = 1; + Options.bootmii_boot2 = 0; Options.navigation = 0; Options.temp_network = 0; Options.temp_wifigecko = 0; @@ -280,7 +281,7 @@ main(int argc, char *argv[]) { if(!check_uneek_fs()) { - xprintf("Start BootMii\n"); + xprintf("Load BootMii (IOS)\n"); IOS_ReloadIOS(254); } else @@ -292,6 +293,12 @@ main(int argc, char *argv[]) } } + if(get_bootmii() == 4) + { + xprintf("Load BootMii (Boot2)\n"); + SYS_ResetSystem(SYS_RESTART, 0, 0); + } + if(get_nandemu() == 2) { if (opendir(check_path("sd1:/apps/NANDEmu-Boot").c_str()) != NULL) diff --git a/main/source/main.h b/main/source/main.h index 4328e65..cbf4faa 100644 --- a/main/source/main.h +++ b/main/source/main.h @@ -132,6 +132,7 @@ struct SOptions bool network; bool wifigecko; bool newrevtext; + bool bootmii_boot2; int wiiload_ahb; int wiiload_ios; }; diff --git a/updates b/updates index eef6ce1..94d2050 100644 --- a/updates +++ b/updates @@ -2,6 +2,11 @@ - changed default options: * disable checking for new version automatically * enable sd-card debug logging +- added option for choosing whether bootmii boot2 is + installed (adds "Load BootMii (Boot2)" in Exit-Prompt +- black-listed v65280 of IOS254 (if that version is + installed there's no "Load BootMii (IOS)" anymore + in Exit-Prompt //rev41: - fixed auto-connecting Internet via WiFi