mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
HLE: Use a proper apploader OSReport
This commit is contained in:
parent
252bb4471d
commit
0f74f1ffb3
@ -111,8 +111,6 @@ bool CBoot::EmulatedBS2_GC(bool skip_app_loader)
|
|||||||
// HIO checks this
|
// HIO checks this
|
||||||
// PowerPC::HostWrite_U16(0x8200, 0x000030e6); // Console type
|
// PowerPC::HostWrite_U16(0x8200, 0x000030e6); // Console type
|
||||||
|
|
||||||
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
|
|
||||||
|
|
||||||
if (!DVDInterface::IsDiscInside())
|
if (!DVDInterface::IsDiscInside())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -163,6 +161,7 @@ bool CBoot::EmulatedBS2_GC(bool skip_app_loader)
|
|||||||
|
|
||||||
// iAppLoaderInit
|
// iAppLoaderInit
|
||||||
DEBUG_LOG(MASTER_LOG, "Call iAppLoaderInit");
|
DEBUG_LOG(MASTER_LOG, "Call iAppLoaderInit");
|
||||||
|
HLE::Patch(0x81300000, "AppLoaderReport"); // HLE OSReport for Apploader
|
||||||
PowerPC::ppcState.gpr[3] = 0x81300000;
|
PowerPC::ppcState.gpr[3] = 0x81300000;
|
||||||
RunFunction(iAppLoaderInit);
|
RunFunction(iAppLoaderInit);
|
||||||
|
|
||||||
@ -191,6 +190,7 @@ bool CBoot::EmulatedBS2_GC(bool skip_app_loader)
|
|||||||
// iAppLoaderClose
|
// iAppLoaderClose
|
||||||
DEBUG_LOG(MASTER_LOG, "call iAppLoaderClose");
|
DEBUG_LOG(MASTER_LOG, "call iAppLoaderClose");
|
||||||
RunFunction(iAppLoaderClose);
|
RunFunction(iAppLoaderClose);
|
||||||
|
HLE::UnPatch("AppLoaderReport");
|
||||||
|
|
||||||
// return
|
// return
|
||||||
PC = PowerPC::ppcState.gpr[3];
|
PC = PowerPC::ppcState.gpr[3];
|
||||||
@ -358,8 +358,6 @@ bool CBoot::EmulatedBS2_Wii()
|
|||||||
Memory::Write_U32(0x4c000064, 0x00000800); // Write default FPU Handler: rfi
|
Memory::Write_U32(0x4c000064, 0x00000800); // Write default FPU Handler: rfi
|
||||||
Memory::Write_U32(0x4c000064, 0x00000C00); // Write default Syscall Handler: rfi
|
Memory::Write_U32(0x4c000064, 0x00000C00); // Write default Syscall Handler: rfi
|
||||||
|
|
||||||
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
|
|
||||||
|
|
||||||
PowerPC::ppcState.gpr[1] = 0x816ffff0; // StackPointer
|
PowerPC::ppcState.gpr[1] = 0x816ffff0; // StackPointer
|
||||||
|
|
||||||
// Execute the apploader
|
// Execute the apploader
|
||||||
@ -391,6 +389,7 @@ bool CBoot::EmulatedBS2_Wii()
|
|||||||
|
|
||||||
// iAppLoaderInit
|
// iAppLoaderInit
|
||||||
DEBUG_LOG(BOOT, "Run iAppLoaderInit");
|
DEBUG_LOG(BOOT, "Run iAppLoaderInit");
|
||||||
|
HLE::Patch(0x81300000, "AppLoaderReport"); // HLE OSReport for Apploader
|
||||||
PowerPC::ppcState.gpr[3] = 0x81300000;
|
PowerPC::ppcState.gpr[3] = 0x81300000;
|
||||||
RunFunction(iAppLoaderInit);
|
RunFunction(iAppLoaderInit);
|
||||||
|
|
||||||
@ -416,6 +415,7 @@ bool CBoot::EmulatedBS2_Wii()
|
|||||||
// iAppLoaderClose
|
// iAppLoaderClose
|
||||||
DEBUG_LOG(BOOT, "Run iAppLoaderClose");
|
DEBUG_LOG(BOOT, "Run iAppLoaderClose");
|
||||||
RunFunction(iAppLoaderClose);
|
RunFunction(iAppLoaderClose);
|
||||||
|
HLE::UnPatch("AppLoaderReport");
|
||||||
|
|
||||||
IOS::HLE::Device::ES::DIVerify(tmd, DVDInterface::GetVolume().GetTicket());
|
IOS::HLE::Device::ES::DIVerify(tmd, DVDInterface::GetVolume().GetTicket());
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ static const SPatch OSPatches[] = {
|
|||||||
// This needs to be put before vprintf (because vprintf is called indirectly by this)
|
// This needs to be put before vprintf (because vprintf is called indirectly by this)
|
||||||
{"JUTWarningConsole_f", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
{"JUTWarningConsole_f", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
||||||
|
|
||||||
{"OSReport", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG}, // apploader needs OSReport replace hook
|
{"OSReport", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
||||||
{"DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
{"DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
||||||
{"WUD_DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
{"WUD_DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
||||||
{"vprintf", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
{"vprintf", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_START, HLE_TYPE_DEBUG},
|
||||||
@ -69,6 +69,7 @@ static const SPatch OSPatches[] = {
|
|||||||
|
|
||||||
{"GeckoCodehandler", HLE_Misc::GeckoCodeHandlerICacheFlush, HLE_HOOK_START, HLE_TYPE_FIXED},
|
{"GeckoCodehandler", HLE_Misc::GeckoCodeHandlerICacheFlush, HLE_HOOK_START, HLE_TYPE_FIXED},
|
||||||
{"GeckoHandlerReturnTrampoline", HLE_Misc::GeckoReturnTrampoline, HLE_HOOK_REPLACE, HLE_TYPE_FIXED},
|
{"GeckoHandlerReturnTrampoline", HLE_Misc::GeckoReturnTrampoline, HLE_HOOK_REPLACE, HLE_TYPE_FIXED},
|
||||||
|
{"AppLoaderReport", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_FIXED} // apploader needs OSReport-like function
|
||||||
};
|
};
|
||||||
|
|
||||||
static const SPatch OSBreakPoints[] = {
|
static const SPatch OSBreakPoints[] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user