mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-19 17:59:16 +01:00
*Fixed some issues
*Added 16:9 forwarder *Changed video mode change behaviour *Added new GameSetting "Online fix" NOTE: Online fix is ONLY needed if you initialize network inside the loader and start an Online Game and ONLY if your boot cios is the same as GameSettings IOS (which is default). That Game would need an IOS Reload before start to be able to play it online BUT this IOS Reload mostly causes Blackscreens. I made this option so you dont have to avoid initializing network. If you have different boot IOS than gamesettings IOS this fix doesnt matter too.
This commit is contained in:
parent
9a4fd8e680
commit
4ca4ab1061
@ -177,6 +177,7 @@ snprintf(LANGUAGE.OFF, sizeof(LANGUAGE.OFF), "OFF");
|
|||||||
snprintf(LANGUAGE.OfficialSite, sizeof(LANGUAGE.OfficialSite), "Official Site");
|
snprintf(LANGUAGE.OfficialSite, sizeof(LANGUAGE.OfficialSite), "Official Site");
|
||||||
snprintf(LANGUAGE.ON, sizeof(LANGUAGE.ON), "ON");
|
snprintf(LANGUAGE.ON, sizeof(LANGUAGE.ON), "ON");
|
||||||
snprintf(LANGUAGE.OnlyInstall, sizeof(LANGUAGE.OnlyInstall), "Only for Install");
|
snprintf(LANGUAGE.OnlyInstall, sizeof(LANGUAGE.OnlyInstall), "Only for Install");
|
||||||
|
snprintf(LANGUAGE.Onlinefix, sizeof(LANGUAGE.Onlinefix), "Online fix");
|
||||||
snprintf(LANGUAGE.Parentalcontrol, sizeof(LANGUAGE.Parentalcontrol), "Parental Control");
|
snprintf(LANGUAGE.Parentalcontrol, sizeof(LANGUAGE.Parentalcontrol), "Parental Control");
|
||||||
snprintf(LANGUAGE.Partition, sizeof(LANGUAGE.Partition), "Partition");
|
snprintf(LANGUAGE.Partition, sizeof(LANGUAGE.Partition), "Partition");
|
||||||
snprintf(LANGUAGE.Password, sizeof(LANGUAGE.Password), "Password");
|
snprintf(LANGUAGE.Password, sizeof(LANGUAGE.Password), "Password");
|
||||||
@ -870,6 +871,10 @@ void language_set(char *name, char *val)
|
|||||||
strcopy(LANGUAGE.ON, val, sizeof(LANGUAGE.ON));
|
strcopy(LANGUAGE.ON, val, sizeof(LANGUAGE.ON));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (strcmp(name, "Onlinefix") == 0) {
|
||||||
|
strcopy(LANGUAGE.Onlinefix, val, sizeof(LANGUAGE.Onlinefix));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (strcmp(name, "Parentalcontrol") == 0) {
|
if (strcmp(name, "Parentalcontrol") == 0) {
|
||||||
strcopy(LANGUAGE.Parentalcontrol, val, sizeof(LANGUAGE.Parentalcontrol));
|
strcopy(LANGUAGE.Parentalcontrol, val, sizeof(LANGUAGE.Parentalcontrol));
|
||||||
return;
|
return;
|
||||||
|
@ -176,6 +176,7 @@ struct LANGUAGE
|
|||||||
char ok[30];
|
char ok[30];
|
||||||
char ON[30];
|
char ON[30];
|
||||||
char OnlyInstall[50];
|
char OnlyInstall[50];
|
||||||
|
char Onlinefix[50];
|
||||||
char Parentalcontrol[50];
|
char Parentalcontrol[50];
|
||||||
char Partition[50];
|
char Partition[50];
|
||||||
char Password[50];
|
char Password[50];
|
||||||
|
@ -515,16 +515,10 @@ static int MenuDiscList()
|
|||||||
clockTimeBack.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
clockTimeBack.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
||||||
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
|
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
|
||||||
clockTimeBack.SetFont(fontClock);
|
clockTimeBack.SetFont(fontClock);
|
||||||
if (Settings.gameDisplay==grid || Settings.gameDisplay==carousel) {
|
|
||||||
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
|
|
||||||
}
|
|
||||||
GuiText clockTime(theTime, 40, (GXColor){THEME.clock_r, THEME.clock_g, THEME.clock_b, 240});
|
GuiText clockTime(theTime, 40, (GXColor){THEME.clock_r, THEME.clock_g, THEME.clock_b, 240});
|
||||||
clockTime.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
clockTime.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
||||||
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
|
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
|
||||||
clockTime.SetFont(fontClock);
|
clockTime.SetFont(fontClock);
|
||||||
if (Settings.gameDisplay==grid || Settings.gameDisplay==carousel) {
|
|
||||||
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
|
|
||||||
}
|
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
GuiWindow w(screenwidth, screenheight);
|
GuiWindow w(screenwidth, screenheight);
|
||||||
@ -1831,6 +1825,7 @@ int MainMenu(int menu)
|
|||||||
ocarinaChoice = game_cfg->ocarina;
|
ocarinaChoice = game_cfg->ocarina;
|
||||||
viChoice = game_cfg->vipatch;
|
viChoice = game_cfg->vipatch;
|
||||||
fix002 = game_cfg->errorfix002;
|
fix002 = game_cfg->errorfix002;
|
||||||
|
onlinefix = game_cfg->onlinegame;
|
||||||
iosChoice = game_cfg->ios;
|
iosChoice = game_cfg->ios;
|
||||||
} else {
|
} else {
|
||||||
videoChoice = Settings.video;
|
videoChoice = Settings.video;
|
||||||
@ -1843,6 +1838,7 @@ int MainMenu(int menu)
|
|||||||
iosChoice = i249;
|
iosChoice = i249;
|
||||||
}
|
}
|
||||||
fix002 = off;
|
fix002 = off;
|
||||||
|
onlinefix = off;
|
||||||
}
|
}
|
||||||
int ios2;
|
int ios2;
|
||||||
switch(iosChoice) {
|
switch(iosChoice) {
|
||||||
@ -1863,7 +1859,7 @@ int MainMenu(int menu)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IOS_GetVersion() != ios2 || IsNetworkInit() == true) {
|
if(IOS_GetVersion() != ios2 || (IsNetworkInit() == true && onlinefix == on)) {
|
||||||
ret = Sys_IosReload(ios2);
|
ret = Sys_IosReload(ios2);
|
||||||
if(ret < 0) {
|
if(ret < 0) {
|
||||||
Sys_IosReload(249);
|
Sys_IosReload(249);
|
||||||
@ -1960,12 +1956,10 @@ int MainMenu(int menu)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case systemdefault:
|
case systemdefault:
|
||||||
|
|
||||||
videoselected = 4;
|
videoselected = 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case patch:
|
case patch:
|
||||||
|
|
||||||
videoselected = 5;
|
videoselected = 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1679,7 +1679,8 @@ int GameSettings(struct discHdr * header)
|
|||||||
options3.SetName(4, "IOS");
|
options3.SetName(4, "IOS");
|
||||||
options3.SetName(5,"%s", LANGUAGE.Parentalcontrol);
|
options3.SetName(5,"%s", LANGUAGE.Parentalcontrol);
|
||||||
options3.SetName(6,"%s", LANGUAGE.Error002fix);
|
options3.SetName(6,"%s", LANGUAGE.Error002fix);
|
||||||
options3.SetName(7,"%s", LANGUAGE.Defaultgamesettings);
|
options3.SetName(7,"%s", LANGUAGE.Onlinefix);
|
||||||
|
options3.SetName(8,"%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);
|
||||||
@ -1766,6 +1767,7 @@ int GameSettings(struct discHdr * header)
|
|||||||
iosChoice = game_cfg->ios;
|
iosChoice = game_cfg->ios;
|
||||||
parentalcontrolChoice = game_cfg->parentalcontrol;
|
parentalcontrolChoice = game_cfg->parentalcontrol;
|
||||||
fix002 = game_cfg->errorfix002;
|
fix002 = game_cfg->errorfix002;
|
||||||
|
onlinefix = game_cfg->onlinegame;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1780,6 +1782,7 @@ int GameSettings(struct discHdr * header)
|
|||||||
}
|
}
|
||||||
parentalcontrolChoice = 0;
|
parentalcontrolChoice = 0;
|
||||||
fix002 = off;
|
fix002 = off;
|
||||||
|
onlinefix = off;
|
||||||
}
|
}
|
||||||
|
|
||||||
int opt_lang = languageChoice; // backup language setting
|
int opt_lang = languageChoice; // backup language setting
|
||||||
@ -1827,7 +1830,10 @@ int GameSettings(struct discHdr * header)
|
|||||||
if (fix002 == on) options3.SetValue(6,LANGUAGE.ON);
|
if (fix002 == on) options3.SetValue(6,LANGUAGE.ON);
|
||||||
else if (fix002 == off) options3.SetValue(6,LANGUAGE.OFF);
|
else if (fix002 == off) options3.SetValue(6,LANGUAGE.OFF);
|
||||||
|
|
||||||
options3.SetValue(7, NULL);
|
if (onlinefix == on) options3.SetValue(7,LANGUAGE.ON);
|
||||||
|
else if (onlinefix == off) options3.SetValue(7,LANGUAGE.OFF);
|
||||||
|
|
||||||
|
options3.SetValue(8, NULL);
|
||||||
|
|
||||||
if(shutdown == 1)
|
if(shutdown == 1)
|
||||||
Sys_Shutdown();
|
Sys_Shutdown();
|
||||||
@ -1860,6 +1866,9 @@ int GameSettings(struct discHdr * header)
|
|||||||
fix002 = (fix002+1) % 2;
|
fix002 = (fix002+1) % 2;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
|
onlinefix = (onlinefix+1) % 2;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
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 = discdefault;
|
videoChoice = discdefault;
|
||||||
@ -1867,6 +1876,7 @@ int GameSettings(struct discHdr * header)
|
|||||||
languageChoice = ConsoleLangDefault;
|
languageChoice = ConsoleLangDefault;
|
||||||
ocarinaChoice = off;
|
ocarinaChoice = off;
|
||||||
fix002 = off;
|
fix002 = off;
|
||||||
|
onlinefix = off;
|
||||||
if(Settings.cios == ios222) {
|
if(Settings.cios == ios222) {
|
||||||
iosChoice = i222;
|
iosChoice = i222;
|
||||||
} else {
|
} else {
|
||||||
|
@ -36,6 +36,7 @@ u8 viChoice = 0;
|
|||||||
u8 iosChoice = 0;
|
u8 iosChoice = 0;
|
||||||
u8 parentalcontrolChoice = 0;
|
u8 parentalcontrolChoice = 0;
|
||||||
u8 fix002 = 0;
|
u8 fix002 = 0;
|
||||||
|
u8 onlinefix = 0;
|
||||||
u8 xflip = 0;
|
u8 xflip = 0;
|
||||||
u8 sort = 0;
|
u8 sort = 0;
|
||||||
u8 fave = 0;
|
u8 fave = 0;
|
||||||
@ -267,7 +268,7 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
|
|||||||
THEME.settingsTxt_g = 0;
|
THEME.settingsTxt_g = 0;
|
||||||
THEME.settingsTxt_b = 0;
|
THEME.settingsTxt_b = 0;
|
||||||
THEME.cover_x = 26;
|
THEME.cover_x = 26;
|
||||||
THEME.cover_y = 55;
|
THEME.cover_y = 58;
|
||||||
THEME.showID = 1;
|
THEME.showID = 1;
|
||||||
// THEME.maxcharacters = 36;
|
// THEME.maxcharacters = 36;
|
||||||
THEME.id_x = 68;
|
THEME.id_x = 68;
|
||||||
@ -1141,6 +1142,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->onlinegame = onlinefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Game_NUM* cfg_get_game_num(u8 *id)
|
struct Game_NUM* cfg_get_game_num(u8 *id)
|
||||||
@ -1296,6 +1298,11 @@ void game_set(char *name, char *val)
|
|||||||
game->errorfix002 = opt_c;
|
game->errorfix002 = opt_c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (strcmp("onlinegame", opt_name) == 0) {
|
||||||
|
if (sscanf(opt_val, "%hd", &opt_c) == 1) {
|
||||||
|
game->onlinegame = opt_c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// next opt
|
// next opt
|
||||||
@ -1439,9 +1446,10 @@ bool cfg_save_games()
|
|||||||
if (s) fprintf(f, "language:%s; ", s);
|
if (s) fprintf(f, "language:%s; ", s);
|
||||||
fprintf(f, "ocarina:%d; ", cfg_game[i].ocarina);
|
fprintf(f, "ocarina:%d; ", cfg_game[i].ocarina);
|
||||||
fprintf(f, "vipatch:%d; ", cfg_game[i].vipatch);
|
fprintf(f, "vipatch:%d; ", cfg_game[i].vipatch);
|
||||||
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;\n", cfg_game[i].errorfix002);
|
fprintf(f, "errorfix002:%d; ", cfg_game[i].errorfix002);
|
||||||
|
fprintf(f, "onlinegame:%d;\n", cfg_game[i].onlinegame);
|
||||||
}
|
}
|
||||||
fprintf(f, "# END\n");
|
fprintf(f, "# END\n");
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
@ -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 onlinefix;
|
||||||
extern u8 xflip;
|
extern u8 xflip;
|
||||||
extern u8 qboot;
|
extern u8 qboot;
|
||||||
extern u8 sort;
|
extern u8 sort;
|
||||||
@ -174,6 +175,7 @@ struct Game_CFG
|
|||||||
u8 ios;
|
u8 ios;
|
||||||
u8 parentalcontrol;
|
u8 parentalcontrol;
|
||||||
u8 errorfix002;
|
u8 errorfix002;
|
||||||
|
u8 onlinegame;
|
||||||
};
|
};
|
||||||
struct Game_NUM
|
struct Game_NUM
|
||||||
{
|
{
|
||||||
|
@ -23,20 +23,24 @@ static char gameid[8];
|
|||||||
|
|
||||||
void __Disc_SetLowMem(void)
|
void __Disc_SetLowMem(void)
|
||||||
{
|
{
|
||||||
|
*(vu32 *)0x80000020 = 0x0D15EA5E; // System Magic
|
||||||
|
*(vu32 *)0x80000024 = 0x00000001; // Version
|
||||||
|
|
||||||
|
*(vu32 *)0x80000030 = 0x00000000; // Arena Low
|
||||||
|
*(vu32 *)0x800000F4 = 0x817E5480; // BI2
|
||||||
|
*(vu32 *)0x800000F8 = 0x0E7BE2C0; // Console Bus Speed
|
||||||
|
*(vu32 *)0x800000FC = 0x2B73A840; // Console CPU Speed
|
||||||
|
|
||||||
/* Setup low memory */
|
/* Setup low memory */
|
||||||
*(vu32 *)0x80000030 = 0x00000000;
|
|
||||||
*(vu32 *)0x80000060 = 0x38A00040;
|
*(vu32 *)0x80000060 = 0x38A00040;
|
||||||
*(vu32 *)0x800000E4 = 0x80431A80;
|
*(vu32 *)0x800000E4 = 0x80431A80;
|
||||||
*(vu32 *)0x800000EC = 0x81800000;
|
*(vu32 *)0x800000EC = 0x81800000;
|
||||||
*(vu32 *)0x800000F4 = 0x817E5480;
|
|
||||||
*(vu32 *)0x800000F8 = 0x0E7BE2C0;
|
|
||||||
*(vu32 *)0x800000FC = 0x2B73A840;
|
|
||||||
|
|
||||||
/* Copy disc ID */
|
/* Copy disc ID */
|
||||||
memcpy((void *)0x80003180, (void *)0x80000000, 4);
|
memcpy((void *)0x80003180, (void *)0x80000000, 4);
|
||||||
|
|
||||||
/* Flush cache */
|
/* Flush cache */
|
||||||
DCFlushRange((void *)0x80000000, 0x3F00);
|
DCFlushRange((void *)0x80000000, 0x17FFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __Disc_SetVMode(u8 videoselected)
|
void __Disc_SetVMode(u8 videoselected)
|
||||||
@ -95,19 +99,18 @@ void __Disc_SetVMode(u8 videoselected)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
vmode_reg = 1;
|
vmode = &TVPal528IntDf;
|
||||||
progressive = (CONF_GetProgressiveScan() > 0) && VIDEO_HaveComponentCable();
|
vmode_reg = (vmode->viTVMode) >> 2;
|
||||||
vmode = (progressive) ? &TVEurgb60Hz480Prog : &TVPal528IntDf;
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
vmode_reg = 5;
|
|
||||||
progressive = (CONF_GetProgressiveScan() > 0) && VIDEO_HaveComponentCable();
|
progressive = (CONF_GetProgressiveScan() > 0) && VIDEO_HaveComponentCable();
|
||||||
vmode = (progressive) ? &TVEurgb60Hz480Prog : &TVEurgb60Hz480IntDf;
|
vmode = (progressive) ? &TVNtsc480Prog : &TVEurgb60Hz480IntDf;
|
||||||
|
vmode_reg = (vmode->viTVMode) >> 2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
vmode_reg = 0;
|
|
||||||
progressive = (CONF_GetProgressiveScan() > 0) && VIDEO_HaveComponentCable();
|
progressive = (CONF_GetProgressiveScan() > 0) && VIDEO_HaveComponentCable();
|
||||||
vmode = (progressive) ? &TVNtsc480Prog : &TVNtsc480IntDf;
|
vmode = (progressive) ? &TVNtsc480Prog : &TVNtsc480IntDf;
|
||||||
|
vmode_reg = (vmode->viTVMode) >> 2;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
// vmode = VIDEO_GetPreferredMode(NULL);
|
// vmode = VIDEO_GetPreferredMode(NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user