]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix CIA/CPU timing
authorToni Wilen <twilen@winuae.net>
Tue, 7 Sep 2021 16:15:01 +0000 (19:15 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 7 Sep 2021 16:15:01 +0000 (19:15 +0300)
cia.cpp

diff --git a/cia.cpp b/cia.cpp
index d7fc0c2057a566199e8c8471d7e6b5dcd1ee0d82..c09b8e454a6e0e08d24f3cb3c93878e53a765b33 100644 (file)
--- 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)