* 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:
Cyan 2012-12-09 19:44:12 +00:00
parent 5512efd10e
commit 420c290d7b
13 changed files with 33 additions and 54 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>3.0 r1204</version> <version>3.0 r1205</version>
<release_date>20121111131816</release_date> <release_date>20121209184858</release_date>
<!-- // remove this line to enable arguments <!-- // remove this line to enable arguments
<arguments> <arguments>
<arg>--ios=250</arg> <arg>--ios=250</arg>

View File

@ -100,7 +100,7 @@ void Channels::InternalGetNandChannelList(u32 type)
NandTitles.AsciiTID(tid, id); NandTitles.AsciiTID(tid, id);
// Force old and new format to be "JODI" which is known by GameTDB // 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"); strcpy(id, "JODI");
const char *name = GameTitles.GetTitle(id); const char *name = GameTitles.GetTitle(id);
@ -493,7 +493,7 @@ bool Channels::ParseTitleDir(char *path, int language)
u64 tid = ((u64)tidHigh << 32) | ((u64) tidLow); u64 tid = ((u64)tidHigh << 32) | ((u64) tidLow);
// Force old and new format to be "JODI" which is known by GameTDB // 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"); strcpy(id, "JODI");
std::string TitleName; std::string TitleName;

View File

@ -64,8 +64,11 @@ static const char * DMLVersions[] =
"v2.3", // DML 2.3 (main link) "v2.3", // DML 2.3 (main link)
"v2.4", // DM 2.4 "v2.4", // DM 2.4
"v2.4", // DML 2.4 "v2.4", // DML 2.4
"v2.5+", // DM 2.5 "v2.5", // DM 2.5
"v2.5+", // DML 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
}; };

View File

@ -211,7 +211,6 @@ bool CGameSettings::Save()
fprintf(f, "DMLNMM:%d; ", GameList[i].DMLNMM); fprintf(f, "DMLNMM:%d; ", GameList[i].DMLNMM);
fprintf(f, "DMLActivityLED:%d; ", GameList[i].DMLActivityLED); fprintf(f, "DMLActivityLED:%d; ", GameList[i].DMLActivityLED);
fprintf(f, "DMLPADHOOK:%d; ", GameList[i].DMLPADHOOK); fprintf(f, "DMLPADHOOK:%d; ", GameList[i].DMLPADHOOK);
fprintf(f, "DMLNoDisc:%d; ", GameList[i].DMLNoDisc);
fprintf(f, "DMLNoDisc2:%d; ", GameList[i].DMLNoDisc2); fprintf(f, "DMLNoDisc2:%d; ", GameList[i].DMLNoDisc2);
fprintf(f, "DMLWidescreen:%d; ", GameList[i].DMLWidescreen); fprintf(f, "DMLWidescreen:%d; ", GameList[i].DMLWidescreen);
fprintf(f, "DMLScreenshot:%d; ", GameList[i].DMLScreenshot); 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); game.DMLPADHOOK = atoi(value);
return true; return true;
} }
else if(strcmp(name, "DMLNoDisc") == 0)
{
game.DMLNoDisc = atoi(value);
return true;
}
else if(strcmp(name, "DMLNoDisc2") == 0) else if(strcmp(name, "DMLNoDisc2") == 0)
{ {
game.DMLNoDisc2 = atoi(value); game.DMLNoDisc2 = atoi(value);
@ -531,7 +525,6 @@ void CGameSettings::SetDefault(GameCFG &game)
game.DMLNMM = INHERIT; game.DMLNMM = INHERIT;
game.DMLActivityLED = INHERIT; game.DMLActivityLED = INHERIT;
game.DMLPADHOOK = INHERIT; game.DMLPADHOOK = INHERIT;
game.DMLNoDisc = INHERIT;
game.DMLNoDisc2 = INHERIT; game.DMLNoDisc2 = INHERIT;
game.DMLWidescreen = INHERIT; game.DMLWidescreen = INHERIT;
game.DMLScreenshot = INHERIT; game.DMLScreenshot = INHERIT;

View File

@ -35,7 +35,6 @@ typedef struct _GameCFG
short DMLNMM; short DMLNMM;
short DMLActivityLED; short DMLActivityLED;
short DMLPADHOOK; short DMLPADHOOK;
short DMLNoDisc;
short DMLNoDisc2; short DMLNoDisc2;
short DMLWidescreen; short DMLWidescreen;
short DMLScreenshot; short DMLScreenshot;
@ -74,7 +73,6 @@ typedef struct _GameCFG
this->DMLNMM = game.DMLNMM; this->DMLNMM = game.DMLNMM;
this->DMLActivityLED = game.DMLActivityLED; this->DMLActivityLED = game.DMLActivityLED;
this->DMLPADHOOK = game.DMLPADHOOK; this->DMLPADHOOK = game.DMLPADHOOK;
this->DMLNoDisc = game.DMLNoDisc;
this->DMLNoDisc2 = game.DMLNoDisc2; this->DMLNoDisc2 = game.DMLNoDisc2;
this->DMLWidescreen = game.DMLWidescreen; this->DMLWidescreen = game.DMLWidescreen;
this->DMLScreenshot = game.DMLScreenshot; this->DMLScreenshot = game.DMLScreenshot;

View File

@ -174,7 +174,6 @@ void CSettings::SetDefault()
DMLNMM = OFF; DMLNMM = OFF;
DMLActivityLED = OFF; DMLActivityLED = OFF;
DMLPADHOOK = OFF; DMLPADHOOK = OFF;
DMLNoDisc = OFF;
DMLNoDisc2 = OFF; DMLNoDisc2 = OFF;
DMLWidescreen = OFF; DMLWidescreen = OFF;
DMLScreenshot = OFF; DMLScreenshot = OFF;
@ -404,7 +403,6 @@ bool CSettings::Save()
fprintf(file, "DMLNMM = %d\n", DMLNMM); fprintf(file, "DMLNMM = %d\n", DMLNMM);
fprintf(file, "DMLActivityLED = %d\n", DMLActivityLED); fprintf(file, "DMLActivityLED = %d\n", DMLActivityLED);
fprintf(file, "DMLPADHOOK = %d\n", DMLPADHOOK); fprintf(file, "DMLPADHOOK = %d\n", DMLPADHOOK);
fprintf(file, "DMLNoDisc = %d\n", DMLNoDisc);
fprintf(file, "DMLNoDisc2 = %d\n", DMLNoDisc2); fprintf(file, "DMLNoDisc2 = %d\n", DMLNoDisc2);
fprintf(file, "DMLWidescreen = %d\n", DMLWidescreen); fprintf(file, "DMLWidescreen = %d\n", DMLWidescreen);
fprintf(file, "DMLScreenshot = %d\n", DMLScreenshot); fprintf(file, "DMLScreenshot = %d\n", DMLScreenshot);
@ -833,11 +831,6 @@ bool CSettings::SetSetting(char *name, char *value)
DMLPADHOOK = atoi(value); DMLPADHOOK = atoi(value);
return true; return true;
} }
else if (strcmp(name, "DMLNoDisc") == 0)
{
DMLNoDisc = atoi(value);
return true;
}
else if (strcmp(name, "DMLNoDisc2") == 0) else if (strcmp(name, "DMLNoDisc2") == 0)
{ {
DMLNoDisc2 = atoi(value); DMLNoDisc2 = atoi(value);

View File

@ -176,7 +176,6 @@ class CSettings
short DMLNMM; short DMLNMM;
short DMLActivityLED; short DMLActivityLED;
short DMLPADHOOK; short DMLPADHOOK;
short DMLNoDisc;
short DMLNoDisc2; short DMLNoDisc2;
short DMLWidescreen; short DMLWidescreen;
short DMLScreenshot; short DMLScreenshot;

View File

@ -166,7 +166,6 @@ void GCGameLoadSM::SetOptionNames()
Options->SetName(Idx++, "%s", tr( "DML NMM Mode" )); Options->SetName(Idx++, "%s", tr( "DML NMM Mode" ));
Options->SetName(Idx++, "%s", tr( "DML LED Activity" )); Options->SetName(Idx++, "%s", tr( "DML LED Activity" ));
Options->SetName(Idx++, "%s", tr( "DML PAD Hook" )); 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) 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+" )); Options->SetName(Idx++, "%s", tr( "DML No Disc+" ));
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_1) if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_1)
@ -249,12 +248,6 @@ void GCGameLoadSM::SetOptionValues()
else else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLPADHOOK])); 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 //! Settings: DML Extended No Disc
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_2_2 && IosLoader::GetDMLVersion() <= DML_VERSION_DML_2_2_1) 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; 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 //! 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) else if (IosLoader::GetMIOSInfo() > DEFAULT_MIOS && IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_2_2 && IosLoader::GetDMLVersion() <= DML_VERSION_DML_2_2_1 && ret == ++Idx)
{ {

View File

@ -172,7 +172,6 @@ LoaderSettings::LoaderSettings()
Options->SetName(Idx++, "%s", tr( "DML NMM Mode" )); Options->SetName(Idx++, "%s", tr( "DML NMM Mode" ));
Options->SetName(Idx++, "%s", tr( "DML LED Activity" )); Options->SetName(Idx++, "%s", tr( "DML LED Activity" ));
Options->SetName(Idx++, "%s", tr( "DML PAD Hook" )); 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 No Disc+" ));
Options->SetName(Idx++, "%s", tr( "DML Force Widescreen" )); Options->SetName(Idx++, "%s", tr( "DML Force Widescreen" ));
Options->SetName(Idx++, "%s", tr( "DML Screenshot" )); Options->SetName(Idx++, "%s", tr( "DML Screenshot" ));
@ -286,9 +285,6 @@ void LoaderSettings::SetOptionValues()
//! Settings: DML PAD Hook //! Settings: DML PAD Hook
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLPADHOOK])); 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 //! Settings: DML Extended No Disc
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLNoDisc2])); Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLNoDisc2]));
@ -492,12 +488,6 @@ int LoaderSettings::GetMenuInternal()
if (++Settings.DMLPADHOOK >= MAX_ON_OFF) Settings.DMLPADHOOK = 0; 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 //! Settings: DML Extended No Disc
else if (ret == ++Idx) else if (ret == ++Idx)
{ {

View File

@ -202,6 +202,7 @@ void Sys_BackToLoader(void)
#define HBC_HAXX 0x0001000148415858LL #define HBC_HAXX 0x0001000148415858LL
#define HBC_JODI 0x000100014A4F4449LL #define HBC_JODI 0x000100014A4F4449LL
#define HBC_1_0_7 0x00010001AF1BF516LL #define HBC_1_0_7 0x00010001AF1BF516LL
#define HBC_LULZ 0x000100014c554c5aLL
void Sys_LoadHBC(void) void Sys_LoadHBC(void)
{ {
@ -209,7 +210,9 @@ void Sys_LoadHBC(void)
WII_Initialize(); 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) if(ret < 0)
WII_LaunchTitle(HBC_JODI); WII_LaunchTitle(HBC_JODI);
if(ret < 0) if(ret < 0)

View File

@ -339,6 +339,18 @@ u8 IosLoader::GetDMLVersion(char* releaseDate)
strptime("Nov 9 2012 21:18:56", "%b %d %Y %H:%M:%S", &time); strptime("Nov 9 2012 21:18:56", "%b %d %Y %H:%M:%S", &time);
const time_t dml_2_5_time = mktime(&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 // Current installed version
gprintf("built on %s\n", releaseDate); gprintf("built on %s\n", releaseDate);
@ -348,7 +360,9 @@ u8 IosLoader::GetDMLVersion(char* releaseDate)
if(currentMIOS == DIOS_MIOS) 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_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_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; 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) 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_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_3_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_3;
else if(difftime(unixTime, dml_2_3m_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_3m; else if(difftime(unixTime, dml_2_3m_time) >= 0) currentDMLVersion = DML_VERSION_DML_2_3m;

View File

@ -50,6 +50,9 @@ enum DMLVersions
DML_VERSION_DML_2_4, // Oct 21 2012 22:57:17 DML_VERSION_DML_2_4, // Oct 21 2012 22:57:17
DML_VERSION_DM_2_5, // Nov 9 2012 21:18:52 DML_VERSION_DM_2_5, // Nov 9 2012 21:18:52
DML_VERSION_DML_2_5, // Nov 9 2012 21:18:56 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, DML_VERSION_MAX_VERSION,
}; };

View File

@ -412,7 +412,6 @@ int GameBooter::BootDIOSMIOS(struct discHdr *gameHdr)
u8 dmlNMMChoice = game_cfg->DMLNMM == INHERIT ? Settings.DMLNMM : game_cfg->DMLNMM; u8 dmlNMMChoice = game_cfg->DMLNMM == INHERIT ? Settings.DMLNMM : game_cfg->DMLNMM;
u8 dmlActivityLEDChoice = game_cfg->DMLActivityLED == INHERIT ? Settings.DMLActivityLED : game_cfg->DMLActivityLED; u8 dmlActivityLEDChoice = game_cfg->DMLActivityLED == INHERIT ? Settings.DMLActivityLED : game_cfg->DMLActivityLED;
u8 dmlPADHookChoice = game_cfg->DMLPADHOOK == INHERIT ? Settings.DMLPADHOOK : game_cfg->DMLPADHOOK; 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 dmlNoDisc2Choice = game_cfg->DMLNoDisc2 == INHERIT ? Settings.DMLNoDisc2 : game_cfg->DMLNoDisc2;
u8 dmlWidescreenChoice = game_cfg->DMLWidescreen == INHERIT ? Settings.DMLWidescreen : game_cfg->DMLWidescreen; u8 dmlWidescreenChoice = game_cfg->DMLWidescreen == INHERIT ? Settings.DMLWidescreen : game_cfg->DMLWidescreen;
u8 dmlScreenshotChoice = game_cfg->DMLScreenshot == INHERIT ? Settings.DMLScreenshot : game_cfg->DMLScreenshot; 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")); WindowPrompt(tr("Warning:"), tr("The Force Widescreen setting requires DIOS MIOS v2.1 or more. This setting will be ignored."), tr("OK"));
dmlWidescreenChoice = OFF; 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(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. if(Settings.DMLNoDisc2) // Display the warning only if set as Global setting. Individual game setting is not displayed.