From fe5186223b3b1cdef428963fdcb702645eebd42f Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 31 Oct 2025 18:32:13 +0200 Subject: [PATCH] Make sure horizontal and vertical counters are reset immediately in fast CPU modes. --- custom.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/custom.cpp b/custom.cpp index 51eefc04..bb4f29ce 100644 --- a/custom.cpp +++ b/custom.cpp @@ -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++; -- 2.47.3