mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
* Added support for Homebrew Channel v1.1.1+
* Added version detection for DIOS MIOS (Lite) v2.6 * Removed unused "DML NoDisc" setting
This commit is contained in:
parent
5512efd10e
commit
420c290d7b
@ -2,8 +2,8 @@
|
||||
<app version="1">
|
||||
<name> USB Loader GX</name>
|
||||
<coder>USB Loader GX Team</coder>
|
||||
<version>3.0 r1204</version>
|
||||
<release_date>20121111131816</release_date>
|
||||
<version>3.0 r1205</version>
|
||||
<release_date>20121209184858</release_date>
|
||||
<!-- // remove this line to enable arguments
|
||||
<arguments>
|
||||
<arg>--ios=250</arg>
|
||||
|
@ -100,7 +100,7 @@ void Channels::InternalGetNandChannelList(u32 type)
|
||||
NandTitles.AsciiTID(tid, id);
|
||||
|
||||
// Force old and new format to be "JODI" which is known by GameTDB
|
||||
if(tid == 0x00010001AF1BF516LL || tid == 0x0001000148415858LL)
|
||||
if(tid == 0x000100014c554c5aLL || tid == 0x00010001AF1BF516LL || tid == 0x0001000148415858LL)
|
||||
strcpy(id, "JODI");
|
||||
|
||||
const char *name = GameTitles.GetTitle(id);
|
||||
@ -493,7 +493,7 @@ bool Channels::ParseTitleDir(char *path, int language)
|
||||
u64 tid = ((u64)tidHigh << 32) | ((u64) tidLow);
|
||||
|
||||
// Force old and new format to be "JODI" which is known by GameTDB
|
||||
if(tid == 0x00010001AF1BF516LL || tid == 0x0001000148415858LL)
|
||||
if(tid == 0x000100014c554c5aLL || tid == 0x00010001AF1BF516LL || tid == 0x0001000148415858LL)
|
||||
strcpy(id, "JODI");
|
||||
|
||||
std::string TitleName;
|
||||
|
@ -64,8 +64,11 @@ static const char * DMLVersions[] =
|
||||
"v2.3", // DML 2.3 (main link)
|
||||
"v2.4", // DM 2.4
|
||||
"v2.4", // DML 2.4
|
||||
"v2.5+", // DM 2.5
|
||||
"v2.5+", // DML 2.5
|
||||
"v2.5", // DM 2.5
|
||||
"v2.5", // DML 2.5
|
||||
"v2.6.0", // DM 2.6
|
||||
"v2.6+", // DML 2.6
|
||||
"v2.6.1+", // DM 2.6 update 1
|
||||
};
|
||||
|
||||
|
||||
|
@ -211,7 +211,6 @@ bool CGameSettings::Save()
|
||||
fprintf(f, "DMLNMM:%d; ", GameList[i].DMLNMM);
|
||||
fprintf(f, "DMLActivityLED:%d; ", GameList[i].DMLActivityLED);
|
||||
fprintf(f, "DMLPADHOOK:%d; ", GameList[i].DMLPADHOOK);
|
||||
fprintf(f, "DMLNoDisc:%d; ", GameList[i].DMLNoDisc);
|
||||
fprintf(f, "DMLNoDisc2:%d; ", GameList[i].DMLNoDisc2);
|
||||
fprintf(f, "DMLWidescreen:%d; ", GameList[i].DMLWidescreen);
|
||||
fprintf(f, "DMLScreenshot:%d; ", GameList[i].DMLScreenshot);
|
||||
@ -360,11 +359,6 @@ bool CGameSettings::SetSetting(GameCFG & game, const char *name, const char *val
|
||||
game.DMLPADHOOK = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if(strcmp(name, "DMLNoDisc") == 0)
|
||||
{
|
||||
game.DMLNoDisc = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if(strcmp(name, "DMLNoDisc2") == 0)
|
||||
{
|
||||
game.DMLNoDisc2 = atoi(value);
|
||||
@ -531,7 +525,6 @@ void CGameSettings::SetDefault(GameCFG &game)
|
||||
game.DMLNMM = INHERIT;
|
||||
game.DMLActivityLED = INHERIT;
|
||||
game.DMLPADHOOK = INHERIT;
|
||||
game.DMLNoDisc = INHERIT;
|
||||
game.DMLNoDisc2 = INHERIT;
|
||||
game.DMLWidescreen = INHERIT;
|
||||
game.DMLScreenshot = INHERIT;
|
||||
|
@ -35,7 +35,6 @@ typedef struct _GameCFG
|
||||
short DMLNMM;
|
||||
short DMLActivityLED;
|
||||
short DMLPADHOOK;
|
||||
short DMLNoDisc;
|
||||
short DMLNoDisc2;
|
||||
short DMLWidescreen;
|
||||
short DMLScreenshot;
|
||||
@ -74,7 +73,6 @@ typedef struct _GameCFG
|
||||
this->DMLNMM = game.DMLNMM;
|
||||
this->DMLActivityLED = game.DMLActivityLED;
|
||||
this->DMLPADHOOK = game.DMLPADHOOK;
|
||||
this->DMLNoDisc = game.DMLNoDisc;
|
||||
this->DMLNoDisc2 = game.DMLNoDisc2;
|
||||
this->DMLWidescreen = game.DMLWidescreen;
|
||||
this->DMLScreenshot = game.DMLScreenshot;
|
||||
|
@ -174,7 +174,6 @@ void CSettings::SetDefault()
|
||||
DMLNMM = OFF;
|
||||
DMLActivityLED = OFF;
|
||||
DMLPADHOOK = OFF;
|
||||
DMLNoDisc = OFF;
|
||||
DMLNoDisc2 = OFF;
|
||||
DMLWidescreen = OFF;
|
||||
DMLScreenshot = OFF;
|
||||
@ -404,7 +403,6 @@ bool CSettings::Save()
|
||||
fprintf(file, "DMLNMM = %d\n", DMLNMM);
|
||||
fprintf(file, "DMLActivityLED = %d\n", DMLActivityLED);
|
||||
fprintf(file, "DMLPADHOOK = %d\n", DMLPADHOOK);
|
||||
fprintf(file, "DMLNoDisc = %d\n", DMLNoDisc);
|
||||
fprintf(file, "DMLNoDisc2 = %d\n", DMLNoDisc2);
|
||||
fprintf(file, "DMLWidescreen = %d\n", DMLWidescreen);
|
||||
fprintf(file, "DMLScreenshot = %d\n", DMLScreenshot);
|
||||
@ -833,11 +831,6 @@ bool CSettings::SetSetting(char *name, char *value)
|
||||
DMLPADHOOK = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "DMLNoDisc") == 0)
|
||||
{
|
||||
DMLNoDisc = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "DMLNoDisc2") == 0)
|
||||
{
|
||||
DMLNoDisc2 = atoi(value);
|
||||
|
@ -176,7 +176,6 @@ class CSettings
|
||||
short DMLNMM;
|
||||
short DMLActivityLED;
|
||||
short DMLPADHOOK;
|
||||
short DMLNoDisc;
|
||||
short DMLNoDisc2;
|
||||
short DMLWidescreen;
|
||||
short DMLScreenshot;
|
||||
|
@ -166,7 +166,6 @@ void GCGameLoadSM::SetOptionNames()
|
||||
Options->SetName(Idx++, "%s", tr( "DML NMM Mode" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML LED Activity" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML PAD Hook" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML No Disc" ));
|
||||
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_2_2 && IosLoader::GetDMLVersion() <= DML_VERSION_DML_2_2_1)
|
||||
Options->SetName(Idx++, "%s", tr( "DML No Disc+" ));
|
||||
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_1)
|
||||
@ -249,12 +248,6 @@ void GCGameLoadSM::SetOptionValues()
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLPADHOOK]));
|
||||
|
||||
//! Settings: DML No Disc
|
||||
if(GameConfig.DMLNoDisc == INHERIT)
|
||||
Options->SetValue(Idx++, tr("Use global"));
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLNoDisc]));
|
||||
|
||||
//! Settings: DML Extended No Disc
|
||||
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_2_2 && IosLoader::GetDMLVersion() <= DML_VERSION_DML_2_2_1)
|
||||
{
|
||||
@ -412,12 +405,6 @@ int GCGameLoadSM::GetMenuInternal()
|
||||
if (++GameConfig.DMLPADHOOK >= MAX_ON_OFF) GameConfig.DMLPADHOOK = INHERIT;
|
||||
}
|
||||
|
||||
//! Settings: DML No Disc
|
||||
else if (IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
|
||||
{
|
||||
if (++GameConfig.DMLNoDisc >= MAX_ON_OFF) GameConfig.DMLNoDisc = INHERIT;
|
||||
}
|
||||
|
||||
//! Settings: DML Extended No Disc
|
||||
else if (IosLoader::GetMIOSInfo() > DEFAULT_MIOS && IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_2_2 && IosLoader::GetDMLVersion() <= DML_VERSION_DML_2_2_1 && ret == ++Idx)
|
||||
{
|
||||
|
@ -172,7 +172,6 @@ LoaderSettings::LoaderSettings()
|
||||
Options->SetName(Idx++, "%s", tr( "DML NMM Mode" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML LED Activity" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML PAD Hook" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML No Disc" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML No Disc+" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML Force Widescreen" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML Screenshot" ));
|
||||
@ -286,9 +285,6 @@ void LoaderSettings::SetOptionValues()
|
||||
//! Settings: DML PAD Hook
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLPADHOOK]));
|
||||
|
||||
//! Settings: DML No Disc
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLNoDisc]));
|
||||
|
||||
//! Settings: DML Extended No Disc
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLNoDisc2]));
|
||||
|
||||
@ -492,12 +488,6 @@ int LoaderSettings::GetMenuInternal()
|
||||
if (++Settings.DMLPADHOOK >= MAX_ON_OFF) Settings.DMLPADHOOK = 0;
|
||||
}
|
||||
|
||||
//! Settings: DML No Disc
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
if (++Settings.DMLNoDisc >= MAX_ON_OFF) Settings.DMLNoDisc = 0;
|
||||
}
|
||||
|
||||
//! Settings: DML Extended No Disc
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
|
@ -202,6 +202,7 @@ void Sys_BackToLoader(void)
|
||||
#define HBC_HAXX 0x0001000148415858LL
|
||||
#define HBC_JODI 0x000100014A4F4449LL
|
||||
#define HBC_1_0_7 0x00010001AF1BF516LL
|
||||
#define HBC_LULZ 0x000100014c554c5aLL
|
||||
|
||||
void Sys_LoadHBC(void)
|
||||
{
|
||||
@ -209,7 +210,9 @@ void Sys_LoadHBC(void)
|
||||
|
||||
WII_Initialize();
|
||||
|
||||
int ret = WII_LaunchTitle(HBC_1_0_7);
|
||||
int ret = WII_LaunchTitle(HBC_LULZ);
|
||||
if(ret < 0)
|
||||
WII_LaunchTitle(HBC_1_0_7);
|
||||
if(ret < 0)
|
||||
WII_LaunchTitle(HBC_JODI);
|
||||
if(ret < 0)
|
||||
|
@ -339,6 +339,18 @@ u8 IosLoader::GetDMLVersion(char* releaseDate)
|
||||
strptime("Nov 9 2012 21:18:56", "%b %d %Y %H:%M:%S", &time);
|
||||
const time_t dml_2_5_time = mktime(&time);
|
||||
|
||||
// Timestamp of DM 2.6.0
|
||||
strptime("Dec 1 2012 01:52:53", "%b %d %Y %H:%M:%S", &time);
|
||||
const time_t dm_2_6_0_time = mktime(&time);
|
||||
|
||||
// Timestamp of DML 2.6
|
||||
strptime("Dec 1 2012 16:22:29", "%b %d %Y %H:%M:%S", &time);
|
||||
const time_t dml_2_6_time = mktime(&time);
|
||||
|
||||
// Timestamp of DM 2.6.1
|
||||
strptime("Dec 1 2012 16:42:34", "%b %d %Y %H:%M:%S", &time);
|
||||
const time_t dm_2_6_1_time = mktime(&time);
|
||||
|
||||
|
||||
// Current installed version
|
||||
gprintf("built on %s\n", releaseDate);
|
||||
@ -348,7 +360,9 @@ u8 IosLoader::GetDMLVersion(char* releaseDate)
|
||||
|
||||
if(currentMIOS == DIOS_MIOS)
|
||||
{
|
||||
if(difftime(unixTime, dm_2_5_time) >= 0) currentDMLVersion = DML_VERSION_DM_2_5;
|
||||
if(difftime(unixTime, dm_2_6_1_time) >= 0) currentDMLVersion = DML_VERSION_DM_2_6_1;
|
||||
else if(difftime(unixTime, dm_2_6_0_time) >= 0) currentDMLVersion = DML_VERSION_DM_2_6_0;
|
||||
else if(difftime(unixTime, dm_2_5_time) >= 0) currentDMLVersion = DML_VERSION_DM_2_5;
|
||||
else if(difftime(unixTime, dm_2_4_time) >= 0) currentDMLVersion = DML_VERSION_DM_2_4;
|
||||
else if(difftime(unixTime, dm_2_3_time) >= 0) currentDMLVersion = DML_VERSION_DM_2_3;
|
||||
else if(difftime(unixTime, dm_2_2_2_time) >= 0) currentDMLVersion = DML_VERSION_DM_2_2_2;
|
||||
@ -358,7 +372,8 @@ u8 IosLoader::GetDMLVersion(char* releaseDate)
|
||||
}
|
||||
else if(currentMIOS == DIOS_MIOS_LITE)
|
||||
{
|
||||
if(difftime(unixTime, dml_2_5_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_5;
|
||||
if(difftime(unixTime, dml_2_6_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_6;
|
||||
else if(difftime(unixTime, dml_2_5_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_5;
|
||||
else if(difftime(unixTime, dml_2_4_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_4;
|
||||
else if(difftime(unixTime, dml_2_3_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_3;
|
||||
else if(difftime(unixTime, dml_2_3m_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_3m;
|
||||
|
@ -50,6 +50,9 @@ enum DMLVersions
|
||||
DML_VERSION_DML_2_4, // Oct 21 2012 22:57:17
|
||||
DML_VERSION_DM_2_5, // Nov 9 2012 21:18:52
|
||||
DML_VERSION_DML_2_5, // Nov 9 2012 21:18:56
|
||||
DML_VERSION_DM_2_6_0, // Dec 1 2012 01:52:53
|
||||
DML_VERSION_DML_2_6, // Dec 1 2012 16:22:29
|
||||
DML_VERSION_DM_2_6_1, // Dec 1 2012 16:42:34
|
||||
DML_VERSION_MAX_VERSION,
|
||||
};
|
||||
|
||||
|
@ -412,7 +412,6 @@ int GameBooter::BootDIOSMIOS(struct discHdr *gameHdr)
|
||||
u8 dmlNMMChoice = game_cfg->DMLNMM == INHERIT ? Settings.DMLNMM : game_cfg->DMLNMM;
|
||||
u8 dmlActivityLEDChoice = game_cfg->DMLActivityLED == INHERIT ? Settings.DMLActivityLED : game_cfg->DMLActivityLED;
|
||||
u8 dmlPADHookChoice = game_cfg->DMLPADHOOK == INHERIT ? Settings.DMLPADHOOK : game_cfg->DMLPADHOOK;
|
||||
u8 dmlNoDiscChoice = game_cfg->DMLNoDisc == INHERIT ? Settings.DMLNoDisc : game_cfg->DMLNoDisc;
|
||||
u8 dmlNoDisc2Choice = game_cfg->DMLNoDisc2 == INHERIT ? Settings.DMLNoDisc2 : game_cfg->DMLNoDisc2;
|
||||
u8 dmlWidescreenChoice = game_cfg->DMLWidescreen == INHERIT ? Settings.DMLWidescreen : game_cfg->DMLWidescreen;
|
||||
u8 dmlScreenshotChoice = game_cfg->DMLScreenshot == INHERIT ? Settings.DMLScreenshot : game_cfg->DMLScreenshot;
|
||||
@ -466,10 +465,6 @@ int GameBooter::BootDIOSMIOS(struct discHdr *gameHdr)
|
||||
WindowPrompt(tr("Warning:"), tr("The Force Widescreen setting requires DIOS MIOS v2.1 or more. This setting will be ignored."), tr("OK"));
|
||||
dmlWidescreenChoice = OFF;
|
||||
}
|
||||
if(dmlNoDiscChoice) // DML NoDisc setting : removed in DM 1.0, config v1. Used as ForceWidescreen in DM v2.1 with cfg v1. Added back in DM 2.2 update2 Config v2
|
||||
{
|
||||
WindowPrompt(tr("Warning:"), tr("The No Disc setting is not used anymore by DIOS MIOS (Lite). Now you need to place a disc in your drive."), tr("OK"));
|
||||
}
|
||||
if(dmlNoDisc2Choice && (IosLoader::GetDMLVersion() < DML_VERSION_DM_2_2_2 || IosLoader::GetDMLVersion() > DML_VERSION_DML_2_2_1)) // DML NoDisc+ setting : Added in DM 2.2 upate 2, config v2, removed in DM(L) v2.3
|
||||
{
|
||||
if(Settings.DMLNoDisc2) // Display the warning only if set as Global setting. Individual game setting is not displayed.
|
||||
|
Loading…
Reference in New Issue
Block a user