From 7b564216a8695ebfbe3b7a72abd0cf770bc9f328 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 1 Jan 2020 15:56:40 +0200 Subject: [PATCH] 68010 RTE format error exception does not clear pending trace. --- cputest.cpp | 2 +- newcpu.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cputest.cpp b/cputest.cpp index da5c5dc4..defefe12 100644 --- a/cputest.cpp +++ b/cputest.cpp @@ -3882,7 +3882,7 @@ static void test_mnemo(const TCHAR *path, const TCHAR *mnemo, const TCHAR *ovrfi // did we have trace also active? if (SPCFLAG_DOTRACE) { - if ((regs.t1 || regs.t0) && (test_exception == 5 || test_exception == 6 || test_exception == 7 || (test_exception >= 32 && test_exception <= 47))) { + if ((regs.t1 || regs.t0) && (test_exception == 5 || test_exception == 6 || test_exception == 7 || (test_exception >= 32 && test_exception <= 47) || (cpu_lvl == 1 && test_exception == 14))) { test_exception_extra = 9; } else { test_exception_extra = 0; diff --git a/newcpu.cpp b/newcpu.cpp index 222a814a..97e597ba 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -2333,6 +2333,10 @@ static void exception_check_trace (int nr) */ if (nr == 5 || nr == 6 || nr == 7 || (nr >= 32 && nr <= 47)) set_special (SPCFLAG_DOTRACE); + // 68010 and RTE format error: trace is not cleared + if (nr == 14 && currprefs.cpu_model == 68010) + set_special(SPCFLAG_DOTRACE); + } regs.t1 = regs.t0 = 0; } -- 2.47.3