*Added Block IOS Reload option to GameSettings (which was in our Loader all the time since i implemented 222 and wasn't used lol)

NOTE: This Block IOS Reload option enables games to work that don't usually work due to IOS Reloads. This option works ONLY if you boot your Loader in 222 and boot the game in 222/223)
This commit is contained in:
dimok321 2009-06-18 16:09:45 +00:00
parent 2a35194fba
commit 1ab0f813e2
7 changed files with 55 additions and 21 deletions

View File

@ -51,6 +51,7 @@ snprintf(LANGUAGE.BacktoLoader, sizeof(LANGUAGE.BacktoLoader), "Back to Loader")
snprintf(LANGUAGE.BacktoWiiMenu, sizeof(LANGUAGE.BacktoWiiMenu), "Back to Wii Menu"); snprintf(LANGUAGE.BacktoWiiMenu, sizeof(LANGUAGE.BacktoWiiMenu), "Back to Wii Menu");
snprintf(LANGUAGE.BootStandard, sizeof(LANGUAGE.BootStandard), "Boot/Standard"); snprintf(LANGUAGE.BootStandard, sizeof(LANGUAGE.BootStandard), "Boot/Standard");
snprintf(LANGUAGE.Both, sizeof(LANGUAGE.Both), "Both"); snprintf(LANGUAGE.Both, sizeof(LANGUAGE.Both), "Both");
snprintf(LANGUAGE.Blockiosreload, sizeof(LANGUAGE.Blockiosreload), "Block IOS Reload");
snprintf(LANGUAGE.Cantcreatedirectory, sizeof(LANGUAGE.Cantcreatedirectory), "Can't create directory"); snprintf(LANGUAGE.Cantcreatedirectory, sizeof(LANGUAGE.Cantcreatedirectory), "Can't create directory");
snprintf(LANGUAGE.Cancel, sizeof(LANGUAGE.Cancel), "Cancel"); snprintf(LANGUAGE.Cancel, sizeof(LANGUAGE.Cancel), "Cancel");
snprintf(LANGUAGE.Cantbeformated, sizeof(LANGUAGE.Cantbeformated), "Can't be formated"); snprintf(LANGUAGE.Cantbeformated, sizeof(LANGUAGE.Cantbeformated), "Can't be formated");
@ -373,6 +374,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.BootStandard, val, sizeof(LANGUAGE.BootStandard)); strcopy(LANGUAGE.BootStandard, val, sizeof(LANGUAGE.BootStandard));
return; return;
} }
if (strcmp(name, "Blockiosreload") == 0) {
strcopy(LANGUAGE.Blockiosreload, val, sizeof(LANGUAGE.Blockiosreload));
return;
}
if (strcmp(name, "Both") == 0) { if (strcmp(name, "Both") == 0) {
strcopy(LANGUAGE.Both, val, sizeof(LANGUAGE.Both)); strcopy(LANGUAGE.Both, val, sizeof(LANGUAGE.Both));
return; return;

View File

@ -47,6 +47,7 @@ struct LANGUAGE
char BacktoWiiMenu[50]; char BacktoWiiMenu[50];
char BootStandard[50]; char BootStandard[50];
char Both[35]; char Both[35];
char Blockiosreload[60];
char Cantcreatedirectory[50]; char Cantcreatedirectory[50];
char Cancel[20]; char Cancel[20];
char Cantbeformated[50]; char Cantbeformated[50];

View File

@ -1878,6 +1878,7 @@ int MainMenu(int menu)
iosChoice = game_cfg->ios; iosChoice = game_cfg->ios;
countrystrings = game_cfg->patchcountrystrings; countrystrings = game_cfg->patchcountrystrings;
alternatedol = game_cfg->loadalternatedol; alternatedol = game_cfg->loadalternatedol;
reloadblock = game_cfg->iosreloadblock;
} else { } else {
videoChoice = Settings.video; videoChoice = Settings.video;
languageChoice = Settings.language; languageChoice = Settings.language;
@ -1891,6 +1892,7 @@ int MainMenu(int menu)
fix002 = Settings.error002; fix002 = Settings.error002;
countrystrings = Settings.patchcountrystrings; countrystrings = Settings.patchcountrystrings;
alternatedol = off; alternatedol = off;
reloadblock = off;
} }
int ios2; int ios2;
switch(iosChoice) { switch(iosChoice) {
@ -1926,6 +1928,11 @@ int MainMenu(int menu)
SDCard_deInit(); SDCard_deInit();
USBDevice_deInit(); USBDevice_deInit();
if(reloadblock == on && (IOS_GetVersion() == 222 || IOS_GetVersion() == 223)) {
patch_cios_data();
mload_close();
}
u8 errorfixer002 = 0; u8 errorfixer002 = 0;
switch(fix002) switch(fix002)
{ {

View File

@ -184,6 +184,7 @@ int mload_set_ES_ioctlv_vector(void *starlet_addr);
/*--------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------*/
int load_ehc_module(); int load_ehc_module();
int patch_cios_data();
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -1725,7 +1725,7 @@ int GameSettings(struct discHdr * header)
strncat(gameName, "...", 3); strncat(gameName, "...", 3);
} }
customOptionList options3(11); customOptionList options3(12);
options3.SetName(0,"%s", LANGUAGE.VideoMode); options3.SetName(0,"%s", LANGUAGE.VideoMode);
options3.SetName(1,"%s", LANGUAGE.VIDTVPatch); options3.SetName(1,"%s", LANGUAGE.VIDTVPatch);
options3.SetName(2,"%s", LANGUAGE.Language); options3.SetName(2,"%s", LANGUAGE.Language);
@ -1735,7 +1735,8 @@ int GameSettings(struct discHdr * header)
options3.SetName(6,"%s", LANGUAGE.Error002fix); options3.SetName(6,"%s", LANGUAGE.Error002fix);
options3.SetName(7,"%s", LANGUAGE.Patchcountrystrings); options3.SetName(7,"%s", LANGUAGE.Patchcountrystrings);
options3.SetName(8,"%s", LANGUAGE.Alternatedol); options3.SetName(8,"%s", LANGUAGE.Alternatedol);
options3.SetName(9,"%s", LANGUAGE.Defaultgamesettings); options3.SetName(9,"%s", LANGUAGE.Blockiosreload);
options3.SetName(10,"%s", LANGUAGE.Defaultgamesettings);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume); GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
@ -1824,6 +1825,7 @@ int GameSettings(struct discHdr * header)
fix002 = game_cfg->errorfix002; fix002 = game_cfg->errorfix002;
countrystrings = game_cfg->patchcountrystrings; countrystrings = game_cfg->patchcountrystrings;
alternatedol = game_cfg->loadalternatedol; alternatedol = game_cfg->loadalternatedol;
reloadblock = game_cfg->iosreloadblock;
} }
else else
{ {
@ -1840,6 +1842,7 @@ int GameSettings(struct discHdr * header)
fix002 = Settings.error002; fix002 = Settings.error002;
countrystrings = Settings.patchcountrystrings; countrystrings = Settings.patchcountrystrings;
alternatedol = off; alternatedol = off;
reloadblock = off;
} }
int opt_lang = languageChoice; // backup language setting int opt_lang = languageChoice; // backup language setting
@ -1894,7 +1897,10 @@ int GameSettings(struct discHdr * header)
if (alternatedol == on) options3.SetValue(8,LANGUAGE.ON); if (alternatedol == on) options3.SetValue(8,LANGUAGE.ON);
else if (alternatedol == off) options3.SetValue(8,LANGUAGE.OFF); else if (alternatedol == off) options3.SetValue(8,LANGUAGE.OFF);
options3.SetValue(9, NULL); if (reloadblock == on) options3.SetValue(9,LANGUAGE.ON);
else if (reloadblock == off) options3.SetValue(9,LANGUAGE.OFF);
options3.SetValue(10, NULL);
if(shutdown == 1) if(shutdown == 1)
Sys_Shutdown(); Sys_Shutdown();
@ -1933,6 +1939,9 @@ int GameSettings(struct discHdr * header)
alternatedol = (alternatedol+1) % 2; alternatedol = (alternatedol+1) % 2;
break; break;
case 9: case 9:
reloadblock = (reloadblock+1) % 2;
break;
case 10:
int choice = WindowPrompt(LANGUAGE.Areyousure,0,LANGUAGE.Yes,LANGUAGE.Cancel,0,0); int choice = WindowPrompt(LANGUAGE.Areyousure,0,LANGUAGE.Yes,LANGUAGE.Cancel,0,0);
if(choice == 1) { if(choice == 1) {
videoChoice = Settings.video; videoChoice = Settings.video;
@ -1942,6 +1951,7 @@ int GameSettings(struct discHdr * header)
fix002 = Settings.error002; fix002 = Settings.error002;
countrystrings = Settings.patchcountrystrings; countrystrings = Settings.patchcountrystrings;
alternatedol = off; alternatedol = off;
reloadblock = off;
if(Settings.cios == ios222) { if(Settings.cios == ios222) {
iosChoice = i222; iosChoice = i222;
} else { } else {

View File

@ -28,6 +28,7 @@ u8 viChoice = 0;
u8 iosChoice = 0; u8 iosChoice = 0;
u8 parentalcontrolChoice = 0; u8 parentalcontrolChoice = 0;
u8 fix002 = 0; u8 fix002 = 0;
u8 reloadblock = 0;
u8 countrystrings = 0; u8 countrystrings = 0;
u8 alternatedol = 0; u8 alternatedol = 0;
u8 xflip = 0; u8 xflip = 0;
@ -1132,6 +1133,7 @@ void cfg_set_game_opt(struct Game_CFG *game, u8 *id)
game->ios = iosChoice; game->ios = iosChoice;
game->parentalcontrol = parentalcontrolChoice; game->parentalcontrol = parentalcontrolChoice;
game->errorfix002 = fix002; game->errorfix002 = fix002;
game->iosreloadblock = reloadblock;
game->patchcountrystrings = countrystrings; game->patchcountrystrings = countrystrings;
game->loadalternatedol = alternatedol; game->loadalternatedol = alternatedol;
} }
@ -1292,6 +1294,11 @@ void game_set(char *name, char *val)
game->errorfix002 = opt_c; game->errorfix002 = opt_c;
} }
} }
if (strcmp("iosreloadblock", opt_name) == 0) {
if (sscanf(opt_val, "%hd", &opt_c) == 1) {
game->iosreloadblock = opt_c;
}
}
if (strcmp("patchcountrystrings", opt_name) == 0) { if (strcmp("patchcountrystrings", opt_name) == 0) {
if (sscanf(opt_val, "%hd", &opt_c) == 1) { if (sscanf(opt_val, "%hd", &opt_c) == 1) {
game->patchcountrystrings = opt_c; game->patchcountrystrings = opt_c;
@ -1447,6 +1454,7 @@ bool cfg_save_games()
fprintf(f, "ios:%d; ", cfg_game[i].ios); fprintf(f, "ios:%d; ", cfg_game[i].ios);
fprintf(f, "pctrl:%d; ", cfg_game[i].parentalcontrol); fprintf(f, "pctrl:%d; ", cfg_game[i].parentalcontrol);
fprintf(f, "errorfix002:%d; ", cfg_game[i].errorfix002); fprintf(f, "errorfix002:%d; ", cfg_game[i].errorfix002);
fprintf(f, "iosreloadblock:%d; ", cfg_game[i].iosreloadblock);
fprintf(f, "patchcountrystrings:%d; ", cfg_game[i].patchcountrystrings); fprintf(f, "patchcountrystrings:%d; ", cfg_game[i].patchcountrystrings);
fprintf(f, "loadalternatedol:%d;\n", cfg_game[i].loadalternatedol); fprintf(f, "loadalternatedol:%d;\n", cfg_game[i].loadalternatedol);
} }

View File

@ -155,6 +155,7 @@ extern u8 iosChoice;
extern u8 faveChoice; extern u8 faveChoice;
extern u8 parentalcontrolChoice; extern u8 parentalcontrolChoice;
extern u8 fix002; extern u8 fix002;
extern u8 reloadblock;
extern u8 countrystrings; extern u8 countrystrings;
extern u8 alternatedol; extern u8 alternatedol;
extern u8 xflip; extern u8 xflip;
@ -176,6 +177,7 @@ struct Game_CFG
u8 ios; u8 ios;
u8 parentalcontrol; u8 parentalcontrol;
u8 errorfix002; u8 errorfix002;
u8 iosreloadblock;
u8 loadalternatedol; u8 loadalternatedol;
u8 patchcountrystrings; u8 patchcountrystrings;
}; };