diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp index 4f93091f802..adf82562f04 100644 --- a/src/devices/cpu/z8/z8.cpp +++ b/src/devices/cpu/z8/z8.cpp @@ -29,6 +29,7 @@ #define LOG_TIMER (1U << 1) #define LOG_RECEIVE (1U << 2) #define LOG_TRANSMIT (1U << 3) +#define LOG_IRQ (1U << 4) #define VERBOSE 0 #include "logmacro.h" @@ -1331,7 +1332,10 @@ void z8_device::request_interrupt(int irq) assert(irq >= 0 && irq < 6); if (m_irq_initialized) + { m_irq |= 1 << irq; + LOGMASKED(LOG_IRQ, "%s: IRQ%d requested\n", machine().time().to_string(), irq); + } } void z8_device::take_interrupt(int irq) diff --git a/src/devices/cpu/z8/z8ops.hxx b/src/devices/cpu/z8/z8ops.hxx index 22934842657..e49b54ac8e5 100644 --- a/src/devices/cpu/z8/z8ops.hxx +++ b/src/devices/cpu/z8/z8ops.hxx @@ -777,7 +777,7 @@ INSTRUCTION( swap_IR1 ) { mode_IR1(swap) } INSTRUCTION( ccf ) { m_flags ^= Z8_FLAGS_C; } INSTRUCTION( di ) { m_imr &= ~Z8_IMR_ENABLE; } -INSTRUCTION( ei ) { m_imr |= Z8_IMR_ENABLE; m_irq_initialized = true; } +INSTRUCTION( ei ) { m_imr |= Z8_IMR_ENABLE; if (!m_irq_initialized) LOGMASKED(LOG_IRQ, "(%04X): IRQs first enabled\n", m_ppc); m_irq_initialized = true; } INSTRUCTION( nop ) { /* no operation */ } INSTRUCTION( rcf ) { set_flag_c(0); } INSTRUCTION( scf ) { set_flag_c(1); }