m3002: expose irq callback

This commit is contained in:
Patrick Mackinlay 2020-09-28 14:48:52 +07:00
parent 691ae61446
commit e706c64e28
2 changed files with 4 additions and 2 deletions

View File

@ -351,13 +351,13 @@ void m3002_device::irq_update()
{ {
LOG("IRQ occurred\n"); LOG("IRQ occurred\n");
m_irq_active = true; m_irq_active = true;
m_irq_callback(ASSERT_LINE); m_irq_callback(0);
} }
else if (m_irq_active && (m_ram[0xf] & 0x0c) == 0) else if (m_irq_active && (m_ram[0xf] & 0x0c) == 0)
{ {
LOG("IRQ cleared\n"); LOG("IRQ cleared\n");
m_irq_active = false; m_irq_active = false;
m_irq_callback(CLEAR_LINE); m_irq_callback(1);
} }
} }

View File

@ -37,6 +37,8 @@ public:
// device type constructor // device type constructor
m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); 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 // 4-bit read/write handlers
u8 read(); u8 read();
void write(u8 data); void write(u8 data);