diff options
Diffstat (limited to 'src/mess/drivers/c128.c')
-rw-r--r-- | src/mess/drivers/c128.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/mess/drivers/c128.c b/src/mess/drivers/c128.c index e1c9b6f9e7e..9c2bf5181eb 100644 --- a/src/mess/drivers/c128.c +++ b/src/mess/drivers/c128.c @@ -927,7 +927,20 @@ READ8_MEMBER( c128_state::sid_potx_r ) { case 1: data = m_joy1->pot_x_r(); break; case 2: data = m_joy2->pot_x_r(); break; - case 3: break; // TODO pot1 and pot2 in series + case 3: + if (m_joy1->has_pot_x() && m_joy2->has_pot_x()) + { + data = 1 / (1 / m_joy1->pot_x_r() + 1 / m_joy2->pot_x_r()); + } + else if (m_joy1->has_pot_x()) + { + data = m_joy1->pot_x_r(); + } + else if (m_joy2->has_pot_x()) + { + data = m_joy2->pot_x_r(); + } + break; } return data; @@ -941,7 +954,20 @@ READ8_MEMBER( c128_state::sid_poty_r ) { case 1: data = m_joy1->pot_y_r(); break; case 2: data = m_joy2->pot_y_r(); break; - case 3: break; // TODO pot1 and pot2 in series + case 3: + if (m_joy1->has_pot_y() && m_joy2->has_pot_y()) + { + data = 1 / (1 / m_joy1->pot_y_r() + 1 / m_joy2->pot_y_r()); + } + else if (m_joy1->has_pot_y()) + { + data = m_joy1->pot_y_r(); + } + else if (m_joy2->has_pot_y()) + { + data = m_joy2->pot_y_r(); + } + break; } return data; |