From 9bc7feb37e34635c980195c02877435f807a9cb9 Mon Sep 17 00:00:00 2001 From: tomcw Date: Wed, 20 Jun 2018 22:12:19 +0100 Subject: [PATCH] Mockingboard: Better support for stop/starting 6522's IER.TIMERx (#567) --- source/Mockingboard.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Mockingboard.cpp b/source/Mockingboard.cpp index 96cc0ee5..49e8bd23 100644 --- a/source/Mockingboard.cpp +++ b/source/Mockingboard.cpp @@ -480,11 +480,11 @@ static void SY6522_Write(BYTE nDevice, BYTE nReg, BYTE nValue) pMB->sy6522.IER |= nValue; UpdateIFR(pMB, 0); - // Check if active timer changed from non-interrupt (polling IFR) to interrupt: - if ((pMB->sy6522.IER & IxR_TIMER1) && pMB->bTimer1Active) + // Check if a timer interrupt has been enabled (regardless of if there's an active timer or not): GH#567 + if (pMB->sy6522.IER & IxR_TIMER1) StartTimer1(pMB); - if ((pMB->sy6522.IER & IxR_TIMER2) && pMB->bTimer2Active) + if (pMB->sy6522.IER & IxR_TIMER2) StartTimer2(pMB); } break;