summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/vcs_ctrl/ctrl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/vcs_ctrl/ctrl.h')
-rw-r--r--src/devices/bus/vcs_ctrl/ctrl.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/devices/bus/vcs_ctrl/ctrl.h b/src/devices/bus/vcs_ctrl/ctrl.h
index 4e098548329..2018d70ba34 100644
--- a/src/devices/bus/vcs_ctrl/ctrl.h
+++ b/src/devices/bus/vcs_ctrl/ctrl.h
@@ -85,14 +85,14 @@ public:
// pin 8 - GND
// bit 6 - pin 9 -
//
- uint8_t joy_r() { uint8_t data = 0xff; if (exists()) data = m_device->vcs_joy_r(); return data; }
- DECLARE_READ8_MEMBER( joy_r ) { return joy_r(); }
- uint8_t pot_x_r() { uint8_t data = 0xff; if (exists()) data = m_device->vcs_pot_x_r(); return data; }
- DECLARE_READ8_MEMBER( pot_x_r ) { return pot_x_r(); }
- uint8_t pot_y_r() { uint8_t data = 0xff; if (exists()) data = m_device->vcs_pot_y_r(); return data; }
- DECLARE_READ8_MEMBER( pot_y_r ) { return pot_y_r(); }
-
- void joy_w( uint8_t data ) { if ( exists() ) m_device->vcs_joy_w( data ); }
+ uint8_t read_joy() { return exists() ? m_device->vcs_joy_r() : 0xff; }
+ DECLARE_READ8_MEMBER( joy_r ) { return read_joy(); }
+ uint8_t read_pot_x() { return exists() ? m_device->vcs_pot_x_r() : 0xff; }
+ DECLARE_READ8_MEMBER( pot_x_r ) { return read_pot_x(); }
+ uint8_t read_pot_y() { return exists() ? m_device->vcs_pot_y_r() : 0xff; }
+ DECLARE_READ8_MEMBER( pot_y_r ) { return read_pot_y(); }
+
+ void joy_w(uint8_t data) { if (exists()) m_device->vcs_joy_w(data); }
bool exists() { return m_device != nullptr; }
bool has_pot_x() { return exists() && m_device->has_pot_x(); }