diff options
Diffstat (limited to 'src/devices/cpu/z80/z80daisy.cpp')
-rw-r--r-- | src/devices/cpu/z80/z80daisy.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/devices/cpu/z80/z80daisy.cpp b/src/devices/cpu/z80/z80daisy.cpp index 82e41c42e1a..23169dd3600 100644 --- a/src/devices/cpu/z80/z80daisy.cpp +++ b/src/devices/cpu/z80/z80daisy.cpp @@ -11,6 +11,8 @@ #include "emu.h" #include "z80daisy.h" +#define VERBOSE 0 + //************************************************************************** // DEVICE Z80 DAISY INTERFACE @@ -164,25 +166,24 @@ int z80_daisy_chain_interface::daisy_update_irq_state() //------------------------------------------------- -// call_ack_device - acknowledge an interrupt -// from a chained device and return the vector +// daisy_get_irq_device - return the device +// in the chain that requested the interrupt //------------------------------------------------- -int z80_daisy_chain_interface::daisy_call_ack_device() +device_z80daisy_interface *z80_daisy_chain_interface::daisy_get_irq_device() { - int vector = 0; - // loop over all devices; dev[0] is the highest priority for (device_z80daisy_interface *intf = m_chain; intf != nullptr; intf = intf->m_daisy_next) { // if this device is asserting the INT line, that's the one we want int state = intf->z80daisy_irq_state(); - vector = intf->z80daisy_irq_ack(); if (state & Z80_DAISY_INT) - return vector; + return intf; } - //logerror("z80daisy_call_ack_device: failed to find an device to ack!\n"); - return vector; + + if (VERBOSE && daisy_chain_present()) + device().logerror("Interrupt from outside Z80 daisy chain\n"); + return nullptr; } @@ -204,7 +205,6 @@ void z80_daisy_chain_interface::daisy_call_reti_device() return; } } - //logerror("z80daisy_call_reti_device: failed to find an device to reti!\n"); } |