diff options
Diffstat (limited to 'src/devices/bus/intv_ctrl/ecs_ctrl.cpp')
-rw-r--r-- | src/devices/bus/intv_ctrl/ecs_ctrl.cpp | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/src/devices/bus/intv_ctrl/ecs_ctrl.cpp b/src/devices/bus/intv_ctrl/ecs_ctrl.cpp index 3f6afda5f4b..ef873489015 100644 --- a/src/devices/bus/intv_ctrl/ecs_ctrl.cpp +++ b/src/devices/bus/intv_ctrl/ecs_ctrl.cpp @@ -41,8 +41,8 @@ DEFINE_DEVICE_TYPE(INTVECS_CONTROL_PORT, intvecs_control_port_device, "intvecs_c // device_intvecs_control_port_interface - constructor //------------------------------------------------- -device_intvecs_control_port_interface::device_intvecs_control_port_interface(const machine_config &mconfig, device_t &device) - : device_slot_card_interface(mconfig,device) +device_intvecs_control_port_interface::device_intvecs_control_port_interface(const machine_config &mconfig, device_t &device) : + device_interface(device, "intvecsctrl") { m_port = dynamic_cast<intvecs_control_port_device *>(device.owner()); } @@ -67,7 +67,8 @@ device_intvecs_control_port_interface::~device_intvecs_control_port_interface() intvecs_control_port_device::intvecs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, INTVECS_CONTROL_PORT, tag, owner, clock), - device_slot_interface(mconfig, *this), m_device(nullptr) + device_single_card_slot_interface<device_intvecs_control_port_interface>(mconfig, *this), + m_device(nullptr) { } @@ -87,30 +88,7 @@ intvecs_control_port_device::~intvecs_control_port_device() void intvecs_control_port_device::device_start() { - m_device = dynamic_cast<device_intvecs_control_port_interface *>(get_card_device()); -} - - -uint8_t intvecs_control_port_device::read_portA() -{ - uint8_t data = 0; - if (m_device) - data |= m_device->read_portA(); - return data; -} - -uint8_t intvecs_control_port_device::read_portB() -{ - uint8_t data = 0; - if (m_device) - data |= m_device->read_portB(); - return data; -} - -void intvecs_control_port_device::write_portA(uint8_t data) -{ - if (m_device) - m_device->write_portA(data); + m_device = get_card_device(); } @@ -170,12 +148,12 @@ void intvecs_ctrls_device::device_reset() uint8_t intvecs_ctrls_device::read_portA() { - return m_hand1->read_ctrl(); + return m_hand1->ctrl_r(); } uint8_t intvecs_ctrls_device::read_portB() { - return m_hand2->read_ctrl(); + return m_hand2->ctrl_r(); } //------------------------------------------------- |