From 3cb2d8dac82f9830a1e34cebccb219bf4979f5c9 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 24 May 2022 19:15:29 +0300 Subject: [PATCH] Include also possible remaining cycles when doing 68000/010 to chipset sync (can be non-zero if 68000/010 is configured to be faster than normally) --- custom.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/custom.cpp b/custom.cpp index a25208a3..07e19254 100644 --- a/custom.cpp +++ b/custom.cpp @@ -14433,11 +14433,12 @@ static int dma_cycle(uaecptr addr, uae_u32 value, int *mode) static void sync_cycles(void) { - evt_t c; - uae_u32 extra; - - c = get_cycles(); - extra = c & (CYCLE_UNIT - 1); + if (extra_cycle) { + do_cycles(extra_cycle); + extra_cycle = 0; + } + evt_t c = get_cycles(); + int extra = c & (CYCLE_UNIT - 1); if (extra) { extra = CYCLE_UNIT - extra; do_cycles(extra); -- 2.47.3