diff --git a/src/devices/bus/qbus/qbus.cpp b/src/devices/bus/qbus/qbus.cpp index 565bab97e92..01229c459bd 100644 --- a/src/devices/bus/qbus/qbus.cpp +++ b/src/devices/bus/qbus/qbus.cpp @@ -131,6 +131,14 @@ void qbus_device::device_reset() { } +void qbus_device::init_w() +{ + for (device_qbus_card_interface &entry : m_device_list) + { + entry.init_w(); + } +} + //------------------------------------------------- // add_card - add card diff --git a/src/devices/bus/qbus/qbus.h b/src/devices/bus/qbus/qbus.h index ae6248c6a40..7e647eb40da 100644 --- a/src/devices/bus/qbus/qbus.h +++ b/src/devices/bus/qbus/qbus.h @@ -33,11 +33,14 @@ class device_qbus_card_interface : public device_interface // Q-Bus interface virtual void biaki_w(int state) { } virtual void bdmgi_w(int state) { } + virtual void init_w() { device_reset(); } protected: // construction/destruction device_qbus_card_interface(const machine_config &mconfig, device_t &device); + virtual void device_reset() { } + virtual int z80daisy_irq_state() { return 0; } virtual int z80daisy_irq_ack() { return -1; } virtual void z80daisy_irq_reti() { } @@ -79,6 +82,8 @@ class qbus_device : public device_t, void add_card(device_qbus_card_interface &card); void install_device(offs_t start, offs_t end, read16sm_delegate rhandler, write16sm_delegate whandler, uint32_t mask=0xffffffff); + void init_w(); + void birq4_w(int state) { m_out_birq4_cb(state); } void birq5_w(int state) { m_out_birq5_cb(state); } void birq6_w(int state) { m_out_birq6_cb(state); } @@ -138,7 +143,6 @@ class qbus_slot_device : public device_t, public device_slot_interface protected: // device_t implementation virtual void device_start() override; - virtual void device_reset() override { if (m_card) get_card_device()->reset(); } devcb_write_line m_write_birq4; devcb_write_line m_write_birq5; diff --git a/src/devices/cpu/t11/t11.cpp b/src/devices/cpu/t11/t11.cpp index 487a7a57003..5e785e6d11a 100644 --- a/src/devices/cpu/t11/t11.cpp +++ b/src/devices/cpu/t11/t11.cpp @@ -42,12 +42,14 @@ DEFINE_DEVICE_TYPE(K1801VM2, k1801vm2_device, "k1801vm2", "K1801VM2") k1801vm1_device::k1801vm1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : t11_device(mconfig, K1801VM1, tag, owner, clock) + , z80_daisy_chain_interface(mconfig, *this) { c_insn_set = IS_LEIS | IS_MXPS | IS_VM1; } k1801vm2_device::k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : t11_device(mconfig, K1801VM2, tag, owner, clock) + , z80_daisy_chain_interface(mconfig, *this) { c_insn_set = IS_LEIS | IS_EIS | IS_MXPS | IS_VM2; } @@ -258,6 +260,7 @@ void k1801vm1_device::t11_check_irqs() // 8. external HALT (nIRQ1 pin); PSW11, PSW10 else if (m_hlt_active) { + m_hlt_active = 0; m_mcir = MCIR_HALT; m_vsel = VM1_HALT; } @@ -277,7 +280,8 @@ void k1801vm1_device::t11_check_irqs() // 12. nVIRQ pin; PSW7, PSW10 else if (m_vec_active && !GET_I) { - int vec = m_in_iack_func(0); + device_z80daisy_interface *intf = daisy_get_irq_device(); + int vec = (intf != nullptr) ? intf->z80daisy_irq_ack() : m_in_iack_func(0); if (vec == -1 || vec == 0) { m_vec_active = 0; diff --git a/src/devices/cpu/t11/t11.h b/src/devices/cpu/t11/t11.h index cb4c2d477c8..2cfc843d01a 100644 --- a/src/devices/cpu/t11/t11.h +++ b/src/devices/cpu/t11/t11.h @@ -7,6 +7,8 @@ #pragma once +#include "machine/z80daisy.h" + enum { @@ -1194,7 +1196,7 @@ class t11_device : public cpu_device void sub_ixd_ixd(uint16_t op); }; -class k1801vm1_device : public t11_device +class k1801vm1_device : public t11_device, public z80_daisy_chain_interface { public: // construction/destruction @@ -1212,7 +1214,7 @@ class k1801vm1_device : public t11_device }; -class k1801vm2_device : public t11_device +class k1801vm2_device : public t11_device, public z80_daisy_chain_interface { public: // construction/destruction