Core: Check if msr.DR or msr.IR are valid at ApplyStartupPatches

This commit is contained in:
Sketch 2025-02-02 17:27:16 -05:00
parent 84d28a4272
commit 4499718368
1 changed files with 11 additions and 0 deletions

View File

@ -293,6 +293,17 @@ static void ApplyStartupPatches(Core::System& system)
{
ASSERT(Core::IsCPUThread());
Core::CPUThreadGuard guard(system);
const auto& ppc_state = system.GetPPCState();
if (!ppc_state.msr.DR || !ppc_state.msr.IR)
{
DEBUG_LOG_FMT(ACTIONREPLAY,
"Need to retry later. CPU configuration is currently incorrect. PC = {:#010x}, "
"MSR = {:#010x}",
ppc_state.pc, ppc_state.msr.Hex);
return;
}
ApplyPatches(guard, s_on_frame);
}