-got a bit sleep

-force video mode works now for sure ;)
-fixed booting gamecube retail games video mode
-re-added parent control for gamecube games
This commit is contained in:
fix94.1 2012-01-22 12:00:32 +00:00
parent 0afba30306
commit f6c23a67ee
3 changed files with 36 additions and 33 deletions

View File

@ -701,7 +701,7 @@ private:
void _launchGame(dir_discHdr *hdr, bool dvd); void _launchGame(dir_discHdr *hdr, bool dvd);
void _launchChannel(dir_discHdr *hdr); void _launchChannel(dir_discHdr *hdr);
void _launchHomebrew(const char *filepath, safe_vector<std::string> arguments); void _launchHomebrew(const char *filepath, safe_vector<std::string> arguments);
void _launchGC(const char *id); void _launchGC(const char *id, bool DML);
void _setAA(int aa); void _setAA(int aa);
void _loadCFCfg(SThemeData &theme); void _loadCFCfg(SThemeData &theme);
void _loadCFLayout(int version, bool forceAA = false, bool otherScrnFmt = false); void _loadCFLayout(int version, bool forceAA = false, bool otherScrnFmt = false);

View File

@ -462,13 +462,10 @@ void CMenu::_game(bool launch)
if (m_gameLblUser[i] != -1u) if (m_gameLblUser[i] != -1u)
m_btnMgr.show(m_gameLblUser[i]); m_btnMgr.show(m_gameLblUser[i]);
if (m_current_view != COVERFLOW_DML && !m_locked) b = m_gcfg1.getBool("ADULTONLY", id, false);
{ m_btnMgr.show(b ? m_gameBtnAdultOn : m_gameBtnAdultOff);
b = m_gcfg1.getBool("ADULTONLY", id, false); m_btnMgr.hide(b ? m_gameBtnAdultOff : m_gameBtnAdultOn);
m_btnMgr.show(b ? m_gameBtnAdultOn : m_gameBtnAdultOff); m_btnMgr.show(m_gameBtnSettings);
m_btnMgr.hide(b ? m_gameBtnAdultOff : m_gameBtnAdultOn);
}
m_btnMgr.show(m_gameBtnSettings);
if (m_current_view == COVERFLOW_USB && !m_locked) if (m_current_view == COVERFLOW_USB && !m_locked)
m_btnMgr.show(m_gameBtnDelete); m_btnMgr.show(m_gameBtnDelete);
@ -535,7 +532,7 @@ void CMenu::_launch(dir_discHdr *hdr)
_launchChannel(hdr); _launchChannel(hdr);
break; break;
case COVERFLOW_DML: case COVERFLOW_DML:
_launchGC((const char*)hdr->hdr.id); _launchGC((const char*)hdr->hdr.id,true);
break; break;
case COVERFLOW_USB: case COVERFLOW_USB:
default: default:
@ -546,35 +543,43 @@ void CMenu::_launch(dir_discHdr *hdr)
extern "C" {extern void USBStorage_Deinit(void);} extern "C" {extern void USBStorage_Deinit(void);}
void CMenu::_launchGC(const char *id) void CMenu::_launchGC(const char *id, bool DML)
{ {
u8 DMLvideoMode = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u); u8 DMLvideoMode = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);
if (!DML)
DMLvideoMode = 0;
Close_Inputs(); Close_Inputs();
USBStorage_Deinit(); USBStorage_Deinit();
Nand::Instance()->Disable_Emu(); Nand::Instance()->Disable_Emu();
char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32); if (DML)
FILE *f; {
sprintf(filepath, "%s:/games/boot.bin", DeviceName[SD]); char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
f = fopen(filepath, "wb"); FILE *f;
fwrite(id, 1, 6, f); sprintf(filepath, "%s:/games/boot.bin", DeviceName[SD]);
fclose(f); f = fopen(filepath, "wb");
fwrite(id, 1, 6, f);
fclose(f);
}
cleanup(); cleanup();
memcpy((char *)0x80000000, id, 6); if (DML)
{
// Tell DML to boot the game from sd card memcpy((char *)0x80000000, id, 6);
*(u32 *)0x80001800 = 0xB002D105;
DCFlushRange((void *)(0x80001800), 4); // Tell DML to boot the game from sd card
ICInvalidateRange((void *)(0x80001800), 4); *(u32 *)0x80001800 = 0xB002D105;
DCFlushRange((void *)(0x80001800), 4);
*(volatile unsigned int *)0xCC003024 |= 7; ICInvalidateRange((void *)(0x80001800), 4);
*(volatile unsigned int *)0xCC003024 |= 7;
}
setstreaming(); setstreaming();
VIDEO_SetBlack(TRUE); VIDEO_SetBlack(TRUE);
if ((id[3] == 'P') || (DMLvideoMode == 1)) if (((id[3] == 'P') && (DMLvideoMode == 0)) || (DMLvideoMode == 1))
{ {
SRAM_PAL(); SRAM_PAL();
@ -590,7 +595,7 @@ void CMenu::_launchGC(const char *id)
VIDEO_ClearFrameBuffer(rmode, m_frameBuf, COLOR_BLACK); VIDEO_ClearFrameBuffer(rmode, m_frameBuf, COLOR_BLACK);
VIDEO_SetNextFramebuffer(m_frameBuf); VIDEO_SetNextFramebuffer(m_frameBuf);
} }
if ((id[3] != 'P') || (DMLvideoMode == 2)) if (((id[3] != 'P') && (DMLvideoMode == 0)) || (DMLvideoMode == 2))
{ {
SRAM_NTSC(); SRAM_NTSC();
@ -1065,17 +1070,15 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
} }
} }
cleanup();
Close_Inputs();
USBStorage_Deinit();
if (gc) if (gc)
{ {
WII_Initialize(); _launchGC(id.c_str(),false);
if (WII_LaunchTitle(0x0000000100000100ULL)<0)
Sys_LoadMenu();
} }
else else
{ {
cleanup();
Close_Inputs();
USBStorage_Deinit();
gprintf("Booting game\n"); gprintf("Booting game\n");
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode) < 0) if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode) < 0)
Sys_LoadMenu(); Sys_LoadMenu();

File diff suppressed because one or more lines are too long