summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/polepos.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-08-20 04:17:46 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-08-20 04:17:46 +0000
commit565b5532a7050ec4aa384d72c3dd691d6356ca71 (patch)
tree8efcec4d72a88a877b7a7a99eb7f52da62caa5eb /src/mame/drivers/polepos.c
parent0941eb004eeac96cb7ef0e7427f1a7a0f1666b6d (diff)
From: Fabio Priuli [mailto:doge.fabio@gmail.com]
Subject: few patch based on u5 Hi, since it seems there will be one more update in this cycle, it is probably better to submit these patches. Hopefully, not too many changes have been done to the source and these will apply cleanly. Let me know if I have to re-submit any of the patches. content of the zip * Ndriv.diff, OPQdriv.diff and RSdriv.diff: clean up of input ports in drivers N->R and partially S. as usual AM_READ_PORTs, conversions to full 32bit inputs where suitable, CUSTOM_PORTs for eeprom bits etc. * cps1.diff: small clean up of the inputs in cps1.c. In particular, I exploited a few port_include (modeled on cps2.c) and added specific inputs for sf2 hacks so that I could simplify input readings in video/cps1.c. Also, I added the 3rd buttons to games which test it in Service Mode even if they don't use it in game: if the game code tests for them in the service mode, they were supposed to be present... * deco.diff, pgm.diff, psikyo.diff, nbmj.diff, jaleco.diff: clean up for specific large drivers * other.diff: some usage of PORT_CUSTOM that I missed to implement previously Regards, Fabio Priuli
Diffstat (limited to 'src/mame/drivers/polepos.c')
-rw-r--r--src/mame/drivers/polepos.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/mame/drivers/polepos.c b/src/mame/drivers/polepos.c
index 45c30a831cf..ea12f83bda4 100644
--- a/src/mame/drivers/polepos.c
+++ b/src/mame/drivers/polepos.c
@@ -453,7 +453,7 @@ static INPUT_PORTS_START( polepos )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
- PORT_START("DSWA") /* DSW A */
+ PORT_START("DSWA")
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) )
@@ -477,7 +477,7 @@ static INPUT_PORTS_START( polepos )
PORT_DIPSETTING( 0x80, "3" )
PORT_DIPSETTING( 0x00, "4" )
- PORT_START("DSWB") /* DSW B */
+ PORT_START("DSWB")
PORT_DIPNAME( 0x07, 0x07, "Extended Rank" )
PORT_DIPSETTING( 0x07, "A" )
PORT_DIPSETTING( 0x03, "B" )
@@ -503,13 +503,13 @@ static INPUT_PORTS_START( polepos )
PORT_DIPSETTING( 0x80, DEF_STR( Off ))
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START("BRAKE") /* IN1 - Brake */
+ PORT_START("BRAKE")
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
- PORT_START("ACCEL") /* IN2 - Accel */
+ PORT_START("ACCEL")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
- PORT_START("STEER") /* IN3 - Steering */
+ PORT_START("STEER")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4)
INPUT_PORTS_END
@@ -525,7 +525,7 @@ static INPUT_PORTS_START( poleposa )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
- PORT_START("DSWA") /* DSW A */
+ PORT_START("DSWA")
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
@@ -549,7 +549,7 @@ static INPUT_PORTS_START( poleposa )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "4" )
- PORT_START("DSWB") /* DSW B */
+ PORT_START("DSWB")
PORT_DIPNAME( 0xe0, 0xe0, "Practice Rank" )
PORT_DIPSETTING( 0xe0, "A" )
PORT_DIPSETTING( 0x60, "B" )
@@ -575,13 +575,13 @@ static INPUT_PORTS_START( poleposa )
PORT_DIPSETTING( 0x01, DEF_STR( Off ))
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START("BRAKE") /* IN1 - Brake */
+ PORT_START("BRAKE")
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
- PORT_START("ACCEL") /* IN2 - Accel */
+ PORT_START("ACCEL")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
- PORT_START("STEER") /* IN3 - Steering */
+ PORT_START("STEER")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4)
INPUT_PORTS_END
@@ -597,7 +597,7 @@ static INPUT_PORTS_START( topracra )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
- PORT_START("DSWA") /* DSW A */
+ PORT_START("DSWA")
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) )
@@ -621,7 +621,7 @@ static INPUT_PORTS_START( topracra )
PORT_DIPSETTING( 0x80, "3" )
PORT_DIPSETTING( 0x00, "4" )
- PORT_START("DSWB") /* DSW B */
+ PORT_START("DSWB")
PORT_DIPNAME( 0x07, 0x07, "Extended Rank" )
PORT_DIPSETTING( 0x07, "A" )
PORT_DIPSETTING( 0x03, "B" )
@@ -647,13 +647,13 @@ static INPUT_PORTS_START( topracra )
PORT_DIPSETTING( 0x80, DEF_STR( Off ))
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START("BRAKE") /* IN1 - Brake */
+ PORT_START("BRAKE")
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
- PORT_START("ACCEL") /* IN2 - Accel */
+ PORT_START("ACCEL")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
- PORT_START("STEER") /* IN3 - Steering */
+ PORT_START("STEER")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4)
INPUT_PORTS_END
@@ -669,7 +669,7 @@ static INPUT_PORTS_START( polepos2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
- PORT_START("DSWA") /* DSW A */
+ PORT_START("DSWA")
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
@@ -694,7 +694,7 @@ static INPUT_PORTS_START( polepos2 )
PORT_DIPSETTING( 0x01, DEF_STR( Off ))
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START("DSWB") /* DSW B */
+ PORT_START("DSWB")
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Game_Time ) )
PORT_DIPSETTING( 0x80, "90 secs." )
PORT_DIPSETTING( 0x00, "120 secs." )
@@ -717,13 +717,13 @@ static INPUT_PORTS_START( polepos2 )
PORT_DIPSETTING( 0x01, "Average" )
PORT_DIPSETTING( 0x00, DEF_STR( High ) )
- PORT_START("BRAKE") /* IN1 - Brake */
+ PORT_START("BRAKE")
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
- PORT_START("ACCEL") /* IN2 - Accel */
+ PORT_START("ACCEL")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
- PORT_START("STEER") /* IN3 - Steering */
+ PORT_START("STEER")
PORT_BIT ( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(4)
INPUT_PORTS_END
@@ -1743,9 +1743,9 @@ static DRIVER_INIT( topracra )
polepos_gear_bit = 0x20;
/* extra direct mapped inputs read */
- memory_install_read8_handler(machine, 0, ADDRESS_SPACE_IO, 0x02, 0x02, 0, 0, input_port_5_r);
- memory_install_read8_handler(machine, 0, ADDRESS_SPACE_IO, 0x03, 0x03, 0, 0, input_port_0_r);
- memory_install_read8_handler(machine, 0, ADDRESS_SPACE_IO, 0x04, 0x04, 0, 0, input_port_1_r);
+ memory_install_read8_handler(machine, 0, ADDRESS_SPACE_IO, 0x02, 0x02, 0, 0, input_port_read_handler8(machine->portconfig, "STEER"));
+ memory_install_read8_handler(machine, 0, ADDRESS_SPACE_IO, 0x03, 0x03, 0, 0, input_port_read_handler8(machine->portconfig, "IN0"));
+ memory_install_read8_handler(machine, 0, ADDRESS_SPACE_IO, 0x04, 0x04, 0, 0, input_port_read_handler8(machine->portconfig, "DSWA"));
}