diff options
author | 2019-03-25 23:13:40 +0100 | |
---|---|---|
committer | 2019-03-25 23:13:40 +0100 | |
commit | b380514764cf857469bae61c11143a19f79a74c5 (patch) | |
tree | 63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/bus/vtech | |
parent | c24473ddff715ecec2e258a6eb38960cf8c8e98e (diff) |
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing
changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/bus/vtech')
-rw-r--r-- | src/devices/bus/vtech/ioexp/ioexp.cpp | 11 | ||||
-rw-r--r-- | src/devices/bus/vtech/ioexp/ioexp.h | 4 | ||||
-rw-r--r-- | src/devices/bus/vtech/ioexp/printer.cpp | 13 | ||||
-rw-r--r-- | src/devices/bus/vtech/memexp/floppy.cpp | 3 | ||||
-rw-r--r-- | src/devices/bus/vtech/memexp/memexp.cpp | 44 | ||||
-rw-r--r-- | src/devices/bus/vtech/memexp/memexp.h | 9 |
6 files changed, 44 insertions, 40 deletions
diff --git a/src/devices/bus/vtech/ioexp/ioexp.cpp b/src/devices/bus/vtech/ioexp/ioexp.cpp index 897b0dba95b..c2916a0ba14 100644 --- a/src/devices/bus/vtech/ioexp/ioexp.cpp +++ b/src/devices/bus/vtech/ioexp/ioexp.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(VTECH_IOEXP_SLOT, vtech_ioexp_slot_device, "vtech_ioexp_slot" vtech_ioexp_slot_device::vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, VTECH_IOEXP_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), - m_io(*this, finder_base::DUMMY_TAG, -1), + m_io(nullptr), m_cart(nullptr) { } @@ -59,6 +59,15 @@ void vtech_ioexp_slot_device::device_reset() { } +//------------------------------------------------- +// set_io_space - set address space we are attached to +//------------------------------------------------- + +void vtech_ioexp_slot_device::set_io_space(address_space *io) +{ + m_io = io; +} + //************************************************************************** // CARTRIDGE INTERFACE diff --git a/src/devices/bus/vtech/ioexp/ioexp.h b/src/devices/bus/vtech/ioexp/ioexp.h index 9a78f861478..0c2a3d2d431 100644 --- a/src/devices/bus/vtech/ioexp/ioexp.h +++ b/src/devices/bus/vtech/ioexp/ioexp.h @@ -54,14 +54,14 @@ public: vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~vtech_ioexp_slot_device(); - template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); } + void set_io_space(address_space *io); protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - required_address_space m_io; + address_space *m_io; device_vtech_ioexp_interface *m_cart; }; diff --git a/src/devices/bus/vtech/ioexp/printer.cpp b/src/devices/bus/vtech/ioexp/printer.cpp index b927f41d3c4..66967668703 100644 --- a/src/devices/bus/vtech/ioexp/printer.cpp +++ b/src/devices/bus/vtech/ioexp/printer.cpp @@ -23,14 +23,11 @@ DEFINE_DEVICE_TYPE(VTECH_PRINTER_INTERFACE, vtech_printer_interface_device, "vte // device_add_mconfig - add device configuration //------------------------------------------------- -void vtech_printer_interface_device::device_add_mconfig(machine_config &config) -{ - CENTRONICS(config, m_centronics, centronics_devices, "printer"); - m_centronics->busy_handler().set(FUNC(vtech_printer_interface_device::busy_w)); - - OUTPUT_LATCH(config, m_latch); - m_centronics->set_output_latch(*m_latch); -} +MACHINE_CONFIG_START(vtech_printer_interface_device::device_add_mconfig) + MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer") + MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, vtech_printer_interface_device, busy_w)) + MCFG_CENTRONICS_OUTPUT_LATCH_ADD("latch", "centronics") +MACHINE_CONFIG_END //************************************************************************** diff --git a/src/devices/bus/vtech/memexp/floppy.cpp b/src/devices/bus/vtech/memexp/floppy.cpp index 5807588ec27..bf7a3175594 100644 --- a/src/devices/bus/vtech/memexp/floppy.cpp +++ b/src/devices/bus/vtech/memexp/floppy.cpp @@ -107,6 +107,9 @@ void vtech_floppy_controller_device::device_start() void vtech_floppy_controller_device::device_reset() { + m_memexp->set_io_space(&io_space()); + m_memexp->set_program_space(&program_space()); + program_space().install_rom(0x4000, 0x5fff, memregion("software")->base()); io_space().install_device(0x10, 0x1f, *this, &vtech_floppy_controller_device::map); diff --git a/src/devices/bus/vtech/memexp/memexp.cpp b/src/devices/bus/vtech/memexp/memexp.cpp index 90f51da7345..e7f61e5d048 100644 --- a/src/devices/bus/vtech/memexp/memexp.cpp +++ b/src/devices/bus/vtech/memexp/memexp.cpp @@ -30,8 +30,8 @@ DEFINE_DEVICE_TYPE(VTECH_MEMEXP_SLOT, vtech_memexp_slot_device, "vtech_memexp_sl vtech_memexp_slot_device::vtech_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, VTECH_MEMEXP_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), - m_program(*this, finder_base::DUMMY_TAG, -1), - m_io(*this, finder_base::DUMMY_TAG, -1), + m_program(nullptr), + m_io(nullptr), m_cart(nullptr), m_int_handler(*this), m_nmi_handler(*this), @@ -48,28 +48,6 @@ vtech_memexp_slot_device::~vtech_memexp_slot_device() } //------------------------------------------------- -// device_config_complete - perform any -// operations now that the configuration is -// complete -//------------------------------------------------- - -void vtech_memexp_slot_device::device_config_complete() -{ - // for passthrough connectors, use the parent slot's spaces - if (dynamic_cast<device_vtech_memexp_interface *>(owner()) != nullptr) - { - auto parent = dynamic_cast<vtech_memexp_slot_device *>(owner()->owner()); - if (parent != nullptr) - { - if (m_program.finder_tag() == finder_base::DUMMY_TAG) - m_program.set_tag(parent->m_program, parent->m_program.spacenum()); - if (m_io.finder_tag() == finder_base::DUMMY_TAG) - m_io.set_tag(parent->m_io, parent->m_io.spacenum()); - } - } -} - -//------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- @@ -89,6 +67,24 @@ void vtech_memexp_slot_device::device_reset() { } +//------------------------------------------------- +// set_program_space - set address space we are attached to +//------------------------------------------------- + +void vtech_memexp_slot_device::set_program_space(address_space *program) +{ + m_program = program; +} + +//------------------------------------------------- +// set_io_space - set address space we are attached to +//------------------------------------------------- + +void vtech_memexp_slot_device::set_io_space(address_space *io) +{ + m_io = io; +} + //************************************************************************** // CARTRIDGE INTERFACE diff --git a/src/devices/bus/vtech/memexp/memexp.h b/src/devices/bus/vtech/memexp/memexp.h index ca096075e90..097036bfd92 100644 --- a/src/devices/bus/vtech/memexp/memexp.h +++ b/src/devices/bus/vtech/memexp/memexp.h @@ -61,8 +61,8 @@ public: vtech_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~vtech_memexp_slot_device(); - template <typename T> void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward<T>(tag), spacenum); } - template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); } + void set_program_space(address_space *program); + void set_io_space(address_space *io); // callbacks auto int_handler() { return m_int_handler.bind(); } @@ -76,12 +76,11 @@ public: protected: // device-level overrides - virtual void device_config_complete() override; virtual void device_start() override; virtual void device_reset() override; - required_address_space m_program; - required_address_space m_io; + address_space *m_program; + address_space *m_io; device_vtech_memexp_interface *m_cart; |