diff options
author | Fabio Priuli <etabeta78@users.noreply.github.com> | 2009-04-01 13:42:58 +0000 |
---|---|---|
committer | Fabio Priuli <etabeta78@users.noreply.github.com> | 2009-04-01 13:42:58 +0000 |
commit | bcc3b3a3d9709fe135d81d0856793033722e0b0e (patch) | |
tree | 11dc05d2107fe7c8faa8956250fed488f3ec6fa0 /src/mame | |
parent | d359e098fb3d2c14873527d24ccb6745f1b09743 (diff) |
Konami inputs improvements:
* Added source file konamipt.h to unify Konami inputs where possible (e.g. most 80s-90s games were using basically the same coinage settings and joystick inputs).
* While at it, verified all 0x00 coinage effects in drivers which now use konamipt.h (fixing a few mistakes: hexion, mikie, crimfgtj...).
* Added finalizb service coin. Removed roadf coin4 & asterix coin3 (neither used by the games nor present in service mode).
* Fixed gberetb coin inputs (they were switched).
* Added port_condition to hcrash so that brake appears only when present in the chosen cabinet.
* Cleaned up mystwarr.c & moo.c input handlers.
Diffstat (limited to 'src/mame')
52 files changed, 1092 insertions, 4000 deletions
diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c index 759fd9bdaf5..6fea4fb8827 100644 --- a/src/mame/drivers/ajax.c +++ b/src/mame/drivers/ajax.c @@ -18,6 +18,7 @@ TO DO: #include "sound/2151intf.h" #include "sound/k007232.h" #include "includes/ajax.h" +#include "konamipt.h" static WRITE8_DEVICE_HANDLER( k007232_extvol_w ); static WRITE8_HANDLER( sound_bank_w ); @@ -61,40 +62,8 @@ ADDRESS_MAP_END static INPUT_PORTS_START( ajax ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Coin Slot 2 Invalid" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") @@ -143,24 +112,10 @@ static INPUT_PORTS_START( ajax ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(2) INPUT_PORTS_END @@ -435,7 +390,6 @@ static DRIVER_INIT( ajax ) } - GAME( 1987, ajax, 0, ajax, ajax, ajax, ROT90, "Konami", "Ajax", GAME_SUPPORTS_SAVE ) GAME( 1987, typhoon, ajax, ajax, ajax, ajax, ROT90, "Konami", "Typhoon", GAME_SUPPORTS_SAVE ) GAME( 1987, ajaxj, ajax, ajax, ajax, ajax, ROT90, "Konami", "Ajax (Japan)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c index 2f431fb5543..1abb9122575 100644 --- a/src/mame/drivers/aliens.c +++ b/src/mame/drivers/aliens.c @@ -13,6 +13,7 @@ Preliminary driver by: #include "video/konamiic.h" #include "sound/k007232.h" #include "sound/2151intf.h" +#include "konamipt.h" /* prototypes */ static MACHINE_RESET( aliens ); @@ -121,40 +122,8 @@ ADDRESS_MAP_END static INPUT_PORTS_START( aliens ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Credits", SW1) + /* "No Credits" = both coin slots open, but no effect on coin counters */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") @@ -187,24 +156,10 @@ static INPUT_PORTS_START( aliens ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + KONAMI8_B12_COIN_START(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_B12_COIN_START(2) INPUT_PORTS_END @@ -513,7 +468,6 @@ static DRIVER_INIT( aliens ) } - GAME( 1990, aliens, 0, aliens, aliens, aliens, ROT0, "Konami", "Aliens (World set 1)", GAME_SUPPORTS_SAVE ) GAME( 1990, aliens2, aliens, aliens, aliens, aliens, ROT0, "Konami", "Aliens (World set 2)", GAME_SUPPORTS_SAVE ) GAME( 1990, aliens3, aliens, aliens, aliens, aliens, ROT0, "Konami", "Aliens (World set 3)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c index f312ae3aa86..8a7de57a4bf 100644 --- a/src/mame/drivers/asterix.c +++ b/src/mame/drivers/asterix.c @@ -16,6 +16,7 @@ colour, including the word "Konami" #include "machine/eeprom.h" #include "sound/2151intf.h" #include "sound/k053260.h" +#include "konamipt.h" VIDEO_START( asterix ); VIDEO_UPDATE( asterix ); @@ -211,28 +212,14 @@ ADDRESS_MAP_END static INPUT_PORTS_START( asterix ) PORT_START("IN0") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) 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_COIN3 ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) + KONAMI16_LSB(1, IPT_UNKNOWN, IPT_START1) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN4 ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN1") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI16_LSB(2, IPT_UNKNOWN, IPT_START2) PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) // EEPROM data PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) // EEPROM ready (always 1) PORT_SERVICE_NO_TOGGLE(0x0400, IP_ACTIVE_LOW ) diff --git a/src/mame/drivers/battlnts.c b/src/mame/drivers/battlnts.c index 1801b36f65a..d1d011b82e8 100644 --- a/src/mame/drivers/battlnts.c +++ b/src/mame/drivers/battlnts.c @@ -15,6 +15,7 @@ Preliminary driver by: Manuel Abadia <manu@teleline.es> #include "cpu/z80/z80.h" #include "video/konamiic.h" #include "sound/3812intf.h" +#include "konamipt.h" /* from video */ WRITE8_HANDLER( battlnts_spritebank_w ); @@ -84,40 +85,8 @@ ADDRESS_MAP_END static INPUT_PORTS_START( battlnts ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") @@ -143,11 +112,7 @@ static INPUT_PORTS_START( battlnts ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW3") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_SYSTEM_10 PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -157,26 +122,13 @@ static INPUT_PORTS_START( battlnts ) PORT_SERVICE_DIPLOC(0x80, IP_ACTIVE_LOW, "SW3:3" ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B1(1) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW3:4") PORT_DIPSETTING( 0x80, "3 Times" ) PORT_DIPSETTING( 0x00, "5 Times" ) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) 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 ) + KONAMI8_B1_UNK(2) INPUT_PORTS_END static INPUT_PORTS_START( thehustj ) @@ -198,11 +150,11 @@ static INPUT_PORTS_START( thehustj ) PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW3:2" ) PORT_MODIFY("P1") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + KONAMI8_B12(1) PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW3:4" ) PORT_MODIFY("P2") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + KONAMI8_B12_UNK(2) INPUT_PORTS_END @@ -397,4 +349,3 @@ GAME( 1987, battlntj, battlnts, battlnts, battlnts, 0, ROT90, "Konami", " GAME( 1987, rackemup, 0, battlnts, thehustj, rackemup, ROT90, "Konami", "Rack 'em Up", GAME_NO_COCKTAIL ) GAME( 1987, thehustl, rackemup, battlnts, thehustj, 0, ROT90, "Konami", "The Hustler (Japan version M)", GAME_NO_COCKTAIL ) GAME( 1987, thehustj, rackemup, battlnts, thehustj, 0, ROT90, "Konami", "The Hustler (Japan version J)", GAME_NO_COCKTAIL ) - diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c index 90b94601c61..978d3f4e415 100644 --- a/src/mame/drivers/bladestl.c +++ b/src/mame/drivers/bladestl.c @@ -32,6 +32,7 @@ Notes: #include "video/konamiic.h" #include "sound/2203intf.h" #include "sound/upd7759.h" +#include "konamipt.h" /* from video */ int bladestl_spritebank; @@ -148,40 +149,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( bladestl ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) + KONAMI_COINAGE_ALT_LOC(SW1) PORT_START("DSW2") PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) @@ -216,26 +184,13 @@ static INPUT_PORTS_START( bladestl ) PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW3:3" ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + KONAMI8_B123(1) PORT_DIPNAME( 0x80, 0x80, "Period time set" ) PORT_DIPLOCATION("SW3:4") PORT_DIPSETTING( 0x80, "4" ) PORT_DIPSETTING( 0x00, "7" ) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(2) PORT_START("TRACKBALL_P1_1") PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(63) PORT_REVERSE PORT_PLAYER(1) @@ -402,6 +357,5 @@ ROM_START( bladstle ) ROM_END - GAME( 1987, bladestl, 0, bladestl, bladestl, 0, ROT90, "Konami", "Blades of Steel (version T)", 0 ) GAME( 1987, bladstle, bladestl, bladestl, bladstle, 0, ROT90, "Konami", "Blades of Steel (version E)", 0 ) diff --git a/src/mame/drivers/blockhl.c b/src/mame/drivers/blockhl.c index 085f4047049..f652a271694 100644 --- a/src/mame/drivers/blockhl.c +++ b/src/mame/drivers/blockhl.c @@ -24,6 +24,7 @@ found it. #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */ #include "video/konamiic.h" #include "sound/2151intf.h" +#include "konamipt.h" /* prototypes */ static MACHINE_RESET( blockhl ); @@ -99,60 +100,14 @@ ADDRESS_MAP_END static INPUT_PORTS_START( blockhl ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + KONAMI8_B123_START(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_B123_START(2) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1") @@ -332,6 +287,5 @@ static DRIVER_INIT( blockhl ) } - GAME( 1989, blockhl, 0, blockhl, blockhl, blockhl, ROT0, "Konami", "Block Hole", 0 ) GAME( 1989, quarth, blockhl, blockhl, blockhl, blockhl, ROT0, "Konami", "Quarth (Japan)", 0 ) diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c index c6df74ec59f..aa33a3a2918 100644 --- a/src/mame/drivers/bottom9.c +++ b/src/mame/drivers/bottom9.c @@ -18,7 +18,7 @@ To be verified for Main Stadium #include "cpu/m6809/m6809.h" #include "video/konamiic.h" #include "sound/k007232.h" - +#include "konamipt.h" extern int bottom9_video_enable; @@ -164,60 +164,13 @@ ADDRESS_MAP_END static INPUT_PORTS_START( bottom9 ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_ALT_B12(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_ALT_B12(2) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) + KONAMI_COINAGE_ALT_LOC(SW1) PORT_START("DSW2") PORT_DIPNAME( 0x07, 0x04, "Play Time" ) PORT_DIPLOCATION("SW2:1,2,3") diff --git a/src/mame/drivers/contra.c b/src/mame/drivers/contra.c index c79df6ed72d..bcb20c59853 100644 --- a/src/mame/drivers/contra.c +++ b/src/mame/drivers/contra.c @@ -19,6 +19,7 @@ Dip locations and factory settings verified with manual #include "driver.h" #include "cpu/m6809/m6809.h" #include "sound/2151intf.h" +#include "konamipt.h" extern UINT8 *contra_fg_vram,*contra_fg_cram; extern UINT8 *contra_bg_vram,*contra_bg_cram; @@ -124,70 +125,17 @@ ADDRESS_MAP_END static INPUT_PORTS_START( contra ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B12_UNK(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B12_UNK(2) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) )//marvins.c - /* 0x00 is invalid */ + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") diff --git a/src/mame/drivers/crimfght.c b/src/mame/drivers/crimfght.c index 63b14b7c2e7..fa6f21fb455 100644 --- a/src/mame/drivers/crimfght.c +++ b/src/mame/drivers/crimfght.c @@ -17,7 +17,7 @@ Dip locations verified with manual (US) #include "video/konamiic.h" #include "sound/2151intf.h" #include "sound/k007232.h" - +#include "konamipt.h" /* prototypes */ static MACHINE_RESET( crimfght ); @@ -120,23 +120,6 @@ static INPUT_PORTS_START( crimfght ) PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) PORT_DIPSETTING( 0x00, "1 Coin/99 Credits" ) PORT_DIPUNUSED_DIPLOC( 0xf0, 0xf0, "SW1:5,6,7,8" ) /* Manual says these are unused */ -/* PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Invalid" ) */ PORT_START("DSW2") PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Manual says these are unused */ @@ -163,44 +146,16 @@ static INPUT_PORTS_START( crimfght ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B12_UNK(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B12_UNK(2) PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B12_UNK(3) PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B12_UNK(1) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -217,23 +172,8 @@ static INPUT_PORTS_START( crimfgtj ) PORT_INCLUDE( crimfght ) PORT_MODIFY("DSW1") - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_MODIFY("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") @@ -243,12 +183,10 @@ static INPUT_PORTS_START( crimfgtj ) PORT_DIPSETTING( 0x00, "4" ) PORT_MODIFY("P1") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + KONAMI8_B123_START(1) PORT_MODIFY("P2") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_B123_START(2) PORT_MODIFY("P3") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) diff --git a/src/mame/drivers/ddrible.c b/src/mame/drivers/ddrible.c index c059ad387ce..368adcf440a 100644 --- a/src/mame/drivers/ddrible.c +++ b/src/mame/drivers/ddrible.c @@ -14,6 +14,7 @@ Dip locations and suggested settings verified with US manual. #include "sound/2203intf.h" #include "sound/vlm5030.h" #include "sound/flt_rc.h" +#include "konamipt.h" int ddrible_int_enable_0; int ddrible_int_enable_1; @@ -182,70 +183,18 @@ ADDRESS_MAP_END static INPUT_PORTS_START( ddribble ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) + KONAMI8_B132(1) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + KONAMI8_B132(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_SYSTEM_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) + KONAMI_COINAGE_ALT_LOC(SW1) PORT_START("DSW2") PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW2:1" ) /* Manual says it's Unused */ @@ -418,5 +367,4 @@ ROM_START( ddribble ) ROM_END - GAME( 1986, ddribble, 0, ddribble, ddribble, 0, ROT0, "Konami", "Double Dribble", 0) diff --git a/src/mame/drivers/fastlane.c b/src/mame/drivers/fastlane.c index 472fa386b32..f7500c42fae 100644 --- a/src/mame/drivers/fastlane.c +++ b/src/mame/drivers/fastlane.c @@ -15,6 +15,7 @@ TODO: #include "cpu/hd6309/hd6309.h" #include "video/konamiic.h" #include "sound/k007232.h" +#include "konamipt.h" /* from video/fastlane.c */ extern UINT8 *fastlane_k007121_regs,*fastlane_videoram1,*fastlane_videoram2; @@ -119,40 +120,8 @@ ADDRESS_MAP_END static INPUT_PORTS_START( fastlane ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -192,31 +161,13 @@ static INPUT_PORTS_START( fastlane ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* service */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(2) INPUT_PORTS_END static const gfx_layout gfxlayout = @@ -324,5 +275,4 @@ ROM_START( fastlane ) ROM_END - GAME( 1987, fastlane, 0, fastlane, fastlane, 0, ROT90, "Konami", "Fast Lane", GAME_IMPERFECT_COLORS ) diff --git a/src/mame/drivers/finalizr.c b/src/mame/drivers/finalizr.c index 27698076e4e..1da1e44fa19 100644 --- a/src/mame/drivers/finalizr.c +++ b/src/mame/drivers/finalizr.c @@ -13,7 +13,7 @@ driver by Nicola Salmoria #include "cpu/mcs48/mcs48.h" #include "sound/sn76496.h" #include "sound/dac.h" - +#include "konamipt.h" extern UINT8 *finalizr_scroll; extern UINT8 *finalizr_videoram2,*finalizr_colorram2; @@ -143,71 +143,21 @@ ADDRESS_MAP_END static INPUT_PORTS_START( finalizr ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_SYSTEM_10 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_B12_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_B12_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Invalid" ) - + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "2" ) @@ -250,9 +200,6 @@ INPUT_PORTS_END static INPUT_PORTS_START( finalizb ) PORT_INCLUDE( finalizr ) - PORT_MODIFY("SYSTEM") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_MODIFY("DSW2") PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) ) PORT_DIPSETTING( 0x18, "20000 100000" ) @@ -263,7 +210,6 @@ static INPUT_PORTS_START( finalizb ) PORT_DIPUNKNOWN( 0x40, 0x40 ) PORT_MODIFY("DSW3") - PORT_DIPUNKNOWN( 0x04, 0x04 ) PORT_DIPUNKNOWN( 0x08, 0x08 ) INPUT_PORTS_END @@ -404,4 +350,3 @@ static DRIVER_INIT( finalizr ) GAME( 1985, finalizr, 0, finalizr, finalizr, finalizr, ROT90, "Konami", "Finalizer - Super Transformation", GAME_IMPERFECT_SOUND ) GAME( 1985, finalizb, finalizr, finalizr, finalizb, finalizr, ROT90, "bootleg", "Finalizer - Super Transformation (bootleg)", GAME_IMPERFECT_SOUND ) - diff --git a/src/mame/drivers/flkatck.c b/src/mame/drivers/flkatck.c index 588d0bd899a..af651dd33ce 100644 --- a/src/mame/drivers/flkatck.c +++ b/src/mame/drivers/flkatck.c @@ -15,6 +15,7 @@ TO DO: #include "cpu/hd6309/hd6309.h" #include "sound/2151intf.h" #include "sound/k007232.h" +#include "konamipt.h" /* from video/flkatck.c */ VIDEO_START( flkatck ); @@ -149,43 +150,11 @@ ADDRESS_MAP_END static INPUT_PORTS_START( flkatck ) - PORT_START("DSW1") /* DSW #1 */ - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - //PORT_DIPSETTING( 0x00, "Invalid" ) - - PORT_START("DSW2") /* DSW #2 */ + PORT_START("DSW1") + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ + + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "1" ) PORT_DIPSETTING( 0x02, "2" ) @@ -208,7 +177,7 @@ static INPUT_PORTS_START( flkatck ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") /* DSW #3 */ + PORT_START("DSW3") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -221,35 +190,14 @@ static INPUT_PORTS_START( flkatck ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("COIN") /* COINSW & START */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) /* service */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - 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("P1") /* PLAYER 1 INPUTS */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P2") /* PLAYER 2 INPUTS */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("COIN") + KONAMI8_SYSTEM_UNK + + PORT_START("P1") + KONAMI8_B12_UNK(1) + + PORT_START("P2") + KONAMI8_B12_UNK(2) INPUT_PORTS_END static const gfx_layout gfxlayout = @@ -358,4 +306,3 @@ ROM_END GAME( 1987, mx5000, 0, flkatck, flkatck, 0, ROT90, "Konami", "MX5000", 0 ) GAME( 1987, flkatck, mx5000, flkatck, flkatck, 0, ROT90, "Konami", "Flak Attack (Japan)", 0 ) - diff --git a/src/mame/drivers/gberet.c b/src/mame/drivers/gberet.c index 337cfa57782..f3a77edc004 100644 --- a/src/mame/drivers/gberet.c +++ b/src/mame/drivers/gberet.c @@ -69,7 +69,7 @@ #include "cpu/z80/z80.h" #include "deprecat.h" #include "sound/sn76496.h" - +#include "konamipt.h" extern UINT8 *gberet_scrollram; @@ -213,66 +213,17 @@ ADDRESS_MAP_END static INPUT_PORTS_START( gberet ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // knife - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // shoot - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_MONO_B12_UNK // button 1 = knife, button 2 = shoot PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_COCKTAIL_B12_UNK PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_SYSTEM_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -309,13 +260,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( gberetb ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // knife - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // shoot - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_MONO_B12_UNK // button 1 = knife, button 2 = shoot PORT_START("P2") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -324,44 +269,12 @@ static INPUT_PORTS_START( gberetb ) PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -389,66 +302,17 @@ INPUT_PORTS_END static INPUT_PORTS_START( mrgoemon ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_MONO_B12_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_COCKTAIL_B12_UNK PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_SYSTEM_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/gbusters.c b/src/mame/drivers/gbusters.c index 9cdb5197cb8..d1969a2921f 100644 --- a/src/mame/drivers/gbusters.c +++ b/src/mame/drivers/gbusters.c @@ -13,6 +13,7 @@ Preliminary driver by: #include "video/konamiic.h" #include "sound/2151intf.h" #include "sound/k007232.h" +#include "konamipt.h" /* prototypes */ static MACHINE_RESET( gbusters ); @@ -173,40 +174,8 @@ ADDRESS_MAP_END static INPUT_PORTS_START( gbusters ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -245,34 +214,13 @@ static INPUT_PORTS_START( gbusters ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(2) INPUT_PORTS_END diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c index d80757edc60..2e89d26a6e2 100644 --- a/src/mame/drivers/gijoe.c +++ b/src/mame/drivers/gijoe.c @@ -43,7 +43,7 @@ Known Issues #include "machine/eeprom.h" #include "sound/2151intf.h" #include "sound/k054539.h" - +#include "konamipt.h" VIDEO_START( gijoe ); VIDEO_UPDATE( gijoe ); @@ -282,45 +282,21 @@ static INPUT_PORTS_START( gijoe ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_START("P1_P2") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) 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_BUTTON3 ) PORT_PLAYER(1) + KONAMI16_LSB_40(1, IPT_BUTTON3 ) PORT_DIPNAME( 0x0080, 0x0000, "Sound" ) PORT_DIPSETTING( 0x0080, DEF_STR( Mono ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Stereo ) ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) 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_BUTTON3 ) PORT_PLAYER(2) + KONAMI16_MSB_40(2, IPT_BUTTON3 ) PORT_DIPNAME( 0x8000, 0x8000, "Coin mechanism" ) PORT_DIPSETTING( 0x8000, "Common" ) PORT_DIPSETTING( 0x0000, "Independant" ) PORT_START("P3_P4") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) + KONAMI16_LSB_40(3, IPT_BUTTON3 ) PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Players ) ) PORT_DIPSETTING( 0x0080, "2" ) PORT_DIPSETTING( 0x0000, "4" ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) + KONAMI16_MSB_40(4, IPT_BUTTON3 ) PORT_DIPUNUSED( 0x8000, IP_ACTIVE_LOW ) INPUT_PORTS_END diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c index 57819fc9f37..abf96da9ef5 100644 --- a/src/mame/drivers/gradius3.c +++ b/src/mame/drivers/gradius3.c @@ -22,7 +22,7 @@ konamiic.c. They don't seem to be used by this game. #include "cpu/z80/z80.h" #include "sound/2151intf.h" #include "sound/k007232.h" - +#include "konamipt.h" extern UINT16 *gradius3_gfxram; extern int gradius3_priority; @@ -226,60 +226,14 @@ static INPUT_PORTS_START( gradius3 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // power-up - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // shoot - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) // missile - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_B123_UNK // button1 = power-up, button2 = shoot, button3 = missile PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_B123_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c index c9993a05b66..859dba6cdad 100644 --- a/src/mame/drivers/hcastle.c +++ b/src/mame/drivers/hcastle.c @@ -12,6 +12,7 @@ #include "sound/3812intf.h" #include "sound/k007232.h" #include "sound/k051649.h" +#include "konamipt.h" PALETTE_INIT( hcastle ); VIDEO_UPDATE( hcastle ); @@ -117,34 +118,13 @@ ADDRESS_MAP_END static INPUT_PORTS_START( hcastle ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_MONO_B12_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_COCKTAIL_B12_UNK PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x01, "Unused SW 1-0" ) @@ -171,40 +151,8 @@ static INPUT_PORTS_START( hcastle ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW2") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalidity" ) // Disables the 2 coin slots + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ PORT_START("DSW3") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) diff --git a/src/mame/drivers/hexion.c b/src/mame/drivers/hexion.c index 258d71cc643..7a3d9018c18 100644 --- a/src/mame/drivers/hexion.c +++ b/src/mame/drivers/hexion.c @@ -83,7 +83,7 @@ Notes: #include "deprecat.h" #include "sound/okim6295.h" #include "sound/k051649.h" - +#include "konamipt.h" VIDEO_START( hexion ); VIDEO_UPDATE( hexion ); @@ -147,40 +147,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( hexion ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) + KONAMI_COINAGE(DEF_STR( Free_Play ), DEF_STR( Free_Play )) PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) @@ -222,24 +189,10 @@ static INPUT_PORTS_START( hexion ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + KONAMI8_B12_START(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_B12_START(2) PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c index 068fb806483..ea4d640955b 100644 --- a/src/mame/drivers/hyperspt.c +++ b/src/mame/drivers/hyperspt.c @@ -14,7 +14,7 @@ Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz) #include "sound/sn76496.h" #include "sound/vlm5030.h" #include "machine/konami1.h" - +#include "konamipt.h" extern UINT8 *hyperspt_scroll; @@ -126,47 +126,6 @@ static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xe002, 0xe002) AM_DEVWRITE("sn", konami_SN76496_w) /* This address triggers the SN chip to read the data port. */ ADDRESS_MAP_END -static INPUT_PORTS_START( shared_dsw1 ) - /* This DSW1 is shared between games */ - PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) - /* 0x00 disables Coin 2. It still accepts coins and makes the sound, but - it doesn't give you any credit */ -INPUT_PORTS_END - static INPUT_PORTS_START( hyperspt ) PORT_START("SYSTEM") @@ -201,7 +160,9 @@ static INPUT_PORTS_START( hyperspt ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) //PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_INCLUDE(shared_dsw1) + PORT_START("DSW1") + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x01, "After Last Event" ) PORT_DIPLOCATION("SW2:1") @@ -238,24 +199,10 @@ INPUT_PORTS_END static INPUT_PORTS_START( roadf ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_B12_UNK PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL @@ -267,7 +214,9 @@ static INPUT_PORTS_START( roadf ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* the game doesn't boot if this is 1 */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_INCLUDE(shared_dsw1) + PORT_START("DSW1") + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:1") diff --git a/src/mame/drivers/ironhors.c b/src/mame/drivers/ironhors.c index 60f2879e34c..24c74c7564e 100644 --- a/src/mame/drivers/ironhors.c +++ b/src/mame/drivers/ironhors.c @@ -12,6 +12,7 @@ driver by Mirko Buffoni #include "cpu/m6809/m6809.h" #include "sound/2203intf.h" #include "sound/discrete.h" +#include "konamipt.h" extern UINT8 *ironhors_scroll; static UINT8 *ironhors_interrupt_enable; @@ -136,35 +137,15 @@ ADDRESS_MAP_END -static INPUT_PORTS_START( ironhors ) +static INPUT_PORTS_START( dairesya ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - - /* note that button 3 for player 1 and 2 are exchanged */ + KONAMI8_SYSTEM_UNK + PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_MONO_4WAY_B123_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_COCKTAIL_4WAY_B123_UNK PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -190,39 +171,8 @@ static INPUT_PORTS_START( ironhors ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW2") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW3") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Flip_Screen ) ) @@ -237,15 +187,15 @@ static INPUT_PORTS_START( ironhors ) PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END -static INPUT_PORTS_START( dairesya ) - PORT_INCLUDE( ironhors ) +static INPUT_PORTS_START( ironhors ) + PORT_INCLUDE( dairesya ) - /* here button 3 for player 1 and 2 are wired as usual */ + /* here button 3 for player 1 and 2 are exchanged */ PORT_MODIFY("P1") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL PORT_MODIFY("P2") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) INPUT_PORTS_END diff --git a/src/mame/drivers/jackal.c b/src/mame/drivers/jackal.c index 3df454037d6..1528f449818 100644 --- a/src/mame/drivers/jackal.c +++ b/src/mame/drivers/jackal.c @@ -74,7 +74,7 @@ Address Dir Data Description #include "cpu/m6809/m6809.h" #include "sound/2151intf.h" #include "includes/jackal.h" - +#include "konamipt.h" #define MASTER_CLOCK XTAL_18_432MHz #define SOUND_CLOCK XTAL_3_579545MHz @@ -128,39 +128,8 @@ ADDRESS_MAP_END static INPUT_PORTS_START( jackal ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION( "SW1:1,2,3,4" ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION( "SW1:5,6,7,8" ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW2:1,2" ) @@ -186,11 +155,7 @@ static INPUT_PORTS_START( jackal ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("IN0") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_SYSTEM_10 PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION( "SW3:1" ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -202,26 +167,13 @@ static INPUT_PORTS_START( jackal ) PORT_DIPSETTING( 0x00, DEF_STR( Stereo ) ) PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Fire") PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Bomb") PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // P1 button 3 + KONAMI8_B12(1) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION( "SW3:4" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Fire") PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Bomb") PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // P2 button 3 - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(2) INPUT_PORTS_END static INPUT_PORTS_START( topgunbl ) diff --git a/src/mame/drivers/jailbrek.c b/src/mame/drivers/jailbrek.c index 4ea3ba858d8..d8329456b93 100644 --- a/src/mame/drivers/jailbrek.c +++ b/src/mame/drivers/jailbrek.c @@ -35,13 +35,12 @@ Board Parts: #define MASTER_CLOCK XTAL_18_432MHz #define VOICE_CLOCK XTAL_3_579545MHz - #include "driver.h" #include "machine/konami1.h" #include "cpu/m6809/m6809.h" #include "sound/sn76496.h" #include "sound/vlm5030.h" - +#include "konamipt.h" extern UINT8 *jailbrek_scroll_x; extern UINT8 *jailbrek_scroll_dir; @@ -116,66 +115,18 @@ ADDRESS_MAP_END static INPUT_PORTS_START( jailbrek ) PORT_START("SYSTEM") /* $3300 */ - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_SYSTEM_10 PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") /* $3301 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // shoot - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // select - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(1) // button1 = shoot, button2 = select PORT_START("P2") /* $3302 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(2) PORT_START("DSW1") /* $3303 */ - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION( "SW1:4,3,2,1" ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION( "SW1:8,7,6,5" ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "Invalid", SW1) + /* "Invalid" = both coin slots disabled */ PORT_START("DSW2") /* $3100 */ PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW2:1,2" ) diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c index e0cd0d830f4..c9ceff68288 100644 --- a/src/mame/drivers/junofrst.c +++ b/src/mame/drivers/junofrst.c @@ -86,7 +86,7 @@ Blitter source graphics #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/flt_rc.h" - +#include "konamipt.h" static int i8039_status; @@ -225,71 +225,17 @@ ADDRESS_MAP_END static INPUT_PORTS_START( junofrst ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - + KONAMI8_MONO_B213_UNK + PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_B213_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) - /* 0x00 not remmed out since the game makes the usual sound if you insert the coin */ + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/labyrunr.c b/src/mame/drivers/labyrunr.c index 8b017b75af3..61b4331e125 100644 --- a/src/mame/drivers/labyrunr.c +++ b/src/mame/drivers/labyrunr.c @@ -13,7 +13,7 @@ Driver by Nicola Salmoria #include "cpu/hd6309/hd6309.h" #include "video/konamiic.h" #include "sound/2203intf.h" - +#include "konamipt.h" /* from video/labyrunr.c */ extern UINT8 *labyrunr_videoram1,*labyrunr_videoram2,*labyrunr_scrollram; @@ -83,41 +83,25 @@ ADDRESS_MAP_END ***************************************************************************/ static INPUT_PORTS_START( labyrunr ) + PORT_START("SYSTEM") + 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_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("P1") + KONAMI8_MONO_B12_START + + PORT_START("P2") + KONAMI8_COCKTAIL_B12_START + PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), DEF_STR( None )) + /* "None" = coin slot B disabled */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -154,36 +138,6 @@ static INPUT_PORTS_START( labyrunr ) PORT_DIPSETTING( 0x08, "3" ) PORT_DIPSETTING( 0x00, "5" ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("SYSTEM") - 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_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) INPUT_PORTS_END diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c index 45da5d19dc8..6a906ded542 100644 --- a/src/mame/drivers/mainevt.c +++ b/src/mame/drivers/mainevt.c @@ -29,7 +29,7 @@ Notes: #include "sound/2151intf.h" #include "sound/k007232.h" #include "sound/upd7759.h" - +#include "konamipt.h" VIDEO_UPDATE( mainevt ); VIDEO_UPDATE( dv ); @@ -251,44 +251,16 @@ static INPUT_PORTS_START( mainevt ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B21_UNK(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B21_UNK(2) PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B21_UNK(3) PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B21_UNK(4) PORT_START("DSW1") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) ) @@ -383,23 +355,7 @@ static INPUT_PORTS_START( mainev2p ) PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_MODIFY("DSW1") - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) + KONAMI_COINAGE_ALT INPUT_PORTS_END static INPUT_PORTS_START( devstors ) @@ -421,40 +377,8 @@ static INPUT_PORTS_START( devstors ) PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_MODIFY("DSW1") /* like mainevt, but different 0x00 settings */ - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ PORT_MODIFY("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c index fdec05783e8..3d879b37a6e 100644 --- a/src/mame/drivers/megazone.c +++ b/src/mame/drivers/megazone.c @@ -14,7 +14,7 @@ To enter service mode, keep 1&2 pressed on reset #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/flt_rc.h" - +#include "konamipt.h" extern UINT8 *megazone_scrollx; extern UINT8 *megazone_scrolly; @@ -119,8 +119,8 @@ static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x6000, 0x6000) AM_READ_PORT("IN0") /* IO Coin */ AM_RANGE(0x6001, 0x6001) AM_READ_PORT("IN1") /* P1 IO */ AM_RANGE(0x6002, 0x6002) AM_READ_PORT("IN2") /* P2 IO */ - AM_RANGE(0x8000, 0x8000) AM_READ_PORT("DSW1") /* DIP 1 */ - AM_RANGE(0x8001, 0x8001) AM_READ_PORT("DSW2") /* DIP 2 */ + AM_RANGE(0x8000, 0x8000) AM_READ_PORT("DSW1") + AM_RANGE(0x8001, 0x8001) AM_READ_PORT("DSW2") AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE(1) ADDRESS_MAP_END @@ -157,36 +157,15 @@ ADDRESS_MAP_END static INPUT_PORTS_START( megazone ) /* 0x6000 -> 0xe320 (CPU1) = 0x3b20 (CPU0) */ PORT_START("IN0") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK /* 0x6001 -> 0xe31e (CPU1) = 0x3b1e (CPU0) */ PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_B1_UNK /* 0x6002 -> 0xe31e (CPU1) = 0x3b1e (CPU0) or 0xe31f (CPU1) = 0x3b1f (CPU0) in "test mode" */ PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_B1_UNK /* 0x8000 -> 0xe020 (CPU1) = 0x3820 (CPU0) */ PORT_START("DSW1") @@ -214,40 +193,8 @@ static INPUT_PORTS_START( megazone ) /* 0x8001 -> 0xe021 (CPU1) = 0x3821 (CPU0) */ PORT_START("DSW2") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, DEF_STR( 1C_0C ) ) "Not use" + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ INPUT_PORTS_END static INPUT_PORTS_START( megazona ) @@ -593,4 +540,3 @@ GAME( 1983, megazonc, megazone, megazone, megazone, megazone, ROT90, "Konami / K /* this displays Konami and Kosuka copyright with a Konami / Interlogic logo */ GAME( 1983, megaznik, megazone, megazone, megazone, megazone, ROT90, "Konami / Interlogic + Kosuka", "Mega Zone (Interlogic + Kosuka)", 0 ) - diff --git a/src/mame/drivers/mikie.c b/src/mame/drivers/mikie.c index e176504becf..17a6afa0f3e 100644 --- a/src/mame/drivers/mikie.c +++ b/src/mame/drivers/mikie.c @@ -20,6 +20,7 @@ MAIN BOARD: #include "cpu/z80/z80.h" #include "cpu/m6809/m6809.h" #include "sound/sn76496.h" +#include "konamipt.h" extern WRITE8_HANDLER( mikie_videoram_w ); extern WRITE8_HANDLER( mikie_colorram_w ); @@ -103,34 +104,13 @@ ADDRESS_MAP_END static INPUT_PORTS_START( mikie ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_4WAY_B12_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_4WAY_B12_UNK PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Flip_Screen ) ) @@ -142,40 +122,8 @@ static INPUT_PORTS_START( mikie ) PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("DSW0") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/mogura.c b/src/mame/drivers/mogura.c index bd0411c4485..7d006e8502b 100644 --- a/src/mame/drivers/mogura.c +++ b/src/mame/drivers/mogura.c @@ -3,6 +3,7 @@ #include "driver.h" #include "cpu/z80/z80.h" #include "sound/dac.h" +#include "konamipt.h" static UINT8 *mogura_tileram; static UINT8* mogura_gfxram; @@ -142,44 +143,16 @@ static INPUT_PORTS_START( mogura ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + KONAMI8_B123_START(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_B123_START(2) PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(3) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) + KONAMI8_B123_START(3) PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(4) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + KONAMI8_B123_START(4) PORT_START("SERVICE") PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW) @@ -245,4 +218,3 @@ ROM_START( mogura ) ROM_END GAME( 1991, mogura, 0, mogura, mogura, 0, ROT0, "Konami", "Mogura Desse", 0 ) - diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c index 1328003fafa..797eb4676b7 100644 --- a/src/mame/drivers/moo.c +++ b/src/mame/drivers/moo.c @@ -49,6 +49,7 @@ Bucky: #include "sound/2151intf.h" #include "sound/okim6295.h" #include "sound/k054539.h" +#include "konamipt.h" VIDEO_START(moo); VIDEO_UPDATE(moo); @@ -258,16 +259,6 @@ static WRITE16_HANDLER( K053247_scattered_word_w ) #endif -static READ16_HANDLER( player1_r ) // players 1 and 3 -{ - return input_port_read(space->machine, "P1") | (input_port_read(space->machine, "P3")<<8); -} - -static READ16_HANDLER( player2_r ) // players 2 and 4 -{ - return input_port_read(space->machine, "P2") | (input_port_read(space->machine, "P4")<<8); -} - static WRITE16_HANDLER( moo_prot_w ) { UINT32 src1, src2, dst, length, a, b, res; @@ -310,8 +301,8 @@ static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x0c4000, 0x0c4001) AM_READ(K053246_word_r) AM_RANGE(0x0d6014, 0x0d6015) AM_READ(sound_status_r) AM_RANGE(0x0d6000, 0x0d601f) AM_READ(SMH_RAM) /* sound regs fall through */ - AM_RANGE(0x0da000, 0x0da001) AM_READ(player1_r) - AM_RANGE(0x0da002, 0x0da003) AM_READ(player2_r) + AM_RANGE(0x0da000, 0x0da001) AM_READ_PORT("P1_P3") + AM_RANGE(0x0da002, 0x0da003) AM_READ_PORT("P2_P4") AM_RANGE(0x0dc000, 0x0dc001) AM_READ_PORT("IN0") AM_RANGE(0x0dc002, 0x0dc003) AM_READ(control1_r) AM_RANGE(0x0de000, 0x0de001) AM_READ(control2_r) @@ -359,8 +350,8 @@ static ADDRESS_MAP_START( readmembl, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x0c2f00, 0x0c2f01) AM_READNOP /* heck if I know, but it's polled constantly */ AM_RANGE(0x0c4000, 0x0c4001) AM_READ(K053246_word_r) AM_RANGE(0x0d6ffe, 0x0d6fff) AM_DEVREAD8("oki", okim6295_r, 0x00ff) - AM_RANGE(0x0da000, 0x0da001) AM_READ(player1_r) - AM_RANGE(0x0da002, 0x0da003) AM_READ(player2_r) + AM_RANGE(0x0da000, 0x0da001) AM_READ_PORT("P1_P3") + AM_RANGE(0x0da002, 0x0da003) AM_READ_PORT("P2_P4") AM_RANGE(0x0dc000, 0x0dc001) AM_READ_PORT("IN0") AM_RANGE(0x0dc002, 0x0dc003) AM_READ(control1_r) AM_RANGE(0x0de000, 0x0de001) AM_READ(control2_r) @@ -401,8 +392,8 @@ static ADDRESS_MAP_START( buckyreadmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x0d2000, 0x0d20ff) AM_READ(K054000_lsb_r) AM_RANGE(0x0d6014, 0x0d6015) AM_READ(sound_status_r) AM_RANGE(0x0d6000, 0x0d601f) AM_READ(SMH_RAM) /* sound regs fall through */ - AM_RANGE(0x0da000, 0x0da001) AM_READ(player1_r) - AM_RANGE(0x0da002, 0x0da003) AM_READ(player2_r) + AM_RANGE(0x0da000, 0x0da001) AM_READ_PORT("P1_P3") + AM_RANGE(0x0da002, 0x0da003) AM_READ_PORT("P2_P4") AM_RANGE(0x0dc000, 0x0dc001) AM_READ_PORT("IN0") AM_RANGE(0x0dc002, 0x0dc003) AM_READ(control1_r) AM_RANGE(0x0de000, 0x0de001) AM_READ(control2_r) @@ -494,62 +485,26 @@ static INPUT_PORTS_START( moo ) PORT_DIPSETTING( 0x40, "3") PORT_DIPSETTING( 0x80, "4") - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) - - PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + PORT_START("P1_P3") + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_START1 ) + KONAMI16_MSB( 3, IPT_UNKNOWN, IPT_START3 ) + + PORT_START("P2_P4") + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_START2 ) + KONAMI16_MSB( 4, IPT_UNKNOWN, IPT_START4 ) INPUT_PORTS_END /* Same as 'moo', but additional "Button 3" for all players */ static INPUT_PORTS_START( bucky ) PORT_INCLUDE( moo ) - PORT_MODIFY("P1") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - - PORT_MODIFY("P2") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - - PORT_MODIFY("P3") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) + PORT_MODIFY("P1_P3") + KONAMI16_LSB( 1, IPT_BUTTON3, IPT_START1 ) + KONAMI16_MSB( 3, IPT_BUTTON3, IPT_START3 ) - PORT_MODIFY("P4") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) + PORT_MODIFY("P2_P4") + KONAMI16_LSB( 2, IPT_BUTTON3, IPT_START2 ) + KONAMI16_MSB( 4, IPT_BUTTON3, IPT_START4 ) INPUT_PORTS_END diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index b15e8949b7a..5f97943e8d9 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -30,6 +30,7 @@ #include "cpu/z80/z80.h" #include "machine/eeprom.h" #include "sound/k054539.h" +#include "konamipt.h" VIDEO_START(gaiapols); VIDEO_START(dadandrn); @@ -314,26 +315,6 @@ static WRITE16_HANDLER( irq_ack_w ) } } -static READ16_HANDLER( player1_r ) -{ - return input_port_read(space->machine, "P1") | (input_port_read(space->machine, "P2")<<8); -} - -static READ16_HANDLER( player2_r ) -{ - return input_port_read(space->machine, "P3") | (input_port_read(space->machine, "P4")<<8); -} - -static READ16_HANDLER( mmplayer1_r ) -{ - return input_port_read(space->machine, "P1") | (input_port_read(space->machine, "P3")<<8); -} - -static READ16_HANDLER( mmplayer2_r ) -{ - return input_port_read(space->machine, "P2") | (input_port_read(space->machine, "P4")<<8); -} - static READ16_HANDLER( mmcoins_r ) { int res = input_port_read(space->machine, "IN0"); @@ -395,8 +376,8 @@ static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM) AM_RANGE(0x400000, 0x40ffff) AM_READ(K053247_scattered_word_r) AM_RANGE(0x482000, 0x48200f) AM_READ(K055673_rom_word_r) - AM_RANGE(0x494000, 0x494001) AM_READ(player1_r) - AM_RANGE(0x494002, 0x494003) AM_READ(player2_r) + AM_RANGE(0x494000, 0x494001) AM_READ_PORT("P1_P2") + AM_RANGE(0x494002, 0x494003) AM_READ_PORT("P3_P4") AM_RANGE(0x496000, 0x496001) AM_READ(mmcoins_r) AM_RANGE(0x496002, 0x496003) AM_READ(mweeprom_r) AM_RANGE(0x498014, 0x498015) AM_READ(sound_status_r) @@ -447,8 +428,8 @@ static ADDRESS_MAP_START( mmreadmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x250000, 0x25000f) AM_READ(K053250_0_r) AM_RANGE(0x268014, 0x268015) AM_READ(sound_status_r) AM_RANGE(0x268000, 0x26801f) AM_READ(SMH_RAM) - AM_RANGE(0x274000, 0x274001) AM_READ(mmplayer1_r) - AM_RANGE(0x274002, 0x274003) AM_READ(mmplayer2_r) + AM_RANGE(0x274000, 0x274001) AM_READ_PORT("P1_P3") + AM_RANGE(0x274002, 0x274003) AM_READ_PORT("P2_P4") AM_RANGE(0x278000, 0x278001) AM_READ(mmcoins_r) AM_RANGE(0x278002, 0x278003) AM_READ(vseeprom_r) AM_RANGE(0x27c000, 0x27c001) AM_READNOP // watchdog lives here @@ -503,8 +484,8 @@ static ADDRESS_MAP_START( vsreadmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x25c000, 0x25c03f) AM_READ(K055550_word_r) AM_RANGE(0x268014, 0x268015) AM_READ(sound_status_r) AM_RANGE(0x268000, 0x26801f) AM_READ(SMH_RAM) - AM_RANGE(0x274000, 0x274001) AM_READ(mmplayer1_r) - AM_RANGE(0x274002, 0x274003) AM_READ(mmplayer2_r) + AM_RANGE(0x274000, 0x274001) AM_READ_PORT("P1_P3") + AM_RANGE(0x274002, 0x274003) AM_READ_PORT("P2_P4") AM_RANGE(0x278000, 0x278001) AM_READ(mmcoins_r) AM_RANGE(0x278002, 0x278003) AM_READ(vseeprom_r) AM_RANGE(0x27c000, 0x27c001) AM_READNOP // watchdog lives here @@ -606,8 +587,8 @@ static ADDRESS_MAP_START( mcreadmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x3fffff) AM_READ(SMH_ROM) // data ROM AM_RANGE(0x402000, 0x40200f) AM_READ(K055673_rom_word_r) // sprite ROM readback AM_RANGE(0x412000, 0x412001) AM_READ(mccontrol_r) - AM_RANGE(0x414000, 0x414001) AM_READ(player1_r) - AM_RANGE(0x414002, 0x414003) AM_READ(player2_r) + AM_RANGE(0x414000, 0x414001) AM_READ_PORT("P1_P2") + AM_RANGE(0x414002, 0x414003) AM_READ_PORT("P3_P4") AM_RANGE(0x416000, 0x416001) AM_READ(mmcoins_r) // coin AM_RANGE(0x416002, 0x416003) AM_READ(mweeprom_r) // eeprom read AM_RANGE(0x418014, 0x418015) AM_READ(sound_status_r) // z80 status @@ -1124,45 +1105,13 @@ static INPUT_PORTS_START( mystwarr ) PORT_DIPSETTING( 0x40, "2" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + PORT_START("P1_P2") + KONAMI16_LSB(1, IPT_BUTTON3, IPT_START1 ) + KONAMI16_MSB(2, IPT_BUTTON3, IPT_START2 ) - PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) - - PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + PORT_START("P3_P4") + KONAMI16_LSB(3, IPT_BUTTON3, IPT_START3 ) + KONAMI16_MSB(4, IPT_BUTTON3, IPT_START4 ) INPUT_PORTS_END static INPUT_PORTS_START( metamrph ) @@ -1194,45 +1143,13 @@ static INPUT_PORTS_START( metamrph ) PORT_DIPSETTING( 0x80, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + PORT_START("P1_P3") + KONAMI16_LSB(1, IPT_BUTTON3, IPT_START1 ) + KONAMI16_MSB(3, IPT_BUTTON3, IPT_START3 ) - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) - - PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + PORT_START("P2_P4") + KONAMI16_LSB(2, IPT_BUTTON3, IPT_START2 ) + KONAMI16_MSB(4, IPT_BUTTON3, IPT_START4 ) INPUT_PORTS_END static INPUT_PORTS_START( viostorm ) @@ -1264,45 +1181,13 @@ static INPUT_PORTS_START( viostorm ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x80, "2" ) - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) + PORT_START("P1_P3") + KONAMI16_LSB(1, IPT_BUTTON3, IPT_START1 ) + KONAMI16_MSB(3, IPT_BUTTON3, IPT_START3 ) - PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + PORT_START("P2_P4") + KONAMI16_LSB(2, IPT_BUTTON3, IPT_START2 ) + KONAMI16_MSB(4, IPT_BUTTON3, IPT_START4 ) INPUT_PORTS_END static INPUT_PORTS_START( dadandrn ) @@ -1331,44 +1216,16 @@ static INPUT_PORTS_START( dadandrn ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + KONAMI8_B123_START(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_B123_START(2) PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) + KONAMI8_B123_START(3) PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + KONAMI8_B123_START(4) INPUT_PORTS_END static INPUT_PORTS_START( martchmp ) @@ -1396,45 +1253,13 @@ static INPUT_PORTS_START( martchmp ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + PORT_START("P1_P2") + KONAMI16_LSB(1, IPT_BUTTON3, IPT_START1 ) + KONAMI16_MSB(2, IPT_BUTTON3, IPT_START2 ) - PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) - - PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + PORT_START("P3_P4") + KONAMI16_LSB(3, IPT_BUTTON3, IPT_START3 ) + KONAMI16_MSB(4, IPT_BUTTON3, IPT_START4 ) INPUT_PORTS_END /**********************************************************************************/ @@ -1785,8 +1610,8 @@ ROM_END ROM_START( mtlchamp ) /* main program */ ROM_REGION( 0x400000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "234eab01.20f", 0x000000, 0x40000, CRC(7c4d1e50) SHA1(f943b955aa66f0892c20df7a94fc8bf070bf4624) ) - ROM_LOAD16_BYTE( "234eab02.20g", 0x000001, 0x40000, CRC(d8bc85c9) SHA1(40a13b4139dd24c06378c6bd982ef3f5fd646dcc) ) + ROM_LOAD16_BYTE( "234eab01.20f", 0x000000, 0x40000, CRC(7c4d1e50) SHA1(f943b955aa66f0892c20df7a94fc8bf070bf4624) ) + ROM_LOAD16_BYTE( "234eab02.20g", 0x000001, 0x40000, CRC(d8bc85c9) SHA1(40a13b4139dd24c06378c6bd982ef3f5fd646dcc) ) ROM_LOAD16_BYTE( "234_d03.19f", 0x300000, 0x80000, CRC(abb577c6) SHA1(493f11a10a4d5b62d755ff8274e77d898544944f) ) ROM_LOAD16_BYTE( "234_d04.19g", 0x300001, 0x80000, CRC(030a1925) SHA1(03783488950c9f27af5948e7b9f6a609c2df6e0b) ) @@ -1819,8 +1644,8 @@ ROM_END ROM_START( mtlchmp1 ) /* main program */ ROM_REGION( 0x400000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "234eaa01.20f", 0x000000, 0x40000, CRC(8fa731db) SHA1(e2ed81762070a764f51aae36ce03859b5d86520d) ) - ROM_LOAD16_BYTE( "234eaa02.20g", 0x000001, 0x40000, CRC(e7b50b54) SHA1(594391a37479e6973aadd1fc866671c306a75497) ) + ROM_LOAD16_BYTE( "234eaa01.20f", 0x000000, 0x40000, CRC(8fa731db) SHA1(e2ed81762070a764f51aae36ce03859b5d86520d) ) + ROM_LOAD16_BYTE( "234eaa02.20g", 0x000001, 0x40000, CRC(e7b50b54) SHA1(594391a37479e6973aadd1fc866671c306a75497) ) ROM_LOAD16_BYTE( "234_d03.19f", 0x300000, 0x80000, CRC(abb577c6) SHA1(493f11a10a4d5b62d755ff8274e77d898544944f) ) ROM_LOAD16_BYTE( "234_d04.19g", 0x300001, 0x80000, CRC(030a1925) SHA1(03783488950c9f27af5948e7b9f6a609c2df6e0b) ) @@ -2090,8 +1915,8 @@ ROM_END ROM_START( mmaulers ) /* main program */ ROM_REGION( 0x400000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "170eaa07.24m", 0x000000, 0x80000, CRC(5458bd93) SHA1(d27a29076be3c745e3efdb1c528b07bd5d8aff1c) ) - ROM_LOAD16_BYTE( "170eaa09.19l", 0x000001, 0x80000, CRC(99c95c7b) SHA1(7f22930c2fe21205ccd01b80566d6bc31fea34d2) ) + ROM_LOAD16_BYTE( "170eaa07.24m", 0x000000, 0x80000, CRC(5458bd93) SHA1(d27a29076be3c745e3efdb1c528b07bd5d8aff1c) ) + ROM_LOAD16_BYTE( "170eaa09.19l", 0x000001, 0x80000, CRC(99c95c7b) SHA1(7f22930c2fe21205ccd01b80566d6bc31fea34d2) ) ROM_LOAD16_BYTE( "170a08.21m", 0x100000, 0x40000, CRC(03c59ba2) SHA1(041473fe5f9004bfb7ca767c2004154c27f726ff) ) ROM_LOAD16_BYTE( "170a10.17l", 0x100001, 0x40000, CRC(8a340909) SHA1(3e2ef2642e792cdc38b3442df67377ed9e70d3ab) ) @@ -2204,4 +2029,3 @@ GAME( 1993, mtlchmpa, mtlchamp, martchmp, martchmp, 0, ROT0, "Konami", " GAME( 1993, gaiapols, 0, gaiapols, dadandrn, 0, ROT90, "Konami", "Gaiapolis (ver EAF)", GAME_IMPERFECT_GRAPHICS ) GAME( 1993, gaiapolu, gaiapols, gaiapols, dadandrn, 0, ROT90, "Konami", "Gaiapolis (ver UAF)", GAME_IMPERFECT_GRAPHICS ) GAME( 1993, gaiapolj, gaiapols, gaiapols, dadandrn, 0, ROT90, "Konami", "Gaiapolis (ver JAF)", GAME_IMPERFECT_GRAPHICS ) - diff --git a/src/mame/drivers/nemesis.c b/src/mame/drivers/nemesis.c index 3923fc07a97..1af9fbbfe19 100644 --- a/src/mame/drivers/nemesis.c +++ b/src/mame/drivers/nemesis.c @@ -50,7 +50,7 @@ So this is the correct behavior of real hardware, not an emulation bug. #include "sound/k007232.h" #include "sound/k051649.h" #include "includes/nemesis.h" - +#include "konamipt.h" int nemesis_irq_on = 0; int nemesis_irq2_on = 0; @@ -628,43 +628,6 @@ ADDRESS_MAP_END /******************************************************************************/ -#define GX400_COINAGE_DIP \ - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4") \ - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) \ - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) \ - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) \ - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) \ - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) \ - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) \ - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) \ - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) \ - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) \ - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) \ - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) \ - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) \ - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) \ - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) \ - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \ - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:5,6,7,8") \ - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) \ - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) \ - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \ - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) \ - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) \ - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \ - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) \ - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) \ - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) \ - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) \ - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) \ - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) \ - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) \ - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) \ - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) \ - PORT_DIPSETTING( 0x00, "Disabled" ) - - static INPUT_PORTS_START( nemesis ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -711,7 +674,8 @@ static INPUT_PORTS_START( nemesis ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("DSW0") - GX400_COINAGE_DIP + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), DEF_STR( None ), SWA) + /* "None" = coin slot B disabled */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") @@ -739,75 +703,19 @@ INPUT_PORTS_END static INPUT_PORTS_START( nemesuk ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_INCLUDE( nemesis ) - PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) // power-up - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) // shoot - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) // missile - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - - PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - - PORT_START("TEST") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWT:1") - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Version ) ) PORT_DIPLOCATION("SWT:2") - PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x00, "Vs" ) - PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SWT:3" ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - - PORT_START("DSW0") - GX400_COINAGE_DIP - - PORT_START("DSW1") + PORT_MODIFY("DSW1") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x03, "2" ) PORT_DIPSETTING( 0x02, "3" ) PORT_DIPSETTING( 0x01, "5" ) PORT_DIPSETTING( 0x00, "7" ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4,5") PORT_DIPSETTING( 0x18, "20k and every 70k" ) PORT_DIPSETTING( 0x10, "30k and every 80k" ) PORT_DIPSETTING( 0x08, "20k" ) PORT_DIPSETTING( 0x00, "30k" ) - PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:6,7") - PORT_DIPSETTING( 0x60, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Medium ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END @@ -830,6 +738,11 @@ static INPUT_PORTS_START( konamigt ) PORT_START("IN2") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_START("IN3") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) +// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) + PORT_START("TEST") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWT:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -845,7 +758,8 @@ static INPUT_PORTS_START( konamigt ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("DSW0") - GX400_COINAGE_DIP + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SWA) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") @@ -874,11 +788,6 @@ static INPUT_PORTS_START( konamigt ) PORT_START("PADDLE") PORT_BIT( 0x7f, 0x40, IPT_PADDLE ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) - - PORT_START("IN3") - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) -// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) INPUT_PORTS_END @@ -901,6 +810,11 @@ static INPUT_PORTS_START( rf2 ) PORT_START("IN2") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("IN3") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) +// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) + PORT_START("TEST") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWT:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -916,7 +830,8 @@ static INPUT_PORTS_START( rf2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DSW0") - GX400_COINAGE_DIP + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SWA) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") @@ -945,43 +860,19 @@ static INPUT_PORTS_START( rf2 ) PORT_START("PADDLE") PORT_BIT( 0x7f, 0x40, IPT_PADDLE ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) - - PORT_START("IN3") - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) -// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) INPUT_PORTS_END static INPUT_PORTS_START( gwarrior ) PORT_START("IN0") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + KONAMI8_B321(1) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + KONAMI8_B321(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("TEST") @@ -999,7 +890,8 @@ static INPUT_PORTS_START( gwarrior ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DSW0") - GX400_COINAGE_DIP + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SWA) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") @@ -1028,34 +920,13 @@ INPUT_PORTS_END static INPUT_PORTS_START( twinbee ) PORT_START("IN0") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B12_UNK(1) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B12_UNK(2) PORT_START("TEST") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWT:1") @@ -1072,7 +943,8 @@ static INPUT_PORTS_START( twinbee ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DSW0") - GX400_COINAGE_DIP + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SWA) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") @@ -1101,33 +973,14 @@ INPUT_PORTS_END static INPUT_PORTS_START( gradius ) PORT_START("IN0") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // power-up - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) // shoot - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // missile + KONAMI8_B132(1) // button1 = power-up, button3 = shoot, button2 = missile PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + KONAMI8_B132(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("TEST") @@ -1145,7 +998,8 @@ static INPUT_PORTS_START( gradius ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DSW0") - GX400_COINAGE_DIP + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), DEF_STR( None ), SWA) + /* "None" = coin slot B disabled */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") @@ -1303,40 +1157,8 @@ static INPUT_PORTS_START( lifefrcj ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("DSW0") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW0:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW0:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) + KONAMI_COINAGE_LOC("Invalid", "Invalid", SW0) + /* "Invalid" = both coin slots disabled */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") @@ -1399,40 +1221,8 @@ static INPUT_PORTS_START( blkpnthr ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START("DSW0") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW0:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW0:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), DEF_STR( None ), SW0) + /* "None" = coin slot B disabled */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") @@ -1460,11 +1250,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( citybomb ) PORT_START("IN0") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_SYSTEM_10 PORT_DIPNAME( 0x20, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWT:1") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) @@ -1474,62 +1260,17 @@ static INPUT_PORTS_START( citybomb ) PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SWT:3" ) PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + KONAMI8_B123(1) PORT_DIPNAME( 0x80, 0x80, "Device Type" ) PORT_DIPLOCATION("SWT:4") PORT_DIPSETTING( 0x00, "Handle" ) PORT_DIPSETTING( 0x80, DEF_STR( Joystick ) ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + KONAMI8_B123_UNK(2) PORT_START("DSW0") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW0:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW0:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "Invalid", SW0) + /* "Invalid" = both coin slots disabled */ PORT_START("DSW1") PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:1") @@ -1551,7 +1292,7 @@ static INPUT_PORTS_START( citybomb ) /* WEC Le Mans 24 specific control? */ PORT_START("ACCEL") /* Accelerator */ - PORT_BIT( 0xff, 0, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) + PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_START("WHEEL") /* Steering Wheel */ PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) @@ -1559,11 +1300,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( nyanpani ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_SYSTEM_10 PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWT:1") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1571,60 +1308,14 @@ static INPUT_PORTS_START( nyanpani ) PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SWT:2" ) PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B123_UNK(1) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_B123_UNK(2) PORT_START("DSW0") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW0:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW0:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "Invalid", SW0) + /* "Invalid" = both coin slots disabled */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") @@ -1657,7 +1348,8 @@ static INPUT_PORTS_START( hcrash ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Brake (WEC Le Mans 24 cabinet)") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x02) // only in WEC Le Mans 24 cabinets + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x02) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) // must be 0 otherwise game freezes when using WEC Le Mans 24 cabinet PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -1691,7 +1383,8 @@ static INPUT_PORTS_START( hcrash ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW0") - GX400_COINAGE_DIP + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "Invalid", SWA) + /* "Invalid" = both coin slots disabled */ PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:1,2") @@ -1722,13 +1415,14 @@ static INPUT_PORTS_START( hcrash ) PORT_BIT( 0x7f, 0x40, IPT_PADDLE ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_START("IN3") - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Brake (Konami GT cabinet)") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x03, PORTCOND_EQUALS, 0x01) // only in Konami GT cabinet with brake + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x03, PORTCOND_NOTEQUALS, 0x01) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) /* WEC Le Mans 24 specific control */ PORT_START("ACCEL") /* Accelerator */ - PORT_BIT( 0xff, 0, IPT_PEDAL ) PORT_MINMAX(0,0x80) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) + PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x80) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_START("WHEEL") /* Steering Wheel */ PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) diff --git a/src/mame/drivers/pandoras.c b/src/mame/drivers/pandoras.c index 1334075af15..d7fead2a56c 100644 --- a/src/mame/drivers/pandoras.c +++ b/src/mame/drivers/pandoras.c @@ -19,6 +19,7 @@ TODO: #include "cpu/mcs48/mcs48.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "konamipt.h" static int irq_enable_a, irq_enable_b; static int firq_old_data_a, firq_old_data_b; @@ -201,40 +202,8 @@ ADDRESS_MAP_END static INPUT_PORTS_START( pandoras ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) @@ -286,29 +255,15 @@ static INPUT_PORTS_START( pandoras ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_SYSTEM_10 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_MONO_B1_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_COCKTAIL_B1_UNK INPUT_PORTS_END @@ -461,6 +416,4 @@ ROM_START( pandoras ) ROM_END - GAME( 1984, pandoras, 0, pandoras, pandoras, 0, ROT90, "Konami/Interlogic", "Pandora's Palace", 0 ) - diff --git a/src/mame/drivers/parodius.c b/src/mame/drivers/parodius.c index 0a548ca08bc..d92de821054 100644 --- a/src/mame/drivers/parodius.c +++ b/src/mame/drivers/parodius.c @@ -12,6 +12,7 @@ driver by Nicola Salmoria #include "video/konamiic.h" #include "sound/2151intf.h" #include "sound/k053260.h" +#include "konamipt.h" /* prototypes */ static MACHINE_RESET( parodius ); @@ -183,60 +184,14 @@ ADDRESS_MAP_END static INPUT_PORTS_START( parodius ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // power-up - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // shoot - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) // missile + KONAMI8_ALT_B123(1) // button1 = power-up, button2 = shoot, button3 = missile PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + KONAMI8_ALT_B123(2) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "No Use" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -414,6 +369,5 @@ static DRIVER_INIT( parodius ) } - GAME( 1990, parodius, 0, parodius, parodius, parodius, ROT0, "Konami", "Parodius DA! (World)", 0 ) GAME( 1990, parodisj, parodius, parodius, parodius, parodius, ROT0, "Konami", "Parodius DA! (Japan)", 0 ) diff --git a/src/mame/drivers/rocnrope.c b/src/mame/drivers/rocnrope.c index bf383dcd706..d2c8a1a0725 100644 --- a/src/mame/drivers/rocnrope.c +++ b/src/mame/drivers/rocnrope.c @@ -8,6 +8,7 @@ Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz) #include "cpu/m6809/m6809.h" #include "machine/konami1.h" #include "audio/timeplt.h" +#include "konamipt.h" #define MASTER_CLOCK XTAL_18_432MHz @@ -63,71 +64,17 @@ ADDRESS_MAP_END static INPUT_PORTS_START( rocnrope ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_4WAY_B12_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_4WAY_B12_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) - /* 0x00 disables Coin 2. It still accepts coins and makes the sound, but it doesn't give you any credit */ + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) @@ -333,6 +280,5 @@ static DRIVER_INIT( rocnropk ) } - GAME( 1983, rocnrope, 0, rocnrope, rocnrope, rocnrope, ROT270, "Konami", "Roc'n Rope", 0 ) GAME( 1983, rocnropk, rocnrope, rocnrope, rocnrope, rocnropk, ROT270, "Konami + Kosuka", "Roc'n Rope (Kosuka)", 0 ) diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index 58abe93050f..5a2221eb2b1 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -42,6 +42,7 @@ #include "cpu/z80/z80.h" #include "machine/eeprom.h" #include "sound/k054539.h" +#include "konamipt.h" VIDEO_START( rng ); VIDEO_UPDATE( rng ); @@ -406,44 +407,16 @@ static INPUT_PORTS_START( rng ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + KONAMI8_B123_START(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_B123_START(2) PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) + KONAMI8_B123_START(3) PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + KONAMI8_B123_START(4) INPUT_PORTS_END diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c index aa6c2c22a1f..29620a480dc 100644 --- a/src/mame/drivers/sbasketb.c +++ b/src/mame/drivers/sbasketb.c @@ -46,7 +46,7 @@ CPU/Video Board Parts: #include "sound/sn76496.h" #include "sound/vlm5030.h" #include "machine/konami1.h" - +#include "konamipt.h" extern UINT8 *sbasketb_scroll; extern UINT8 *sbasketb_palettebank; @@ -122,34 +122,16 @@ ADDRESS_MAP_END static INPUT_PORTS_START( sbasketb ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - + KONAMI8_SYSTEM_UNK + PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_B123_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_B123_UNK + + PORT_START("DSW1") + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), DEF_STR( Free_Play ), SW1) PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Game_Time ) ) PORT_DIPLOCATION( "SW2:1,2" ) @@ -174,42 +156,6 @@ static INPUT_PORTS_START( sbasketb ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW2:8" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION( "SW1:1,2,3,4" ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION( "SW1:5,6,7,8" ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Invalid" ) INPUT_PORTS_END diff --git a/src/mame/drivers/scotrsht.c b/src/mame/drivers/scotrsht.c index 797dc26f62b..8c19e651121 100644 --- a/src/mame/drivers/scotrsht.c +++ b/src/mame/drivers/scotrsht.c @@ -36,6 +36,7 @@ Stephh's notes (based on the game M6502 code and some tests) : #include "cpu/z80/z80.h" #include "cpu/m6809/m6809.h" #include "sound/2203intf.h" +#include "konamipt.h" extern UINT8 *scotrsht_scroll; @@ -116,60 +117,14 @@ static INPUT_PORTS_START( scotrsht ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") /* $3301 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) 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 ) + KONAMI8_B1_UNK(1) PORT_START("P2") /* $3302 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) 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 ) + KONAMI8_B1_UNK(2) PORT_START("DSW1") /* $3303 -> $196e */ - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) /* see notes */ - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Disable All Coin Slots" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ PORT_START("DSW2") /* $3100 -> $196f */ PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c index 6ce955c4c61..157a652ba17 100644 --- a/src/mame/drivers/simpsons.c +++ b/src/mame/drivers/simpsons.c @@ -73,6 +73,7 @@ Custom ICs - 053260 - sound chip (QFP80) #include "sound/2151intf.h" #include "sound/k053260.h" #include "includes/simpsons.h" +#include "konamipt.h" /*************************************************************************** @@ -149,47 +150,19 @@ ADDRESS_MAP_END ***************************************************************************/ static INPUT_PORTS_START( simpsons ) - PORT_START("P1") /* IN0 - Player 1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //BUTTON3 Unused - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") /* IN1 - Player 2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //BUTTON3 Unused - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("P3") /* IN2 - Player 3 - Used on the 4p version */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //BUTTON3 Unused - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) - - PORT_START("P4") /* IN3 - Player 4 - Used on the 4p version */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //BUTTON3 Unused - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + PORT_START("P1") + KONAMI8_B12_START(1) - PORT_START("COIN") /* IN4 */ + PORT_START("P2") + KONAMI8_B12_START(2) + + PORT_START("P3") + KONAMI8_B12_START(3) + + PORT_START("P4") + KONAMI8_B12_START(4) + + PORT_START("COIN") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) @@ -199,51 +172,23 @@ static INPUT_PORTS_START( simpsons ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //SERVICE3 Unused PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //SERVICE4 Unused - PORT_START("TEST") /* IN5 */ + PORT_START("TEST") PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW ) PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END static INPUT_PORTS_START( simpsn2p ) - PORT_START("P1") /* IN0 - Player 1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //BUTTON3 Unused - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") /* IN1 - Player 2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //BUTTON3 Unused - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("P3") /* IN2 - Player 3 - Used on the 4p version */ -// PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) -// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) -// PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) -// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) -// PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) -// PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) -// PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //BUTTON3 Unused -// PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) - - PORT_START("P4") /* IN3 - Player 4 - Used on the 4p version */ -// PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) -// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) -// PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) -// PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) -// PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) -// PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) -// PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) //BUTTON3 Unused -// PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) + PORT_START("P1") + KONAMI8_B12_START(1) + + PORT_START("P2") + KONAMI8_B12_START(2) + + PORT_START("P3") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("P4") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("COIN") /* IN4 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) diff --git a/src/mame/drivers/spy.c b/src/mame/drivers/spy.c index f14d2964728..0576b04985c 100644 --- a/src/mame/drivers/spy.c +++ b/src/mame/drivers/spy.c @@ -23,7 +23,7 @@ Revisions: #include "video/konamiic.h" #include "sound/3812intf.h" #include "sound/k007232.h" - +#include "konamipt.h" VIDEO_START( spy ); VIDEO_UPDATE( spy ); @@ -399,60 +399,14 @@ ADDRESS_MAP_END static INPUT_PORTS_START( spy ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 3 */ + KONAMI8_ALT_B21(1) /* button 3 unused */ PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 3 */ + KONAMI8_ALT_B21(2) /* button 3 unused */ PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/surpratk.c b/src/mame/drivers/surpratk.c index 6668af2fe84..5374caa0b65 100644 --- a/src/mame/drivers/surpratk.c +++ b/src/mame/drivers/surpratk.c @@ -12,6 +12,7 @@ driver by Nicola Salmoria #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */ #include "video/konamiic.h" #include "sound/2151intf.h" +#include "konamipt.h" /* prototypes */ static MACHINE_RESET( surpratk ); @@ -122,60 +123,13 @@ ADDRESS_MAP_END static INPUT_PORTS_START( surpratk ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_ALT_B12(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_ALT_B12(2) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "No Use" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), DEF_STR( Free_Play )) PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c index bd2c279684f..3c96004c6da 100644 --- a/src/mame/drivers/thunderx.c +++ b/src/mame/drivers/thunderx.c @@ -14,6 +14,7 @@ K052591 emulation by Eddie Edwards #include "video/konamiic.h" #include "sound/2151intf.h" #include "sound/k007232.h" +#include "konamipt.h" static MACHINE_RESET( scontra ); static MACHINE_RESET( thunderx ); @@ -434,70 +435,17 @@ ADDRESS_MAP_END static INPUT_PORTS_START( scontra ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(2) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -538,70 +486,20 @@ INPUT_PORTS_END static INPUT_PORTS_START( thunderx ) PORT_START("SYSTEM") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + KONAMI8_SYSTEM_10 PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B12_UNK(2) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/timeplt.c b/src/mame/drivers/timeplt.c index 4a425e0a920..e1ee6d3066f 100644 --- a/src/mame/drivers/timeplt.c +++ b/src/mame/drivers/timeplt.c @@ -48,12 +48,10 @@ #include "cpu/z80/z80.h" #include "timeplt.h" #include "audio/timeplt.h" - +#include "konamipt.h" #define MASTER_CLOCK XTAL_18_432MHz - - static UINT8 nmi_enable; @@ -175,64 +173,16 @@ ADDRESS_MAP_END static INPUT_PORTS_START( timeplt ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_B1_UNK PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_B1_UNK PORT_START("DSW0") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) + KONAMI_COINAGE(DEF_STR( Free_Play ), DEF_STR( Free_Play )) PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index 1a5ae6b8316..d3276f547c2 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -78,7 +78,7 @@ Updates: #include "sound/k007232.h" #include "sound/upd7759.h" #include "includes/tmnt.h" - +#include "konamipt.h" static int tmnt_soundlatch; static int cuebrick_snd_irqlatch, cuebrick_nvram_bank; @@ -1240,27 +1240,6 @@ static ADDRESS_MAP_START( prmrsocr_audio_map, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_END - -#define KONAMI_PLAYERS_INPUT_LSB( player, button3, start ) \ - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) \ - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \ - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) \ - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) \ - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \ - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) \ - PORT_BIT( 0x0040, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player) \ - PORT_BIT( 0x0080, IP_ACTIVE_LOW, start ) - -#define KONAMI_PLAYERS_INPUT_MSB( player, button3, start ) \ - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) \ - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \ - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) \ - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) \ - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \ - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) \ - PORT_BIT( 0x4000, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player) \ - PORT_BIT( 0x8000, IP_ACTIVE_LOW, start ) - static INPUT_PORTS_START( cuebrick ) PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -1273,10 +1252,10 @@ static INPUT_PORTS_START( cuebrick ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_BUTTON3, IPT_UNUSED ) + KONAMI16_LSB( 1, IPT_BUTTON3, IPT_UNUSED ) PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_BUTTON3, IPT_UNUSED ) + KONAMI16_LSB( 2, IPT_BUTTON3, IPT_UNUSED ) PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -1300,40 +1279,8 @@ static INPUT_PORTS_START( cuebrick ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW2") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ PORT_START("DSW3") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) @@ -1358,46 +1305,14 @@ static INPUT_PORTS_START( mia ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_BUTTON3, IPT_UNUSED ) + KONAMI16_LSB( 1, IPT_BUTTON3, IPT_UNUSED ) PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_BUTTON3, IPT_UNUSED ) + KONAMI16_LSB( 2, IPT_BUTTON3, IPT_UNUSED ) PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -1443,13 +1358,16 @@ static INPUT_PORTS_START( tmnt ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) PORT_START("P3") - KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) + + PORT_START("P4") + KONAMI16_LSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) PORT_START("DSW1") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) ) @@ -1494,9 +1412,6 @@ static INPUT_PORTS_START( tmnt ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("P4") - KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) - PORT_START("DSW3") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -1523,49 +1438,20 @@ static INPUT_PORTS_START( tmnt2p ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_START1 ) PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_START2 ) PORT_START("P3") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("P4") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) @@ -1591,9 +1477,6 @@ static INPUT_PORTS_START( tmnt2p ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("P4") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("DSW3") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -1686,12 +1569,12 @@ static INPUT_PORTS_START( punkshot ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_START("P1/P2") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) - KONAMI_PLAYERS_INPUT_MSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_MSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) PORT_START("P3/P4") - KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) - KONAMI_PLAYERS_INPUT_MSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_MSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) INPUT_PORTS_END static INPUT_PORTS_START( punksht2 ) @@ -1772,8 +1655,8 @@ static INPUT_PORTS_START( punksht2 ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_START("P1/P2") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) - KONAMI_PLAYERS_INPUT_MSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) + KONAMI16_MSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) PORT_START("P3/P4") PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1791,10 +1674,10 @@ static INPUT_PORTS_START( lgtnfght ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_BUTTON3, IPT_UNKNOWN ) + KONAMI16_LSB( 1, IPT_BUTTON3, IPT_UNKNOWN ) PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_BUTTON3, IPT_UNKNOWN ) + KONAMI16_LSB( 2, IPT_BUTTON3, IPT_UNKNOWN ) PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -1820,40 +1703,8 @@ static INPUT_PORTS_START( lgtnfght ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW2") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_START("DSW3") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) @@ -1870,12 +1721,6 @@ static INPUT_PORTS_START( lgtnfght ) INPUT_PORTS_END static INPUT_PORTS_START( blswhstl ) - PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) - - PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) - PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -1886,6 +1731,12 @@ static INPUT_PORTS_START( blswhstl ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* VBLANK? OBJMPX? */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("P1") + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) + + PORT_START("P2") + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) + PORT_START("EEPROM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ @@ -1893,49 +1744,9 @@ static INPUT_PORTS_START( blswhstl ) INPUT_PORTS_END static INPUT_PORTS_START( glfgreat ) - PORT_START("P1/P2") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_BUTTON3, IPT_BUTTON4 ) PORT_PLAYER(1) - KONAMI_PLAYERS_INPUT_MSB( 2, IPT_BUTTON3, IPT_BUTTON4 ) PORT_PLAYER(2) - - PORT_START("P3/P4") - KONAMI_PLAYERS_INPUT_LSB( 3, IPT_BUTTON3, IPT_BUTTON4 ) PORT_PLAYER(3) - KONAMI_PLAYERS_INPUT_MSB( 4, IPT_BUTTON3, IPT_BUTTON4 ) PORT_PLAYER(4) - PORT_START("DSW1/DSW2") - PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x000f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x0007, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x000e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0006, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x000d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x000c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x000b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x000a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x0009, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x00f0, 0x00f0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x0050, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0040, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x00f0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0030, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x0070, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0060, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x00d0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x00b0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x0090, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x0000, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ PORT_DIPNAME( 0x0300, 0x0100, "Players/Controllers" ) PORT_DIPSETTING( 0x0300, "4/1" ) PORT_DIPSETTING( 0x0200, "4/2" ) @@ -1984,15 +1795,17 @@ static INPUT_PORTS_START( glfgreat ) PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) -INPUT_PORTS_END -static INPUT_PORTS_START( ssriders ) - PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) + PORT_START("P1/P2") + KONAMI16_LSB( 1, IPT_BUTTON3, IPT_BUTTON4 ) + KONAMI16_MSB( 2, IPT_BUTTON3, IPT_BUTTON4 ) - PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) + PORT_START("P3/P4") + KONAMI16_LSB( 3, IPT_BUTTON3, IPT_BUTTON4 ) + KONAMI16_MSB( 4, IPT_BUTTON3, IPT_BUTTON4 ) +INPUT_PORTS_END +static INPUT_PORTS_START( ssriders ) PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -2003,6 +1816,18 @@ static INPUT_PORTS_START( ssriders ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("P1") + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_START1 ) + + PORT_START("P2") + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_START2 ) + + PORT_START("P3") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("P4") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("EEPROM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ @@ -2011,21 +1836,9 @@ static INPUT_PORTS_START( ssriders ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) - - PORT_START("P3") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P4") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END static INPUT_PORTS_START( ssridr4p ) - PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) - - PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) - PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -2036,6 +1849,18 @@ static INPUT_PORTS_START( ssridr4p ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) + PORT_START("P1") + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) + + PORT_START("P2") + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) + + PORT_START("P3") + KONAMI16_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) + + PORT_START("P4") + KONAMI16_LSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) + PORT_START("EEPROM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ @@ -2044,23 +1869,11 @@ static INPUT_PORTS_START( ssridr4p ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) - - PORT_START("P3") - KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) - - PORT_START("P4") - KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) INPUT_PORTS_END /* Same as 'ssridr4p', but additional Start button for each player. COIN3, COIN4, SERVICE3 and SERVICE4 only have an effect in the "test mode". */ static INPUT_PORTS_START( ssrid4ps ) - PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) - - PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) - PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -2071,6 +1884,18 @@ static INPUT_PORTS_START( ssrid4ps ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) + PORT_START("P1") + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_START1 ) + + PORT_START("P2") + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_START2 ) + + PORT_START("P3") + KONAMI16_LSB( 3, IPT_UNKNOWN, IPT_START3 ) + + PORT_START("P4") + KONAMI16_LSB( 4, IPT_UNKNOWN, IPT_START4 ) + PORT_START("EEPROM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ @@ -2079,22 +1904,10 @@ static INPUT_PORTS_START( ssrid4ps ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) - - PORT_START("P3") - KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_START3 ) - - PORT_START("P4") - KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_START4 ) INPUT_PORTS_END /* Version for the bootleg, which has the service switch a little different */ static INPUT_PORTS_START( sunsetbl ) - PORT_START("P1") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) - - PORT_START("P2") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) - PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -2105,6 +1918,18 @@ static INPUT_PORTS_START( sunsetbl ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) + PORT_START("P1") + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_START1 ) + + PORT_START("P2") + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_START2 ) + + PORT_START("P3") + KONAMI16_LSB( 3, IPT_UNKNOWN, IPT_START3 ) + + PORT_START("P4") + KONAMI16_LSB( 4, IPT_UNKNOWN, IPT_START4 ) + PORT_START("EEPROM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ @@ -2113,12 +1938,6 @@ static INPUT_PORTS_START( sunsetbl ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) - - PORT_START("P3") - KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_START3 ) - - PORT_START("P4") - KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_START4 ) INPUT_PORTS_END static INPUT_PORTS_START( qgakumon ) @@ -2142,6 +1961,12 @@ static INPUT_PORTS_START( qgakumon ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + PORT_START("P3") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("P4") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -2160,17 +1985,11 @@ static INPUT_PORTS_START( qgakumon ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) - - PORT_START("P3") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P4") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END static INPUT_PORTS_START( thndrx2 ) PORT_START("P1/COINS") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_START1 ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 ) @@ -2181,7 +2000,7 @@ static INPUT_PORTS_START( thndrx2 ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("P2/EEPROM") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_START2 ) PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2194,7 +2013,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( prmrsocr ) PORT_START("P1/COINS") - KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) + KONAMI16_LSB( 1, IPT_UNKNOWN, IPT_START1 ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE_NO_TOGGLE( 0x0200, IP_ACTIVE_LOW ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -2213,7 +2032,7 @@ static INPUT_PORTS_START( prmrsocr ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_START("P2/EEPROM") - KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) + KONAMI16_LSB( 2, IPT_UNKNOWN, IPT_START2 ) PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN2 ) diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index b3dd606c84b..a00bab6f991 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -69,7 +69,7 @@ C004 76489 #4 trigger #include "cpu/m6809/m6809.h" #include "sound/sn76496.h" #include "sound/flt_rc.h" - +#include "konamipt.h" extern UINT8 *tp84_bg_videoram; extern UINT8 *tp84_bg_colorram; @@ -205,70 +205,17 @@ ADDRESS_MAP_END static INPUT_PORTS_START( tp84 ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_B12_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_B12_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -295,94 +242,14 @@ static INPUT_PORTS_START( tp84 ) INPUT_PORTS_END static INPUT_PORTS_START( tp84a ) - PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( tp84 ) - PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Invalid" ) - - PORT_START("DSW2") + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "3" ) PORT_DIPSETTING( 0x02, "4" ) PORT_DIPSETTING( 0x01, "5" ) PORT_DIPSETTING( 0x00, "7" ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x18, 0x10, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x18, "10K 50K+" ) - PORT_DIPSETTING( 0x10, "20K 60K+" ) - PORT_DIPSETTING( 0x08, "30K 70K+" ) - PORT_DIPSETTING( 0x00, "40K 80K+" ) - PORT_DIPNAME( 0x60, 0x20, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x60, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END diff --git a/src/mame/drivers/tutankhm.c b/src/mame/drivers/tutankhm.c index 323623e8e98..ee4e6459f21 100644 --- a/src/mame/drivers/tutankhm.c +++ b/src/mame/drivers/tutankhm.c @@ -24,14 +24,12 @@ #include "tutankhm.h" #include "cpu/m6809/m6809.h" #include "audio/timeplt.h" - - +#include "konamipt.h" static UINT8 irq_toggle; static UINT8 irq_enable; - /************************************* * * Interrupts @@ -159,71 +157,17 @@ static INPUT_PORTS_START( tutankhm ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("IN0") - 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_LOW, IPT_START1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_SYSTEM_UNK PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_4WAY_B123_UNK PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_4WAY_B123_UNK PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, "Disabled" ) -/* 0x00 not commented out since the game makes the usual sound if you insert the coin */ + KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Coin B", SW1) + /* "No Coin B" = coins produce sound, but no effect on coin counter */ INPUT_PORTS_END diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c index 07491f005c2..10eb8e5ad13 100644 --- a/src/mame/drivers/twin16.c +++ b/src/mame/drivers/twin16.c @@ -59,6 +59,7 @@ Known Issues: #include "sound/k007232.h" #include "sound/upd7759.h" #include "includes/twin16.h" +#include "konamipt.h" UINT16 twin16_custom_video; UINT16 *twin16_gfx_rom; @@ -323,42 +324,6 @@ ADDRESS_MAP_END /* Input Ports */ -#define KONAMI_TWIN_COINAGE PORT_START("DSW1") \ - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) \ - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) \ - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) \ - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) \ - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) \ - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) \ - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) \ - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) \ - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) \ - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) \ - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) \ - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) \ - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) \ - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) \ - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) \ - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \ - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) \ - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) \ - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) \ - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \ - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) \ - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) \ - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \ - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) \ - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) \ - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) \ - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) \ - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) \ - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) \ - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) \ - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) \ - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) \ - PORT_DIPSETTING( 0x00, "Disabled" ) - static INPUT_PORTS_START( devilw ) PORT_START("SYSTEM") /* 0xa0001 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -371,31 +336,19 @@ static INPUT_PORTS_START( devilw ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") /* 0xa0003 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // start/powerup - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // attack - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) // jump - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(1) // button1 = start/powerup, button2 = attack, button3 = jump PORT_START("P2") /* 0xa0005 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(2) PORT_START("P3") /* 0xa0007 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - KONAMI_TWIN_COINAGE + PORT_START("DSW1") + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "2" ) PORT_DIPSETTING( 0x02, "3" ) @@ -411,7 +364,7 @@ static INPUT_PORTS_START( devilw ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") /* DSW3 0xa0019 */ + PORT_START("DSW3") /* 0xa0019 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -433,34 +386,14 @@ static INPUT_PORTS_START( darkadv ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_START("P1") /* 0xa0003 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // start/jump - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // attack - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) // dynamite + KONAMI8_B123(1) // button1 = start/jump, button2 = attack, button3 = dynamite PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_START("P2") /* 0xa0005 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(2) PORT_START("P3") /* 0xa0007 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(3) PORT_START("DSW1") /* Coinage */ PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) ) @@ -482,7 +415,7 @@ static INPUT_PORTS_START( darkadv ) PORT_DIPSETTING( 0x00, "Invalid" ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "2" ) PORT_DIPSETTING( 0x02, "3" ) @@ -498,7 +431,7 @@ static INPUT_PORTS_START( darkadv ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") /* DSW3 0xa0019 */ + PORT_START("DSW3") /* 0xa0019 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -520,31 +453,19 @@ static INPUT_PORTS_START( vulcan ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") /* 0xa0003 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // powerup - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // shoot - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) // missile - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(1) // button1 = powerup, button2 = shoot, button3 = missile PORT_START("P2") /* 0xa0005 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(2) PORT_START("P3") /* 0xa0007 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - KONAMI_TWIN_COINAGE + PORT_START("DSW1") + KONAMI_COINAGE(DEF_STR( Free_Play ), DEF_STR( None )) + /* "None" = coin slot B disabled */ - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "2" ) PORT_DIPSETTING( 0x02, "3" ) @@ -567,7 +488,7 @@ static INPUT_PORTS_START( vulcan ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") /* DSW3 0xa0018 */ + PORT_START("DSW3") /* 0xa0018 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -581,74 +502,14 @@ INPUT_PORTS_END static INPUT_PORTS_START( gradius2 ) // same as vulcan, different bonus - PORT_START("SYSTEM") /* 0xa0001 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) // advance through tests - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P1") /* 0xa0003 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // powerup - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // shoot - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) // missile - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P2") /* 0xa0005 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_INCLUDE( vulcan ) - PORT_START("P3") /* 0xa0007 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - KONAMI_TWIN_COINAGE - - PORT_START("DSW2") /* DSW2 */ - PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x03, "2" ) - PORT_DIPSETTING( 0x02, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x00, "7" ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x18, 0x18, DEF_STR (Bonus_Life ) ) PORT_DIPSETTING( 0x18, "20K 150K" ) PORT_DIPSETTING( 0x10, "30K 200K" ) PORT_DIPSETTING( 0x08, "20K" ) PORT_DIPSETTING( 0x00, "70K" ) - PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x60, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x20, "Difficult" ) - PORT_DIPSETTING( 0x00, "Very Difficult" ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("DSW3") /* DSW3 0xa0018 */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, "Upright Controls" ) - PORT_DIPSETTING( 0x02, DEF_STR( Single ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Dual ) ) - PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END static INPUT_PORTS_START( fround ) @@ -663,31 +524,19 @@ static INPUT_PORTS_START( fround ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") /* 0xa0003 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // face punch - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // body punch - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) // defend - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(1) // button1 = face punch, button2 = body punch, button3 = defend PORT_START("P2") /* 0xa0005 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED) + KONAMI8_B123_UNK(2) PORT_START("P3") /* 0xa0007 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - KONAMI_TWIN_COINAGE + PORT_START("DSW1") + KONAMI_COINAGE(DEF_STR( Free_Play ), "No Coin B") + /* "No Coin B" = coins produce sound, but no effect on coin counter */ - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, "Energy" ) PORT_DIPSETTING( 0x03, "18" ) PORT_DIPSETTING( 0x02, "20" ) @@ -703,7 +552,7 @@ static INPUT_PORTS_START( fround ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") /* DSW3 0xa0018 */ + PORT_START("DSW3") /* 0xa0018 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -725,31 +574,19 @@ static INPUT_PORTS_START( miaj ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") /* 0xa0003 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // knife - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // weapon - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) // choice - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(1) // button1 = knife, button2 = weapon, button3 = choice PORT_START("P2") /* 0xa0005 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(2) PORT_START("P3") /* 0xa0007 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - KONAMI_TWIN_COINAGE + PORT_START("DSW1") + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "2" ) PORT_DIPSETTING( 0x02, "3" ) @@ -770,7 +607,7 @@ static INPUT_PORTS_START( miaj ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") /* DSW3 0xa0018 */ + PORT_START("DSW3") /* 0xa0018 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -794,31 +631,19 @@ static INPUT_PORTS_START( cuebrckj ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("P1") /* 0xa0003 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // move - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // warp - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) // stop - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(1) // button1 = move, button2 = warp, button3 = stop PORT_START("P2") /* 0xa0005 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + KONAMI8_B123_UNK(2) PORT_START("P3") /* 0xa0007 */ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - KONAMI_TWIN_COINAGE + PORT_START("DSW1") + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "1" ) PORT_DIPSETTING( 0x02, "2" ) @@ -841,7 +666,7 @@ static INPUT_PORTS_START( cuebrckj ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") /* DSW3 0xa0018 */ + PORT_START("DSW3") /* 0xa0018 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1466,16 +1291,16 @@ static DRIVER_INIT( cuebrckj ) /* Game Drivers */ -GAME( 1987, devilw, 0, devilw, devilw, twin16, ROT0, "Konami", "Devil World", 0 ) -GAME( 1987, majuu, devilw, devilw, devilw, twin16, ROT0, "Konami", "Majuu no Ohkoku", 0 ) -GAME( 1987, darkadv, devilw, devilw, darkadv, twin16, ROT0, "Konami", "Dark Adventure", 0 ) -GAME( 1988, vulcan, 0, twin16, vulcan, twin16, ROT0, "Konami", "Vulcan Venture", 0 ) -GAME( 1988, gradius2, vulcan, twin16, gradius2, twin16, ROT0, "Konami", "Gradius II - GOFER no Yabou (Japan New Ver.)", 0 ) -GAME( 1988, grdius2a, vulcan, twin16, vulcan, twin16, ROT0, "Konami", "Gradius II - GOFER no Yabou (Japan Old Ver.)", 0 ) -GAME( 1988, grdius2b, vulcan, twin16, vulcan, twin16, ROT0, "Konami", "Gradius II - GOFER no Yabou (Japan Older Ver.)", 0 ) - -GAME( 1988, fround, 0, fround, fround, fround, ROT0, "Konami", "The Final Round (version M)", 0 ) -GAME( 1988, froundl, fround, fround, fround, fround, ROT0, "Konami", "The Final Round (version L)", 0 ) -GAME( 1988, hpuncher, fround, hpuncher, fround, hpuncher, ROT0, "Konami", "Hard Puncher (Japan)", 0 ) -GAME( 1989, miaj, mia, miaj, miaj, hpuncher, ROT0, "Konami", "M.I.A. - Missing in Action (Japan)", 0 ) -GAME( 1989, cuebrckj, cuebrick, cuebrckj, cuebrckj, cuebrckj, ROT0, "Konami", "Cue Brick (Japan)", 0 ) +GAME( 1987, devilw, 0, devilw, devilw, twin16, ROT0, "Konami", "Devil World", 0 ) +GAME( 1987, majuu, devilw, devilw, devilw, twin16, ROT0, "Konami", "Majuu no Ohkoku", 0 ) +GAME( 1987, darkadv, devilw, devilw, darkadv, twin16, ROT0, "Konami", "Dark Adventure", 0 ) +GAME( 1988, vulcan, 0, twin16, vulcan, twin16, ROT0, "Konami", "Vulcan Venture", 0 ) +GAME( 1988, gradius2, vulcan, twin16, gradius2, twin16, ROT0, "Konami", "Gradius II - GOFER no Yabou (Japan New Ver.)", 0 ) +GAME( 1988, grdius2a, vulcan, twin16, vulcan, twin16, ROT0, "Konami", "Gradius II - GOFER no Yabou (Japan Old Ver.)", 0 ) +GAME( 1988, grdius2b, vulcan, twin16, vulcan, twin16, ROT0, "Konami", "Gradius II - GOFER no Yabou (Japan Older Ver.)", 0 ) + +GAME( 1988, fround, 0, fround, fround, fround, ROT0, "Konami", "The Final Round (version M)", 0 ) +GAME( 1988, froundl, fround, fround, fround, fround, ROT0, "Konami", "The Final Round (version L)", 0 ) +GAME( 1988, hpuncher, fround, hpuncher, fround, hpuncher, ROT0, "Konami", "Hard Puncher (Japan)", 0 ) +GAME( 1989, miaj, mia, miaj, miaj, hpuncher, ROT0, "Konami", "M.I.A. - Missing in Action (Japan)", 0 ) +GAME( 1989, cuebrckj, cuebrick, cuebrckj, cuebrckj, cuebrckj, ROT0, "Konami", "Cue Brick (Japan)", 0 ) diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c index 0e11fffc73b..c473345ad5a 100644 --- a/src/mame/drivers/vendetta.c +++ b/src/mame/drivers/vendetta.c @@ -93,6 +93,7 @@ Notes: #include "machine/eeprom.h" #include "sound/2151intf.h" #include "sound/k053260.h" +#include "konamipt.h" /* prototypes */ static MACHINE_RESET( vendetta ); @@ -334,24 +335,16 @@ ADDRESS_MAP_END static INPUT_PORTS_START( vendet4p ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) + KONAMI8_RL_B12_COIN(1) PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) + KONAMI8_RL_B12_COIN(2) + + PORT_START("P3") + KONAMI8_RL_B12_COIN(3) + + PORT_START("P4") + KONAMI8_RL_B12_COIN(4) PORT_START("SERVICE") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -369,31 +362,17 @@ static INPUT_PORTS_START( vendet4p ) PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) /* not really vblank, object related. Its timed, otherwise sprites flicker */ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) - - PORT_START("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN4 ) INPUT_PORTS_END static INPUT_PORTS_START( vendetta ) PORT_INCLUDE( vendet4p ) + PORT_MODIFY("P3") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("P4") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_MODIFY("SERVICE") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) @@ -403,34 +382,20 @@ static INPUT_PORTS_START( vendetta ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_MODIFY("P3") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_MODIFY("P4") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END static INPUT_PORTS_START( esckids ) - PORT_START("P1") // Player 1 Control - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) - - PORT_START("P2") // Player 2 Control - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_START("P1") + KONAMI8_RL_B12_COIN(1) // Player 1 Control + + PORT_START("P2") + KONAMI8_RL_B12_COIN(2) // Player 2 Control + + PORT_START("P3") + KONAMI8_RL_B12_COIN(3) // Player 3 Control ??? (Not used) + + PORT_START("P4") + KONAMI8_RL_B12_COIN(4) // Player 4 Control ??? (Not used) PORT_START("SERVICE") // Start, Service PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) @@ -448,26 +413,6 @@ static INPUT_PORTS_START( esckids ) PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) /* not really vblank, object related. Its timed, otherwise sprites flicker */ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P3") // Player 3 Control ??? (Not used) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) - - PORT_START("P4") // Player 4 Control ??? (Not used) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN4 ) INPUT_PORTS_END static INPUT_PORTS_START( esckidsj ) diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c index ef1a0f6bcb4..dabdcd08d57 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -70,6 +70,7 @@ Unresolved Issues: #include "sound/k054539.h" #include "sound/2151intf.h" #include "sound/flt_vol.h" +#include "konamipt.h" VIDEO_START( xexex ); VIDEO_UPDATE( xexex ); @@ -406,14 +407,21 @@ ADDRESS_MAP_END static INPUT_PORTS_START( xexex ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE2 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("P1") + KONAMI16_LSB(1, IPT_UNKNOWN, IPT_START1 ) + + PORT_START("P2") + KONAMI16_LSB(2, IPT_UNKNOWN, IPT_START2 ) PORT_START("EEPROM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ @@ -421,26 +429,6 @@ static INPUT_PORTS_START( xexex ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW ) PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) INPUT_PORTS_END diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c index 6596d0c575b..753656681fb 100644 --- a/src/mame/drivers/xmen.c +++ b/src/mame/drivers/xmen.c @@ -23,6 +23,7 @@ likewise be a 2 screen game #include "sound/k054539.h" #include "rendlay.h" #include "includes/xmen.h" +#include "konamipt.h" UINT16 xmen_current_frame; @@ -248,41 +249,13 @@ ADDRESS_MAP_END static INPUT_PORTS_START( xmen ) - PORT_START("P2_P4") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 ) - PORT_START("P1_P3") - 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_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN3 ) + KONAMI16_LSB(1, IPT_BUTTON3, IPT_COIN1 ) + KONAMI16_MSB(3, IPT_BUTTON3, IPT_COIN3 ) + + PORT_START("P2_P4") + KONAMI16_LSB(2, IPT_BUTTON3, IPT_COIN2 ) + KONAMI16_MSB(4, IPT_BUTTON3, IPT_COIN4 ) PORT_START("EEPROM") PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ @@ -297,6 +270,29 @@ static INPUT_PORTS_START( xmen ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ INPUT_PORTS_END +static INPUT_PORTS_START( xmen2p ) + PORT_START("P1_P3") + KONAMI16_LSB(1, IPT_BUTTON3, IPT_COIN1 ) + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("P2_P4") + KONAMI16_LSB(2, IPT_BUTTON3, IPT_COIN2 ) + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("EEPROM") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE2 ) + PORT_BIT( 0x003c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* EEPROM status - always 1 */ + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ + PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ +INPUT_PORTS_END static CUSTOM_INPUT( xmen_frame_r ) { @@ -304,41 +300,17 @@ static CUSTOM_INPUT( xmen_frame_r ) } static INPUT_PORTS_START( xmen6p ) + PORT_START("P1_P3") + KONAMI16_LSB(1, IPT_BUTTON3, IPT_COIN1 ) + KONAMI16_MSB(3, IPT_BUTTON3, IPT_COIN3 ) + PORT_START("P2_P4") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 ) + KONAMI16_LSB(2, IPT_BUTTON3, IPT_COIN2 ) + KONAMI16_MSB(4, IPT_BUTTON3, IPT_COIN4 ) - PORT_START("P1_P3") - 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_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_START("P5_P6") + KONAMI16_LSB(5, IPT_BUTTON3, IPT_COIN5 ) + KONAMI16_MSB(6, IPT_BUTTON3, IPT_COIN6 ) PORT_START("EEPROM") PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ @@ -352,62 +324,6 @@ static INPUT_PORTS_START( xmen6p ) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START6 ) /* not verified */ PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW ) PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xmen_frame_r, NULL) /* screen indicator? */ - - PORT_START("P5_P6") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(5) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(5) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(5) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(5) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(5) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(5) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(5) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN5 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(6) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(6) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(6) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(6) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(6) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(6) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(6) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN6 ) -INPUT_PORTS_END - -static INPUT_PORTS_START( xmen2p ) - PORT_START("P2_P4") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P1_P3") - 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_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("EEPROM") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE2 ) - PORT_BIT( 0x003c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ - PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* EEPROM data */ - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* EEPROM status - always 1 */ - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ - PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ INPUT_PORTS_END diff --git a/src/mame/drivers/yiear.c b/src/mame/drivers/yiear.c index 0ffedc1e93f..0fa577ed535 100644 --- a/src/mame/drivers/yiear.c +++ b/src/mame/drivers/yiear.c @@ -52,6 +52,7 @@ The 6809 NMI is used for sound timing. #include "cpu/m6809/m6809.h" #include "sound/sn76496.h" #include "sound/vlm5030.h" +#include "konamipt.h" extern int yiear_nmi_enable; @@ -117,24 +118,10 @@ static INPUT_PORTS_START( yiear ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_MONO_B12_UNK PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + KONAMI8_COCKTAIL_B12_UNK PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) @@ -169,40 +156,8 @@ static INPUT_PORTS_START( yiear ) PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("DSW3") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) -// PORT_DIPSETTING( 0x00, "Invalid" ) + KONAMI_COINAGE(DEF_STR( Free_Play ), "Invalid") + /* "Invalid" = both coin slots disabled */ INPUT_PORTS_END diff --git a/src/mame/includes/konamipt.h b/src/mame/includes/konamipt.h new file mode 100644 index 00000000000..7fff4947dfd --- /dev/null +++ b/src/mame/includes/konamipt.h @@ -0,0 +1,414 @@ +/******************************************************************************* + + Input port macros used by many games in multiple KONAMI drivers + +*******************************************************************************/ + + +/***************************** 8bit Players Inputs ****************************/ + +/*********************** Prototypes 8bit ***********************/ + +#define KONAMI8_MONO_4WAY( direction1, direction2, button1, button2, button3 ) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_4WAY \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_4WAY \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) + +#define KONAMI8_COCKTAIL_4WAY( direction1, direction2, button1, button2, button3 ) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_4WAY \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_4WAY \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) + +#define KONAMI8_MONO_8WAY( direction1, direction2, button1, button2, button3 ) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) + +#define KONAMI8_COCKTAIL_8WAY( direction1, direction2, button1, button2, button3 ) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY PORT_COCKTAIL \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY PORT_COCKTAIL \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) PORT_COCKTAIL \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) PORT_COCKTAIL \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) PORT_COCKTAIL + +#define KONAMI8_MULTI_8WAY( player, direction1, direction2, button1, button2, button3 ) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY PORT_PLAYER(player) \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY PORT_PLAYER(player) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) PORT_PLAYER(player) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) PORT_PLAYER(player) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player) + +#define KONAMI8_LR_40( player, button1, button2, button3 ) \ + KONAMI8_MULTI_8WAY( player, LEFT, RIGHT, button1, button2, button3 ) + +#define KONAMI8_RL_40( player, button1, button2, button3 ) \ + KONAMI8_MULTI_8WAY( player, RIGHT, LEFT, button1, button2, button3 ) + +/*********************** Actual Inputs 8bit ***********************/ + +/* Cocktail Cabinet 4Way Inputs */ +#define KONAMI8_MONO_4WAY_B12_UNK \ + KONAMI8_MONO_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_COCKTAIL_4WAY_B12_UNK \ + KONAMI8_COCKTAIL_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_MONO_4WAY_B123_UNK \ + KONAMI8_MONO_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_COCKTAIL_4WAY_B123_UNK \ + KONAMI8_COCKTAIL_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + +/* Cocktail Cabinet 8Way Inputs */ +/* 1 Button */ +#define KONAMI8_MONO_B1_UNK \ + KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_COCKTAIL_B1_UNK \ + KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +/* 2 Buttons */ +#define KONAMI8_MONO_B12_UNK \ + KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_COCKTAIL_B12_UNK \ + KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +/* 3 Buttons */ +#define KONAMI8_MONO_B123_UNK \ + KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_COCKTAIL_B123_UNK \ + KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_MONO_B213_UNK \ + KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON2, IPT_BUTTON1, IPT_BUTTON3 ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_COCKTAIL_B213_UNK \ + KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON2, IPT_BUTTON1, IPT_BUTTON3 ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +/* 2 Buttons + Start */ +#define KONAMI8_MONO_B12_START \ + KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + +#define KONAMI8_COCKTAIL_B12_START \ + KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) + + +/* Upright Multiplayer Cabinet Inputs */ +/* 1 Button */ +#define KONAMI8_B1( player ) \ + KONAMI8_LR_40( player, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN ) + +#define KONAMI8_B1_UNK( player ) \ + KONAMI8_B1( player ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +/* 2 Buttons */ +#define KONAMI8_B12( player ) \ + KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) + +#define KONAMI8_B12_UNK( player ) \ + KONAMI8_B12( player ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +#define KONAMI8_B12_START( player ) \ + KONAMI8_B12( player ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player ) + +#define KONAMI8_B12_COIN_START( player ) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN##player ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player ) + +#define KONAMI8_B21_UNK( player ) \ + KONAMI8_LR_40( player, IPT_BUTTON2, IPT_BUTTON1, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +/* 3 Buttons */ +#define KONAMI8_B123( player ) \ + KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) + +#define KONAMI8_B123_UNK( player ) \ + KONAMI8_B123( player ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + +#define KONAMI8_B123_START( player ) \ + KONAMI8_B123( player ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player ) + +#define KONAMI8_B132( player ) \ + KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON3, IPT_BUTTON2 ) + +#define KONAMI8_B321( player ) \ + KONAMI8_LR_40( player, IPT_BUTTON3, IPT_BUTTON2, IPT_BUTTON1 ) + + +/* vendetta.c uses inputs with switched Left/Right directions. We add these inputs here as well +because they just need a few lines of code */ +#define KONAMI8_RL_B12_COIN( player ) \ + KONAMI8_RL_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN##player ) + + +/* A few drivers uses bit0 for Start and shuffled joystick inputs */ +#define KONAMI8_ALT( player, button1, button2, button3 ) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START##player ) \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(player) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(player) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, button1 ) PORT_PLAYER(player) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, button2 ) PORT_PLAYER(player) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player) + +#define KONAMI8_ALT_B12( player ) \ + KONAMI8_ALT( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) + +#define KONAMI8_ALT_B21( player ) \ + KONAMI8_ALT( player, IPT_BUTTON2, IPT_BUTTON1, IPT_UNKNOWN ) + +#define KONAMI8_ALT_B123( player ) \ + KONAMI8_ALT( player, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) + + +/**************************** 16bit Players Inputs ****************************/ + +#define KONAMI16_LSB_40( player, button3 ) \ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) \ + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \ + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) \ + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) \ + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \ + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) \ + PORT_BIT( 0x0040, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player) + +#define KONAMI16_MSB_40( player, button3 ) \ + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) \ + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \ + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) \ + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) \ + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \ + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) \ + PORT_BIT( 0x4000, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player) + +#define KONAMI16_LSB( player, button3, start ) \ + KONAMI16_LSB_40( player, button3 ) \ + PORT_BIT( 0x0080, IP_ACTIVE_LOW, start ) + +#define KONAMI16_MSB( player, button3, start ) \ + KONAMI16_MSB_40( player, button3 ) \ + PORT_BIT( 0x8000, IP_ACTIVE_LOW, start ) + + +/******************** System Inputs (Coin, Start & Service) *******************/ + +#define KONAMI8_SYSTEM_10 \ + 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_LOW, IPT_START1 ) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) + +#define KONAMI8_SYSTEM_UNK \ + KONAMI8_SYSTEM_10 \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ + +/**************************** Coinage Dip Swicthes ****************************/ + +/* Konami games from 80s-90s basically use only two kind of coinage dips. The only +difference is in the settings corresponding to 0x00, which could be either 4C_5C +or a "Free_Play"-related option. Actually, in the latter case the behavior may change +depending on the game code: +Coin A - 0x00 could produce the following effects + Free_Play = nomen omen (for both players) + Invalid = both coin slots disabled +Coin B - 0x00 could produce the following effects + Free_Play = nomen omen (for both players) + No Coin B = coin slot B open (coins produce sound), but no effect on coin counter + None = coin slot B disabled + No Credits = both coin slots open, but no effect on coin counters + Invalid = both coin slots disabled +Accordingly, we pass below different strings for different games */ + +#define KONAMI_COINAGE_LOC( STRING_A, STRING_B, DIPBANK ) \ + PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":1,2,3,4") \ + PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) \ + PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) \ + PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) \ + PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) \ + PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) \ + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) \ + PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) \ + PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) \ + PORT_DIPSETTING( 0x00, STRING_A ) \ + PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":5,6,7,8") \ + PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) \ + PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) \ + PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) \ + PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) \ + PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) \ + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) \ + PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) \ + PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) \ + PORT_DIPSETTING( 0x00, STRING_B ) + +#define KONAMI_COINAGE( STRING_A, STRING_B ) \ + PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) \ + PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) \ + PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) \ + PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) \ + PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) \ + PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) \ + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) \ + PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) \ + PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) \ + PORT_DIPSETTING( 0x00, STRING_A ) \ + PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) \ + PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) \ + PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) \ + PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) \ + PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) \ + PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) \ + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) \ + PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) \ + PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) \ + PORT_DIPSETTING( 0x00, STRING_B ) + +#define KONAMI_COINAGE_ALT_LOC( DIPBANK ) \ + PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":1,2,3,4") \ + PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) \ + PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) \ + PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) \ + PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) \ + PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) \ + PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) \ + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) \ + PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) \ + PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) \ + PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":5,6,7,8") \ + PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) \ + PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) \ + PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) \ + PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) \ + PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) \ + PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) \ + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) \ + PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) \ + PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) + +#define KONAMI_COINAGE_ALT \ + PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) \ + PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) \ + PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x04, DEF_STR( 3C_2C ) ) \ + PORT_DIPSETTING( 0x01, DEF_STR( 4C_3C ) ) \ + PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) \ + PORT_DIPSETTING( 0x03, DEF_STR( 3C_4C ) ) \ + PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) ) \ + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x06, DEF_STR( 2C_5C ) ) \ + PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) \ + PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) \ + PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) \ + PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) \ + PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) \ + PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \ + PORT_DIPSETTING( 0x40, DEF_STR( 3C_2C ) ) \ + PORT_DIPSETTING( 0x10, DEF_STR( 4C_3C ) ) \ + PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x00, DEF_STR( 4C_5C ) ) \ + PORT_DIPSETTING( 0x30, DEF_STR( 3C_4C ) ) \ + PORT_DIPSETTING( 0x70, DEF_STR( 2C_3C ) ) \ + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x60, DEF_STR( 2C_5C ) ) \ + PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) \ + PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) \ + PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) \ + PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) |