mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Added a check for the IOS version before overriding the OSGetResetCode() function.
Fixes issue 6700.
This commit is contained in:
@ -169,30 +169,38 @@ u32 GetDolFileSize(std::string dol)
|
|||||||
return (u32)pFileSystem->GetFileSize(dolFile.c_str());
|
return (u32)pFileSystem->GetFileSize(dolFile.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSGetResetCode()
|
|
||||||
{
|
|
||||||
u32 resetCode = Memory::Read_U32(0xCC003024);
|
|
||||||
|
|
||||||
if ((resetCode & 0x1fffffff) != 0)
|
|
||||||
{
|
|
||||||
GPR(3) = resetCode | 0x80000000;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GPR(3) = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
NPC = LR;
|
|
||||||
}
|
|
||||||
|
|
||||||
u16 GetIOSVersion()
|
u16 GetIOSVersion()
|
||||||
{
|
{
|
||||||
return Memory::Read_U16(0x00003140);
|
return Memory::Read_U16(0x00003140);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OSGetResetCode()
|
||||||
|
{
|
||||||
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && GetIOSVersion() >= 30)
|
||||||
|
{
|
||||||
|
u32 resetCode = Memory::Read_U32(0xCC003024);
|
||||||
|
|
||||||
|
if ((resetCode & 0x1fffffff) != 0)
|
||||||
|
{
|
||||||
|
GPR(3) = resetCode | 0x80000000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GPR(3) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
NPC = LR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HLE::UnPatch("OSGetResetCode");
|
||||||
|
NPC = PC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OSBootDol()
|
void OSBootDol()
|
||||||
{
|
{
|
||||||
if (GetIOSVersion() >= 30)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && GetIOSVersion() >= 30)
|
||||||
{
|
{
|
||||||
if ((GPR(4) >> 28) == 0x8)
|
if ((GPR(4) >> 28) == 0x8)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user