HLE function hooking: Avoid ppcState global.

This commit is contained in:
Admiral H. Curtiss committed 2023-01-27 15:22:46 +01:00
1 parent 30de91d843
commit 7fd552081f
9 files changed
+75 -46

No files matched your search

+1 -1
View File
@@ -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;
}
+3 -3
View File
@@ -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];