summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/vcs_keypad.c
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2013-01-26 18:53:13 +0000
committer Curt Coder <curtcoder@mail.com>2013-01-26 18:53:13 +0000
commit31ddd3a1aa4702cf83b387b597412d3261d4e4b9 (patch)
tree2bfdb858d80fe4d73107319266b4c3fe231e555c /src/mess/machine/vcs_keypad.c
parent380368e16fe8c94e2c0950e6e73df2e2e1964d40 (diff)
(MESS) c64/c128: Implemented parallel joystick pot X/Y read. [Curt Coder]
(MESS) vcsctrl: Removed runtime tag lookups. (nw)
Diffstat (limited to 'src/mess/machine/vcs_keypad.c')
-rw-r--r--src/mess/machine/vcs_keypad.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mess/machine/vcs_keypad.c b/src/mess/machine/vcs_keypad.c
index 69038faf26b..55685ae0c8b 100644
--- a/src/mess/machine/vcs_keypad.c
+++ b/src/mess/machine/vcs_keypad.c
@@ -56,7 +56,8 @@ ioport_constructor vcs_keypad_device::device_input_ports() const
vcs_keypad_device::vcs_keypad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, VCS_KEYPAD, "Keypad", tag, owner, clock),
- device_vcs_control_port_interface(mconfig, *this)
+ device_vcs_control_port_interface(mconfig, *this),
+ m_keypad(*this, "KEYPAD")
{
}
@@ -82,7 +83,7 @@ UINT8 vcs_keypad_device::vcs_joy_r()
{
if ( ! ( ( m_column >> i ) & 0x01 ) )
{
- if ( ( ioport("KEYPAD")->read() >> 3*i ) & 0x04 )
+ if ( ( m_keypad->read() >> 3*i ) & 0x04 )
{
return 0xff;
}
@@ -106,7 +107,7 @@ UINT8 vcs_keypad_device::vcs_pot_x_r()
{
if ( ! ( ( m_column >> i ) & 0x01 ) )
{
- if ( ( ioport("KEYPAD")->read() >> 3*i ) & 0x01 )
+ if ( ( m_keypad->read() >> 3*i ) & 0x01 )
{
return 0;
}
@@ -125,7 +126,7 @@ UINT8 vcs_keypad_device::vcs_pot_y_r()
{
if ( ! ( ( m_column >> i ) & 0x01 ) )
{
- if ( ( ioport("KEYPAD")->read() >> 3*i ) & 0x02 )
+ if ( ( m_keypad->read() >> 3*i ) & 0x02 )
{
return 0;
}