Skip to content

Commit d1fefb1

Browse files
committed
ns32202: check interrupt status after in-service write
1 parent 105c61a commit d1fefb1

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/devices/machine/ns32202.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -712,14 +712,24 @@ void ns32202_device::ipndh_w(u8 data)
712712

713713
void ns32202_device::isrvl_w(u8 data)
714714
{
715-
LOGMASKED(LOG_REGW, "isrvl_w 0x%02x (%s)\n", data, machine().describe_context());
716-
m_isrv = (m_isrv & 0xff00) | data;
715+
if (u8(m_isrv >> 0) ^ data)
716+
{
717+
LOGMASKED(LOG_REGW, "isrvl_w 0x%02x (%s)\n", data, machine().describe_context());
718+
m_isrv = (m_isrv & 0xff00) | data;
719+
720+
m_interrupt->adjust(attotime::zero);
721+
}
717722
}
718723

719724
void ns32202_device::isrvh_w(u8 data)
720725
{
721-
LOGMASKED(LOG_REGW, "isrvh_w 0x%02x (%s)\n", data, machine().describe_context());
722-
m_isrv = (u16(data) << 8) | u8(m_isrv);
726+
if (u8(m_isrv >> 8) ^ data)
727+
{
728+
LOGMASKED(LOG_REGW, "isrvh_w 0x%02x (%s)\n", data, machine().describe_context());
729+
m_isrv = (u16(data) << 8) | u8(m_isrv);
730+
731+
m_interrupt->adjust(attotime::zero);
732+
}
723733
}
724734

725735
void ns32202_device::imskl_w(u8 data)

0 commit comments

Comments
 (0)