From: Toni Wilen Date: Sun, 28 Sep 2025 16:17:14 +0000 (+0300) Subject: Realign cycle counter if on the fly switching to 68000/010 CE mode. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=ca20e3d29002fffe596537fd717870617490dae5;p=francis%2Fwinuae.git Realign cycle counter if on the fly switching to 68000/010 CE mode. --- 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); + } } }