From fc266e0fe1dbf11d91e6bdba4364c3f6b3b46f2c Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Thu, 26 Apr 2012 17:35:13 +0000 Subject: [PATCH] -made launching retail gamecube discs possible with next dml versions (thanks crediar) --- source/gc/gc.c | 18 ++++++++++++++++++ source/gc/gc.h | 1 + source/menu/menu_game.cpp | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/source/gc/gc.c b/source/gc/gc.c index 4352b501..56c76d9b 100644 --- a/source/gc/gc.c +++ b/source/gc/gc.c @@ -232,3 +232,21 @@ void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo *(vu32*)0xCC003024 |= 7; } + +void DML_New_SetBootDiscOption() +{ + gprintf("Booting GC game\n"); + + DML_CFG *DMLCfg = (DML_CFG*)MEM2_alloc(sizeof(DML_CFG)); + memset(DMLCfg, 0, sizeof(DML_CFG)); + + DMLCfg->Magicbytes = 0xD1050CF6; + DMLCfg->CfgVersion = 0x00000001; + + DMLCfg->Config |= DML_CFG_BOOT_DISC; + + //DML v1.2+ + memcpy((void *)0xC1200000, DMLCfg, sizeof(DML_CFG)); + + MEM2_free(DMLCfg); +} diff --git a/source/gc/gc.h b/source/gc/gc.h index 9f0ab67a..cc5dfcd0 100644 --- a/source/gc/gc.h +++ b/source/gc/gc.h @@ -50,6 +50,7 @@ void GC_SetLanguage(u8 lang); int GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir); void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc); //, u8 DMLvideoMode); void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats); +void DML_New_SetBootDiscOption(); #endif //GC_H_ #ifdef __cplusplus diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index 50f44a8b..893e8dcc 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -741,7 +741,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML) } } else - gprintf("Booting GC game\n"); + DML_New_SetBootDiscOption(); m_gcfg1.save(true); m_gcfg2.save(true);