-fixed banner keeps playing on delete game (issue 117)

-small changes on wii game booting
This commit is contained in:
fix94.1 2012-08-10 13:47:05 +00:00
parent 0967af43b3
commit 5cd988fe23
4 changed files with 19 additions and 16 deletions

View File

@ -59,15 +59,14 @@ s32 Apploader_Run(entry_point *entry, u8 vidMode, GXRModeObj *vmode, bool vipatc
/* Calculate apploader length */
appldr_len = buffer[5] + buffer[6];
/* Clear Apploader region (important buffers are under that) */
memset((void*)0x81200000, 0, 0x500000);
/* Read apploader code */
ret = WDVD_Read(appldr, appldr_len, APPLDR_OFFSET + 0x20);
if(ret < 0)
return ret;
/* Flush into memory */
DCFlushRange(appldr, appldr_len);
ICInvalidateRange(appldr, appldr_len);
/* Set apploader entry function */
app_entry appldr_entry = (app_entry)buffer[4];
@ -99,7 +98,6 @@ s32 Apploader_Run(entry_point *entry, u8 vidMode, GXRModeObj *vmode, bool vipatc
/* ERROR 002 fix (WiiPower) */
*(u32 *)0x80003140 = *(u32 *)0x80003188;
DCFlushRange((void*)0x80000000, 0x3f00);
return 0;

View File

@ -418,8 +418,9 @@ s32 Disc_BootPartition()
return 0;
}
void RunApploader(u64 offset, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, int aspectRatio, u32 returnTo)
void Disc_BootWiiGame(u64 offset, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, int aspectRatio, u32 returnTo)
{
/* Open Partition */
WDVD_OpenPartition(offset);
/* Setup low memory */
@ -430,6 +431,9 @@ void RunApploader(u64 offset, u8 vidMode, bool vipatch, bool countryString, u8 p
/* Run apploader */
Apploader_Run(&p_entry, vidMode, vmode, vipatch, countryString, patchVidMode, aspectRatio, returnTo);
appentrypoint = (u32)p_entry;
/* Boot Game */
gprintf("Entry Point: 0x%08x\n", appentrypoint);
Disc_BootPartition();
}

View File

@ -109,7 +109,8 @@ s32 Disc_FindPartition(u64 *outbuf);
GXRModeObj *Disc_SelectVMode(u8 videoselected, u64 chantitle, u32 *rmode_reg);
void Disc_SetVMode(GXRModeObj *rmode, u32 rmode_reg);
void RunApploader(u64 offset, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, int aspectRatio, u32 returnTo);
void Disc_BootWiiGame(u64 offset, u8 vidMode, bool vipatch, bool countryString,
u8 patchVidMode, int aspectRatio, u32 returnTo);
#ifdef __cplusplus
}

View File

@ -493,8 +493,10 @@ void CMenu::_game(bool launch)
_hideGame();
if(_wbfsOp(CMenu::WO_REMOVE_GAME))
{
m_gameSound->Stop();
m_gameSound->FreeMemory();
CheckGameSoundThread();
ClearGameSoundThreadStack();
m_banner->DeleteBanner();
break;
}
_showGame();
@ -1421,9 +1423,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
return;
DisableMEM1allocR();
RunApploader(offset, videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, returnTo);
gprintf("Booting game\n");
Disc_BootPartition();
Disc_BootWiiGame(offset, videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, returnTo);
}
void CMenu::_initGameMenu(CMenu::SThemeData &theme)