From 2b9c407dc3bd396fbed780fab0f70c8bae9d099e Mon Sep 17 00:00:00 2001 From: Eladash Date: Thu, 17 Dec 2020 05:58:36 +0200 Subject: [PATCH] Mask PC in debugger_frame::keyPressEvent for SPU SPU only has 256kb of memory, need to work with this. --- rpcs3/rpcs3qt/debugger_frame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp index ec638fbcd4..be44c15c29 100644 --- a/rpcs3/rpcs3qt/debugger_frame.cpp +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -231,7 +231,8 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) return; } - const u32 pc = i >= 0 ? m_debugger_list->m_pc + i * 4 : cpu->get_pc(); + const u32 address_limits = (cpu->id_type() != 1 ? 0x3fffc : ~3); + const u32 pc = (i >= 0 ? m_debugger_list->m_pc + i * 4 : cpu->get_pc()) & address_limits; const auto modifiers = QApplication::keyboardModifiers();