diff options
Diffstat (limited to 'src/devices/bus/amiga/zorro/zorro.cpp')
-rw-r--r-- | src/devices/bus/amiga/zorro/zorro.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/devices/bus/amiga/zorro/zorro.cpp b/src/devices/bus/amiga/zorro/zorro.cpp index fec5d745015..af0bff3b45b 100644 --- a/src/devices/bus/amiga/zorro/zorro.cpp +++ b/src/devices/bus/amiga/zorro/zorro.cpp @@ -30,7 +30,7 @@ zorro_slot_device::zorro_slot_device(const machine_config &mconfig, const char * zorro_slot_device::zorro_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock), device_slot_interface(mconfig, *this), - m_zorro_tag(nullptr) + m_zorro_bus(*this, finder_base::DUMMY_TAG) { } @@ -43,10 +43,7 @@ void zorro_slot_device::device_start() device_zorro_card_interface *dev = dynamic_cast<device_zorro_card_interface *>(get_card_device()); if (dev) - { - zorro_device *m_zorro_bus = downcast<zorro_device *>(m_owner->subdevice(m_zorro_tag)); m_zorro_bus->add_card(dev); - } } @@ -60,8 +57,7 @@ void zorro_slot_device::device_start() zorro_device::zorro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock), - m_space(nullptr), - m_cputag(nullptr), + m_space(*this, finder_base::DUMMY_TAG, -1), m_ovr_handler(*this), m_int2_handler(*this), m_int6_handler(*this) @@ -69,15 +65,25 @@ zorro_device::zorro_device(const machine_config &mconfig, device_type type, cons } //------------------------------------------------- +// device_resolve_objects - resolve objects that +// may be needed for other devices to set +// initial conditions at start time +//------------------------------------------------- + +void zorro_device::device_resolve_objects() +{ + // resolve callbacks + m_ovr_handler.resolve_safe(); + m_int2_handler.resolve_safe(); + m_int6_handler.resolve_safe(); +} + +//------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- void zorro_device::device_start() { - // get address space - device_t *cpu = machine().device(m_cputag); - m_space = &cpu->memory().space(AS_PROGRAM); - // resolve callbacks m_ovr_handler.resolve_safe(); m_int2_handler.resolve_safe(); |