diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 3bee4371732c..eb1d03b43140 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1394,7 +1394,24 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) return true; } - vm::temporary_unlock(*cpu); + if (cpu->id_type() == 2) + { + LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr); + + // TODO: + // RawSPU: Send appropriate interrupt + // SPUThread: Send sys_spu exception event + cpu->state += cpu_flag::dbg_pause; + if (cpu->check_state()) + { + static_cast(cpu)->cpu_stop(); + throw cpu_flag::exit; + } + } + else + { + lv2_obj::sleep(*cpu); + } } LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr); diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index ebb74ef0234d..7507a3ab3efb 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "Emu/System.h" #include "Emu/Memory/vm.h" #include "CPUThread.h"