From 8f9692dbf68bbdab455c2430b4d765704120f4b0 Mon Sep 17 00:00:00 2001 From: Brian Troha Date: Tue, 1 Jan 2008 18:11:53 +0000 Subject: Fixes: edrandy0113gra robocop2_0106u3gra Converts 2 common ports to macros Uses port_include & port_modify where needed Added dip locations Added DSW3 for Robocop2 (thanks to Byran McPhail) --- src/mame/drivers/cninja.c | 393 ++++++++++++++++++---------------------------- 1 file changed, 153 insertions(+), 240 deletions(-) diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c index f4f70b66a91..ad8f3c9789c 100644 --- a/src/mame/drivers/cninja.c +++ b/src/mame/drivers/cninja.c @@ -132,6 +132,8 @@ static WRITE16_HANDLER( cninja_irq_w ) logerror("%08x: Unmapped IRQ write %d %04x\n",activecpu_get_pc(),offset,data); } +static READ16_HANDLER( robo2_dip3_r ) { return readinputport(3); } + static READ16_HANDLER( robocop2_prot_r ) { switch (offset<<1) { @@ -251,6 +253,7 @@ static ADDRESS_MAP_START( robocop2_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x156000, 0x156fff) AM_READ(MRA16_RAM) AM_RANGE(0x15c000, 0x15c7ff) AM_READ(MRA16_RAM) AM_RANGE(0x15e000, 0x15e7ff) AM_READ(MRA16_RAM) + AM_RANGE(0x1f8000, 0x1f8001) AM_READ(robo2_dip3_r) /* Dipswitch #3 */ ADDRESS_MAP_END static ADDRESS_MAP_START( robocop2_writemem, ADDRESS_SPACE_PROGRAM, 16 ) @@ -382,26 +385,54 @@ static ADDRESS_MAP_START( stoneage_s_writemem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x9800, 0x9800) AM_WRITE(OKIM6295_data_0_w) ADDRESS_MAP_END +/*********************************************************** + Basic INPUT PORTS, DIPs +***********************************************************/ + +#define DATAEAST_2BUTTON \ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) \ + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) \ + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) \ + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) \ + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) \ + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) \ + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) \ + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) \ + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) \ + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) \ + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) \ + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) \ + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) \ + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) \ + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + +#define DATAEAST_COINAGE \ + PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") \ + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) \ + PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5,6") \ + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0x0018, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0x0010, DEF_STR( 1C_6C ) ) + /**********************************************************************************/ static INPUT_PORTS_START( edrandy ) + PORT_START - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + DATAEAST_2BUTTON PORT_START PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -409,73 +440,54 @@ static INPUT_PORTS_START( edrandy ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) - PORT_START - PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0018, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Flip_Screen ) ) + PORT_START_TAG("DSW") + + DATAEAST_COINAGE + + PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) /* Listed as "Don't Change" in the manual */ - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0300, 0x0300, "Player's Power" ) /* Energy */ + PORT_DIPNAME( 0x0080, 0x0080, "Credit(s) to Start" ) PORT_DIPLOCATION("SW1:8") /* Also, if Coin A and B are on 1/1, 0x00 gives 2 to start, 1 to continue */ + PORT_DIPSETTING( 0x0080, "1" ) + PORT_DIPSETTING( 0x0000, "2" ) + + PORT_DIPNAME( 0x0300, 0x0300, "Player's Power" ) PORT_DIPLOCATION("SW2:1,2") /* Energy */ PORT_DIPSETTING( 0x0100, DEF_STR( Very_Low ) ) /* 2.5 */ PORT_DIPSETTING( 0x0000, DEF_STR( Low ) ) /* 3 */ PORT_DIPSETTING( 0x0300, DEF_STR( Medium ) ) /* 3.5 */ PORT_DIPSETTING( 0x0200, DEF_STR( High ) ) /* 4.5 */ - PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) + PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4") PORT_DIPSETTING( 0x0800, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x0400, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) /* Listed as "Don't Change" in the manual */ + PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") /* Listed as "Don't Change" in the manual */ PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) /* Listed as "Don't Change" in the manual */ + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") /* Listed as "Don't Change" in the manual */ PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Continues ) ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Continues ) ) PORT_DIPLOCATION("SW2:7") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x4000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8") PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END +static INPUT_PORTS_START( edrandc ) + PORT_INCLUDE(edrandy) + + PORT_MODIFY("DSW") + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") /* Listed as "Don't Change" in the manual */ + PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) +INPUT_PORTS_END + static INPUT_PORTS_START( cninja ) + PORT_START - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + DATAEAST_2BUTTON PORT_START PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -483,127 +495,48 @@ static INPUT_PORTS_START( cninja ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) - PORT_START - PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0018, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) + PORT_START_TAG("DSW") /* Dip switch bank 1 */ + + DATAEAST_COINAGE + + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) /* If DS #1-#6 are all ON */ + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") /* If DS #1-#6 are all ON */ PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) /* Standard Coin Credit */ PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) /* 2 Coins to Start / 1 Coin to Continue */ - PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) + + PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") /* Dip switch bank 2 */ PORT_DIPSETTING( 0x0100, "1" ) PORT_DIPSETTING( 0x0000, "2" ) PORT_DIPSETTING( 0x0300, "3" ) PORT_DIPSETTING( 0x0200, "4" ) - PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) + PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4") PORT_DIPSETTING( 0x0800, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x0400, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x1000, 0x1000, "Restore Life Meter" ) /* Recovery of Life After Defeated Boss */ + PORT_DIPNAME( 0x1000, 0x1000, "Restore Life Meter" ) PORT_DIPLOCATION("SW2:5") /* Recovery of Life After Defeated Boss */ PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) /* Listed as "Don't Change" in the manual */ + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") /* Listed as "Don't Change" in the manual */ PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) /* Listed as "Don't Change" in the manual */ + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7") /* Listed as "Don't Change" in the manual */ PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8") PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( cninjau ) - PORT_START - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + PORT_INCLUDE(cninja) - PORT_START - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) - - PORT_START - PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0018, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, "Credit(s) to Start" ) /* Also, if Coin A and B are on 1/1, 0x00 gives 2 to start, 1 to continue */ + PORT_MODIFY("DSW") + PORT_DIPNAME( 0x0080, 0x0080, "Credit(s) to Start" ) PORT_DIPLOCATION("SW1:8") /* Also, if Coin A and B are on 1/1, 0x00 gives 2 to start, 1 to continue */ PORT_DIPSETTING( 0x0080, "1" ) PORT_DIPSETTING( 0x0000, "2" ) - PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x0100, "1" ) - PORT_DIPSETTING( 0x0000, "2" ) - PORT_DIPSETTING( 0x0300, "3" ) - PORT_DIPSETTING( 0x0200, "4" ) - PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x0800, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0400, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) /* Listed as "Don't Change" in the manual */ - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) /* Listed as "Don't Change" in the manual */ - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, "Restore Life Meter" ) /* Life Meter Restored when Big Boss is Defeated */ - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( robocop2 ) @@ -631,73 +564,67 @@ static INPUT_PORTS_START( robocop2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) - PORT_START /* Dip switch bank 1 */ - PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0018, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Flip_Screen ) ) + PORT_START_TAG("DSW") /* Dip switch bank 1 */ + + DATAEAST_COINAGE + + PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unused ) ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) /* Dip switch bank 2 */ + + PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") /* Dip switch bank 2 */ PORT_DIPSETTING( 0x0100, "1" ) PORT_DIPSETTING( 0x0000, "2" ) PORT_DIPSETTING( 0x0300, "3" ) PORT_DIPSETTING( 0x0200, "4" ) - PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x0800, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0400, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPNAME( 0x0c00, 0x0c00, "Time" ) PORT_DIPLOCATION("SW2:3,4") + PORT_DIPSETTING( 0x0800, "400 Seconds" ) + PORT_DIPSETTING( 0x0c00, "300 Seconds" ) + PORT_DIPSETTING( 0x0400, "200 Seconds" ) + PORT_DIPSETTING( 0x0000, "100 Seconds" ) + PORT_DIPNAME( 0x3000, 0x3000, "Health" ) PORT_DIPLOCATION("SW2:5,6") + PORT_DIPSETTING( 0x0000, "17" ) + PORT_DIPSETTING( 0x1000, "24" ) + PORT_DIPSETTING( 0x3000, "33" ) + PORT_DIPSETTING( 0x2000, "40" ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Continues ) ) PORT_DIPLOCATION("SW2:7") + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x4000, DEF_STR( On ) ) + PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8") PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + + PORT_START + PORT_DIPNAME( 0x0003, 0x0003, "Bullets" ) PORT_DIPLOCATION("SW3:1,2") /* Dip switch bank 3 */ + PORT_DIPSETTING( 0x0000, "Least" ) + PORT_DIPSETTING( 0x0001, "Less" ) + PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0002, "More" ) + PORT_DIPNAME( 0x000c, 0x000c, "Enemy Movement" ) PORT_DIPLOCATION("SW3:3,4") + PORT_DIPSETTING( 0x0008, "Slow" ) + PORT_DIPSETTING( 0x000c, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0004, "Fast" ) + PORT_DIPSETTING( 0x0000, "Fastest" ) + PORT_DIPNAME( 0x0030, 0x0030, "Enemy Strength" ) PORT_DIPLOCATION("SW3:5,6") + PORT_DIPSETTING( 0x0020, "Less" ) + PORT_DIPSETTING( 0x0030, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0010, "More" ) + PORT_DIPSETTING( 0x0000, "Most" ) + PORT_DIPNAME( 0x0040, 0x0040, "Enemy Weapon Speed" ) PORT_DIPLOCATION("SW3:7") + PORT_DIPSETTING( 0x0040, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0000, "Fast" ) + PORT_DIPNAME( 0x0080, 0x0080, "Game Over Message" ) PORT_DIPLOCATION("SW3:8") /* This refers to the system shut down text just before the actual "GAME OVER" */ + PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( mutantf ) + PORT_START - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + DATAEAST_2BUTTON PORT_START PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -705,50 +632,36 @@ static INPUT_PORTS_START( mutantf ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) - PORT_START - PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0018, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) + PORT_START_TAG("DSW") /* Dip switch bank 1 */ + + DATAEAST_COINAGE + + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, "Continue Coin" ) - PORT_DIPSETTING( 0x0080, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0000, "Two Coin Start" ) - PORT_DIPNAME( 0x0300, 0x0300, "Timer Decrement" ) + PORT_DIPNAME( 0x0080, 0x0080, "Credit(s) to Start" ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x0080, "1" ) + PORT_DIPSETTING( 0x0000, "2" ) + + PORT_DIPNAME( 0x0300, 0x0300, "Timer Decrement" ) PORT_DIPLOCATION("SW2:1,2") PORT_DIPSETTING( 0x0100, "Slow" ) PORT_DIPSETTING( 0x0300, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x0200, "Fast" ) PORT_DIPSETTING( 0x0000, "Very Fast" ) - PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) + PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:3,4") PORT_DIPSETTING( 0x0800, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x0400, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x3000, 0x3000, "Life Per Stage" ) + PORT_DIPNAME( 0x3000, 0x3000, "Life Per Stage" ) PORT_DIPLOCATION("SW2:5,6") PORT_DIPSETTING( 0x0000, "Least" ) PORT_DIPSETTING( 0x1000, "Little" ) PORT_DIPSETTING( 0x2000, "Less" ) PORT_DIPSETTING( 0x3000, DEF_STR( Normal ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Continues ) ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Continues ) ) PORT_DIPLOCATION("SW2:7") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x4000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8") PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END @@ -1876,9 +1789,9 @@ static DRIVER_INIT( mutantf ) /**********************************************************************************/ GAME( 1990, edrandy, 0, edrandy, edrandy, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (World ver 3)", 0 ) -GAME( 1990, edrandy2, edrandy, edrandy, edrandy, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (World ver 2)", 0 ) -GAME( 1990, edrandy1, edrandy, edrandy, edrandy, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (World ver 1)", 0 ) -GAME( 1990, edrandyj, edrandy, edrandy, edrandy, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (Japan ver 3)", 0 ) +GAME( 1990, edrandy2, edrandy, edrandy, edrandc, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (World ver 2)", 0 ) +GAME( 1990, edrandy1, edrandy, edrandy, edrandc, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (World ver 1)", 0 ) +GAME( 1990, edrandyj, edrandy, edrandy, edrandc, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (Japan ver 3)", 0 ) GAME( 1991, cninja, 0, cninja, cninja, cninja, ROT0, "Data East Corporation", "Caveman Ninja (World ver 4)", 0 ) GAME( 1991, cninja1, cninja, cninja, cninja, cninja, ROT0, "Data East Corporation", "Caveman Ninja (World ver 1)", 0 ) GAME( 1991, cninjau, cninja, cninja, cninjau, cninja, ROT0, "Data East Corporation", "Caveman Ninja (US ver 4)", 0 ) -- cgit v1.2.3