summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2021-04-23 21:00:29 +0200
committerGitHub <noreply@github.com>2021-04-23 21:00:29 +0200
commitf0bd6b105f474a3c249b8e11f752f4bbffbb64ee (patch)
tree966b19cf404df00ba805baba20d8f2cb8e316d5a /Source/Core
parentcfc4af76a9d0b00df81239d9a83ba5ea1d381a1e (diff)
parent1686b637df633c77a1f05034325383f6c97ab4eb (diff)
Merge pull request #9663 from leoetlino/mios-hle-patch
Fix IPL crash when launching MIOS-patched games
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HLE/HLE.cpp8
-rw-r--r--Source/Core/Core/IOS/MIOS.cpp1
2 files changed, 9 insertions, 0 deletions
diff --git a/Source/Core/Core/HLE/HLE.cpp b/Source/Core/Core/HLE/HLE.cpp
index a598e8d2b0..9c9471434d 100644
--- a/Source/Core/Core/HLE/HLE.cpp
+++ b/Source/Core/Core/HLE/HLE.cpp
@@ -76,6 +76,14 @@ void Patch(u32 addr, std::string_view func_name)
void PatchFixedFunctions()
{
+ // MIOS puts patch data in low MEM1 (0x1800-0x3000) for its own use.
+ // Overwriting data in this range can cause the IPL to crash when launching games
+ // that get patched by MIOS. See https://bugs.dolphin-emu.org/issues/11952 for more info.
+ // Not applying the Gecko HLE patches means that Gecko codes will not work under MIOS,
+ // but this is better than the alternative of having specific games crash.
+ if (SConfig::GetInstance().m_is_mios)
+ return;
+
// HLE jump to loader (homebrew). Disabled when Gecko is active as it interferes with the code
// handler
if (!SConfig::GetInstance().bEnableCheats)
diff --git a/Source/Core/Core/IOS/MIOS.cpp b/Source/Core/Core/IOS/MIOS.cpp
index 3be52ed411..7a4ce4a6bc 100644
--- a/Source/Core/Core/IOS/MIOS.cpp
+++ b/Source/Core/Core/IOS/MIOS.cpp
@@ -86,6 +86,7 @@ bool Load()
NOTICE_LOG_FMT(IOS, "IPL ready.");
SConfig::GetInstance().m_is_mios = true;
DVDInterface::UpdateRunningGameMetadata();
+ SConfig::OnNewTitleLoad();
return true;
}
} // namespace IOS::HLE::MIOS