From 8fb30d31ed48b0e5ff2dfd672732736ca5fa613f Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 21 Oct 2022 18:53:32 +0300 Subject: [PATCH] Trace does not wake up STOP if STOP enables trace and trace was not already enabled. --- newcpu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/newcpu.cpp b/newcpu.cpp index ce29e95f..aadc2afb 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -2458,7 +2458,7 @@ static void MakeFromSR_x(int t0trace) } // Stop SR-modification does not generate T0 // If this SR modification set Tx bit, no trace until next instruction. - if ((oldt0 && t0trace && currprefs.cpu_model >= 68020) || oldt1) { + if (!regs.stopped && ((oldt0 && t0trace && currprefs.cpu_model >= 68020) || oldt1)) { // Always trace if Tx bits were already set, even if this SR modification cleared them. activate_trace(); } @@ -4155,8 +4155,11 @@ void mmu_op (uae_u32 opcode, uae_u32 extra) #endif -static void do_trace (void) +static void do_trace(void) { + if (regs.stopped) { + return; + } // need to store PC because of branch instructions regs.trace_pc = m68k_getpc(); if (regs.t0 && !regs.t1 && currprefs.cpu_model >= 68020) { -- 2.47.3