From 692eb28c34c3b9b20394f5b44c398e74926e4d6a Mon Sep 17 00:00:00 2001 From: 0kmg <9137159+0kmg@users.noreply.github.com> Date: Wed, 7 Dec 2022 12:38:44 -0800 Subject: atari/sprint8.cpp: Cleaned up input code. (#10649) Made the gear shift levers toggle inputs. This needs to be confirmed from a manual. --- src/mame/atari/sprint8.cpp | 294 +++++++-------------------------------------- src/mame/atari/sprint8.h | 18 +-- 2 files changed, 54 insertions(+), 258 deletions(-) diff --git a/src/mame/atari/sprint8.cpp b/src/mame/atari/sprint8.cpp index 5dee6532124..a4bd415828c 100644 --- a/src/mame/atari/sprint8.cpp +++ b/src/mame/atari/sprint8.cpp @@ -15,7 +15,7 @@ Atari Sprint 8 driver void sprint8_state::set_collision(int n) { - if (m_collision_reset == 0) + if (!m_collision_reset) { m_maincpu->set_input_line(0, ASSERT_LINE); @@ -26,42 +26,40 @@ void sprint8_state::set_collision(int n) TIMER_DEVICE_CALLBACK_MEMBER(sprint8_state::input_callback) { - static const char *const dialnames[] = { "DIAL1", "DIAL2", "DIAL3", "DIAL4", "DIAL5", "DIAL6", "DIAL7", "DIAL8" }; - for (int i = 0; i < 8; i++) { - uint8_t val = ioport(dialnames[i])->read() >> 4; - - signed char delta = (val - m_dial[i]) & 15; - - if (delta & 8) - delta |= 0xf0; /* extend sign to 8 bits */ + uint8_t const val = m_dial[i]->read() >> 4; - m_steer_flag[i] = (delta != 0); + int8_t const delta = util::sext((val - m_prev_dial[i]) & 15, 4); - if (delta > 0) - m_steer_dir[i] = 0; + // steer flag + if (delta) + m_steering[i] |= 0x04; + else + m_steering[i] &= ~0x04; + // steer dir if (delta < 0) - m_steer_dir[i] = 1; + m_steering[i] |= 0x02; + else if (delta > 0) + m_steering[i] &= ~0x02; - m_dial[i] = val; + m_prev_dial[i] = val; } } void sprint8_state::machine_start() { - save_item(NAME(m_steer_dir)); - save_item(NAME(m_steer_flag)); + save_item(NAME(m_steering)); save_item(NAME(m_collision_reset)); save_item(NAME(m_collision_index)); - save_item(NAME(m_dial)); + save_item(NAME(m_prev_dial)); save_item(NAME(m_team)); } void sprint8_state::machine_reset() { - m_collision_reset = 0; + m_collision_reset = false; m_collision_index = 0; } @@ -74,19 +72,7 @@ uint8_t sprint8_state::collision_r() uint8_t sprint8_state::input_r(offs_t offset) { - static const char *const portnames[] = { "P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8" }; - uint8_t val = ioport(portnames[offset])->read(); - - if (m_steer_dir[offset]) - { - val |= 0x02; - } - if (m_steer_flag[offset]) - { - val |= 0x04; - } - - return val; + return m_in[offset]->read() | m_steering[offset]; } @@ -130,112 +116,29 @@ void sprint8_state::sprint8_map(address_map &map) map(0xf800, 0xffff).rom(); } +#define SPRINT8_PLAYER_INPUT(player) \ + PORT_START("P" #player) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN ## player ) \ + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR */ \ + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG */ \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) PORT_NAME("%p Accelerate") \ + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(player) PORT_NAME("%p Gear Shift") PORT_TOGGLE \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) \ + \ + PORT_START("DIAL" #player) \ + PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(player) static INPUT_PORTS_START( sprint8 ) - - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P1 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P1 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P2 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P3 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P3 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P4 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P4 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P5") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN5 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P5 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P5 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(5) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(5) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - - PORT_START("P6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN6 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P6 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P6 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(6) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(6) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P7") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN7 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P7 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P7 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(7) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(7) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P8") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN8 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P8 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(8) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(8) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("DIAL1") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) - - PORT_START("DIAL2") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) - - PORT_START("DIAL3") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3) - - PORT_START("DIAL4") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(4) - - PORT_START("DIAL5") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(5) - - PORT_START("DIAL6") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(6) - - PORT_START("DIAL7") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(7) - - PORT_START("DIAL8") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(8) + SPRINT8_PLAYER_INPUT( 1 ) + SPRINT8_PLAYER_INPUT( 2 ) + SPRINT8_PLAYER_INPUT( 3 ) + SPRINT8_PLAYER_INPUT( 4 ) + SPRINT8_PLAYER_INPUT( 5 ) + SPRINT8_PLAYER_INPUT( 6 ) + SPRINT8_PLAYER_INPUT( 7 ) + SPRINT8_PLAYER_INPUT( 8 ) PORT_START("IN0") PORT_DIPNAME( 0x0f, 0x08, "Play Time" ) @@ -263,138 +166,27 @@ static INPUT_PORTS_START( sprint8 ) PORT_START("VBLANK") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") - /* this is actually a variable resistor */ + // this is actually a variable resistor PORT_START("R132") PORT_ADJUSTER(65, "R132 - Crash & Screech Volume") - INPUT_PORTS_END static INPUT_PORTS_START( sprint8p ) + PORT_INCLUDE( sprint8 ) - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P1 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P1 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P2 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P3 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P3 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P4 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P4 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P5") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN5 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P5 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P5 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(5) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(5) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - - PORT_START("P6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN6 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P6 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P6 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(6) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(6) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P7") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN7 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P7 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P7 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(7) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(7) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P8") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN8 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER DIR P8 */ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* STEER FLAG P8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(8) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(8) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("DIAL1") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) - - PORT_START("DIAL2") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) - - PORT_START("DIAL3") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3) - - PORT_START("DIAL4") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(4) - - PORT_START("DIAL5") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(5) - - PORT_START("DIAL6") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(6) - - PORT_START("DIAL7") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(7) - - PORT_START("DIAL8") - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(8) - - PORT_START("IN0") + PORT_MODIFY("IN0") PORT_DIPNAME( 0x03, 0x03, "Play Time" ) PORT_DIPSETTING( 0x00, "54 seconds" ) PORT_DIPSETTING( 0x01, "108 seconds" ) PORT_DIPSETTING( 0x03, "216 seconds" ) PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("IN1") + PORT_MODIFY("IN1") PORT_DIPNAME( 0x01, 0x01, "Play Mode" ) PORT_DIPSETTING( 0x00, "Chase" ) PORT_DIPSETTING( 0x01, "Tag" ) - - PORT_START("VBLANK") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") - - /* this is actually a variable resistor */ - PORT_START("R132") - PORT_ADJUSTER(65, "R132 - Crash & Screech Volume") - + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END diff --git a/src/mame/atari/sprint8.h b/src/mame/atari/sprint8.h index 7f01ac5d241..6b3aeed9b01 100644 --- a/src/mame/atari/sprint8.h +++ b/src/mame/atari/sprint8.h @@ -25,7 +25,9 @@ public: m_video_ram(*this, "video_ram"), m_pos_h_ram(*this, "pos_h_ram"), m_pos_v_ram(*this, "pos_v_ram"), - m_pos_d_ram(*this, "pos_d_ram") + m_pos_d_ram(*this, "pos_d_ram"), + m_in(*this, "P%u", 1U), + m_dial(*this, "DIAL%u", 1U) { } void sprint8(machine_config &config); @@ -67,12 +69,14 @@ private: required_shared_ptr m_pos_v_ram; required_shared_ptr m_pos_d_ram; - int m_steer_dir[8]{}; - int m_steer_flag[8]{}; - int m_collision_reset = 0; - int m_collision_index = 0; - uint8_t m_dial[8]{}; - int m_team = 0; + required_ioport_array<8> m_in; + required_ioport_array<8> m_dial; + + uint8_t m_steering[8]{}; + bool m_collision_reset = false; + uint8_t m_collision_index = 0; + uint8_t m_prev_dial[8]{}; + bool m_team = false; tilemap_t* m_tilemap1 = nullptr; tilemap_t* m_tilemap2 = nullptr; -- cgit v1.2.3