diff options
author | Dirk Best <mail@dirk-best.de> | 2018-05-20 19:46:01 +0200 |
---|---|---|
committer | Dirk Best <mail@dirk-best.de> | 2018-05-20 20:32:35 +0200 |
commit | c0dff0ebcb5e5d29a016efce69838748a8c9191d (patch) | |
tree | 9e5bd8ce66fea587039682a59e942fdb3548e1a8 /src/mame/drivers/model1.cpp | |
parent | 53b791f7561a524cd8a6add587402f98d6616990 (diff) |
model1io: Various updates
- Map the 3 dip switches, remove bogus IN3, IN4 and IN5 callbacks
- Set swa to use epr14869b
- Clock for 315_5338A
- Add missing save state variable
- Update comments
- Document vcop dip switch settings
Diffstat (limited to 'src/mame/drivers/model1.cpp')
-rw-r--r-- | src/mame/drivers/model1.cpp | 98 |
1 files changed, 40 insertions, 58 deletions
diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp index a6959b7ba58..03f6c5ccf7b 100644 --- a/src/mame/drivers/model1.cpp +++ b/src/mame/drivers/model1.cpp @@ -968,6 +968,38 @@ void model1_state::model1_comm_mem(address_map &map) map(0xb01002, 0xb01002).rw(m_m1comm, FUNC(m1comm_device::fg_r), FUNC(m1comm_device::fg_w)); } +static INPUT_PORTS_START( ioboard_dipswitches ) + PORT_START("ioboard:dsw1") + PORT_DIPUNUSED_DIPLOC(0x01, 0x01, "DSW1:1") + PORT_DIPUNUSED_DIPLOC(0x02, 0x02, "DSW1:2") + PORT_DIPUNUSED_DIPLOC(0x04, 0x04, "DSW1:3") + PORT_DIPUNUSED_DIPLOC(0x08, 0x08, "DSW1:4") + PORT_DIPUNUSED_DIPLOC(0x10, 0x10, "DSW1:5") + PORT_DIPUNUSED_DIPLOC(0x20, 0x20, "DSW1:6") + PORT_DIPUNUSED_DIPLOC(0x40, 0x40, "DSW1:7") + PORT_DIPUNUSED_DIPLOC(0x80, 0x80, "DSW1:8") + + PORT_START("ioboard:dsw2") + PORT_DIPUNUSED_DIPLOC(0x01, 0x01, "DSW2:1") + PORT_DIPUNUSED_DIPLOC(0x02, 0x02, "DSW2:2") + PORT_DIPUNUSED_DIPLOC(0x04, 0x04, "DSW2:3") + PORT_DIPUNUSED_DIPLOC(0x08, 0x08, "DSW2:4") + PORT_DIPUNUSED_DIPLOC(0x10, 0x10, "DSW2:5") + PORT_DIPUNUSED_DIPLOC(0x20, 0x20, "DSW2:6") + PORT_DIPUNUSED_DIPLOC(0x40, 0x40, "DSW2:7") + PORT_DIPUNUSED_DIPLOC(0x80, 0x80, "DSW2:8") + + PORT_START("ioboard:dsw3") + PORT_DIPUNUSED_DIPLOC(0x01, 0x01, "DSW3:1") + PORT_DIPUNUSED_DIPLOC(0x02, 0x02, "DSW3:2") + PORT_DIPUNUSED_DIPLOC(0x04, 0x04, "DSW3:3") + PORT_DIPUNUSED_DIPLOC(0x08, 0x08, "DSW3:4") + PORT_DIPUNUSED_DIPLOC(0x10, 0x10, "DSW3:5") + PORT_DIPUNUSED_DIPLOC(0x20, 0x20, "DSW3:6") + PORT_DIPUNUSED_DIPLOC(0x40, 0x40, "DSW3:7") + PORT_DIPUNUSED_DIPLOC(0x80, 0x80, "DSW3:8") +INPUT_PORTS_END + static INPUT_PORTS_START( vf ) PORT_START("IN.0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -998,6 +1030,8 @@ static INPUT_PORTS_START( vf ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY + + PORT_INCLUDE(ioboard_dipswitches) INPUT_PORTS_END static INPUT_PORTS_START( vr ) @@ -1033,6 +1067,7 @@ static INPUT_PORTS_START( vr ) PORT_START("BRAKE") PORT_BIT( 0xff, 0x30, IPT_PEDAL2 ) PORT_MINMAX(1,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) + PORT_INCLUDE(ioboard_dipswitches) INPUT_PORTS_END static INPUT_PORTS_START( swa ) @@ -1070,6 +1105,8 @@ static INPUT_PORTS_START( swa ) PORT_START("STICK2Y") PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(27,227) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_PLAYER(2) + + PORT_INCLUDE(ioboard_dipswitches) INPUT_PORTS_END static INPUT_PORTS_START( wingwar ) @@ -1102,35 +1139,7 @@ static INPUT_PORTS_START( wingwar ) PORT_START("THROTTLE") PORT_BIT( 0xff, 0x01, IPT_PEDAL ) PORT_MINMAX(1,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) - PORT_START("ioboard:dsw1") - PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW1:1") - PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW1:2") - PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW1:3") - PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW1:4") - PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW1:5") - PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW1:6") - PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW1:7") - PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW1:8") - - PORT_START("ioboard:dsw2") - PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW2:1") - PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW2:2") - PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW2:3") - PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW2:4") - PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW2:5") - PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW2:6") - PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW2:7") - PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW2:8") - - PORT_START("ioboard:dsw3") - PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW3:1") - PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW3:2") - PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW3:3") - PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW3:4") - PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW3:5") - PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW3:6") - PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW3:7") - PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW3:8") + PORT_INCLUDE(ioboard_dipswitches) INPUT_PORTS_END static INPUT_PORTS_START( wingwar360 ) @@ -1170,35 +1179,7 @@ static INPUT_PORTS_START( netmerc ) PORT_START("STICKY") PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE - PORT_START("ioboard:dsw1") - PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW1:1") - PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW1:2") - PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW1:3") - PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW1:4") - PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW1:5") - PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW1:6") - PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW1:7") - PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW1:8") - - PORT_START("ioboard:dsw2") - PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW2:1") - PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW2:2") - PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW2:3") - PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW2:4") - PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW2:5") - PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW2:6") - PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW2:7") - PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW2:8") - - PORT_START("ioboard:dsw3") - PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW3:1") - PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW3:2") - PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW3:3") - PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW3:4") - PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW3:5") - PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW3:6") - PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW3:7") - PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW3:8") + PORT_INCLUDE(ioboard_dipswitches) INPUT_PORTS_END @@ -1785,6 +1766,7 @@ MACHINE_CONFIG_START(model1_state::swa) model1_hle(config); MCFG_DEVICE_MODIFY("ioboard") + MCFG_DEVICE_BIOS("epr14869b"); MCFG_MODEL1IO_AN0_CB(IOPORT("STICK1X")) MCFG_MODEL1IO_AN1_CB(IOPORT("STICK1Y")) MCFG_MODEL1IO_AN2_CB(IOPORT("THROTTLE")) |