From d1fefb196a442e9937261c8750bb4a0b898016d5 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Mon, 11 Mar 2024 13:13:59 +0700 Subject: [PATCH] ns32202: check interrupt status after in-service write --- src/devices/machine/ns32202.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/devices/machine/ns32202.cpp b/src/devices/machine/ns32202.cpp index 8ce52d0f138..70d6bf080ea 100644 --- a/src/devices/machine/ns32202.cpp +++ b/src/devices/machine/ns32202.cpp @@ -712,14 +712,24 @@ void ns32202_device::ipndh_w(u8 data) void ns32202_device::isrvl_w(u8 data) { - LOGMASKED(LOG_REGW, "isrvl_w 0x%02x (%s)\n", data, machine().describe_context()); - m_isrv = (m_isrv & 0xff00) | data; + if (u8(m_isrv >> 0) ^ data) + { + LOGMASKED(LOG_REGW, "isrvl_w 0x%02x (%s)\n", data, machine().describe_context()); + m_isrv = (m_isrv & 0xff00) | data; + + m_interrupt->adjust(attotime::zero); + } } void ns32202_device::isrvh_w(u8 data) { - LOGMASKED(LOG_REGW, "isrvh_w 0x%02x (%s)\n", data, machine().describe_context()); - m_isrv = (u16(data) << 8) | u8(m_isrv); + if (u8(m_isrv >> 8) ^ data) + { + LOGMASKED(LOG_REGW, "isrvh_w 0x%02x (%s)\n", data, machine().describe_context()); + m_isrv = (u16(data) << 8) | u8(m_isrv); + + m_interrupt->adjust(attotime::zero); + } } void ns32202_device::imskl_w(u8 data)