HLE function hooking: Avoid ppcState global.
This commit is contained in:
9 files changed
+75
-46
No files matched your search
@@ -580,7 +580,7 @@ bool CBoot::BootUp(Core::System& system, std::unique_ptr<BootParameters> boot)
|
||||
if (executable.reader->LoadSymbols())
|
||||
{
|
||||
UpdateDebugger_MapLoaded();
|
||||
HLE::PatchFunctions();
|
||||
HLE::PatchFunctions(system);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -166,8 +166,8 @@ bool CBoot::RunApploader(Core::System& system, bool is_wii, const DiscIO::Volume
|
||||
|
||||
// iAppLoaderInit
|
||||
DEBUG_LOG_FMT(BOOT, "Call iAppLoaderInit");
|
||||
PowerPC::HostWrite_U32(0x4E800020, 0x81300000); // Write BLR
|
||||
HLE::Patch(0x81300000, "AppLoaderReport"); // HLE OSReport for Apploader
|
||||
PowerPC::HostWrite_U32(0x4E800020, 0x81300000); // Write BLR
|
||||
HLE::Patch(system, 0x81300000, "AppLoaderReport"); // HLE OSReport for Apploader
|
||||
ppc_state.gpr[3] = 0x81300000;
|
||||
RunFunction(system, iAppLoaderInit);
|
||||
|
||||
@@ -208,7 +208,7 @@ bool CBoot::RunApploader(Core::System& system, bool is_wii, const DiscIO::Volume
|
||||
// iAppLoaderClose
|
||||
DEBUG_LOG_FMT(BOOT, "call iAppLoaderClose");
|
||||
RunFunction(system, iAppLoaderClose);
|
||||
HLE::UnPatch("AppLoaderReport");
|
||||
HLE::UnPatch(system, "AppLoaderReport");
|
||||
|
||||
// return
|
||||
ppc_state.pc = ppc_state.gpr[3];
|
||||
|
||||
Reference in new issue
Block a user