From ca20e3d29002fffe596537fd717870617490dae5 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 28 Sep 2025 19:17:14 +0300 Subject: [PATCH] Realign cycle counter if on the fly switching to 68000/010 CE mode. --- custom.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom.cpp b/custom.cpp index bc82373d..767cd435 100644 --- a/custom.cpp +++ b/custom.cpp @@ -12478,6 +12478,11 @@ static void sync_cycles(void) if (extra) { extra = CYCLE_UNIT - extra; x_do_cycles(extra); + // 68000/010 CE requires CYCLE_UNIT aligned cycle counter + // (it might be unaligned if on the fly switching CPU modes) + if (currprefs.cpu_model <= 68010) { + set_cycles(c + extra); + } } } -- 2.47.3