diff options
Diffstat (limited to 'src/devices/bus/amiga/zorro/zorro.cpp')
-rw-r--r-- | src/devices/bus/amiga/zorro/zorro.cpp | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/src/devices/bus/amiga/zorro/zorro.cpp b/src/devices/bus/amiga/zorro/zorro.cpp index fec5d745015..b4f06507d55 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,21 +65,27 @@ zorro_device::zorro_device(const machine_config &mconfig, device_type type, cons } //------------------------------------------------- -// device_start - device-specific startup +// device_resolve_objects - resolve objects that +// may be needed for other devices to set +// initial conditions at start time //------------------------------------------------- -void zorro_device::device_start() +void zorro_device::device_resolve_objects() { - // 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(); m_int6_handler.resolve_safe(); } +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void zorro_device::device_start() +{ +} + // from slot device WRITE_LINE_MEMBER( zorro_device::ovr_w ) { m_ovr_handler(state); } WRITE_LINE_MEMBER( zorro_device::int2_w ) { m_int2_handler(state); } @@ -115,16 +117,18 @@ exp_slot_device::exp_slot_device(const machine_config &mconfig, device_type type } //------------------------------------------------- -// device_start - device-specific startup +// device_resolve_objects - resolve objects that +// may be needed for other devices to set +// initial conditions at start time //------------------------------------------------- -void exp_slot_device::device_start() +void exp_slot_device::device_resolve_objects() { // resolve callbacks m_ipl_handler.resolve_safe(); - // call base device start - zorro_device::device_start(); + // call base device + zorro_device::device_resolve_objects(); } //------------------------------------------------- @@ -190,10 +194,12 @@ zorro2_device::~zorro2_device() } //------------------------------------------------- -// device_start - device-specific startup +// device_resolve_objects - resolve objects that +// may be needed for other devices to set +// initial conditions at start time //------------------------------------------------- -void zorro2_device::device_start() +void zorro2_device::device_resolve_objects() { // resolve callbacks m_eint1_handler.resolve_safe(); @@ -201,8 +207,8 @@ void zorro2_device::device_start() m_eint5_handler.resolve_safe(); m_eint7_handler.resolve_safe(); - // call base device start - zorro_device::device_start(); + // call base device + zorro_device::device_resolve_objects(); } //------------------------------------------------- |