From: Toni Wilen Date: Tue, 24 May 2022 16:15:29 +0000 (+0300) Subject: Include also possible remaining cycles when doing 68000/010 to chipset sync (can... X-Git-Tag: 41000~235 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=3cb2d8dac82f9830a1e34cebccb219bf4979f5c9;p=francis%2Fwinuae.git 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) --- 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);