*Added IOS223 support

NOTE: If your loader is rebooting when you try to start a game its because you initialized Network! Right now initializing the network by trying to update or trying to download covers/discimages the Loader has Issues with booting games. Try booting games directly without initializing the Network.
This commit is contained in:
dimok321 2009-06-12 11:50:14 +00:00
parent bc3d173ef4
commit d8298a73d9
10 changed files with 77 additions and 41 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<pd><ViewState><e p="gui" x="true"></e><e p="gui\source\mxml" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="true"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\unzip" x="false"></e></ViewState></pd>
<pd><ViewState><e p="gui" x="true"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="true"></e><e p="gui\source\sounds" x="false"></e></ViewState></pd>

View File

@ -21,6 +21,7 @@
#include "partition.h"
#include "usbstorage.h"
#include "getentries.h"
#include "mload.h"
/*** Variables that are also used extern ***/
int cntMissFiles = 0;
@ -241,13 +242,13 @@ void WindowCredits()
i++;
y+=24;
sprintf(text, "Tantric %s LibWiiGui", LANGUAGE.awesometool);
sprintf(text, "Waninkoko, Kwiirk & Hermes %s", LANGUAGE.theUSBLoaderandreleasingthesourcecode);
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); txt[i]->SetPosition(100,y);
i++;
y+=22;
sprintf(text, "Waninkoko & Kwiirk %s", LANGUAGE.theUSBLoaderandreleasingthesourcecode);
sprintf(text, "Tantric %s LibWiiGui", LANGUAGE.awesometool);
txt[i] = new GuiText(text);
txt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP); txt[i]->SetPosition(100,y);
i++;
@ -1487,13 +1488,16 @@ DiscWait(const char *title, const char *msg, const char *btn1Label, const char *
if(IsDeviceWait) {
while(i >= 0)
{
timerTxt.SetTextf("%u %s", i,LANGUAGE.secondsleft);
VIDEO_WaitVSync();
timerTxt.SetTextf("%u %s", i,LANGUAGE.secondsleft);
HaltGui();
if(Settings.cios == ios222) {
ret = Sys_IosReload(222);
ret = IOS_ReloadIOS(222);
load_ehc_module();
} else {
ret = Sys_IosReload(249);
ret = IOS_ReloadIOS(249);
}
ResumeGui();
sleep(1);
ret = WBFS_Init(WBFS_DEVICE_USB);
if(ret>=0)

View File

@ -559,7 +559,7 @@ int MenuSettings()
if (Settings.titlesOverride == 0) options2.SetValue(10,"%s",LANGUAGE.OFF);
else if (Settings.titlesOverride == 1) options2.SetValue(10,"%s",LANGUAGE.ON);
if(backBtn.GetState() == STATE_CLICKED)
{
backBtn.ResetState();
@ -1799,6 +1799,7 @@ int GameSettings(struct discHdr * header)
if (iosChoice == i249) options3.SetValue(4,"249");
else if (iosChoice == i222) options3.SetValue(4,"222");
else if (iosChoice == i223) options3.SetValue(4,"223");
if (parentalcontrolChoice == 0) options3.SetValue(5, LANGUAGE.Always);
else if (parentalcontrolChoice == 1) options3.SetValue(5,"1");
@ -1832,7 +1833,7 @@ int GameSettings(struct discHdr * header)
ocarinaChoice = (ocarinaChoice + 1) % 2;
break;
case 4:
iosChoice = (iosChoice + 1) % 2;
iosChoice = (iosChoice + 1) % 3;
break;
case 5:
parentalcontrolChoice = (parentalcontrolChoice + 1) % 4;

View File

@ -235,6 +235,7 @@ enum {
enum {
i249=0,
i222,
i223
};
enum {

View File

@ -287,7 +287,9 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa
/* Disconnect Wiimote */
WPAD_Flush(0);
WPAD_Disconnect(0);
WPAD_Shutdown();
WPAD_Shutdown();
WDVD_Close();
/* Shutdown IOS subsystems */
SYS_ResetSystem(SYS_SHUTDOWN, 0, 0);

View File

@ -196,7 +196,7 @@ snprintf(LANGUAGE.Save, sizeof(LANGUAGE.Save), "Save");
snprintf(LANGUAGE.SaveFailed, sizeof(LANGUAGE.SaveFailed), "Save Failed");
snprintf(LANGUAGE.Specialthanksto, sizeof(LANGUAGE.Specialthanksto), "Special thanks to:");
snprintf(LANGUAGE.For, sizeof(LANGUAGE.For), "for");
snprintf(LANGUAGE.theUSBLoaderandreleasingthesourcecode, sizeof(LANGUAGE.theUSBLoaderandreleasingthesourcecode), "for the USB Loader source code");
snprintf(LANGUAGE.theUSBLoaderandreleasingthesourcecode, sizeof(LANGUAGE.theUSBLoaderandreleasingthesourcecode), "for the USB Loader source");
snprintf(LANGUAGE.secondsleft, sizeof(LANGUAGE.secondsleft), "seconds left");
snprintf(LANGUAGE.Setasbackgroundmusic, sizeof(LANGUAGE.Setasbackgroundmusic), "Set as backgroundmusic?");
snprintf(LANGUAGE.SelectthePartition, sizeof(LANGUAGE.SelectthePartition), "Select the Partition");
@ -274,7 +274,7 @@ snprintf(LANGUAGE.developedby, sizeof(LANGUAGE.developedby), "Developed by");
snprintf(LANGUAGE.publishedby, sizeof(LANGUAGE.publishedby), "Published by");
snprintf(LANGUAGE.wififeatures, sizeof(LANGUAGE.wififeatures), "WiFi Features");
snprintf(LANGUAGE.XMLTitles, sizeof(LANGUAGE.XMLTitles), "Titles from XML");
};

View File

@ -113,6 +113,8 @@ main(int argc, char *argv[])
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
}
if(Settings.cios == ios222) load_ehc_module();
SDCard_Init(); // now mount SD:/
USBDevice_Init(); // and mount USB:/

View File

@ -33,6 +33,7 @@
#include "Settings.h"
#include "gameinfo.h"
#include "mload.h"
#include "usbstorage.h"
//#include "xml.h" /* XML - Lustar*/
@ -1654,18 +1655,33 @@ static int MenuCheck()
LANGUAGE.Doyouwanttoretryfor30secs,
"cIOS249", "cIOS222",
LANGUAGE.BacktoWiiMenu, 0);
SDCard_deInit();
USBDevice_deInit();
WPAD_Flush(0);
WPAD_Disconnect(0);
WPAD_Shutdown();
if(ret2 == 1) {
Settings.cios = ios249;
} else if(ret2 == 2) {
if(Settings.cios != ios222)
{
HaltGui();
ret2 = Sys_IosReload(222);
if(ret2 < 0)
Sys_IosReload(249);
if(ret2 < 0)
ResumeGui();
if(ret2 < 0) {
Wpad_Init();
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
WindowPrompt(LANGUAGE.YoudonthavecIOS,LANGUAGE.LoadingincIOS,LANGUAGE.ok, 0,0,0);
else
WPAD_Flush(0);
WPAD_Disconnect(0);
WPAD_Shutdown();
} else {
Settings.cios = ios222;
load_ehc_module();
}
}
} else {
Sys_LoadMenu();
@ -1675,6 +1691,9 @@ static int MenuCheck()
//reinitialize SD and USB
SDCard_Init();
USBDevice_Init();
Wpad_Init();
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
}
if (ret2 < 0) {
WindowPrompt (LANGUAGE.Error,LANGUAGE.USBDevicenotfound, LANGUAGE.ok, 0,0,0);
@ -1850,21 +1869,24 @@ int MainMenu(int menu)
ios2 = 222;
break;
case i223:
ios2 = 223;
break;
default:
ios2 = 249;
break;
}
if(networkisinitialized == 1 || (iosChoice == i249 && Settings.cios == 1) || (iosChoice == i222 && Settings.cios == 0)) {
/*Needed for IOS Reload */
ResumeGui();
if(iosChoice == i223 || networkisinitialized == 1
|| (iosChoice == i249 && Settings.cios == 1)
|| (iosChoice == i222 && Settings.cios == 0)) {
if(networkisinitialized == 1) ResumeGui();
ret = Sys_IosReload(ios2);
if(ret < 0) {
Sys_IosReload(249);
exit(0);
}
}
ret = Disc_SetUSB(header->id, GetPartition());
if(ret < 0) Sys_BackToLoader();
ret = Disc_Open();
@ -1872,6 +1894,7 @@ int MainMenu(int menu)
SDCard_deInit();
USBDevice_deInit();
USBStorage_Deinit();
u8 errorfixer002 = 0;
switch(fix002)

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <ogcsys.h>
#include <unistd.h>
#include "sys.h"
#include "wpad.h"
@ -74,12 +75,14 @@ void Sys_Reboot(void)
int Sys_IosReload(int IOS)
{
s32 ret;
s32 ret = -1;
//shutdown SD and USB before IOS Reload in DiscWait
SDCard_deInit();
USBDevice_deInit();
mload_close();
WPAD_Flush(0);
WPAD_Disconnect(0);
WPAD_Shutdown();
@ -87,32 +90,32 @@ int Sys_IosReload(int IOS)
USBStorage_Deinit();
WDVD_Close();
ret = IOS_ReloadIOS(IOS);
if(IOS == 222) load_ehc_module();
if(IOS == 249 || IOS == 222 || IOS == 223) {
for(int i = 0; i < 10; i++) {
ret = IOS_ReloadIOS(IOS);
if(ret < 0) return ret;
if(IOS == 222 || IOS == 223) load_ehc_module();
ret = WBFS_Init(WBFS_DEVICE_USB);
if(!(ret < 0)) break;
sleep(1);
USBStorage_Deinit();
}
if(ret>=0) {
ret = Disc_Init();
int i = 0;
if(ret>=0) {
for(i = 0; i < 4; i++) {
ret = WBFS_Open2(i);
if(ret == 0) break;
}
}
} else Sys_BackToLoader();
}
PAD_Init();
Wpad_Init();
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
if(ret < 0) {
return ret;
}
if(IOS == 249 || IOS == 222) {
ret = WBFS_Init(WBFS_DEVICE_USB);
if(ret>=0)
{
ret = Disc_Init();
int i = 0;
if(ret>=0)
for(i = 0; i < 4; i++) {
ret = WBFS_Open2(i);
if(ret == 0) break;
}
}
}
//reinitialize SD and USB
SDCard_Init();
USBDevice_Init();