]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Make sure horizontal and vertical counters are reset immediately in fast CPU modes.
authorToni Wilen <twilen@winuae.net>
Fri, 31 Oct 2025 16:32:13 +0000 (18:32 +0200)
committerToni Wilen <twilen@winuae.net>
Fri, 31 Oct 2025 16:32:13 +0000 (18:32 +0200)
custom.cpp

index 51eefc04e8fae6bc6d92a7b74f9bea37c2d7e889..bb4f29ce516f3ad7652140ee4a2c0a1b7243691d 100644 (file)
@@ -2373,9 +2373,18 @@ STATIC_INLINE int issyncstopped(uae_u16 con0)
        return (con0 & 2) && (!currprefs.genlock || currprefs.genlock_effects);
 }
 
+static void setsyncstoppos(void)
+{
+       agnus_hpos = 0;
+       hhpos = 0;
+       linear_hpos = 0;
+       dmal_shifter = 0; // fast CPU fix
+}
+
 static void setsyncstopped(void)
 {
        syncs_stopped = true;
+       setsyncstoppos();
        resetfulllinestate();
 }
 
@@ -11534,10 +11543,7 @@ static void inc_cck(void)
                }
        }
        if (syncs_stopped) {
-               agnus_hpos = 0;
-               hhpos = 0;
-               linear_hpos = 0;
-               dmal_shifter = 0; // fast CPU fix
+               setsyncstoppos();
                set_fakehsync_handler();
        } else {
                rga_denise_cycle++;