diff options
Diffstat (limited to 'src/devices/bus/spectrum/exp.cpp')
-rw-r--r-- | src/devices/bus/spectrum/exp.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/devices/bus/spectrum/exp.cpp b/src/devices/bus/spectrum/exp.cpp index 73e1d4a3a9a..2c8f86f6a9d 100644 --- a/src/devices/bus/spectrum/exp.cpp +++ b/src/devices/bus/spectrum/exp.cpp @@ -43,7 +43,7 @@ device_spectrum_expansion_interface::device_spectrum_expansion_interface(const m spectrum_expansion_slot_device::spectrum_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SPECTRUM_EXPANSION_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), - m_io(nullptr), + m_io(*this, finder_base::DUMMY_TAG, -1), m_card(nullptr), m_irq_handler(*this), m_nmi_handler(*this) @@ -52,6 +52,23 @@ spectrum_expansion_slot_device::spectrum_expansion_slot_device(const machine_con //------------------------------------------------- +// device_config_complete - perform any +// operations now that the configuration is +// complete +//------------------------------------------------- + +void spectrum_expansion_slot_device::device_config_complete() +{ + // for passthrough connectors, use the parent slot's I/O space + if (m_io.finder_tag() == finder_base::DUMMY_TAG && dynamic_cast<device_spectrum_expansion_interface *>(owner()) != nullptr) + { + auto parent = dynamic_cast<spectrum_expansion_slot_device *>(owner()->owner()); + if (parent != nullptr) + m_io.set_tag(parent->m_io, parent->m_io.spacenum()); + } +} + +//------------------------------------------------- // device_validity_check - device-specific checks //------------------------------------------------- @@ -87,15 +104,6 @@ void spectrum_expansion_slot_device::device_reset() } //------------------------------------------------- -// set_io_space - set address space we are attached to -//------------------------------------------------- - -void spectrum_expansion_slot_device::set_io_space(address_space *io) -{ - m_io = io; -} - -//------------------------------------------------- // port_fe_r //------------------------------------------------- |