diff options
Diffstat (limited to 'src/devices/bus/sat_ctrl/segatap.cpp')
-rw-r--r-- | src/devices/bus/sat_ctrl/segatap.cpp | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/src/devices/bus/sat_ctrl/segatap.cpp b/src/devices/bus/sat_ctrl/segatap.cpp index e36400125fe..baaa52071ed 100644 --- a/src/devices/bus/sat_ctrl/segatap.cpp +++ b/src/devices/bus/sat_ctrl/segatap.cpp @@ -10,7 +10,6 @@ #include "segatap.h" - //************************************************************************** // DEVICE DEFINITIONS //************************************************************************** @@ -22,10 +21,6 @@ DEFINE_DEVICE_TYPE(SATURN_SEGATAP, saturn_segatap_device, "saturn_segatap", "sat // LIVE DEVICE //************************************************************************** -//------------------------------------------------- -// saturn_segatap_device - constructor -//------------------------------------------------- - saturn_segatap_device::saturn_segatap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SATURN_SEGATAP, tag, owner, clock) , device_saturn_control_port_interface(mconfig, *this) @@ -34,47 +29,23 @@ saturn_segatap_device::saturn_segatap_device(const machine_config &mconfig, cons } -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - void saturn_segatap_device::device_start() { - for (int i = 0; i < 4; i++) - m_subctrl_port[i]->device_start(); } -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void saturn_segatap_device::device_reset() +void saturn_segatap_device::device_add_mconfig(machine_config &config) { + for (auto &port : m_subctrl_port) + SATURN_CONTROL_PORT(config, port, saturn_joys, "joypad"); } -//------------------------------------------------- -// read_ctrl -//------------------------------------------------- uint8_t saturn_segatap_device::read_ctrl(uint8_t offset) { return m_subctrl_port[offset < 8 ? (offset >> 1) : 0]->read_ctrl(offset & 1); } -//------------------------------------------------- -// read_id -//------------------------------------------------- - uint8_t saturn_segatap_device::read_id(int idx) { return m_subctrl_port[idx < 4 ? idx : 0]->read_id(0); } - - -void saturn_segatap_device::device_add_mconfig(machine_config &config) -{ - SATURN_CONTROL_PORT(config, m_subctrl_port[0], saturn_joys, "joypad"); - SATURN_CONTROL_PORT(config, m_subctrl_port[1], saturn_joys, "joypad"); - SATURN_CONTROL_PORT(config, m_subctrl_port[2], saturn_joys, "joypad"); - SATURN_CONTROL_PORT(config, m_subctrl_port[3], saturn_joys, "joypad"); -} |