diff options
Diffstat (limited to 'src/devices/bus/spectrum/uslot.cpp')
-rw-r--r-- | src/devices/bus/spectrum/uslot.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/devices/bus/spectrum/uslot.cpp b/src/devices/bus/spectrum/uslot.cpp index 178f8ab0941..d2d75d6a72c 100644 --- a/src/devices/bus/spectrum/uslot.cpp +++ b/src/devices/bus/spectrum/uslot.cpp @@ -20,16 +20,17 @@ DEFINE_DEVICE_TYPE(SPECTRUM_USLOT, spectrum_uslot_device, "spectrum_uslot", "Spe // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(spectrum_uslot_device::device_add_mconfig) +void spectrum_uslot_device::device_add_mconfig(machine_config &config) +{ /* passthru */ - MCFG_SPECTRUM_EXPANSION_SLOT_ADD("exp1", spectrum_expansion_devices, nullptr) - MCFG_SPECTRUM_EXPANSION_SLOT_IRQ_HANDLER(WRITELINE(DEVICE_SELF_OWNER, spectrum_expansion_slot_device, irq_w)) - MCFG_SPECTRUM_EXPANSION_SLOT_NMI_HANDLER(WRITELINE(DEVICE_SELF_OWNER, spectrum_expansion_slot_device, nmi_w)) + SPECTRUM_EXPANSION_SLOT(config, m_exp1, spectrum_expansion_devices, nullptr); + m_exp1->irq_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::irq_w)); + m_exp1->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::nmi_w)); - MCFG_SPECTRUM_EXPANSION_SLOT_ADD("exp2", spectrum_expansion_devices, nullptr) - MCFG_SPECTRUM_EXPANSION_SLOT_IRQ_HANDLER(WRITELINE(DEVICE_SELF_OWNER, spectrum_expansion_slot_device, irq_w)) - MCFG_SPECTRUM_EXPANSION_SLOT_NMI_HANDLER(WRITELINE(DEVICE_SELF_OWNER, spectrum_expansion_slot_device, nmi_w)) -MACHINE_CONFIG_END + SPECTRUM_EXPANSION_SLOT(config, m_exp2, spectrum_expansion_devices, nullptr); + m_exp2->irq_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::irq_w)); + m_exp2->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::nmi_w)); +} //************************************************************************** // LIVE DEVICE @@ -54,7 +55,6 @@ spectrum_uslot_device::spectrum_uslot_device(const machine_config &mconfig, cons void spectrum_uslot_device::device_start() { - m_slot = dynamic_cast<spectrum_expansion_slot_device *>(owner()); } @@ -64,6 +64,8 @@ void spectrum_uslot_device::device_start() void spectrum_uslot_device::device_reset() { + m_exp1->set_io_space(&io_space()); + m_exp2->set_io_space(&io_space()); } |