From f346b99719a57dd02da335dda980b979bc8b4547 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 27 Nov 2022 14:43:19 +0200 Subject: [PATCH] CIA-A fix update --- cia.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cia.cpp b/cia.cpp index 5b7ba2b3..1ed9cb97 100644 --- a/cia.cpp +++ b/cia.cpp @@ -1179,6 +1179,10 @@ static void check_keyboard(void) static void cia_delayed_tod(int num) { struct CIA *c = &cia[num]; + if (c->tod_event_state == 4) { + c->tod_event_state = 1; + return; + } if (c->tod_event_state == 1) { CIA_tod_inc(false, num); } @@ -1212,10 +1216,6 @@ void CIA_hsync_posthandler(bool ciahsync, bool dotod) if (!ciahsync) { // Increase CIA-A TOD if delayed from previous line - struct CIA *c = &cia[0]; - if (c->tod_event_state == 4) { - c->tod_event_state = 1; - } cia_delayed_tod(0); if (currprefs.tod_hack && cia[0].todon) { do_tod_hack(); -- 2.47.3