From d848c4622e28203370558a92a2a87df9ec655487 Mon Sep 17 00:00:00 2001 From: "Adam Polkosnik [fun]" Date: Thu, 17 Sep 2020 02:35:37 -0400 Subject: [PATCH] TG68K.C - Exceptions which don't come from the instruction reset the trace flag Gyurco's exception patch --- lib/cpu/m68k/rtl/m68k.vhd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cpu/m68k/rtl/m68k.vhd b/lib/cpu/m68k/rtl/m68k.vhd index a32c9f4..3d2091b 100644 --- a/lib/cpu/m68k/rtl/m68k.vhd +++ b/lib/cpu/m68k/rtl/m68k.vhd @@ -1490,6 +1490,10 @@ begin SVmode <= preSVmode; end if; end if; + if trap_berr = '1' or trap_illegal = '1' or trap_addr_error = '1' or trap_priv = '1' then + make_trace <= '0'; + FlagsSR(7) <= '0'; + end if; if set.changeMode = '1' then preSVmode <= not preSVmode; FlagsSR(5) <= not preSVmode;