]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Realign cycle counter if on the fly switching to 68000/010 CE mode.
authorToni Wilen <twilen@winuae.net>
Sun, 28 Sep 2025 16:17:14 +0000 (19:17 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 28 Sep 2025 16:17:14 +0000 (19:17 +0300)
custom.cpp

index bc82373df26ea4a10eeb51cf20c16f5e3818274c..767cd4353240df16c0fba1643ad6d2459702d664 100644 (file)
@@ -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);
+               }
        }
 }