From 40a83e5b7f73ddc9531eeeff15ef8994b6813556 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Tue, 1 Mar 2022 18:11:52 +0200 Subject: [PATCH] z80dma: Fixed Interrupt Enable Output. [Curt Coder] --- src/devices/machine/z80dma.cpp | 7 ++++++- src/devices/machine/z80dma.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/devices/machine/z80dma.cpp b/src/devices/machine/z80dma.cpp index 1a347cc2f24..68396ed7177 100644 --- a/src/devices/machine/z80dma.cpp +++ b/src/devices/machine/z80dma.cpp @@ -334,7 +334,12 @@ int z80dma_device::is_ready() void z80dma_device::interrupt_check() { m_out_int_cb(m_ip ? ASSERT_LINE : CLEAR_LINE); - m_out_ieo_cb(m_iei && !m_ip); + + int ieo = m_iei; + if (m_ip) { + ieo = 0; + } + m_out_ieo_cb(ieo); } diff --git a/src/devices/machine/z80dma.h b/src/devices/machine/z80dma.h index 14725329bd0..74edbfa8d70 100644 --- a/src/devices/machine/z80dma.h +++ b/src/devices/machine/z80dma.h @@ -128,7 +128,7 @@ private: uint8_t m_latch; // interrupts - bool m_iei; + int m_iei; // interrupt enable input int m_ip; // interrupt pending int m_ius; // interrupt under service uint8_t m_vector; // interrupt vector