summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/neogeo_ctrl/ctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/neogeo_ctrl/ctrl.cpp')
-rw-r--r--src/devices/bus/neogeo_ctrl/ctrl.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/devices/bus/neogeo_ctrl/ctrl.cpp b/src/devices/bus/neogeo_ctrl/ctrl.cpp
index 4fb9914adb8..1f36549fe17 100644
--- a/src/devices/bus/neogeo_ctrl/ctrl.cpp
+++ b/src/devices/bus/neogeo_ctrl/ctrl.cpp
@@ -115,18 +115,12 @@ void neogeo_control_port_device::device_start()
uint8_t neogeo_control_port_device::read_ctrl()
{
- uint8_t data = 0xff;
- if (m_device)
- data &= m_device->read_ctrl();
- return data;
+ return m_device ? m_device->read_ctrl() : 0xff;
}
uint8_t neogeo_control_port_device::read_start_sel()
{
- uint8_t data = 0xff;
- if (m_device)
- data &= m_device->read_start_sel();
- return data;
+ return m_device ? m_device->read_start_sel() : 0xff;
}
@@ -170,26 +164,17 @@ void neogeo_ctrl_edge_port_device::device_start()
READ8_MEMBER(neogeo_ctrl_edge_port_device::in0_r)
{
- uint8_t data = 0xff;
- if (m_device)
- data &= m_device->in0_r(space, offset, mem_mask);
- return data;
+ return m_device ? m_device->in0_r(space, offset, mem_mask) : 0xff;
}
READ8_MEMBER(neogeo_ctrl_edge_port_device::in1_r)
{
- uint8_t data = 0xff;
- if (m_device)
- data &= m_device->in1_r(space, offset, mem_mask);
- return data;
+ return m_device ? m_device->in1_r(space, offset, mem_mask) : 0xff;
}
uint8_t neogeo_ctrl_edge_port_device::read_start_sel()
{
- uint8_t data = 0xff;
- if (m_device)
- data &= m_device->read_start_sel();
- return data;
+ return m_device ? m_device->read_start_sel() : 0xff;
}
void neogeo_ctrl_edge_port_device::write_ctrlsel(uint8_t data)