]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
CIA E-clock mode on the fly change support
authorToni Wilen <twilen@winuae.net>
Mon, 12 Feb 2024 18:41:22 +0000 (20:41 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 12 Feb 2024 18:41:22 +0000 (20:41 +0200)
cia.cpp
custom.cpp
include/cia.h

diff --git a/cia.cpp b/cia.cpp
index e96b3b29e7142bf132d5e516a1f9ecf72b07e651..4afc532480f77ee068bd8c8eb24eb42a90520d34 100644 (file)
--- a/cia.cpp
+++ b/cia.cpp
@@ -192,7 +192,7 @@ void cia_adjust_eclock_phase(int diff)
        //write_log("CIA E-clock phase %d\n", internaleclockphase);
 }
 
-static void set_eclockphase(void)
+void cia_set_eclockphase(void)
 {
        if (currprefs.cs_eclocksync == 3) {
                e_clock_sync = E_CLOCK_SYNC_X;
@@ -228,7 +228,7 @@ static evt_t get_e_cycles(void)
                        currprefs.cs_eclocksync = 1;
                }
                changed_prefs.cs_eclocksync = currprefs.cs_eclocksync;
-               set_eclockphase();
+               cia_set_eclockphase();
                write_log("CIA elock timing mode %d\n", currprefs.cs_eclocksync);
                blop2 = 0;
        }
@@ -2197,7 +2197,7 @@ void CIA_reset(void)
                CIA_calctimers();
                DISK_select_set(cia[1].prb);
        }
-       set_eclockphase();
+       cia_set_eclockphase();
        map_overlay(0);
        check_led();
 #ifdef SERIAL_PORT
index c81a74c88e669121032319b74d50107d8876e85b..340feb060243c742731c70deaa5a43c4c2dabcc3 100644 (file)
@@ -16372,6 +16372,7 @@ void check_prefs_changed_custom(void)
                currprefs.chipset_hr = changed_prefs.chipset_hr;
                init_custom();
        }
+       cia_set_eclockphase();
        if (syncchange) {
                varsync_changed = 2;
        }
index ed2b3ff9942972d0652b716efaa76d1d6967c820..753e4582b3eb23f428d53840efb38a56128e0c86 100644 (file)
@@ -22,6 +22,7 @@ extern void CIAB_tod_handler(int);
 extern void cia_parallelack (void);
 extern void cia_diskindex (void);
 extern void cia_adjust_eclock_phase(int);
+extern void cia_set_eclockphase(void);
 
 extern void dumpcia(void);
 extern void rethink_cias(void);