black-list v65280 of IOS254, add option to choose if bootmii boot2 is installed (and ability to boot it)

This commit is contained in:
Christopher Roy Bratusek 2012-11-28 18:41:35 +01:00
parent 316b507f9c
commit 8445199eba
10 changed files with 58 additions and 13 deletions

Binary file not shown.

View File

@ -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;

View File

@ -31,6 +31,7 @@ enum
WIILOAD_IOS,
WIILOAD_AHB,
SDGECKO,
BOOTMII_BOOT2,
CHILDLOCK,
NAVIGATION,
DISPLAY,

View File

@ -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;
}

View File

@ -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)

View File

@ -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());

View File

@ -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;

View File

@ -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)

View File

@ -132,6 +132,7 @@ struct SOptions
bool network;
bool wifigecko;
bool newrevtext;
bool bootmii_boot2;
int wiiload_ahb;
int wiiload_ios;
};

View File

@ -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