From e706c64e28e152d2c5f09643d99ed8de1b483b3e Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Mon, 28 Sep 2020 14:48:52 +0700 Subject: m3002: expose irq callback --- src/devices/machine/m3002.cpp | 4 ++-- src/devices/machine/m3002.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/devices/machine/m3002.cpp b/src/devices/machine/m3002.cpp index 8bb9edda2b9..fd93666a55f 100644 --- a/src/devices/machine/m3002.cpp +++ b/src/devices/machine/m3002.cpp @@ -351,13 +351,13 @@ void m3002_device::irq_update() { LOG("IRQ occurred\n"); m_irq_active = true; - m_irq_callback(ASSERT_LINE); + m_irq_callback(0); } else if (m_irq_active && (m_ram[0xf] & 0x0c) == 0) { LOG("IRQ cleared\n"); m_irq_active = false; - m_irq_callback(CLEAR_LINE); + m_irq_callback(1); } } diff --git a/src/devices/machine/m3002.h b/src/devices/machine/m3002.h index d39f904fe60..ef13c360e47 100644 --- a/src/devices/machine/m3002.h +++ b/src/devices/machine/m3002.h @@ -37,6 +37,8 @@ public: // device type constructor m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + auto irq_out() { return m_irq_callback.bind(); } + // 4-bit read/write handlers u8 read(); void write(u8 data); -- cgit v1.2.3