From: Toni Wilen Date: Sun, 27 Nov 2022 12:43:19 +0000 (+0200) Subject: CIA-A fix update X-Git-Tag: 41000~42 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=f346b99719a57dd02da335dda980b979bc8b4547;p=francis%2Fwinuae.git CIA-A fix update --- 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();