From a2d65c3a1c0d73765d4b08140819d009a55dcf10 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 7 Sep 2021 19:15:01 +0300 Subject: [PATCH] Fix CIA/CPU timing --- cia.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cia.cpp b/cia.cpp index d7fc0c20..c09b8e45 100644 --- a/cia.cpp +++ b/cia.cpp @@ -1971,7 +1971,7 @@ static void cia_wait_pre(int cianummask) } #ifndef CUSTOM_SIMPLE - int div = get_cycles() % DIV10; + int div = (get_cycles() - eventtab[ev_cia].oldcycles) % DIV10; int cycles = DIV10 - div; if (cycles) { if (currprefs.cpu_memory_cycle_exact) -- 2.47.3