From: Toni Wilen Date: Fri, 31 Oct 2025 16:32:13 +0000 (+0200) Subject: Make sure horizontal and vertical counters are reset immediately in fast CPU modes. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=fe5186223b3b1cdef428963fdcb702645eebd42f;p=francis%2Fwinuae.git Make sure horizontal and vertical counters are reset immediately in fast CPU modes. --- 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++;