From de4e1cf073e13fff85ac2030280b7918e55351f2 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Thu, 11 Jan 2024 11:25:25 +0700 Subject: i8291a: implement interrupt polarity inversion --- src/devices/machine/i8291a.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/devices/machine/i8291a.cpp b/src/devices/machine/i8291a.cpp index 4316ce3c871..c2b396fe43b 100644 --- a/src/devices/machine/i8291a.cpp +++ b/src/devices/machine/i8291a.cpp @@ -242,7 +242,7 @@ void i8291a_device::update_int() if (m_intr_out != intr) { LOGMASKED(LOG_INT, "%s: intr %s\n", __FUNCTION__, intr ? "true" : "false"); - m_int_write_func(intr); + m_int_write_func(intr != bool(m_auxb & REG_AUXB_INT_ACTIVE_LOW)); m_intr_out = intr; } } @@ -433,6 +433,9 @@ void i8291a_device::aux_mode_w(uint8_t data) break; case 5: LOGMASKED(LOG_REG, "AUXB = %02X\n", data & 0x1f); + // force interrupt line update if polarity is changed + if ((data ^ m_auxb) & REG_AUXB_INT_ACTIVE_LOW) + m_intr_out = !m_intr_out; m_auxb = data; break; case 3: -- cgit v1.2.3