From 0979207cc6958038c22600d488c30619b7fe848b Mon Sep 17 00:00:00 2001 From: eladash Date: Sun, 14 Apr 2019 21:28:23 +0300 Subject: [PATCH] Log currently PPU HLE function executed after access violation old functionality retrieved --- Utilities/Thread.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index e98c8b9d5a..9797915077 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1408,7 +1408,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) return true; } - if (cpu->id_type() == 2) + if (cpu->id_type() != 1) { LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr); @@ -1436,12 +1436,17 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) } else { + if (auto last_func = static_cast(cpu)->current_function) + { + LOG_FATAL(PPU, "Function aborted: %s", last_func); + } + lv2_obj::sleep(*cpu); } } - LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr); Emu.Pause(); + LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr); while (Emu.IsPaused()) {