summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Derrick Renaud <derrickr@mamedev.org>2009-04-13 23:50:02 +0000
committer Derrick Renaud <derrickr@mamedev.org>2009-04-13 23:50:02 +0000
commit3edaad1df6bfabb4e827cbe5e6f8bd173ca443e7 (patch)
treeb8fc6c505e5ee5c907ad2ede037a1b1c36657945
parent4312fdc9cba01873b1d1910c72d11622a3b25c8f (diff)
Simplified the gun port handling in the Sammy Outdoor Shooting games.
-rw-r--r--src/mame/drivers/seta2.c63
1 files changed, 23 insertions, 40 deletions
diff --git a/src/mame/drivers/seta2.c b/src/mame/drivers/seta2.c
index 48c64374717..3a97c48389e 100644
--- a/src/mame/drivers/seta2.c
+++ b/src/mame/drivers/seta2.c
@@ -871,16 +871,6 @@ ADDRESS_MAP_END
Sammy Outdoor Shooting
***************************************************************************/
-static READ16_HANDLER( samshoot_lightgun1_r )
-{
-// popmessage("%02x %02x",input_port_read(space->machine, "GUN1X"),input_port_read(space->machine, "GUN1Y"));
- return (input_port_read(space->machine, "GUN1Y") << 8) | input_port_read(space->machine, "GUN1X");
-}
-static READ16_HANDLER( samshoot_lightgun2_r )
-{
- return (input_port_read(space->machine, "GUN2Y") << 8) | input_port_read(space->machine, "GUN2X");
-}
-
static WRITE16_HANDLER( samshoot_coin_w )
{
if (ACCESSING_BITS_0_7)
@@ -904,8 +894,8 @@ static ADDRESS_MAP_START( samshoot_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE( 0x400300, 0x40030f ) AM_WRITE( seta2_sound_bank_w ) // Samples Banks
- AM_RANGE( 0x500000, 0x500001 ) AM_READ( samshoot_lightgun1_r ) // P1
- AM_RANGE( 0x580000, 0x580001 ) AM_READ( samshoot_lightgun2_r ) // P2
+ AM_RANGE( 0x500000, 0x500001 ) AM_READ_PORT("GUN1") // P1
+ AM_RANGE( 0x580000, 0x580001 ) AM_READ_PORT("GUN2") // P2
AM_RANGE( 0x700000, 0x700001 ) AM_READ_PORT("TRIGGER") // Trigger
AM_RANGE( 0x700002, 0x700003 ) AM_READ_PORT("PUMP") // Pump
@@ -1847,7 +1837,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( deerhunt )
- PORT_START("DSW1") // IN0 - $400000.w
+ PORT_START("DSW1") // $400000.w
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3")
PORT_DIPSETTING( 0x0005, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0006, DEF_STR( 2C_1C ) )
@@ -1872,7 +1862,7 @@ static INPUT_PORTS_START( deerhunt )
PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("DSW2") // IN1 - fffd0a.w
+ PORT_START("DSW2") // fffd0a.w
PORT_DIPNAME( 0x0001, 0x0001, "Vert. Flip Screen" ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -1898,35 +1888,30 @@ static INPUT_PORTS_START( deerhunt )
PORT_DIPSETTING( 0x0000, "Hand Gun" )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("GUN1Y") // IN2 - $500000.b
- PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0x08,0xf8) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1)
+ PORT_START("GUN1") // $500000
+ PORT_BIT( 0x00ff, 0x0080, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0x0025,0x00c5) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1)
+ PORT_BIT( 0xff00, 0x8000, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0x0800,0xf800) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START("GUN1X") // IN3 - $500001.b
- PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0x25,0xc5) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1)
-
- PORT_START("GUN2Y") // IN4 - $580000.b
- PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 gun, read but not used
-
- PORT_START("GUN2X") // IN5 - $580001.b
+ PORT_START("GUN2") // $580000.b
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 gun, read but not used
- PORT_START("TRIGGER") // IN6 - $700000
+ PORT_START("TRIGGER") // $700000
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) // trigger
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xff3f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("PUMP") // IN7 - $700003.b
+ PORT_START("PUMP") // $700003.b
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) // pump
PORT_BIT( 0xffbf, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("COIN") // IN8 - $700005.b
+ PORT_START("COIN") // $700005.b
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("BUTTONS") // IN9 - $400002
+ PORT_START("BUTTONS") // $400002
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) // trigger
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) // pump
PORT_BIT( 0xfffc, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1936,7 +1921,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( turkhunt )
PORT_INCLUDE(deerhunt)
- PORT_MODIFY("DSW2") // IN1 - fffd0a.w
+ PORT_MODIFY("DSW2") // fffd0a.w
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x0040, "2" )
PORT_DIPSETTING( 0x0000, "3" )
@@ -1946,7 +1931,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( wschamp )
PORT_INCLUDE(deerhunt)
- PORT_MODIFY("DSW1") // IN0 - $400000.w
+ PORT_MODIFY("DSW1") // $400000.w
PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4")
PORT_DIPSETTING( 0x0009, "4 Coins Start, 4 Coins Continue" )
PORT_DIPSETTING( 0x0008, "4 Coins Start, 3 Coins Continue" )
@@ -1970,38 +1955,36 @@ static INPUT_PORTS_START( wschamp )
PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_MODIFY("DSW2") // IN1 - fffd0a.w
+ PORT_MODIFY("DSW2") // fffd0a.w
PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW2:6" )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x0040, "2" )
PORT_DIPSETTING( 0x0000, "3" )
- PORT_MODIFY("GUN2Y") // IN4 - $580000.b
- PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0x08,0xf8) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2)
-
- PORT_MODIFY("GUN2X") // IN5 - $580001.b
- PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0x25,0xc5) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2)
+ PORT_MODIFY("GUN2") // $580000
+ PORT_BIT( 0x00ff, 0x0080, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0x0025,0x00c5) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2)
+ PORT_BIT( 0xff00, 0x8000, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0x0800,0xf800) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_MODIFY("TRIGGER") // IN6 - $700000
+ PORT_MODIFY("TRIGGER") // $700000
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) // trigger P2
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) // trigger P1
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xff1f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_MODIFY("PUMP") // IN7 - $700003.b
+ PORT_MODIFY("PUMP") // $700003.b
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) // pump P2
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) // pump P1
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xff1f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_MODIFY("COIN") // IN8 - $700005.b
+ PORT_MODIFY("COIN") // $700005.b
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_MODIFY("BUTTONS") // IN9 - $400002
+ PORT_MODIFY("BUTTONS") // $400002
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) // trigger P1
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) // pump P1
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // trigger P2
@@ -2012,7 +1995,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( trophyh )
PORT_INCLUDE(wschamp)
- PORT_MODIFY("DSW2") // IN1 - fffd0a.w
+ PORT_MODIFY("DSW2") // fffd0a.w
PORT_DIPNAME( 0x0020, 0x0020, "Blood Color" ) PORT_DIPLOCATION("SW2:6") /* WSChamp doesn't use Blood Color, so add it back in */
PORT_DIPSETTING( 0x0020, "Red" )
PORT_DIPSETTING( 0x0000, "Yellow" )