summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-06-17 14:55:43 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-06-17 14:55:43 +0000
commitf6c324faf27d6c7f3b9dc13b5f6b44fed3b6e36c (patch)
treece1f8dc80acc3a1567a841534930ebd26ea9a828
parented88246e48a43e915096b9827558b270adaa2af4 (diff)
From: Fabio Priuli [mailto:doge.fabio@gmail.com]
Subject: some more diff Hi, attached please find a few more patches about indexed port reads. * g_patch01 & g_patch02 cover drivers starting with g (it seems I never sent you these ones :) ). With these patches I also simplified gaplus inputs, fixed a small problem with grchamp coin lockout (it was reading the accelerator rather than the right dipswitch) and removed some old code from galaxold.c (driver & machine). * k_patch & l_patch cover drivers starting with k & l. Notice that I simplified a bit konamigx ports and used input_port_read_safe to avoid the need of too many fake ports * snes.diff removes indexed port reads from snes based drivers (nss.c & kinstb.c). Please let Arbee know that if he's still using the debug graphic inputs in his local builds, he has to add tags (DEBUG1, DEBUG2, DEBUG3, see kinstb.c). OTOH If he's not using those anymore, it's now easier to remove the dead code searching for those 3 tags. * md.diff removes most of indexed port reads from megadrive/genesis based drivers (plus segas18, that I realized later it was sharing only video code). It also removes some dead code (handlers used only by megaplay/megatech, with a local copy in the driver). Notice that port_read_indexed is still used to read pad inputs: indeed, the natural 'tagged' replacement has issues with 6 button pad (and therefore breaks ssf2ghw). hopefully, I'll find a clean solution to be submitted after u6 :) Regards, Fabio
-rw-r--r--src/mame/drivers/ataxx.c228
-rw-r--r--src/mame/drivers/gaelco2.c62
-rw-r--r--src/mame/drivers/galaxold.c46
-rw-r--r--src/mame/drivers/galpani3.c12
-rw-r--r--src/mame/drivers/gameplan.c99
-rw-r--r--src/mame/drivers/gaplus.c238
-rw-r--r--src/mame/drivers/gauntlet.c4
-rw-r--r--src/mame/drivers/gcpinbal.c12
-rw-r--r--src/mame/drivers/genesis.c132
-rw-r--r--src/mame/drivers/getrivia.c10
-rw-r--r--src/mame/drivers/gijoe.c10
-rw-r--r--src/mame/drivers/goal92.c10
-rw-r--r--src/mame/drivers/gomoku.c21
-rw-r--r--src/mame/drivers/goodejan.c118
-rw-r--r--src/mame/drivers/gottlieb.c10
-rw-r--r--src/mame/drivers/grchamp.c2
-rw-r--r--src/mame/drivers/gridlee.c27
-rw-r--r--src/mame/drivers/groundfx.c22
-rw-r--r--src/mame/drivers/gsword.c50
-rw-r--r--src/mame/drivers/gticlub.c64
-rw-r--r--src/mame/drivers/guab.c20
-rw-r--r--src/mame/drivers/gunbustr.c23
-rw-r--r--src/mame/drivers/gundealr.c46
-rw-r--r--src/mame/drivers/hshavoc.c2
-rw-r--r--src/mame/drivers/kaneko16.c106
-rw-r--r--src/mame/drivers/karnov.c8
-rw-r--r--src/mame/drivers/kinst.c29
-rw-r--r--src/mame/drivers/kinstb.c34
-rw-r--r--src/mame/drivers/klax.c6
-rw-r--r--src/mame/drivers/koikoi.c53
-rw-r--r--src/mame/drivers/konamigv.c18
-rw-r--r--src/mame/drivers/konamigx.c472
-rw-r--r--src/mame/drivers/kopunch.c18
-rw-r--r--src/mame/drivers/ksys573.c8
-rw-r--r--src/mame/drivers/laserbat.c35
-rw-r--r--src/mame/drivers/lastfght.c12
-rw-r--r--src/mame/drivers/lazercmd.c40
-rw-r--r--src/mame/drivers/leland.c242
-rw-r--r--src/mame/drivers/lemmings.c14
-rw-r--r--src/mame/drivers/lethal.c57
-rw-r--r--src/mame/drivers/lethalj.c72
-rw-r--r--src/mame/drivers/liberate.c31
-rw-r--r--src/mame/drivers/liberatr.c20
-rw-r--r--src/mame/drivers/limenko.c20
-rw-r--r--src/mame/drivers/lordgun.c20
-rw-r--r--src/mame/drivers/lsasquad.c14
-rw-r--r--src/mame/drivers/lvcards.c16
-rw-r--r--src/mame/drivers/megadriv.c67
-rw-r--r--src/mame/drivers/megaplay.c471
-rw-r--r--src/mame/drivers/megatech.c13
-rw-r--r--src/mame/drivers/nss.c18
-rw-r--r--src/mame/drivers/puckpkmn.c10
-rw-r--r--src/mame/drivers/segac2.c5
-rw-r--r--src/mame/drivers/segas18.c8
-rw-r--r--src/mame/drivers/topshoot.c2
-rw-r--r--src/mame/includes/genesis.h48
-rw-r--r--src/mame/machine/gaelco2.c2
-rw-r--r--src/mame/machine/galaxold.c129
-rw-r--r--src/mame/machine/gaplus.c4
-rw-r--r--src/mame/machine/kaneko16.c8
-rw-r--r--src/mame/machine/leland.c58
-rw-r--r--src/mame/machine/lsasquad.c2
-rw-r--r--src/mame/machine/snes.c20
-rw-r--r--src/mame/video/lazercmd.c4
-rw-r--r--src/mame/video/lethal.c2
-rw-r--r--src/mame/video/lethalj.c5
-rw-r--r--src/mame/video/lordgun.c12
-rw-r--r--src/mame/video/snes.c12
68 files changed, 1323 insertions, 2190 deletions
diff --git a/src/mame/drivers/ataxx.c b/src/mame/drivers/ataxx.c
index 4a20cc2b8c9..e05c8fb344a 100644
--- a/src/mame/drivers/ataxx.c
+++ b/src/mame/drivers/ataxx.c
@@ -104,183 +104,183 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( ataxx )
- PORT_START /* 0xF6 */
+ PORT_START_TAG("IN0") /* 0xF6 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* huh? affects trackball movement */
- PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
+ PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_START /* 0xF7 */
+ PORT_START_TAG("IN1") /* 0xF7 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x20 */
+ PORT_START_TAG("IN2") /* 0x20 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x00 - analog X */
+ PORT_START_TAG("AN0") /* 0x00 - analog X */
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* 0x01 - analog Y */
+ PORT_START_TAG("AN1") /* 0x01 - analog Y */
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* 0x02 - analog X */
+ PORT_START_TAG("AN2") /* 0x02 - analog X */
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* 0x03 - analog Y */
+ PORT_START_TAG("AN3") /* 0x03 - analog Y */
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( wsf )
- PORT_START /* 0xF6 */
+ PORT_START_TAG("IN0") /* 0xF6 */
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_COIN4 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
-
- PORT_START /* 0xF7 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
- PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START /* 0x20 */
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
+
+ PORT_START_TAG("IN1") /* 0xF7 */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
+ PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("IN2") /* 0x20 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
+ PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x0D */
- 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_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
-
- PORT_START /* 0x0E */
- 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_DOWN ) PORT_8WAY PORT_PLAYER(4)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
-
- PORT_START /* 0x0F */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START3 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
+ PORT_START_TAG("IN3") /* 0x0D */
+ 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_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+
+ PORT_START_TAG("IN4") /* 0x0E */
+ 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_DOWN ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
+
+ PORT_START_TAG("IN5") /* 0x0F */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START3 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
INPUT_PORTS_END
static INPUT_PORTS_START( indyheat )
- PORT_START /* 0xF6 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_START_TAG("IN0") /* 0xF6 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_IMPULSE(1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_IMPULSE(1)
PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_START /* 0xF7 */
+ PORT_START_TAG("IN1") /* 0xF7 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
- PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x20 */
+ PORT_START_TAG("IN2") /* 0x20 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog wheel 1 */
+ PORT_START_TAG("AN0") /* Analog wheel 1 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog wheel 2 */
+ PORT_START_TAG("AN1") /* Analog wheel 2 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* Analog wheel 3 */
+ PORT_START_TAG("AN2") /* Analog wheel 3 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3)
- PORT_START /* Analog pedal 1 */
+ PORT_START_TAG("AN3") /* Analog pedal 1 */
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog pedal 2 */
+ PORT_START_TAG("AN4") /* Analog pedal 2 */
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* Analog pedal 3 */
+ PORT_START_TAG("AN5") /* Analog pedal 3 */
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3)
- PORT_START /* 0x0D */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_START_TAG("IN3") /* 0x0D */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x0E */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_START_TAG("IN4") /* 0x0E */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x0F */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
+ PORT_START_TAG("IN5") /* 0x0F */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
+ PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
INPUT_PORTS_END
static INPUT_PORTS_START( brutforc )
- PORT_START /* 0xF6 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_START_TAG("IN0") /* 0xF6 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_IMPULSE(1)
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_IMPULSE(1)
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
- PORT_START /* 0xF7 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
- PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_START_TAG("IN1") /* 0xF7 */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SLAVEHALT )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
+ PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x20 */
+ PORT_START_TAG("IN2") /* 0x20 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x0D */
- 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_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) 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_START2 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START /* 0x0E */
- 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_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) 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_START1 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
-
- PORT_START /* 0x0F */
- 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_DOWN ) PORT_8WAY PORT_PLAYER(3)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) 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_START3 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_START_TAG("IN3") /* 0x0D */
+ 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_DOWN ) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) 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_START2 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("IN4") /* 0x0E */
+ 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_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) 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_START1 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("IN5") /* 0x0F */
+ 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_DOWN ) PORT_8WAY PORT_PLAYER(3)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) 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_START3 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/gaelco2.c b/src/mame/drivers/gaelco2.c
index fc25d822b29..669dfa6659c 100644
--- a/src/mame/drivers/gaelco2.c
+++ b/src/mame/drivers/gaelco2.c
@@ -80,7 +80,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( maniacsq )
-PORT_START /* DSW #1 + 1P INPUTS */
+PORT_START_TAG("IN0") /* DSW #1 + 1P INPUTS */
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_RIGHT ) PORT_8WAY PORT_PLAYER(1)
@@ -116,7 +116,7 @@ PORT_START /* DSW #1 + 1P INPUTS */
PORT_DIPSETTING( 0xa000, DEF_STR( 1C_6C ) )
PORT_DIPSETTING( 0x0000, "Disabled or Free Play (if Coin A too)" )
-PORT_START /* DSW #2 + 2P INPUTS */
+PORT_START_TAG("IN1") /* DSW #2 + 2P INPUTS */
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_RIGHT ) PORT_8WAY PORT_PLAYER(2)
@@ -147,7 +147,7 @@ PORT_START /* DSW #2 + 2P INPUTS */
PORT_DIPSETTING( 0x4000, DEF_STR( On ) )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
-PORT_START /* COINSW & SERVICESW */
+PORT_START_TAG("COIN") /* COINSW & SERVICESW */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -243,10 +243,10 @@ static INTERRUPT_GEN( bang_interrupt )
}
}
-static READ16_HANDLER(p1_gun_x) {return (input_port_read_indexed(machine, 3)*320/0x100)+1;}
-static READ16_HANDLER(p1_gun_y) {return (input_port_read_indexed(machine, 5)*240/0x100)-4;}
-static READ16_HANDLER(p2_gun_x) {return (input_port_read_indexed(machine, 4)*320/0x100)+1;}
-static READ16_HANDLER(p2_gun_y) {return (input_port_read_indexed(machine, 6)*240/0x100)-4;}
+static READ16_HANDLER(p1_gun_x) {return (input_port_read(machine, "LIGHT0_X") * 320 / 0x100) + 1;}
+static READ16_HANDLER(p1_gun_y) {return (input_port_read(machine, "LIGHT0_Y") * 240 / 0x100) - 4;}
+static READ16_HANDLER(p2_gun_x) {return (input_port_read(machine, "LIGHT1_X") * 320 / 0x100) + 1;}
+static READ16_HANDLER(p2_gun_y) {return (input_port_read(machine, "LIGHT1_Y") * 240 / 0x100) - 4;}
static ADDRESS_MAP_START( bang_readmem, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM) /* ROM */
@@ -282,13 +282,13 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( bang )
-PORT_START /* 1P INPUTS */
+PORT_START_TAG("P1") /* 1P INPUTS */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_IMPULSE(1) PORT_PLAYER(1)
-PORT_START /* 2P INPUTS */
+PORT_START_TAG("P2") /* 2P INPUTS */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
-PORT_START /* COINSW & Service */
+PORT_START_TAG("COIN") /* COINSW & Service */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_SERVICE_NO_TOGGLE( 0x0004, IP_ACTIVE_LOW) /* go to service mode NOW */
@@ -297,16 +297,16 @@ PORT_START /* COINSW & Service */
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 )
/* bits 6 & 7 are used for accessing the NVRAM */
- PORT_START /* Gun 1 X */
+ PORT_START_TAG("LIGHT0_X") /* Gun 1 X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(1)
- PORT_START /* Gun 2 X */
+ PORT_START_TAG("LIGHT1_X") /* Gun 2 X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(2)
- PORT_START /* Gun 1 Y */
+ PORT_START_TAG("LIGHT0_Y") /* Gun 1 Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, -6.0 / 240, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(1)
- PORT_START /* Gun 2 Y */
+ PORT_START_TAG("LIGHT1_Y") /* Gun 2 Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, -6.0 / 240, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(2)
INPUT_PORTS_END
@@ -439,7 +439,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( alighunt )
-PORT_START /* DSW #1 */
+PORT_START_TAG("IN0") /* DSW #1 */
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_RIGHT ) PORT_8WAY PORT_PLAYER(1)
@@ -475,7 +475,7 @@ PORT_START /* DSW #1 */
PORT_DIPSETTING( 0xa000, DEF_STR( 1C_6C ) )
PORT_DIPSETTING( 0x0000, "Disabled or Free Play (if Coin A too)" )
-PORT_START /* DSW #2 */
+PORT_START_TAG("IN1") /* DSW #2 */
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_RIGHT ) PORT_8WAY PORT_PLAYER(2)
@@ -505,7 +505,7 @@ PORT_START /* DSW #2 */
PORT_DIPSETTING( 0x4000, DEF_STR( Standard ) )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
-PORT_START /* COINSW & Service */
+PORT_START_TAG("COIN") /* COINSW & Service */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -672,7 +672,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( touchgo )
-PORT_START /* DSW #2 + 1P INPUTS */
+PORT_START_TAG("IN0") /* DSW #2 + 1P INPUTS */
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_RIGHT ) PORT_8WAY PORT_PLAYER(1)
@@ -701,7 +701,7 @@ PORT_START /* DSW #2 + 1P INPUTS */
PORT_DIPSETTING( 0x4000, DEF_STR( On ) )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
-PORT_START /* DSW #1 + 2P INPUTS */
+PORT_START_TAG("IN1") /* DSW #1 + 2P INPUTS */
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_RIGHT ) PORT_8WAY PORT_PLAYER(2)
@@ -745,7 +745,7 @@ PORT_START /* DSW #1 + 2P INPUTS */
PORT_DIPSETTING( 0xb000, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0xa000, DEF_STR( 1C_6C ) )
-PORT_START /* COINSW + 3P */
+PORT_START_TAG("IN2") /* COINSW + 3P */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
@@ -760,7 +760,7 @@ PORT_START /* COINSW + 3P */
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNKNOWN )
-PORT_START /* SERVICESW + 4P INPUTS */
+PORT_START_TAG("IN3") /* SERVICESW + 4P INPUTS */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
@@ -774,8 +774,8 @@ PORT_START /* SERVICESW + 4P INPUTS */
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN )
-PORT_START /* Fake: To switch between monitors at run time */
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE
+PORT_START_TAG("FAKE") /* Fake: To switch between monitors at run time */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE
INPUT_PORTS_END
static const struct gaelcosnd_interface touchgo_snd_interface =
@@ -951,7 +951,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( snowboar )
-PORT_START /* 1P INPUTS */
+PORT_START_TAG("P1") /* 1P INPUTS */
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_RIGHT ) PORT_8WAY PORT_PLAYER(1)
@@ -961,7 +961,7 @@ PORT_START /* 1P INPUTS */
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-PORT_START /* 2P INPUTS */
+PORT_START_TAG("P2") /* 2P INPUTS */
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_RIGHT ) PORT_8WAY PORT_PLAYER(2)
@@ -971,7 +971,7 @@ PORT_START /* 2P INPUTS */
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-PORT_START /* COINSW & Service */
+PORT_START_TAG("COIN") /* COINSW & Service */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW) /* go to service mode NOW */
@@ -1144,7 +1144,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( wrally2 )
-PORT_START /* DIPSW #2 + 1P INPUTS */
+PORT_START_TAG("IN0") /* DIPSW #2 + 1P INPUTS */
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_RIGHT ) PORT_8WAY PORT_PLAYER(1)
@@ -1175,7 +1175,7 @@ PORT_START /* DIPSW #2 + 1P INPUTS */
PORT_DIPSETTING( 0x8000, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
-PORT_START /* DIPSW #1 */
+PORT_START_TAG("IN1") /* DIPSW #1 */
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Free_Play ) )
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
@@ -1202,7 +1202,7 @@ PORT_START /* DIPSW #1 */
PORT_DIPSETTING( 0xa000, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x2000, DEF_STR( 1C_4C ) )
-PORT_START /* 2P INPUTS */
+PORT_START_TAG("IN2") /* 2P INPUTS */
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_RIGHT ) PORT_8WAY PORT_PLAYER(2)
@@ -1215,14 +1215,14 @@ PORT_START /* 2P INPUTS */
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0xfa00, IP_ACTIVE_LOW, IPT_UNKNOWN )
-PORT_START /* SERVICESW */
+PORT_START_TAG("IN3") /* SERVICESW */
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE3 ) /* go to test mode NOW */
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN )
-PORT_START /* Fake: To switch between monitors at run time */
+PORT_START_TAG("FAKE") /* Fake: To switch between monitors at run time */
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE
INPUT_PORTS_END
diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c
index 7c062db038b..c638b256d21 100644
--- a/src/mame/drivers/galaxold.c
+++ b/src/mame/drivers/galaxold.c
@@ -546,9 +546,9 @@ ADDRESS_MAP_END
static READ8_HANDLER( scramb2_protection_r ) { return 0x25; }
-static READ8_HANDLER( scramb2_port0_r ) { return (input_port_read_indexed(machine, 0)>>offset)&0x1; }
-static READ8_HANDLER( scramb2_port1_r ) { return (input_port_read_indexed(machine, 1)>>offset)&0x1; }
-static READ8_HANDLER( scramb2_port2_r ) { return (input_port_read_indexed(machine, 2)>>offset)&0x1; }
+static READ8_HANDLER( scramb2_port0_r ) { return (input_port_read(machine, "IN0") >> offset) & 0x1; }
+static READ8_HANDLER( scramb2_port1_r ) { return (input_port_read(machine, "IN1") >> offset) & 0x1; }
+static READ8_HANDLER( scramb2_port2_r ) { return (input_port_read(machine, "IN2") >> offset) & 0x1; }
static ADDRESS_MAP_START( scramb2_readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_READ(SMH_ROM)
@@ -977,32 +977,6 @@ static ADDRESS_MAP_START( hexpoola_io, ADDRESS_SPACE_IO, 8 )
AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_3_r)
ADDRESS_MAP_END
-#define GAL_IN0\
- PORT_START_TAG("IN0")\
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )\
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )\
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY\
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY\
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )\
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )\
- PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )\
- PORT_DIPSETTING( 0x20, DEF_STR( Cocktail ) )\
- PORT_SERVICE( 0x40, IP_ACTIVE_HIGH )\
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 )
-
-#define GAL_IN1\
- PORT_START_TAG("IN1")\
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )\
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )\
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL\
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL\
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL\
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )\
- PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) )\
- PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) )\
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )\
- PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) )\
- PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) )
static INPUT_PORTS_START( scramblb )
PORT_START_TAG("IN0")
@@ -1089,20 +1063,6 @@ static INPUT_PORTS_START( scramb2 )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
-
-#define MOON_IN0\
- PORT_START_TAG("IN0")\
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )\
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )\
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY\
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY\
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )\
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )\
- PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )\
- PORT_DIPSETTING( 0x20, DEF_STR( Cocktail ) )\
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* "reset" on schematics */\
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
-
static INPUT_PORTS_START( 4in1 )
PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c
index 5909ce63e12..5df23c79aed 100644
--- a/src/mame/drivers/galpani3.c
+++ b/src/mame/drivers/galpani3.c
@@ -110,7 +110,7 @@ static VIDEO_UPDATE(galpani3)
static INPUT_PORTS_START( galpani3 )
- PORT_START // IN0 - Player Controls
+ PORT_START_TAG("P1") /* IN0 - Player Controls */
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
@@ -120,7 +120,7 @@ static INPUT_PORTS_START( galpani3 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ?
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START // IN1 - Player Controls
+ PORT_START_TAG("P2") /* IN1 - Player Controls */
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
@@ -130,7 +130,7 @@ static INPUT_PORTS_START( galpani3 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ?
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START // IN2 - Coins
+ PORT_START_TAG("COIN") /* IN2 - Coins */
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -140,7 +140,7 @@ static INPUT_PORTS_START( galpani3 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START // IN3 - DSW provided by the MCU - $200386.b <- $400200
+ PORT_START_TAG("DSW") /* IN3 - DSW provided by the MCU - $200386.b <- $400200 */
PORT_DIPNAME( 0x0100, 0x0100, "Test Mode" )
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -215,8 +215,8 @@ static void galpani3_mcu_run(running_machine *machine)
{
case 0x03: // DSW
{
- mcu_ram[mcu_offset] = input_port_read_indexed(machine, 3);
- logerror("PC=%06X : MCU executed command: %04X %04X (read DSW)\n",activecpu_get_pc(),mcu_command,mcu_offset*2);
+ mcu_ram[mcu_offset] = input_port_read(machine, "DSW");
+ logerror("PC=%06X : MCU executed command: %04X %04X (read DSW)\n", activecpu_get_pc(), mcu_command, mcu_offset*2);
}
break;
diff --git a/src/mame/drivers/gameplan.c b/src/mame/drivers/gameplan.c
index 864e7582a6a..31d2a1ba723 100644
--- a/src/mame/drivers/gameplan.c
+++ b/src/mame/drivers/gameplan.c
@@ -95,9 +95,10 @@ static WRITE8_HANDLER( io_select_w )
static READ8_HANDLER( io_port_r )
{
+ static const char *portnames[] = { "IN0", "IN1", "IN2", "IN3", "DSW0", "DSW1" };
gameplan_state *state = machine->driver_data;
- return input_port_read_indexed(machine, state->current_port);
+ return input_port_read(machine, portnames[state->current_port]);
}
@@ -279,7 +280,7 @@ ADDRESS_MAP_END
*************************************/
static INPUT_PORTS_START( killcom )
- PORT_START /* COL. A - from "TEST NO.7 - status locator - coin-door" */
+ PORT_START_TAG("IN0") /* COL. A - from "TEST NO.7 - status locator - coin-door" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
@@ -289,7 +290,7 @@ static INPUT_PORTS_START( killcom )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* COL. B - from "TEST NO.7 - status locator - start sws." */
+ PORT_START_TAG("IN1") /* COL. B - from "TEST NO.7 - status locator - start sws." */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -299,7 +300,7 @@ static INPUT_PORTS_START( killcom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
- PORT_START /* COL. C - from "TEST NO.8 - status locator - player no.1" */
+ PORT_START_TAG("IN2") /* COL. C - from "TEST NO.8 - status locator - player no.1" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )
@@ -309,7 +310,7 @@ static INPUT_PORTS_START( killcom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
- PORT_START /* COL. D - from "TEST NO.8 - status locator - player no.2" */
+ PORT_START_TAG("IN3") /* COL. D - from "TEST NO.8 - status locator - player no.2" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
@@ -319,7 +320,7 @@ static INPUT_PORTS_START( killcom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
- PORT_START /* DSW A - from "TEST NO.6 - dip switch A" */
+ PORT_START_TAG("DSW0") /* DSW A - from "TEST NO.6 - dip switch A" */
PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" )
PORT_DIPSETTING( 0x03, "1 Credit/2 Credits" )
PORT_DIPSETTING( 0x02, "2 Credits/3 Credits" )
@@ -343,7 +344,7 @@ static INPUT_PORTS_START( killcom )
PORT_DIPSETTING( 0x40, "Fast" )
PORT_DIPSETTING( 0x00, "Fastest" )
- PORT_START /* DSW B - from "TEST NO.6 - dip switch B" */
+ PORT_START_TAG("DSW1") /* DSW B - from "TEST NO.6 - dip switch B" */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -369,7 +370,7 @@ static INPUT_PORTS_START( killcom )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_START /* audio board DSW A */
+ PORT_START_TAG("DSW2") /* audio board DSW A */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -395,7 +396,7 @@ static INPUT_PORTS_START( killcom )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* audio board DSW B */
+ PORT_START_TAG("DSW3") /* audio board DSW B */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -424,7 +425,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( megatack )
- PORT_START /* COL. A - from "TEST NO.7 - status locator - coin-door" */
+ PORT_START_TAG("IN0") /* COL. A - from "TEST NO.7 - status locator - coin-door" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
@@ -434,7 +435,7 @@ static INPUT_PORTS_START( megatack )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* COL. B - from "TEST NO.7 - status locator - start sws." */
+ PORT_START_TAG("IN1") /* COL. B - from "TEST NO.7 - status locator - start sws." */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -444,7 +445,7 @@ static INPUT_PORTS_START( megatack )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
- PORT_START /* COL. C - from "TEST NO.8 - status locator - player no.1" */
+ PORT_START_TAG("IN2") /* COL. C - from "TEST NO.8 - status locator - player no.1" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -454,7 +455,7 @@ static INPUT_PORTS_START( megatack )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* COL. D - from "TEST NO.8 - status locator - player no.2" */
+ PORT_START_TAG("IN3") /* COL. D - from "TEST NO.8 - status locator - player no.2" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -464,7 +465,7 @@ static INPUT_PORTS_START( megatack )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* DSW A - from "TEST NO.6 - dip switch A" */
+ PORT_START_TAG("DSW0") /* DSW A - from "TEST NO.6 - dip switch A" */
PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" )
PORT_DIPSETTING( 0x03, "1 Credit/2 Credits" )
PORT_DIPSETTING( 0x02, "2 Credits/3 Credits" )
@@ -489,7 +490,7 @@ static INPUT_PORTS_START( megatack )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* DSW B - from "TEST NO.6 - dip switch B" */
+ PORT_START_TAG("DSW1") /* DSW B - from "TEST NO.6 - dip switch B" */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x07, "20000" )
PORT_DIPSETTING( 0x06, "30000" )
@@ -515,7 +516,7 @@ static INPUT_PORTS_START( megatack )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_START /* audio board DSW A */
+ PORT_START_TAG("DSW2") /* audio board DSW A */
PORT_DIPNAME( 0x01, 0x00, "Sound Test A 0" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -541,7 +542,7 @@ static INPUT_PORTS_START( megatack )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* audio board DSW B */
+ PORT_START_TAG("DSW3") /* audio board DSW B */
PORT_DIPNAME( 0x01, 0x00, "Sound Test B 0" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -570,7 +571,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( challeng )
- PORT_START /* COL. A - from "TEST NO.7 - status locator - coin-door" */
+ PORT_START_TAG("IN0") /* COL. A - from "TEST NO.7 - status locator - coin-door" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
@@ -580,7 +581,7 @@ static INPUT_PORTS_START( challeng )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_START /* COL. B - from "TEST NO.7 - status locator - start sws." */
+ PORT_START_TAG("IN1") /* COL. B - from "TEST NO.7 - status locator - start sws." */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -590,7 +591,7 @@ static INPUT_PORTS_START( challeng )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
- PORT_START /* COL. C - from "TEST NO.8 - status locator - player no.1" */
+ PORT_START_TAG("IN2") /* COL. C - from "TEST NO.8 - status locator - player no.1" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -600,7 +601,7 @@ static INPUT_PORTS_START( challeng )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* COL. D - from "TEST NO.8 - status locator - player no.2" */
+ PORT_START_TAG("IN3") /* COL. D - from "TEST NO.8 - status locator - player no.2" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -610,7 +611,7 @@ static INPUT_PORTS_START( challeng )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* DSW A - from "TEST NO.6 - dip switch A" */
+ PORT_START_TAG("DSW0") /* DSW A - from "TEST NO.6 - dip switch A" */
PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" )
PORT_DIPSETTING( 0x03, "1 Credit/2 Credits" )
PORT_DIPSETTING( 0x02, "2 Credits/3 Credits" )
@@ -634,7 +635,7 @@ static INPUT_PORTS_START( challeng )
PORT_DIPSETTING( 0x40, "5" )
PORT_DIPSETTING( 0x00, "6" )
- PORT_START /* DSW B - from "TEST NO.6 - dip switch B" */
+ PORT_START_TAG("DSW1") /* DSW B - from "TEST NO.6 - dip switch B" */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x01, "20000" )
PORT_DIPSETTING( 0x00, "30000" )
@@ -660,7 +661,7 @@ static INPUT_PORTS_START( challeng )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_START /* audio board DSW A */
+ PORT_START_TAG("DSW2") /* audio board DSW A */
PORT_DIPNAME( 0x01, 0x00, "Sound Test A 0" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -686,7 +687,7 @@ static INPUT_PORTS_START( challeng )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* audio board DSW B */
+ PORT_START_TAG("DSW3") /* audio board DSW B */
PORT_DIPNAME( 0x01, 0x00, "Sound Test B 0" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -715,7 +716,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( kaos )
- PORT_START /* COL. A - from "TEST NO.7 - status locator - coin-door" */
+ PORT_START_TAG("IN0") /* COL. A - from "TEST NO.7 - status locator - coin-door" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
@@ -725,7 +726,7 @@ static INPUT_PORTS_START( kaos )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* COL. B - from "TEST NO.7 - status locator - start sws." */
+ PORT_START_TAG("IN1") /* COL. B - from "TEST NO.7 - status locator - start sws." */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -735,7 +736,7 @@ static INPUT_PORTS_START( kaos )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
- PORT_START /* COL. C - from "TEST NO.8 - status locator - player no.1" */
+ PORT_START_TAG("IN2") /* COL. C - from "TEST NO.8 - status locator - player no.1" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
@@ -745,7 +746,7 @@ static INPUT_PORTS_START( kaos )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* COL. D - from "TEST NO.8 - status locator - player no.2" */
+ PORT_START_TAG("IN3") /* COL. D - from "TEST NO.8 - status locator - player no.2" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
@@ -755,7 +756,7 @@ static INPUT_PORTS_START( kaos )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("DSW0")
PORT_DIPNAME( 0x0f, 0x0e, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0e, DEF_STR( 1C_1C ) )
@@ -785,7 +786,7 @@ static INPUT_PORTS_START( kaos )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START
+ PORT_START_TAG("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "4" )
@@ -810,7 +811,7 @@ static INPUT_PORTS_START( kaos )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_START /* audio board DSW A */
+ PORT_START_TAG("DSW2") /* audio board DSW A */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -836,7 +837,7 @@ static INPUT_PORTS_START( kaos )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* audio board DSW B */
+ PORT_START_TAG("DSW3") /* audio board DSW B */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -865,7 +866,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( leprechn )
- PORT_START /* COL. A - from "TEST NO.7 - status locator - coin-door" */
+ PORT_START_TAG("IN0") /* COL. A - from "TEST NO.7 - status locator - coin-door" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
@@ -875,7 +876,7 @@ static INPUT_PORTS_START( leprechn )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* COL. B - from "TEST NO.7 - status locator - start sws." */
+ PORT_START_TAG("IN1") /* COL. B - from "TEST NO.7 - status locator - start sws." */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -885,7 +886,7 @@ static INPUT_PORTS_START( leprechn )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
- PORT_START /* COL. C - from "TEST NO.8 - status locator - player no.1" */
+ PORT_START_TAG("IN2") /* COL. C - from "TEST NO.8 - status locator - player no.1" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -895,7 +896,7 @@ static INPUT_PORTS_START( leprechn )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
- PORT_START /* COL. D - from "TEST NO.8 - status locator - player no.2" */
+ PORT_START_TAG("IN3") /* COL. D - from "TEST NO.8 - status locator - player no.2" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -905,7 +906,7 @@ static INPUT_PORTS_START( leprechn )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
- PORT_START /* DSW A - from "TEST NO.6 - dip switch A" */
+ PORT_START_TAG("DSW0") /* DSW A - from "TEST NO.6 - dip switch A" */
PORT_DIPNAME( 0x09, 0x09, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x09, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
@@ -928,7 +929,7 @@ static INPUT_PORTS_START( leprechn )
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) )
- PORT_START /* DSW B - from "TEST NO.6 - dip switch B" */
+ PORT_START_TAG("DSW1") /* DSW B - from "TEST NO.6 - dip switch B" */
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -953,7 +954,7 @@ static INPUT_PORTS_START( leprechn )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* audio board DSW A */
+ PORT_START_TAG("DSW2") /* audio board DSW A */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -979,7 +980,7 @@ static INPUT_PORTS_START( leprechn )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* audio board DSW B */
+ PORT_START_TAG("DSW3") /* audio board DSW B */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1008,7 +1009,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( piratetr )
- PORT_START /* COL. A - from "TEST NO.7 - status locator - coin-door" */
+ PORT_START_TAG("IN0") /* COL. A - from "TEST NO.7 - status locator - coin-door" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
@@ -1018,7 +1019,7 @@ static INPUT_PORTS_START( piratetr )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* COL. B - from "TEST NO.7 - status locator - start sws." */
+ PORT_START_TAG("IN1") /* COL. B - from "TEST NO.7 - status locator - start sws." */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1028,7 +1029,7 @@ static INPUT_PORTS_START( piratetr )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
- PORT_START /* COL. C - from "TEST NO.8 - status locator - player no.1" */
+ PORT_START_TAG("IN2") /* COL. C - from "TEST NO.8 - status locator - player no.1" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1038,7 +1039,7 @@ static INPUT_PORTS_START( piratetr )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
- PORT_START /* COL. D - from "TEST NO.8 - status locator - player no.2" */
+ PORT_START_TAG("IN3") /* COL. D - from "TEST NO.8 - status locator - player no.2" */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1048,7 +1049,7 @@ static INPUT_PORTS_START( piratetr )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
- PORT_START /* DSW A - from "TEST NO.6 - dip switch A" */
+ PORT_START_TAG("DSW0") /* DSW A - from "TEST NO.6 - dip switch A" */
PORT_DIPNAME( 0x09, 0x09, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x09, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
@@ -1071,7 +1072,7 @@ static INPUT_PORTS_START( piratetr )
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) )
- PORT_START /* DSW B - from "TEST NO.6 - dip switch B" */
+ PORT_START_TAG("DSW1") /* DSW B - from "TEST NO.6 - dip switch B" */
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1096,7 +1097,7 @@ static INPUT_PORTS_START( piratetr )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* audio board DSW A */
+ PORT_START_TAG("DSW2") /* audio board DSW A */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1122,7 +1123,7 @@ static INPUT_PORTS_START( piratetr )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* audio board DSW B */
+ PORT_START_TAG("DSW3") /* audio board DSW B */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
diff --git a/src/mame/drivers/gaplus.c b/src/mame/drivers/gaplus.c
index 264c375d72e..92dcc32a7e8 100644
--- a/src/mame/drivers/gaplus.c
+++ b/src/mame/drivers/gaplus.c
@@ -162,14 +162,14 @@ TODO:
***************************************************************************/
-static READ8_HANDLER( in0_l ) { return input_port_read_indexed(machine, 0); } // P1 joystick
-static READ8_HANDLER( in0_h ) { return input_port_read_indexed(machine, 0) >> 4; } // P2 joystick
-static READ8_HANDLER( in1_l ) { return input_port_read_indexed(machine, 1); } // fire and start buttons
-static READ8_HANDLER( in1_h ) { return input_port_read_indexed(machine, 1) >> 4; } // coins
-static READ8_HANDLER( dipA_l ) { return input_port_read_indexed(machine, 2); } // dips A
-static READ8_HANDLER( dipA_h ) { return input_port_read_indexed(machine, 2) >> 4; } // dips A
-static READ8_HANDLER( dipB_l ) { return input_port_read_indexed(machine, 3); } // dips B
-static READ8_HANDLER( dipB_h ) { return input_port_read_indexed(machine, 3) >> 4; } // dips B
+static READ8_HANDLER( in0_l ) { return input_port_read(machine, "IN0"); } // P1 joystick
+static READ8_HANDLER( in0_h ) { return input_port_read(machine, "IN0") >> 4; } // P2 joystick
+static READ8_HANDLER( in1_l ) { return input_port_read(machine, "IN1"); } // fire and start buttons
+static READ8_HANDLER( in1_h ) { return input_port_read(machine, "IN1") >> 4; } // coins
+static READ8_HANDLER( dipA_l ) { return input_port_read(machine, "DSW0"); } // dips A
+static READ8_HANDLER( dipA_h ) { return input_port_read(machine, "DSW0") >> 4; } // dips A
+static READ8_HANDLER( dipB_l ) { return input_port_read(machine, "DSW1"); } // dips B
+static READ8_HANDLER( dipB_h ) { return input_port_read(machine, "DSW1") >> 4; } // dips B
static WRITE8_HANDLER( out_lamps0 )
{
set_led_status(0,data & 1);
@@ -364,7 +364,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( gaplus )
/* The inputs are not memory mapped, they are handled by three I/O chips. */
- PORT_START /* 56XX #0 pins 22-29 */
+ PORT_START_TAG("IN0") /* 56XX #0 pins 22-29 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
@@ -374,7 +374,7 @@ static INPUT_PORTS_START( gaplus )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_START /* 56XX #0 pins 30-33 and 38-41 */
+ PORT_START_TAG("IN1") /* 56XX #0 pins 30-33 and 38-41 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
@@ -384,7 +384,7 @@ static INPUT_PORTS_START( gaplus )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_START /* 58XX #1 pins 30-33 and 38-41 */
+ PORT_START_TAG("DSW0") /* 58XX #1 pins 30-33 and 38-41 */
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x80, "2" )
PORT_DIPSETTING( 0xc0, "3" )
@@ -407,7 +407,7 @@ static INPUT_PORTS_START( gaplus )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
- PORT_START /* 58XX #1 pins 22-29 */
+ PORT_START_TAG("DSW1") /* 58XX #1 pins 22-29 */
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -433,7 +433,7 @@ static INPUT_PORTS_START( gaplus )
PORT_DIPSETTING( 0x05, "50k 150k and every 300k" )
PORT_DIPSETTING( 0x06, "50k 150k" )
- PORT_START /* 62XX #2 pins 24-27 */
+ PORT_START_TAG("IN2") /* 62XX #2 pins 24-27 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
@@ -444,145 +444,20 @@ INPUT_PORTS_END
/* identical to gaplus, but service mode is a dip switch instead of coming from edge connector */
static INPUT_PORTS_START( gapluso )
- /* The inputs are not memory mapped, they are handled by three I/O chips. */
- PORT_START /* 56XX #0 pins 22-29 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
-
- PORT_START /* 56XX #0 pins 30-33 and 38-41 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
-
- PORT_START /* 58XX #1 pins 30-33 and 38-41 */
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x80, "2" )
- PORT_DIPSETTING( 0xc0, "3" )
- PORT_DIPSETTING( 0x40, "4" )
- PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
+ PORT_INCLUDE( gaplus )
- PORT_START /* 58XX #1 pins 22-29 */
+ PORT_MODIFY("DSW1")
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
- PORT_DIPNAME( 0x70, 0x70, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x70, "0 - Standard" )
- PORT_DIPSETTING( 0x60, "1 - Easiest" )
- PORT_DIPSETTING( 0x50, "2" )
- PORT_DIPSETTING( 0x40, "3" )
- PORT_DIPSETTING( 0x30, "4" )
- PORT_DIPSETTING( 0x20, "5" )
- PORT_DIPSETTING( 0x10, "6" )
- PORT_DIPSETTING( 0x00, "7 - Hardest" )
- PORT_DIPNAME( 0x08, 0x08, "Round Advance" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x07, 0x00, DEF_STR( Bonus_Life ) )
- PORT_DIPSETTING( 0x00, "30k 70k and every 70k" )
- PORT_DIPSETTING( 0x01, "30k 100k and every 100k" )
- PORT_DIPSETTING( 0x02, "30k 100k and every 200k" )
- PORT_DIPSETTING( 0x03, "50k 100k and every 100k" )
- PORT_DIPSETTING( 0x04, "50k 100k and every 200k" )
- PORT_DIPSETTING( 0x07, "50k 150k and every 150k" )
- PORT_DIPSETTING( 0x05, "50k 150k and every 300k" )
- PORT_DIPSETTING( 0x06, "50k 150k" )
- PORT_START /* 62XX #2 pins 24-27 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+ PORT_MODIFY("IN2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // doesn't seem to be used
INPUT_PORTS_END
/* identical to gaplus, but different bonus life settings */
static INPUT_PORTS_START( galaga3a )
- /* The inputs are not memory mapped, they are handled by three I/O chips. */
- PORT_START /* 56XX #0 pins 22-29 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
-
- PORT_START /* 56XX #0 pins 30-33 and 38-41 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
-
- PORT_START /* 58XX #1 pins 30-33 and 38-41 */
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x80, "2" )
- PORT_DIPSETTING( 0xc0, "3" )
- PORT_DIPSETTING( 0x40, "4" )
- PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
+ PORT_INCLUDE( gaplus )
- PORT_START /* 58XX #1 pins 22-29 */
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x70, 0x70, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x70, "0 - Standard" )
- PORT_DIPSETTING( 0x60, "1 - Easiest" )
- PORT_DIPSETTING( 0x50, "2" )
- PORT_DIPSETTING( 0x40, "3" )
- PORT_DIPSETTING( 0x30, "4" )
- PORT_DIPSETTING( 0x20, "5" )
- PORT_DIPSETTING( 0x10, "6" )
- PORT_DIPSETTING( 0x00, "7 - Hardest" )
- PORT_DIPNAME( 0x08, 0x08, "Round Advance" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_MODIFY("DSW1")
PORT_DIPNAME( 0x07, 0x02, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x02, "30k 80k and every 100k" )
PORT_DIPSETTING( 0x03, "30k 100k and every 100k" )
@@ -592,78 +467,13 @@ static INPUT_PORTS_START( galaga3a )
PORT_DIPSETTING( 0x06, "30k 150k" )
PORT_DIPSETTING( 0x00, "50k 150k and every 150k" )
PORT_DIPSETTING( 0x01, "50k 150k and every 200k" )
-
- PORT_START /* 62XX #2 pins 24-27 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
INPUT_PORTS_END
/* identical to gaplus, but different bonus life settings */
static INPUT_PORTS_START( galaga3m )
- /* The inputs are not memory mapped, they are handled by three I/O chips. */
- PORT_START /* 56XX #0 pins 22-29 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
+ PORT_INCLUDE( gaplus )
- PORT_START /* 56XX #0 pins 30-33 and 38-41 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
-
- PORT_START /* 58XX #1 pins 30-33 and 38-41 */
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x80, "2" )
- PORT_DIPSETTING( 0xc0, "3" )
- PORT_DIPSETTING( 0x40, "4" )
- PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
-
- PORT_START /* 58XX #1 pins 22-29 */
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x70, 0x70, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x70, "0 - Standard" )
- PORT_DIPSETTING( 0x60, "1 - Easiest" )
- PORT_DIPSETTING( 0x50, "2" )
- PORT_DIPSETTING( 0x40, "3" )
- PORT_DIPSETTING( 0x30, "4" )
- PORT_DIPSETTING( 0x20, "5" )
- PORT_DIPSETTING( 0x10, "6" )
- PORT_DIPSETTING( 0x00, "7 - Hardest" )
- PORT_DIPNAME( 0x08, 0x08, "Round Advance" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_MODIFY("DSW1")
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "30k 150k and every 600k" )
PORT_DIPSETTING( 0x01, "50k 150k and every 300k" )
@@ -673,14 +483,6 @@ static INPUT_PORTS_START( galaga3m )
PORT_DIPSETTING( 0x07, "100k 300k and every 600k" )
PORT_DIPSETTING( 0x05, "150k 400k and every 900k" )
PORT_DIPSETTING( 0x06, "150k 400k" )
-
- PORT_START /* 62XX #2 pins 24-27 */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
INPUT_PORTS_END
diff --git a/src/mame/drivers/gauntlet.c b/src/mame/drivers/gauntlet.c
index 903939b3435..1177217b900 100644
--- a/src/mame/drivers/gauntlet.c
+++ b/src/mame/drivers/gauntlet.c
@@ -193,7 +193,7 @@ static MACHINE_RESET( gauntlet )
static READ16_HANDLER( port4_r )
{
- int temp = input_port_read_indexed(machine, 4);
+ int temp = input_port_read(machine, "IN4");
if (atarigen_cpu_to_sound_ready) temp ^= 0x0020;
if (atarigen_sound_to_cpu_ready) temp ^= 0x0010;
return temp;
@@ -237,7 +237,7 @@ static READ8_HANDLER( switch_6502_r )
if (atarigen_cpu_to_sound_ready) temp ^= 0x80;
if (atarigen_sound_to_cpu_ready) temp ^= 0x40;
if (tms5220_ready_r()) temp ^= 0x20;
- if (!(input_port_read_indexed(machine, 4) & 0x0008)) temp ^= 0x10;
+ if (!(input_port_read(machine, "IN4") & 0x0008)) temp ^= 0x10;
return temp;
}
diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c
index a4be04724f6..ab1c0aadb98 100644
--- a/src/mame/drivers/gcpinbal.c
+++ b/src/mame/drivers/gcpinbal.c
@@ -81,13 +81,13 @@ static READ16_HANDLER( ioc_r )
switch (offset)
{
case 0x80/2:
- return input_port_read_indexed(machine,0); /* DSW */
+ return input_port_read(machine, "DSW");
case 0x84/2:
- return input_port_read_indexed(machine,1); /* IN0 */
+ return input_port_read(machine, "IN0");
case 0x86/2:
- return input_port_read_indexed(machine,2); /* IN1 */
+ return input_port_read(machine, "IN1");
case 0x50:
case 0x51:
@@ -231,7 +231,7 @@ ADDRESS_MAP_END
***********************************************************/
static INPUT_PORTS_START( gcpinbal )
- PORT_START /* DSW */
+ PORT_START_TAG("DSW") /* DSW */
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )
@@ -278,7 +278,7 @@ static INPUT_PORTS_START( gcpinbal )
PORT_DIPSETTING( 0x8000, "4" )
PORT_DIPSETTING( 0x4000, "5" )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -296,7 +296,7 @@ static INPUT_PORTS_START( gcpinbal )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) // Tilt left
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START1 )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/genesis.c b/src/mame/drivers/genesis.c
index aeb897e3477..2ed23406fbc 100644
--- a/src/mame/drivers/genesis.c
+++ b/src/mame/drivers/genesis.c
@@ -444,136 +444,8 @@ $A1001F Port C serial control
UINT16 *genesis_io_ram;
-READ16_HANDLER ( genesis_io_r )
-{
- /* 8-bit only, data is mirrored in both halves */
-
- UINT8 return_value = 0;
-
- switch (offset)
- {
- case 0:
- /* Charles MacDonald ( http://cgfm2.emuviews.com/ )
- D7 : Console is 1= Export (USA, Europe, etc.) 0= Domestic (Japan)
- D6 : Video type is 1= PAL, 0= NTSC
- D5 : Sega CD unit is 1= not present, 0= connected.
- D4 : Unused (always returns zero)
- D3 : Bit 3 of version number
- D2 : Bit 2 of version number
- D1 : Bit 1 of version number
- D0 : Bit 0 of version number
- */
- return_value = 0x80; /* ? megatech is usa? */
- break;
-
- case 1: /* port A data (joypad 1) */
-
- if (genesis_io_ram[offset] & 0x40)
- {
- int iport = input_port_read_indexed(machine, 9);
- return_value = iport & 0x3f;
- }
- else
- {
- int iport1 = input_port_read_indexed(machine, 12);
- int iport2 = input_port_read_indexed(machine, 7) >> 1;
- return_value = (iport1 & 0x10) + (iport2 & 0x20);
- if(iport1 & 0x10 || iport2 & 0x20)
- return_value+=1;
- }
-
- return_value = (genesis_io_ram[offset] & 0x80) | return_value;
-// logerror ("reading joypad 1 , type %02x %02x\n",genesis_io_ram[offset] & 0x80, return_value &0x7f);
- if(bios_ctrl_inputs & 0x04) return_value = 0xff;
- break;
-
- case 2: /* port B data (joypad 2) */
-
- if (genesis_io_ram[offset] & 0x40)
- {
- int iport1 = (input_port_read_indexed(machine, 9) & 0xc0) >> 6;
- int iport2 = (input_port_read_indexed(machine, 8) & 0x0f) << 2;
- return_value = (iport1 + iport2) & 0x3f;
- }
- else
- {
- int iport1 = input_port_read_indexed(machine, 12) << 2;
- int iport2 = input_port_read_indexed(machine, 7) >> 2;
- return_value = (iport1 & 0x10) + (iport2 & 0x20);
- if(iport1 & 0x10 || iport2 & 0x20)
- return_value+=1;
- }
- return_value = (genesis_io_ram[offset] & 0x80) | return_value;
-// logerror ("reading joypad 2 , type %02x %02x\n",genesis_io_ram[offset] & 0x80, return_value &0x7f);
- if(bios_ctrl_inputs & 0x04) return_value = 0xff;
- break;
-
- default:
- return_value = 0xe0;
-
- }
- return return_value | return_value << 8;
-}
-
-READ16_HANDLER ( megaplay_genesis_io_r )
-{
- /* 8-bit only, data is mirrored in both halves */
-
- UINT8 return_value = 0;
-
- switch (offset)
- {
- case 0:
- /* Charles MacDonald ( http://cgfm2.emuviews.com/ )
- D7 : Console is 1= Export (USA, Europe, etc.) 0= Domestic (Japan)
- D6 : Video type is 1= PAL, 0= NTSC
- D5 : Sega CD unit is 1= not present, 0= connected.
- D4 : Unused (always returns zero)
- D3 : Bit 3 of version number
- D2 : Bit 2 of version number
- D1 : Bit 1 of version number
- D0 : Bit 0 of version number
- */
- return_value = 0x80; /* ? megatech is usa? */
- break;
-
- case 1: /* port A data (joypad 1) */
-
- if (genesis_io_ram[offset] & 0x40)
- return_value = input_port_read_indexed(machine, 1) & (genesis_io_ram[4]^0xff);
- else
- {
- return_value = input_port_read_indexed(machine, 2) & (genesis_io_ram[4]^0xff);
- return_value |= input_port_read_indexed(machine, 1) & 0x03;
- }
- return_value = (genesis_io_ram[offset] & 0x80) | return_value;
-// logerror ("reading joypad 1 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f);
- break;
-
- case 2: /* port B data (joypad 2) */
-
- if (genesis_io_ram[offset] & 0x40)
- return_value = input_port_read_indexed(machine, 3) & (genesis_io_ram[5]^0xff);
- else
- {
- return_value = input_port_read_indexed(machine, 4) & (genesis_io_ram[5]^0xff);
- return_value |= input_port_read_indexed(machine, 3) & 0x03;
- }
- return_value = (genesis_io_ram[offset] & 0x80) | return_value;
-// logerror ("reading joypad 2 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f);
- break;
-
-// case 3: /* port C data */
-// return_value = bios_6402 << 3;
-// break;
-
- default:
- return_value = genesis_io_ram[offset];
-
- }
- return return_value | return_value << 8;
-}
-
+/* This handler is still used in hshavoc.c & topshoot.c ; */
+/* megaplay.c uses a local copy 'OLD_megaplay_genesis_io_w' */
WRITE16_HANDLER ( genesis_io_w )
{
// logerror ("write io offset :%02x data %04x PC: 0x%06x\n",offset,data,activecpu_get_previouspc());
diff --git a/src/mame/drivers/getrivia.c b/src/mame/drivers/getrivia.c
index bcf1212bdcc..936dc4250f3 100644
--- a/src/mame/drivers/getrivia.c
+++ b/src/mame/drivers/getrivia.c
@@ -121,7 +121,7 @@ static WRITE8_HANDLER( getrivia_bitmap_w )
static READ8_HANDLER( port1_r )
{
- return input_port_read_indexed(machine, 1) | (ticket_dispenser_0_r(machine, 0) >> 5);
+ return input_port_read(machine, "IN0") | (ticket_dispenser_0_r(machine, 0) >> 5);
}
static WRITE8_HANDLER( lamps_w )
@@ -301,7 +301,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( gselect )
- PORT_START /* DSW A */
+ PORT_START_TAG("DSWA")
PORT_DIPNAME( 0x01, 0x01, "Poker: Discard Cards" )
PORT_DIPSETTING( 0x01, "5" )
PORT_DIPSETTING( 0x00, "3" )
@@ -336,7 +336,7 @@ static INPUT_PORTS_START( gselect )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_IMPULSE(2) PORT_NAME ("Play / Raise")
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_IMPULSE(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_IMPULSE(2)
@@ -347,7 +347,7 @@ static INPUT_PORTS_START( gselect )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_IMPULSE(2) PORT_NAME ("Stand")
/* Button 8, 6, 7 order verified in test mode switch test */
- PORT_START
+ PORT_START_TAG("IN2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
@@ -397,7 +397,7 @@ static INPUT_PORTS_START( getrivia )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )
diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c
index 0e723ac5dec..f1135d34fbf 100644
--- a/src/mame/drivers/gijoe.c
+++ b/src/mame/drivers/gijoe.c
@@ -96,7 +96,7 @@ static READ16_HANDLER( control1_r )
/* bit 8 is EEPROM data */
/* bit 9 is EEPROM ready */
/* bit 11 is service button */
- res = (eeprom_read_bit()<<8) | input_port_read_indexed(machine,0);
+ res = (eeprom_read_bit()<<8) | input_port_read(machine, "IN0");
if (init_eeprom_count)
{
@@ -269,7 +269,7 @@ static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
static INPUT_PORTS_START( gijoe )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START3 )
@@ -278,7 +278,7 @@ static INPUT_PORTS_START( gijoe )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) // EEPROM ready (always 1)
PORT_SERVICE_NO_TOGGLE( 0x0800, IP_ACTIVE_LOW )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
@@ -288,7 +288,7 @@ static INPUT_PORTS_START( gijoe )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE3 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE4 )
- PORT_START
+ PORT_START_TAG("IN2")
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)
@@ -310,7 +310,7 @@ static INPUT_PORTS_START( gijoe )
PORT_DIPSETTING( 0x8000, "Common" )
PORT_DIPSETTING( 0x0000, "Independant" )
- PORT_START
+ PORT_START_TAG("IN3")
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)
diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c
index 9ee293f3684..7f6c62f56a6 100644
--- a/src/mame/drivers/goal92.c
+++ b/src/mame/drivers/goal92.c
@@ -40,15 +40,15 @@ static READ16_HANDLER( goal92_inputs_r )
switch(offset)
{
case 0:
- return input_port_read_indexed(machine, 0);
+ return input_port_read(machine, "DSW1");
case 1:
- return input_port_read_indexed(machine, 1);
+ return input_port_read(machine, "IN1");
case 2:
- return input_port_read_indexed(machine, 2);
+ return input_port_read(machine, "IN2");
case 3:
- return input_port_read_indexed(machine, 3);
+ return input_port_read(machine, "IN3");
case 7:
- return input_port_read_indexed(machine, 4);
+ return input_port_read(machine, "DSW2");
default:
logerror("reading unhandled goal92 inputs %04X %04X @ PC = %04X\n",offset, mem_mask,activecpu_get_pc());
diff --git a/src/mame/drivers/gomoku.c b/src/mame/drivers/gomoku.c
index 51e0a8667fa..076a8581305 100644
--- a/src/mame/drivers/gomoku.c
+++ b/src/mame/drivers/gomoku.c
@@ -49,10 +49,11 @@ extern void *gomoku_sh_start(int clock, const struct CustomSound_interface *conf
static READ8_HANDLER( input_port_r )
{
int i, res;
-
+ static const char *portnames[] = { "IN0", "IN1", "DSW", "UNUSED0", "UNUSED1", "UNUSED2", "UNUSED3", "UNUSED4" };
+
res = 0;
for (i = 0; i < 8; i++)
- res |= ((input_port_read_indexed(machine, i) >> offset) & 1) << i;
+ res |= ((input_port_read(machine, portnames[i]) >> offset) & 1) << i;
return res;
}
@@ -84,7 +85,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( gomoku )
- PORT_START /* 0 */
+ PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
@@ -94,7 +95,7 @@ static INPUT_PORTS_START( gomoku )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
- PORT_START /* 1 */
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
@@ -106,7 +107,7 @@ static INPUT_PORTS_START( gomoku )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 )
- PORT_START /* 2 */
+ PORT_START_TAG("DSW")
PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ))
PORT_DIPSETTING( 0x00, "2" )
@@ -127,19 +128,19 @@ static INPUT_PORTS_START( gomoku )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) )
- PORT_START /* 3 */
+ PORT_START_TAG("UNUSED0")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 4 */
+ PORT_START_TAG("UNUSED1")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 5 */
+ PORT_START_TAG("UNUSED2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 6 */
+ PORT_START_TAG("UNUSED3")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 7 */
+ PORT_START_TAG("UNUSED4")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/goodejan.c b/src/mame/drivers/goodejan.c
index 4877dbdfba9..6a089fe588d 100644
--- a/src/mame/drivers/goodejan.c
+++ b/src/mame/drivers/goodejan.c
@@ -79,11 +79,11 @@ static READ16_HANDLER( mahjong_panel_r )
switch(goodejan_mux_data)
{
- case 1: ret = input_port_read_indexed(machine, 1); break;
- case 2: ret = input_port_read_indexed(machine, 2); break;
- case 4: ret = input_port_read_indexed(machine, 3); break;
- case 8: ret = input_port_read_indexed(machine, 4); break;
- case 0x10: ret = input_port_read_indexed(machine, 5); break;
+ case 1: ret = input_port_read(machine, "KEY0"); break;
+ case 2: ret = input_port_read(machine, "KEY1"); break;
+ case 4: ret = input_port_read(machine, "KEY2"); break;
+ case 8: ret = input_port_read(machine, "KEY3"); break;
+ case 0x10: ret = input_port_read(machine, "KEY4"); break;
}
return ret;
@@ -126,7 +126,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( goodejan )
SEIBU_COIN_INPUTS /* coin inputs read through sound cpu */
- PORT_START
+ PORT_START_TAG("KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )
@@ -136,7 +136,7 @@ static INPUT_PORTS_START( goodejan )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("KEY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )
@@ -146,7 +146,7 @@ static INPUT_PORTS_START( goodejan )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
@@ -156,7 +156,7 @@ static INPUT_PORTS_START( goodejan )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("KEY3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )
@@ -166,7 +166,7 @@ static INPUT_PORTS_START( goodejan )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("KEY4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
@@ -176,55 +176,55 @@ static INPUT_PORTS_START( goodejan )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
- PORT_DIPNAME( 0x0001, 0x0001, "4" )
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Unknown ) ) // Freezes if off?
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_START_TAG("DSW")
+ PORT_DIPNAME( 0x0001, 0x0001, "4" )
+ PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Unknown ) ) // Freezes if off?
+ PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
INPUT_PORTS_END
diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c
index b1e2c7b7d95..252d3072450 100644
--- a/src/mame/drivers/gottlieb.c
+++ b/src/mame/drivers/gottlieb.c
@@ -197,19 +197,19 @@ static int track[2];
static READ8_HANDLER( gottlieb_track_0_r )
{
- return input_port_read_indexed(machine, 2) - track[0];
+ return input_port_read(machine, "IN2") - track[0];
}
static READ8_HANDLER( gottlieb_track_1_r )
{
- return input_port_read_indexed(machine, 3) - track[1];
+ return input_port_read(machine, "IN3") - track[1];
}
static WRITE8_HANDLER( gottlieb_track_reset_w )
{
/* reset the trackball counters */
- track[0] = input_port_read_indexed(machine, 2);
- track[1] = input_port_read_indexed(machine, 3);
+ track[0] = input_port_read(machine, "IN2");
+ track[1] = input_port_read(machine, "IN3");
}
static int joympx;
@@ -601,7 +601,7 @@ static INPUT_PORTS_START( tylz )
PORT_DIPSETTING( 0x80, "Normal Hard" )
PORT_DIPSETTING( 0xc0, DEF_STR( Hard ) )
- PORT_START_TAG("DSW1") /* ? */
+ PORT_START_TAG("IN1") /* ? */
PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Select in Service Mode") PORT_CODE(KEYCODE_F1) // cycle through test options, hold to do test
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c
index 32ace2dce12..a0977e36b5c 100644
--- a/src/mame/drivers/grchamp.c
+++ b/src/mame/drivers/grchamp.c
@@ -78,7 +78,7 @@
static MACHINE_START( grchamp )
{
/* if the coin system is 1 way, lock Coin B (Page 40) */
- if (input_port_read_indexed(machine, 1) & 0x10)
+ if (input_port_read(machine, "DSWB") & 0x10)
coin_lockout_w(1, 1);
}
diff --git a/src/mame/drivers/gridlee.c b/src/mame/drivers/gridlee.c
index c8a87985b19..eccacce9517 100644
--- a/src/mame/drivers/gridlee.c
+++ b/src/mame/drivers/gridlee.c
@@ -172,9 +172,10 @@ static READ8_HANDLER( analog_port_r )
{
int delta, sign, magnitude;
UINT8 newval;
+ static const char *portnames[] = { "TRACK0_Y", "TRACK0_X", "TRACK1_Y", "TRACK1_X" };
/* first read the new trackball value and compute the signed delta */
- newval = input_port_read_indexed(machine, offset + 2 * gridlee_cocktail_flip);
+ newval = input_port_read(machine, portnames[offset + 2 * gridlee_cocktail_flip]);
delta = (int)newval - (int)last_analog_input[offset];
/* handle the case where we wrap around from 0x00 to 0xff, or vice versa */
@@ -300,10 +301,10 @@ static WRITE8_HANDLER( gridlee_coin_counter_w )
static ADDRESS_MAP_START( readmem_cpu1, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_RAM)
AM_RANGE(0x9500, 0x9501) AM_READ(analog_port_r)
- AM_RANGE(0x9502, 0x9502) AM_READ(input_port_4_r)
- AM_RANGE(0x9503, 0x9503) AM_READ(input_port_5_r)
- AM_RANGE(0x9600, 0x9600) AM_READ(input_port_6_r)
- AM_RANGE(0x9700, 0x9700) AM_READ(input_port_7_r)
+ AM_RANGE(0x9502, 0x9502) AM_READ_PORT("IN0")
+ AM_RANGE(0x9503, 0x9503) AM_READ_PORT("IN1")
+ AM_RANGE(0x9600, 0x9600) AM_READ_PORT("DSW")
+ AM_RANGE(0x9700, 0x9700) AM_READ_PORT("IN2")
AM_RANGE(0x9820, 0x9820) AM_READ(random_num_r)
AM_RANGE(0x9c00, 0x9cff) AM_READ(SMH_RAM)
AM_RANGE(0xa000, 0xffff) AM_READ(SMH_ROM)
@@ -335,24 +336,24 @@ ADDRESS_MAP_END
*************************************/
static INPUT_PORTS_START( gridlee )
- PORT_START /* 9500 (fake) */
+ PORT_START_TAG("TRACK0_Y") /* 9500 (fake) */
PORT_BIT( 0xff, 0, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(8)
- PORT_START /* 9501 (fake) */
+ PORT_START_TAG("TRACK0_X") /* 9501 (fake) */
PORT_BIT( 0xff, 0, IPT_TRACKBALL_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(8) PORT_REVERSE
- PORT_START /* 9500 (fake) */
+ PORT_START_TAG("TRACK1_Y") /* 9500 (fake) */
PORT_BIT( 0xff, 0, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(8) PORT_COCKTAIL
- PORT_START /* 9501 (fake) */
+ PORT_START_TAG("TRACK1_X") /* 9501 (fake) */
PORT_BIT( 0xff, 0, IPT_TRACKBALL_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(8) PORT_REVERSE PORT_COCKTAIL
- PORT_START /* 9502 */
+ PORT_START_TAG("IN0") /* 9502 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START /* 9503 */
+ PORT_START_TAG("IN1") /* 9503 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
@@ -363,7 +364,7 @@ static INPUT_PORTS_START( gridlee )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ))
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START /* 9600 */
+ PORT_START_TAG("DSW") /* 9600 */
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Bonus_Life ))
PORT_DIPSETTING( 0x00, "8000 points" )
PORT_DIPSETTING( 0x01, "10000 points" )
@@ -387,7 +388,7 @@ static INPUT_PORTS_START( gridlee )
PORT_DIPSETTING( 0x00, DEF_STR( No ))
PORT_DIPSETTING( 0x80, DEF_STR( Yes ))
- PORT_START /* 9700 */
+ PORT_START_TAG("IN2") /* 9700 */
PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c
index 6dffaa1f808..89e6fe26420 100644
--- a/src/mame/drivers/groundfx.c
+++ b/src/mame/drivers/groundfx.c
@@ -163,13 +163,13 @@ static READ32_HANDLER( groundfx_input_r )
{
case 0x00:
{
- return (input_port_read_indexed(machine,0) << 16) | input_port_read_indexed(machine,1) |
+ return (input_port_read(machine, "IN0") << 16) | input_port_read(machine, "IN1") |
(eeprom_read_bit() << 7) | frame_counter;
}
case 0x01:
{
- return input_port_read_indexed(machine,2) | (coin_word << 16);
+ return input_port_read(machine, "IN2") | (coin_word << 16);
}
}
@@ -214,7 +214,7 @@ static WRITE32_HANDLER( groundfx_input_w )
static READ32_HANDLER( groundfx_adc_r )
{
- return (input_port_read_indexed(machine,3) << 8) | input_port_read_indexed(machine,4);
+ return (input_port_read(machine, "AN0") << 8) | input_port_read(machine, "AN1");
}
static WRITE32_HANDLER( groundfx_adc_w )
@@ -280,7 +280,7 @@ static ADDRESS_MAP_START( groundfx_writemem, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x200000, 0x21ffff) AM_WRITE(SMH_RAM) AM_BASE(&groundfx_ram)
AM_RANGE(0x300000, 0x303fff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram32) AM_SIZE(&spriteram_size)
AM_RANGE(0x400000, 0x400003) AM_WRITE(motor_control_w) /* gun vibration */
- AM_RANGE(0x500000, 0x500007) AM_WRITE(groundfx_input_w) /* eerom etc. */
+ AM_RANGE(0x500000, 0x500007) AM_WRITE(groundfx_input_w) /* eeprom etc. */
AM_RANGE(0x600000, 0x600003) AM_WRITE(groundfx_adc_w)
AM_RANGE(0x700000, 0x7007ff) AM_WRITE(SMH_RAM) AM_BASE(&f3_shared_ram)
AM_RANGE(0x800000, 0x80ffff) AM_WRITE(TC0480SCP_long_w) /* tilemaps */
@@ -298,10 +298,10 @@ ADDRESS_MAP_END
***********************************************************/
static INPUT_PORTS_START( groundfx )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* Frame counter */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -319,7 +319,7 @@ static INPUT_PORTS_START( groundfx )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN2 */
+ PORT_START_TAG("IN2") /* IN2 */
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_LOW )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -329,16 +329,16 @@ static INPUT_PORTS_START( groundfx )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN 2, steering wheel */
+ PORT_START_TAG("AN0") /* IN 2, steering wheel */
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1)
- PORT_START /* IN 3, accel */
+ PORT_START_TAG("AN1") /* IN 3, accel */
PORT_BIT( 0xff, 0xff, IPT_AD_STICK_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* IN 4, sound volume */
+ PORT_START_TAG("AN2") /* IN 4, sound volume */
PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2)
- PORT_START /* IN 5, unknown */
+ PORT_START_TAG("AN3") /* IN 5, unknown */
PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c
index 2a876d26a5c..9e1c26349cf 100644
--- a/src/mame/drivers/gsword.c
+++ b/src/mame/drivers/gsword.c
@@ -177,7 +177,7 @@ static int gsword_protect_hack;
static int gsword_coins_in(void)
{
/* emulate 8741 coin slot */
- if (input_port_read_indexed(machine, 4)&0xc0)
+ if (input_port_read(machine, "IN4") & 0xc0)
{
logerror("Coin In\n");
return 0x80;
@@ -215,11 +215,11 @@ static READ8_HANDLER( gsword_8741_2_r )
switch (offset)
{
case 0x01: /* start button , coins */
- return input_port_read_indexed(machine, 0);
+ return input_port_read(machine, "IN0");
case 0x02: /* Player 1 Controller */
- return input_port_read_indexed(machine, 1);
+ return input_port_read(machine, "IN1");
case 0x04: /* Player 2 Controller */
- return input_port_read_indexed(machine, 3);
+ return input_port_read(machine, "IN3");
// default:
// logerror("8741-2 unknown read %d PC=%04x\n",offset,activecpu_get_pc());
}
@@ -232,11 +232,11 @@ static READ8_HANDLER( gsword_8741_3_r )
switch (offset)
{
case 0x01: /* start button */
- return input_port_read_indexed(machine, 2);
+ return input_port_read(machine, "IN2");
case 0x02: /* Player 1 Controller? */
- return input_port_read_indexed(machine, 1);
+ return input_port_read(machine, "IN1");
case 0x04: /* Player 2 Controller? */
- return input_port_read_indexed(machine, 3);
+ return input_port_read(machine, "IN3");
}
/* unknown */
// logerror("8741-3 unknown read %d PC=%04x\n",offset,activecpu_get_pc());
@@ -422,9 +422,9 @@ static ADDRESS_MAP_START( josvolly_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&gsword_cpu2_ram)
/* 8000 to 8003 looks MCU */
- AM_RANGE(0x8000, 0x8000) AM_READ(input_port_1_r) // 1PL
- AM_RANGE(0x8001, 0x8001) AM_READ(input_port_2_r) // 2PL / ACK
- AM_RANGE(0x8002, 0x8002) AM_READ(input_port_0_r) // START
+ AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN1") // 1PL
+ AM_RANGE(0x8001, 0x8001) AM_READ_PORT("IN2") // 2PL / ACK
+ AM_RANGE(0x8002, 0x8002) AM_READ_PORT("IN0") // START
// AM_RANGE(0x6000, 0x6000) AM_WRITE(adpcm_soundcommand_w)
AM_RANGE(0xA000, 0xA001) AM_WRITE(josvolly_8741_1_w) AM_READ(josvolly_8741_1_r)
@@ -443,7 +443,7 @@ static ADDRESS_MAP_START( josvolly_cpu2_io_map, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
static INPUT_PORTS_START( gsword )
- PORT_START /* IN0 (8741-2 port1?) */
+ PORT_START_TAG("IN0") /* IN0 (8741-2 port1?) */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -452,7 +452,8 @@ static INPUT_PORTS_START( gsword )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
- PORT_START /* IN1 (8741-2 port2?) */
+
+ PORT_START_TAG("IN1") /* IN1 (8741-2 port2?) */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -461,7 +462,8 @@ static INPUT_PORTS_START( gsword )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
- PORT_START /* IN2 (8741-3 port1?) */
+
+ PORT_START_TAG("IN2") /* IN2 (8741-3 port1?) */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -469,7 +471,8 @@ static INPUT_PORTS_START( gsword )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
- PORT_START /* IN3 (8741-3 port2?) */
+
+ PORT_START_TAG("IN3") /* IN3 (8741-3 port2?) */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -478,7 +481,8 @@ static INPUT_PORTS_START( gsword )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
- PORT_START /* IN4 (coins) */
+
+ PORT_START_TAG("IN4") /* IN4 (coins) */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -488,7 +492,7 @@ static INPUT_PORTS_START( gsword )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
/* NOTE: Switches 0 & 1, 6,7,8 not used */
/* Coins configurations were handled */
/* via external hardware & not via program */
@@ -501,7 +505,7 @@ static INPUT_PORTS_START( gsword )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) )
- PORT_START /* DSW1 */
+ PORT_START_TAG("DSW1") /* DSW1 */
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
@@ -526,7 +530,7 @@ static INPUT_PORTS_START( gsword )
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x80, "255 (Cheat)" )
- PORT_START /* DSW2 */
+ PORT_START_TAG("DSW2") /* DSW2 */
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
@@ -553,7 +557,7 @@ static INPUT_PORTS_START( gsword )
INPUT_PORTS_END
static INPUT_PORTS_START( josvolly )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW , IPT_START2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW , IPT_START1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW , IPT_COIN2 ) PORT_IMPULSE(1)
@@ -563,7 +567,7 @@ static INPUT_PORTS_START( josvolly )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
@@ -573,7 +577,7 @@ static INPUT_PORTS_START( josvolly )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN2 */
+ PORT_START_TAG("IN2") /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
@@ -583,7 +587,7 @@ static INPUT_PORTS_START( josvolly )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* DSW1 */
+ PORT_START_TAG("DSW1") /* DSW1 */
PORT_DIPNAME( 0x0c, 0x00, "DIP1-0c(982E)" )
PORT_DIPSETTING( 0x0c, "0" )
PORT_DIPSETTING( 0x08, "1" )
@@ -601,7 +605,7 @@ static INPUT_PORTS_START( josvolly )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START /* DSW2 */
+ PORT_START_TAG("DSW2") /* DSW2 */
// PORT_DIPNAME( 0x01, 0x00, "DSW2-0" )
// PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
// PORT_DIPSETTING( 0x01, DEF_STR( On ) )
diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c
index 10e08f34a82..b3f8a8b5715 100644
--- a/src/mame/drivers/gticlub.c
+++ b/src/mame/drivers/gticlub.c
@@ -210,10 +210,10 @@ static void adc1038_clk_w(running_machine *machine, int bit)
switch (adc1038_adr)
{
- case 0: adc1038_adc_data = input_port_read_indexed(machine, 4); break;
- case 1: adc1038_adc_data = input_port_read_indexed(machine, 5); break;
- case 2: adc1038_adc_data = input_port_read_indexed(machine, 6); break;
- case 3: adc1038_adc_data = input_port_read_indexed(machine, 7); break;
+ case 0: adc1038_adc_data = input_port_read(machine, "AN0"); break;
+ case 1: adc1038_adc_data = input_port_read(machine, "AN1"); break;
+ case 2: adc1038_adc_data = input_port_read(machine, "AN2"); break;
+ case 3: adc1038_adc_data = input_port_read(machine, "AN3"); break;
case 4: adc1038_adc_data = 0x000; break;
case 5: adc1038_adc_data = 0x000; break;
case 6: adc1038_adc_data = 0x000; break;
@@ -255,10 +255,10 @@ static int adc1038_sars_r(running_machine *machine)
switch (adc1038_adr)
{
- case 0: adc1038_adc_data = input_port_read_indexed(machine, 4); break;
- case 1: adc1038_adc_data = input_port_read_indexed(machine, 5); break;
- case 2: adc1038_adc_data = input_port_read_indexed(machine, 6); break;
- case 3: adc1038_adc_data = input_port_read_indexed(machine, 7); break;
+ case 0: adc1038_adc_data = input_port_read(machine, "AN0"); break;
+ case 1: adc1038_adc_data = input_port_read(machine, "AN1"); break;
+ case 2: adc1038_adc_data = input_port_read(machine, "AN2"); break;
+ case 3: adc1038_adc_data = input_port_read(machine, "AN3"); break;
case 4: adc1038_adc_data = 0x000; break;
case 5: adc1038_adc_data = 0x000; break;
case 6: adc1038_adc_data = 0x000; break;
@@ -274,12 +274,14 @@ static int adc1038_sars_r(running_machine *machine)
static READ8_HANDLER( sysreg_r )
{
+ static const char *portnames[] = { "IN0", "IN1", "IN2", "IN3" };
+
switch (offset)
{
case 0:
case 1:
case 3:
- return input_port_read_indexed(machine, offset);
+ return input_port_read(machine, portnames[offset]);
case 2:
return adc1038_sars_r(machine) << 7;
@@ -512,7 +514,7 @@ static NVRAM_HANDLER(gticlub)
static INPUT_PORTS_START( gticlub )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) // View switch
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // Shift Down
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) // Shift Up
@@ -520,13 +522,13 @@ static INPUT_PORTS_START( gticlub )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8)
PORT_BIT( 0x0b, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN3")
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -543,37 +545,37 @@ static INPUT_PORTS_START( gticlub )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* mask default type sens delta min max */
+ PORT_START_TAG("AN0") /* mask default type sens delta min max */
PORT_BIT( 0x3ff, 0x200, IPT_PADDLE ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
- PORT_START
+ PORT_START_TAG("AN1")
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
- PORT_START
+ PORT_START_TAG("AN2")
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL2 ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
- PORT_START
+ PORT_START_TAG("AN3")
PORT_BIT( 0x3ff, 0x000, IPT_PEDAL3 ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
INPUT_PORTS_END
static INPUT_PORTS_START( slrasslt )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) // View Shift
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // Trigger
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // Missile
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) // Power Up
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("IN2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN3")
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -591,16 +593,16 @@ static INPUT_PORTS_START( slrasslt )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START
+ PORT_START_TAG("AN0")
PORT_BIT( 0x3ff, 0x000, IPT_AD_STICK_Y ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
- PORT_START
+ PORT_START_TAG("AN1")
PORT_BIT( 0x3ff, 0x000, IPT_AD_STICK_X ) PORT_MINMAX(0x000,0x3ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) PORT_REVERSE
INPUT_PORTS_END
static INPUT_PORTS_START( thunderh )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
@@ -610,7 +612,7 @@ static INPUT_PORTS_START( thunderh )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
@@ -620,10 +622,10 @@ static INPUT_PORTS_START( thunderh )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
- PORT_START
+ PORT_START_TAG("IN2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN3")
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -644,7 +646,7 @@ static INPUT_PORTS_START( thunderh )
INPUT_PORTS_END
static INPUT_PORTS_START( hangplt )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
@@ -652,15 +654,15 @@ static INPUT_PORTS_START( hangplt )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // Push limit switch
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // Pull limit switch
- PORT_START
+ PORT_START_TAG("IN2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN3")
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c
index cf56cc67844..933b831a36b 100644
--- a/src/mame/drivers/guab.c
+++ b/src/mame/drivers/guab.c
@@ -545,13 +545,15 @@ static READ16_HANDLER( wd1770_r )
static READ16_HANDLER( io_r )
{
+ static const char *portnames[] = { "IN0", "IN1", "IN2" };
+
switch (offset)
{
case 0x00:
case 0x01:
case 0x02:
{
- return input_port_read_indexed(machine, offset);
+ return input_port_read(machine, portnames[offset]);
}
case 0x30:
{
@@ -665,7 +667,7 @@ ADDRESS_MAP_END
*************************************/
static INPUT_PORTS_START( guab )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("50p")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("100p")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Back door") PORT_CODE(KEYCODE_R) PORT_TOGGLE
@@ -674,7 +676,8 @@ static INPUT_PORTS_START( guab )
PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_UNUSED ) PORT_NAME("50p level")
PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_UNUSED ) PORT_NAME("100p level")
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_UNUSED )
- PORT_START
+
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START )
@@ -683,7 +686,8 @@ static INPUT_PORTS_START( guab )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("A")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("B")
- PORT_START
+
+ PORT_START_TAG("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Select")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -695,7 +699,7 @@ static INPUT_PORTS_START( guab )
INPUT_PORTS_END
static INPUT_PORTS_START( tenup )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("50p")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("100p")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Back door") PORT_CODE(KEYCODE_R) PORT_TOGGLE
@@ -704,7 +708,8 @@ static INPUT_PORTS_START( tenup )
PORT_BIT( 0x20, IP_ACTIVE_HIGH,IPT_UNUSED ) PORT_NAME("10p level")
PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_UNUSED ) PORT_NAME("100p level")
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_UNUSED )
- PORT_START
+
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START )
@@ -713,7 +718,8 @@ static INPUT_PORTS_START( tenup )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Pass")
- PORT_START
+
+ PORT_START_TAG("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Collect")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c
index 9f6b0608462..7cf81b8ce8a 100644
--- a/src/mame/drivers/gunbustr.c
+++ b/src/mame/drivers/gunbustr.c
@@ -91,13 +91,12 @@ static READ32_HANDLER( gunbustr_input_r )
{
case 0x00:
{
- return (input_port_read_indexed(machine,0) << 16) | input_port_read_indexed(machine,1) |
- (eeprom_read_bit() << 7);
+ return (input_port_read(machine, "IN0") << 16) | input_port_read(machine, "IN1") | (eeprom_read_bit() << 7);
}
case 0x01:
{
- return input_port_read_indexed(machine,2) | (coin_word << 16);
+ return input_port_read(machine, "IN2") | (coin_word << 16);
}
}
logerror("CPU #0 PC %06x: read input %06x\n",activecpu_get_pc(),offset);
@@ -174,8 +173,8 @@ static WRITE32_HANDLER( motor_control_w )
static READ32_HANDLER( gunbustr_gun_r )
{
- return ( input_port_read_indexed(machine,3) << 24) | (input_port_read_indexed(machine,4) << 16) |
- ( input_port_read_indexed(machine,5) << 8) | input_port_read_indexed(machine,6);
+ return ( input_port_read(machine, "LIGHT0_X") << 24) | (input_port_read(machine, "LIGHT0_Y") << 16) |
+ ( input_port_read(machine, "LIGHT1_X") << 8) | input_port_read(machine, "LIGHT1_Y");
}
static WRITE32_HANDLER( gunbustr_gun_w )
@@ -221,7 +220,7 @@ ADDRESS_MAP_END
***********************************************************/
static INPUT_PORTS_START( gunbustr )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -239,7 +238,7 @@ static INPUT_PORTS_START( gunbustr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) /* Freeze input */
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -257,7 +256,7 @@ static INPUT_PORTS_START( gunbustr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_START /* IN2 */
+ PORT_START_TAG("IN2") /* IN2 */
PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -277,16 +276,16 @@ static INPUT_PORTS_START( gunbustr )
/* Light gun inputs */
- PORT_START /* IN 3, P1X */
+ PORT_START_TAG("LIGHT0_X") /* IN 3, P1X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1)
- PORT_START /* IN 4, P1Y */
+ PORT_START_TAG("LIGHT0_Y") /* IN 4, P1Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_REVERSE PORT_PLAYER(1)
- PORT_START /* IN 5, P2X */
+ PORT_START_TAG("LIGHT1_X") /* IN 5, P2X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(2)
- PORT_START /* IN 6, P2Y */
+ PORT_START_TAG("LIGHT1_Y") /* IN 6, P2Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_REVERSE PORT_PLAYER(2)
INPUT_PORTS_END
diff --git a/src/mame/drivers/gundealr.c b/src/mame/drivers/gundealr.c
index 735944523af..ace7b60aa26 100644
--- a/src/mame/drivers/gundealr.c
+++ b/src/mame/drivers/gundealr.c
@@ -73,9 +73,9 @@ static INTERRUPT_GEN( yamyam_interrupt )
{
if (input_ports_hack)
{
- rambase[0x004] = input_port_read_indexed(machine, 4); /* COIN */
- rambase[0x005] = input_port_read_indexed(machine, 3); /* IN1 */
- rambase[0x006] = input_port_read_indexed(machine, 2); /* IN0 */
+ rambase[0x004] = input_port_read(machine, "IN2");
+ rambase[0x005] = input_port_read(machine, "IN1");
+ rambase[0x006] = input_port_read(machine, "IN0");
}
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xd7); /* RST 10h vblank */
}
@@ -158,11 +158,11 @@ logerror("e000 = %02x\n",rambase[0x000]);
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1)
- AM_RANGE(0xc000, 0xc000) AM_READ(input_port_0_r) /* DSW0 */
- AM_RANGE(0xc001, 0xc001) AM_READ(input_port_1_r) /* DSW1 */
- AM_RANGE(0xc004, 0xc004) AM_READ(input_port_2_r) /* COIN (Gun Dealer only) */
- AM_RANGE(0xc005, 0xc005) AM_READ(input_port_3_r) /* IN1 (Gun Dealer only) */
- AM_RANGE(0xc006, 0xc006) AM_READ(input_port_4_r) /* IN0 (Gun Dealer only) */
+ AM_RANGE(0xc000, 0xc000) AM_READ_PORT("DSW0") /* DSW0 */
+ AM_RANGE(0xc001, 0xc001) AM_READ_PORT("DSW1") /* DSW1 */
+ AM_RANGE(0xc004, 0xc004) AM_READ_PORT("IN0") /* COIN (Gun Dealer only) */
+ AM_RANGE(0xc005, 0xc005) AM_READ_PORT("IN1") /* IN1 (Gun Dealer only) */
+ AM_RANGE(0xc006, 0xc006) AM_READ_PORT("IN2") /* IN0 (Gun Dealer only) */
AM_RANGE(0xc010, 0xc013) AM_WRITE(yamyam_fg_scroll_w) /* Yam Yam only */
AM_RANGE(0xc014, 0xc014) AM_WRITE(gundealr_flipscreen_w)
AM_RANGE(0xc016, 0xc016) AM_WRITE(yamyam_bankswitch_w)
@@ -182,7 +182,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( gundealr )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -207,7 +207,7 @@ static INPUT_PORTS_START( gundealr )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START /* DSW1 */
+ PORT_START_TAG("DSW1") /* DSW1 */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) )
@@ -232,7 +232,7 @@ static INPUT_PORTS_START( gundealr )
PORT_DIPSETTING( 0x80, "2" )
PORT_DIPSETTING( 0xc0, "3" )
- PORT_START /* COIN */
+ PORT_START_TAG("IN0") /* COIN */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
@@ -242,7 +242,7 @@ static INPUT_PORTS_START( gundealr )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* Player 2 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
@@ -252,7 +252,7 @@ static INPUT_PORTS_START( gundealr )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_START /* IN0 */
+ PORT_START_TAG("IN2") /* Player 1 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1)
@@ -264,7 +264,7 @@ static INPUT_PORTS_START( gundealr )
INPUT_PORTS_END
static INPUT_PORTS_START( gundealt )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -289,7 +289,7 @@ static INPUT_PORTS_START( gundealt )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START /* DSW1 */
+ PORT_START_TAG("DSW1") /* DSW1 */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) )
@@ -314,7 +314,7 @@ static INPUT_PORTS_START( gundealt )
PORT_DIPSETTING( 0x80, "2" )
PORT_DIPSETTING( 0xc0, "3" )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* Player 1 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1)
@@ -324,7 +324,7 @@ static INPUT_PORTS_START( gundealt )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* Player 2 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
@@ -334,7 +334,7 @@ static INPUT_PORTS_START( gundealt )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_START /* COIN */
+ PORT_START_TAG("IN2") /* COIN */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
@@ -346,7 +346,7 @@ static INPUT_PORTS_START( gundealt )
INPUT_PORTS_END
static INPUT_PORTS_START( yamyam )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
@@ -370,7 +370,7 @@ static INPUT_PORTS_START( yamyam )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START /* DSW1 */
+ PORT_START_TAG("DSW1") /* DSW1 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x07, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 4C_1C ) )
@@ -394,7 +394,7 @@ static INPUT_PORTS_START( yamyam )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
- PORT_START /* COIN */
+ PORT_START_TAG("IN0") /* COIN */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
@@ -404,7 +404,7 @@ static INPUT_PORTS_START( yamyam )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* Player 2 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
@@ -414,7 +414,7 @@ static INPUT_PORTS_START( yamyam )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_START /* IN0 */
+ PORT_START_TAG("IN2") /* Player 1 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1)
diff --git a/src/mame/drivers/hshavoc.c b/src/mame/drivers/hshavoc.c
index 97b1e8b89a9..9166a32a89c 100644
--- a/src/mame/drivers/hshavoc.c
+++ b/src/mame/drivers/hshavoc.c
@@ -41,7 +41,7 @@ Unfortunately it's read protected.
static INPUT_PORTS_START( hshavoc )
- PORT_START /* 16bit */
+ PORT_START_TAG("IN0") /* 16bit */
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c
index e72b63e3708..bb4a32db387 100644
--- a/src/mame/drivers/kaneko16.c
+++ b/src/mame/drivers/kaneko16.c
@@ -598,10 +598,10 @@ ADDRESS_MAP_END
static READ16_HANDLER( gtmr_wheel_r )
{
- if ( (input_port_read_indexed(machine, 4) & 0x1800) == 0x10) // DSW setting
- return input_port_read_indexed(machine, 5)<<8; // 360' Wheel
+ if ( (input_port_read(machine, "DSW1") & 0x1800) == 0x10) // DSW setting
+ return input_port_read(machine, "WHEEL0")<<8; // 360' Wheel
else
- return input_port_read_indexed(machine, 5); // 270' Wheel
+ return input_port_read(machine, "WHEEL0"); // 270' Wheel
}
static WRITE16_HANDLER( gtmr_oki_0_bank_w )
@@ -703,16 +703,16 @@ ADDRESS_MAP_END
static READ16_HANDLER( gtmr2_wheel_r )
{
- switch (input_port_read_indexed(machine, 4) & 0x1800)
+ switch (input_port_read(machine, "DSW1") & 0x1800)
{
case 0x0000: // 270' A. Wheel
- return (input_port_read_indexed(machine, 5));
+ return (input_port_read(machine, "WHEEL0"));
break;
case 0x1000: // 270' D. Wheel
- return (input_port_read_indexed(machine, 6) << 8);
+ return (input_port_read(machine, "WHEEL1") << 8);
break;
case 0x0800: // 360' Wheel
- return (input_port_read_indexed(machine, 7) << 8);
+ return (input_port_read(machine, "WHEEL2") << 8);
break;
default:
logerror("gtmr2_wheel_r : read at %06x with joystick\n", activecpu_get_pc());
@@ -723,7 +723,7 @@ static READ16_HANDLER( gtmr2_wheel_r )
static READ16_HANDLER( gtmr2_IN1_r )
{
- return (input_port_read_indexed(machine, 1) & (input_port_read_indexed(machine, 8) | ~0x7100));
+ return (input_port_read(machine, "IN1") & (input_port_read(machine, "FAKE") | ~0x7100));
}
static ADDRESS_MAP_START( gtmr2_readmem, ADDRESS_SPACE_PROGRAM, 16 )
@@ -874,7 +874,7 @@ ADDRESS_MAP_END
***************************************************************************/
static INPUT_PORTS_START( bakubrkr )
- PORT_START // IN0 - Player 1 + DSW - e00000.w
+ PORT_START_TAG("IN0") // IN0 - Player 1 + DSW - e00000.w
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -896,7 +896,7 @@ static INPUT_PORTS_START( bakubrkr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN1 - Player 2 - e00002.b
+ PORT_START_TAG("IN1") // IN1 - Player 2 - e00002.b
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
@@ -906,7 +906,7 @@ static INPUT_PORTS_START( bakubrkr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN2 - Coins - e00004.b
+ PORT_START_TAG("IN2") // IN2 - Coins - e00004.b
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -916,7 +916,7 @@ static INPUT_PORTS_START( bakubrkr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN3 - Seems unused ! - e00006.b
+ PORT_START_TAG("IN3") // IN3 - Seems unused ! - e00006.b
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -933,7 +933,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( berlwall )
- PORT_START // IN0 - Player 1 - 680000.w
+ PORT_START_TAG("IN0") // IN0 - Player 1 - 680000.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
@@ -943,7 +943,7 @@ static INPUT_PORTS_START( berlwall )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN1 - Player 2 - 680002.w
+ PORT_START_TAG("IN1") // IN1 - Player 2 - 680002.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
@@ -953,7 +953,7 @@ static INPUT_PORTS_START( berlwall )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN2 - Coins - 680004.w
+ PORT_START_TAG("IN2") // IN2 - Coins - 680004.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -963,7 +963,7 @@ static INPUT_PORTS_START( berlwall )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN3 - ? - 680006.w
+ PORT_START_TAG("IN3") // IN3 - ? - 680006.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1043,7 +1043,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( blazeon )
- PORT_START // IN0 - Player 1 + DSW - c00000.w
+ PORT_START_TAG("IN0") // IN0 - Player 1 + DSW - c00000.w
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )
@@ -1070,7 +1070,7 @@ static INPUT_PORTS_START( blazeon )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
- PORT_START // IN1 - Player 2 - c00002.w
+ PORT_START_TAG("IN1") // IN1 - Player 2 - c00002.w
PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4")
PORT_DIPSETTING( 0x0007, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) )
@@ -1116,10 +1116,10 @@ static INPUT_PORTS_START( blazeon )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2)
- PORT_START // IN2 - ? - c00004.w
+ PORT_START_TAG("IN2") // IN2 - ? - c00004.w
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused?
- PORT_START // IN3 - Other Buttons - c00006.w
+ PORT_START_TAG("IN3") // IN3 - Other Buttons - c00006.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1135,7 +1135,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( bloodwar )
- PORT_START // IN0 - Player 1 - b00000.w
+ PORT_START_TAG("IN0") // IN0 - Player 1 - b00000.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
@@ -1145,7 +1145,7 @@ static INPUT_PORTS_START( bloodwar )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
- PORT_START // IN1 - Player 2 - b00002.w
+ PORT_START_TAG("IN1") // IN1 - Player 2 - b00002.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
@@ -1155,7 +1155,7 @@ static INPUT_PORTS_START( bloodwar )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN2 - Coins - b00004.w
+ PORT_START_TAG("IN2") // IN2 - Coins - b00004.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -1165,7 +1165,7 @@ static INPUT_PORTS_START( bloodwar )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // tested
- PORT_START // IN3 - ? - b00006.w
+ PORT_START_TAG("IN3") // IN3 - ? - b00006.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // tested
@@ -1175,7 +1175,7 @@ static INPUT_PORTS_START( bloodwar )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN4 - DSW from the MCU - $10497e.b <- $208000.b
+ PORT_START_TAG("DSW1") // IN4 - DSW from the MCU - $10497e.b <- $208000.b
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0100, DEF_STR( On ) )
@@ -1205,7 +1205,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( bonkadv )
- PORT_START // IN0 - Player 1 - b00000.w
+ PORT_START_TAG("IN0") // IN0 - Player 1 - b00000.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
@@ -1215,7 +1215,7 @@ static INPUT_PORTS_START( bonkadv )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
- PORT_START // IN1 - Player 2 - b00002.w
+ PORT_START_TAG("IN1") // IN1 - Player 2 - b00002.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
@@ -1225,7 +1225,7 @@ static INPUT_PORTS_START( bonkadv )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
- PORT_START // IN2 - Coins - b00004.w
+ PORT_START_TAG("IN2") // IN2 - Coins - b00004.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -1235,7 +1235,7 @@ static INPUT_PORTS_START( bonkadv )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE2 )
- PORT_START // IN3 - ? - b00006.w
+ PORT_START_TAG("IN3") // IN3 - ? - b00006.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1245,7 +1245,7 @@ static INPUT_PORTS_START( bonkadv )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN4 - DSW from the MCU - $10019e.b <- $200200.b
+ PORT_START_TAG("DSW1") // IN4 - DSW from the MCU - $10019e.b <- $200200.b
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -1276,7 +1276,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( gtmr )
- PORT_START // IN0 - Player 1 - b00000.w
+ PORT_START_TAG("IN0") // IN0 - Player 1 - b00000.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
@@ -1286,7 +1286,7 @@ static INPUT_PORTS_START( gtmr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN1 - Player 2 - b00002.w
+ PORT_START_TAG("IN1") // IN1 - Player 2 - b00002.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
@@ -1296,7 +1296,7 @@ static INPUT_PORTS_START( gtmr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN2 - Coins - b00004.w
+ PORT_START_TAG("IN2") // IN2 - Coins - b00004.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -1306,7 +1306,7 @@ static INPUT_PORTS_START( gtmr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN3 - Seems unused ! - b00006.w
+ PORT_START_TAG("IN3") // IN3 - Seems unused ! - b00006.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1316,7 +1316,7 @@ static INPUT_PORTS_START( gtmr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN4 - DSW from the MCU - 101265.b <- 206000.b
+ PORT_START_TAG("DSW1") // IN4 - DSW from the MCU - 101265.b <- 206000.b
PORT_SERVICE_DIPLOC( 0x0100, IP_ACTIVE_LOW, "SW1:1" )
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
@@ -1339,7 +1339,7 @@ static INPUT_PORTS_START( gtmr )
PORT_DIPSETTING( 0x4000, "Flag Only" )
PORT_DIPSETTING( 0x0000, DEF_STR( None ) )
- PORT_START // IN5 - Wheel - 100015.b <- ffffe.b
+ PORT_START_TAG("WHEEL0") // IN5 - Wheel - 100015.b <- ffffe.b
PORT_BIT ( 0x00ff, 0x0080, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(1)
INPUT_PORTS_END
@@ -1349,7 +1349,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( gtmr2 )
- PORT_START // IN0 - Player 1 - 100004.w <- b00000.w (cpl)
+ PORT_START_TAG("IN0") // IN0 - Player 1 - 100004.w <- b00000.w (cpl)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
@@ -1359,7 +1359,7 @@ static INPUT_PORTS_START( gtmr2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN1 - Player 2 - 10000c.w <- b00002.w (cpl) - for "test mode" only
+ PORT_START_TAG("IN1") // IN1 - Player 2 - 10000c.w <- b00002.w (cpl) - for "test mode" only
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
@@ -1369,7 +1369,7 @@ static INPUT_PORTS_START( gtmr2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN2 - Coins - 100014.w <- b00004.w (cpl)
+ PORT_START_TAG("IN2") // IN2 - Coins - 100014.w <- b00004.w (cpl)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) // only in "test mode"
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -1379,7 +1379,7 @@ static INPUT_PORTS_START( gtmr2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN3 - 100017.w <- b00006.w
+ PORT_START_TAG("IN3") // IN3 - 100017.w <- b00006.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1389,7 +1389,7 @@ static INPUT_PORTS_START( gtmr2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("IN 3-6") // Code at 0x002236 - Centers 270D wheel ?
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN4 - DSW from the MCU - 1016f7.b <- 206000.b
+ PORT_START_TAG("DSW1") // IN4 - DSW from the MCU - 1016f7.b <- 206000.b
PORT_DIPNAME( 0x0700, 0x0700, "Linked Operation Board Number" ) PORT_DIPLOCATION("SW1:6,7,8")
PORT_DIPSETTING( 0x0700, "No Communication" )
PORT_DIPSETTING( 0x0600, "Board #1" )
@@ -1414,16 +1414,16 @@ static INPUT_PORTS_START( gtmr2 )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW1:1" )
- PORT_START // IN5 - Wheel (270A) - 100019.b <- fffff.b
+ PORT_START_TAG("WHEEL0") // IN5 - Wheel (270A) - 100019.b <- fffff.b
PORT_BIT ( 0x00ff, 0x0080, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(1)
- PORT_START // IN6 - Wheel (270D) - 100019.b <- ffffe.b
+ PORT_START_TAG("WHEEL1") // IN6 - Wheel (270D) - 100019.b <- ffffe.b
PORT_BIT ( 0x00ff, 0x0080, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(1)
- PORT_START // IN7 - Wheel (360) - 100019.b <- ffffe.b
+ PORT_START_TAG("WHEEL2") // IN7 - Wheel (360) - 100019.b <- ffffe.b
PORT_BIT( 0x00ff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT)
- PORT_START // Fake IN1 - To be pressed during boot sequence - Code at 0x000c9e
+ PORT_START_TAG("FAKE") // Fake IN1 - To be pressed during boot sequence - Code at 0x000c9e
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("IN 1-0") PORT_CODE(KEYCODE_H) // "sound test"
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1440,7 +1440,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( mgcrystl )
- PORT_START // IN0 - Player 1 + DSW - c00000.w
+ PORT_START_TAG("IN0") // IN0 - Player 1 + DSW - c00000.w
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -1462,7 +1462,7 @@ static INPUT_PORTS_START( mgcrystl )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN1 - Player 2 - c00002.b
+ PORT_START_TAG("IN1") // IN1 - Player 2 - c00002.b
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1481,7 +1481,7 @@ static INPUT_PORTS_START( mgcrystl )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN2 - Other Buttons - c00004.b
+ PORT_START_TAG("IN2") // IN2 - Other Buttons - c00004.b
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
@@ -1500,7 +1500,7 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( shogwarr )
- PORT_START // IN0 - - b80000.w
+ PORT_START_TAG("IN0") // IN0 - - b80000.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
@@ -1510,7 +1510,7 @@ static INPUT_PORTS_START( shogwarr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested
- PORT_START // IN1 - - b80002.w
+ PORT_START_TAG("IN1") // IN1 - - b80002.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
@@ -1520,7 +1520,7 @@ static INPUT_PORTS_START( shogwarr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested
- PORT_START // IN2 - Coins - b80004.w
+ PORT_START_TAG("IN2") // IN2 - Coins - b80004.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -1530,7 +1530,7 @@ static INPUT_PORTS_START( shogwarr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? tested
- PORT_START // IN3 - ? - b80006.w
+ PORT_START_TAG("IN3") // IN3 - ? - b80006.w
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1540,7 +1540,7 @@ static INPUT_PORTS_START( shogwarr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN4 - DSW from the MCU - 102e15.b <- 200059.b
+ PORT_START_TAG("DSW1") // IN4 - DSW from the MCU - 102e15.b <- 200059.b
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
diff --git a/src/mame/drivers/karnov.c b/src/mame/drivers/karnov.c
index ce78229004f..093fb821e96 100644
--- a/src/mame/drivers/karnov.c
+++ b/src/mame/drivers/karnov.c
@@ -651,13 +651,13 @@ static INTERRUPT_GEN( karnov_interrupt )
static int latch;
/* Coin input to the i8751 generates an interrupt to the main cpu */
- if (input_port_read_indexed(machine, 3) == coin_mask) latch=1;
- if (input_port_read_indexed(machine, 3) != coin_mask && latch) {
+ if (input_port_read(machine, "FAKE") == coin_mask) latch=1;
+ if (input_port_read(machine, "FAKE") != coin_mask && latch) {
if (i8751_needs_ack) {
/* i8751 is busy - queue the command */
- i8751_coin_pending=input_port_read_indexed(machine, 3) | 0x8000;
+ i8751_coin_pending=input_port_read(machine, "FAKE") | 0x8000;
} else {
- i8751_return=input_port_read_indexed(machine, 3) | 0x8000;
+ i8751_return=input_port_read(machine, "FAKE") | 0x8000;
cpunum_set_input_line(machine, 0,6,HOLD_LINE);
i8751_needs_ack=1;
}
diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c
index 3558b830ed2..30caa53bbbd 100644
--- a/src/mame/drivers/kinst.c
+++ b/src/mame/drivers/kinst.c
@@ -330,7 +330,8 @@ static WRITE32_DEVICE_HANDLER( kinst_ide_extra_w )
static READ32_HANDLER( kinst_control_r )
{
UINT32 result;
-
+ static const char *portnames[] = { "P1", "P2", "IN0", "IN1", "DSW" };
+
/* apply shuffling */
offset = control_map[offset / 2];
result = kinst_control[offset];
@@ -338,7 +339,7 @@ static READ32_HANDLER( kinst_control_r )
switch (offset)
{
case 2: /* $90 -- sound return */
- result = 0xffff0000 | input_port_read_indexed(machine, offset);
+ result = 0xffff0000 | input_port_read(machine, portnames[offset]);
result &= ~0x0002;
if (dcs_control_r() & 0x800)
result |= 0x0002;
@@ -347,11 +348,11 @@ static READ32_HANDLER( kinst_control_r )
case 0: /* $80 */
case 1: /* $88 */
case 3: /* $98 */
- result = 0xffff0000 | input_port_read_indexed(machine, offset);
+ result = 0xffff0000 | input_port_read(machine, portnames[offset]);
break;
case 4: /* $a0 */
- result = 0xffff0000 | input_port_read_indexed(machine, offset);
+ result = 0xffff0000 | input_port_read(machine, portnames[offset]);
if (activecpu_get_pc() == 0x802d428)
cpu_spinuntil_int();
break;
@@ -452,7 +453,7 @@ ADDRESS_MAP_END
*************************************/
static INPUT_PORTS_START( kinst )
- PORT_START
+ PORT_START_TAG("P1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
@@ -470,7 +471,7 @@ static INPUT_PORTS_START( kinst )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) /* door */
- PORT_START
+ PORT_START_TAG("P2")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
@@ -488,17 +489,17 @@ static INPUT_PORTS_START( kinst )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BILL1 ) /* bill */
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) /* coin door */
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* sound status */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VOLUME_UP )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) /* verify */
- PORT_START
+ PORT_START_TAG("DSW")
PORT_DIPNAME( 0x0003, 0x0003, "Blood Level" )
PORT_DIPSETTING( 0x0003, DEF_STR( High ))
PORT_DIPSETTING( 0x0002, DEF_STR( Medium ))
@@ -556,7 +557,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( kinst2 )
- PORT_START
+ PORT_START_TAG("P1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
@@ -574,7 +575,7 @@ static INPUT_PORTS_START( kinst2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) /* door */
- PORT_START
+ PORT_START_TAG("P2")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
@@ -592,17 +593,17 @@ static INPUT_PORTS_START( kinst2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BILL1 ) /* bill */
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) /* coin door */
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) /* sound status */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VOLUME_UP )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) /* verify */
- PORT_START
+ PORT_START_TAG("DSW")
PORT_DIPNAME( 0x0003, 0x0003, "Blood Level" )
PORT_DIPSETTING( 0x0003, DEF_STR( High ))
PORT_DIPSETTING( 0x0002, DEF_STR( Medium ))
diff --git a/src/mame/drivers/kinstb.c b/src/mame/drivers/kinstb.c
index 947ca5874c7..56c24e2697d 100644
--- a/src/mame/drivers/kinstb.c
+++ b/src/mame/drivers/kinstb.c
@@ -43,11 +43,7 @@ static READ8_HANDLER(sharedram_r)
//check coins
static INT32 oldinput=0;
INT32 coincnt;
-#ifdef MAME_DEBUG
- INT32 input=input_port_read_indexed(machine, 13);
-#else
- INT32 input=input_port_read_indexed(machine, 10);
-#endif
+ INT32 input = input_port_read(machine, "COIN");
if(input&3)
{
@@ -99,12 +95,12 @@ static ADDRESS_MAP_START( spc_mem, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
static INPUT_PORTS_START( kinstb )
- PORT_START /* IN 0 : Joypad 1 - L */
+ PORT_START_TAG("PAD1L") /* IN 0 : Joypad 1 - L */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Button A") PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Button X") PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Button L") PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Button R") PORT_PLAYER(1)
- PORT_START /* IN 1 : Joypad 1 - H */
+ PORT_START_TAG("PAD1H") /* IN 1 : Joypad 1 - H */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Button B") PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Button Y") PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("P1 Select")
@@ -114,12 +110,12 @@ static INPUT_PORTS_START( kinstb )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
- PORT_START /* IN 2 : Joypad 2 - L */
+ PORT_START_TAG("PAD2L") /* IN 2 : Joypad 2 - L */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Button A") PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Button X") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P2 Button L") PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P2 Button R") PORT_PLAYER(2)
- PORT_START /* IN 3 : Joypad 2 - H */
+ PORT_START_TAG("PAD2H") /* IN 3 : Joypad 2 - H */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Button B") PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Button Y") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("P2 Select")
@@ -129,12 +125,12 @@ static INPUT_PORTS_START( kinstb )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
- PORT_START /* IN 4 : Joypad 3 - L */
+ PORT_START_TAG("PAD3L") /* IN 4 : Joypad 3 - L */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3 Button A") PORT_PLAYER(3)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P3 Button X") PORT_PLAYER(3)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P3 Button L") PORT_PLAYER(3)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P3 Button R") PORT_PLAYER(3)
- PORT_START /* IN 5 : Joypad 3 - H */
+ PORT_START_TAG("PAD3H") /* IN 5 : Joypad 3 - H */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 Button B") PORT_PLAYER(3)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 Button Y") PORT_PLAYER(3)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE3 ) PORT_NAME("P3 Select")
@@ -144,12 +140,12 @@ static INPUT_PORTS_START( kinstb )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
- PORT_START /* IN 6 : Joypad 4 - L */
+ PORT_START_TAG("PAD4L") /* IN 6 : Joypad 4 - L */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4 Button A") PORT_PLAYER(4)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P4 Button X") PORT_PLAYER(4)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P4 Button L") PORT_PLAYER(4)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P4 Button R") PORT_PLAYER(4)
- PORT_START /* IN 7 : Joypad 4 - H */
+ PORT_START_TAG("PAD4H") /* IN 7 : Joypad 4 - H */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 Button B") PORT_PLAYER(4)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 Button Y") PORT_PLAYER(4)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_NAME("P4 Select")
@@ -159,13 +155,13 @@ static INPUT_PORTS_START( kinstb )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
- PORT_START /* IN 8 : Internal switches */
+ PORT_START_TAG("INTERNAL") /* IN 8 : Internal switches */
PORT_DIPNAME( 0x1, 0x1, "Enforce 32 sprites/line" )
PORT_DIPSETTING( 0x0, DEF_STR( No ) )
PORT_DIPSETTING( 0x1, DEF_STR( Yes ) )
#ifdef MAME_DEBUG
- PORT_START /* IN 9 : debug switches */
+ PORT_START_TAG("DEBUG1") /* IN 9 : debug switches */
PORT_DIPNAME( 0x3, 0x0, "Browse tiles" )
PORT_DIPSETTING( 0x0, DEF_STR( Off ) )
PORT_DIPSETTING( 0x1, "2bpl" )
@@ -177,7 +173,7 @@ static INPUT_PORTS_START( kinstb )
PORT_DIPSETTING( 0x8, "4bpl" )
PORT_DIPSETTING( 0xc, "8bpl" )
- PORT_START /* IN 10 : debug switches */
+ PORT_START_TAG("DEBUG2") /* IN 10 : debug switches */
PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Toggle BG 1") PORT_PLAYER(2)
PORT_BIT( 0x2, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Toggle BG 2") PORT_PLAYER(2)
PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Toggle BG 3") PORT_PLAYER(2)
@@ -187,15 +183,15 @@ static INPUT_PORTS_START( kinstb )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Toggle Back col") PORT_PLAYER(3)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Toggle Windows") PORT_PLAYER(3)
- PORT_START /* IN 11 : debug input */
+ PORT_START_TAG("DEBUG3") /* IN 11 : debug input */
PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Pal prev")
PORT_BIT( 0x2, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Pal next")
PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Toggle Transparency") PORT_PLAYER(4)
#endif
- PORT_START /* IN 12 : dip-switches */
+ PORT_START_TAG("DSW") /* IN 12 : dip-switches */
- PORT_START /* IN 13 : coins */
+ PORT_START_TAG("COIN") /* IN 13 : coins */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
diff --git a/src/mame/drivers/klax.c b/src/mame/drivers/klax.c
index ebe9af9f5e6..05b2786f081 100644
--- a/src/mame/drivers/klax.c
+++ b/src/mame/drivers/klax.c
@@ -47,7 +47,7 @@ static void update_interrupts(running_machine *machine)
static void scanline_update(const device_config *screen, int scanline)
{
/* generate 32V signals */
- if ((scanline & 32) == 0 && !(input_port_read_indexed(screen->machine, 0) & 0x800))
+ if ((scanline & 32) == 0 && !(input_port_read(screen->machine, "IN0") & 0x800))
atarigen_scanline_int_gen(screen->machine, 0);
}
@@ -137,7 +137,7 @@ ADDRESS_MAP_END
*************************************/
static INPUT_PORTS_START( klax )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -149,7 +149,7 @@ static INPUT_PORTS_START( klax )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0600, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/koikoi.c b/src/mame/drivers/koikoi.c
index f0ecc534233..6dcbc4dd237 100644
--- a/src/mame/drivers/koikoi.c
+++ b/src/mame/drivers/koikoi.c
@@ -70,10 +70,14 @@ static READ8_HANDLER(vram_r)
static READ8_HANDLER(input_r)
{
- if(inputcnt<0){ return 0; }
+ if(inputcnt<0)
+ {
+ return 0;
+ }
+
if(!inputcnt)
{
- int key=input_port_read_indexed(machine,2);
+ int key=input_port_read(machine, "IN1");
int keyval=0; //we must return 0 (0x2 in 2nd read) to clear 4 bit at $6600 and allow next read
if(key)
@@ -84,14 +88,17 @@ static READ8_HANDLER(input_r)
inputval=inputTab[keyval]&0x1f;
inputlen=inputTab[keyval]>>5;
}
+
if(inputlen==++inputcnt) //return expected value
{
return inputval^0xff;
}
+
if(inputcnt>4) //end of cycle
{
inputcnt=-1;
}
+
return 0xff; //return 0^0xff
}
@@ -104,7 +111,7 @@ static READ8_HANDLER(io_r)
{
if(!offset)
{
- return input_port_read_indexed(machine, 1)^ioram[4]; //coin
+ return input_port_read(machine, "IN0")^ioram[4]; //coin
}
return 0;
}
@@ -121,7 +128,7 @@ static WRITE8_HANDLER(io_w)
static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x2fff) AM_ROM
AM_RANGE(0x6000, 0x67ff) AM_RAM
- AM_RANGE(0x8000, 0x8000) AM_READ( input_port_0_r )
+ AM_RANGE(0x8000, 0x8000) AM_READ_PORT("DSW")
AM_RANGE(0x7000, 0x77ff) AM_READWRITE(vram_r, vram_w) AM_BASE(&videoram)
AM_RANGE(0x9000, 0x9007) AM_READWRITE(io_r, io_w)
ADDRESS_MAP_END
@@ -136,40 +143,40 @@ static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
static INPUT_PORTS_START( koikoi )
- PORT_START /* DSW */
+ PORT_START_TAG("DSW") /* DSW */
PORT_DIPNAME( 0x03, 0x01, "Timer C" )
- PORT_DIPSETTING( 0x00, "50" )
- PORT_DIPSETTING( 0x01, "70" )
- PORT_DIPSETTING( 0x02, "90" )
- PORT_DIPSETTING( 0x03, "110" )
+ PORT_DIPSETTING( 0x00, "50" )
+ PORT_DIPSETTING( 0x01, "70" )
+ PORT_DIPSETTING( 0x02, "90" )
+ PORT_DIPSETTING( 0x03, "110" )
PORT_DIPNAME( 0x0c, 0x04, "Timer M" )
- PORT_DIPSETTING( 0x00, "120" )
- PORT_DIPSETTING( 0x04, "150" )
- PORT_DIPSETTING( 0x08, "180" )
- PORT_DIPSETTING( 0x0c, "210" )
+ PORT_DIPSETTING( 0x00, "120" )
+ PORT_DIPSETTING( 0x04, "150" )
+ PORT_DIPSETTING( 0x08, "180" )
+ PORT_DIPSETTING( 0x0c, "210" )
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, "Test Mode" )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_A) //1
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_S) //2
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_D) //3
diff --git a/src/mame/drivers/konamigv.c b/src/mame/drivers/konamigv.c
index 89b17b0d93f..377b8893352 100644
--- a/src/mame/drivers/konamigv.c
+++ b/src/mame/drivers/konamigv.c
@@ -517,10 +517,11 @@ static READ32_HANDLER( trackball_r )
int axis;
UINT16 diff;
UINT16 value;
+ static const char *axisnames[] = { "TRACK0_X", "TRACK0_Y" };
for( axis = 0; axis < 2; axis++ )
{
- value = input_port_read_indexed(machine, axis + 3 );
+ value = input_port_read(machine, axisnames[axis]);
diff = value - trackball_prev[ axis ];
trackball_prev[ axis ] = value;
trackball_data[ axis ] = ( ( diff & 0xf00 ) << 16 ) | ( ( diff & 0xff ) << 8 );
@@ -556,10 +557,10 @@ MACHINE_DRIVER_END
static INPUT_PORTS_START( simpbowl )
PORT_INCLUDE( konamigv )
- PORT_START_TAG("IN3")
+ PORT_START_TAG("TRACK0_X")
PORT_BIT( 0xfff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(63) PORT_REVERSE PORT_PLAYER(1)
- PORT_START_TAG("IN4")
+ PORT_START_TAG("TRACK0_Y")
PORT_BIT( 0xfff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(63) PORT_PLAYER(1)
INPUT_PORTS_END
@@ -601,10 +602,11 @@ static READ32_HANDLER( btc_trackball_r )
int axis;
UINT16 diff;
UINT16 value;
+ static const char *axisnames[] = { "TRACK0_X", "TRACK0_Y", "TRACK1_X", "TRACK1_Y" };
for( axis = 0; axis < 4; axis++ )
{
- value = input_port_read_indexed(machine, axis + 3 );
+ value = input_port_read(machine, axisnames[axis]);
diff = value - btc_trackball_prev[ axis ];
btc_trackball_prev[ axis ] = value;
btc_trackball_data[ axis ] = ( ( diff & 0xf00 ) << 16 ) | ( ( diff & 0xff ) << 8 );
@@ -643,16 +645,16 @@ MACHINE_DRIVER_END
static INPUT_PORTS_START( btchamp )
PORT_INCLUDE( konamigv )
- PORT_START_TAG("IN3")
+ PORT_START_TAG("TRACK0_X")
PORT_BIT( 0x7ff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(63) PORT_REVERSE PORT_PLAYER(1)
- PORT_START_TAG("IN4")
+ PORT_START_TAG("TRACK0_Y")
PORT_BIT( 0x7ff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(63) PORT_PLAYER(1)
- PORT_START_TAG("IN5")
+ PORT_START_TAG("TRACK1_X")
PORT_BIT( 0x7ff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(63) PORT_REVERSE PORT_PLAYER(2)
- PORT_START_TAG("IN6")
+ PORT_START_TAG("TRACK1_Y")
PORT_BIT( 0x7ff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(63) PORT_PLAYER(2)
INPUT_PORTS_END
diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c
index cfb24d3b604..a126937372c 100644
--- a/src/mame/drivers/konamigx.c
+++ b/src/mame/drivers/konamigx.c
@@ -489,7 +489,7 @@ static READ32_HANDLER( eeprom_r )
// excpuint stat, objdma stat, eeprom do
// note: racin' force expects bit 1 of the eeprom port to toggle
- return(input_port_read_indexed(machine, 6)<<24 | input_port_read_indexed(machine, 7)<<16 | input_port_read_indexed(machine, 0)<<8 | eeprom_read_bit() | gx_rdport1_3);
+ return(input_port_read(machine, "DSW0")<<24 | input_port_read_safe(machine, "DSW1", 0)<<16 | input_port_read(machine, "IN0")<<8 | eeprom_read_bit() | gx_rdport1_3);
}
static WRITE32_HANDLER( eeprom_w )
@@ -869,9 +869,9 @@ static double adc0834_callback( int input )
switch( input )
{
case ADC083X_CH0:
- return ( (double)5 * input_port_read_indexed(Machine, 9 ) ) / 255; // steer
+ return ( (double)5 * input_port_read(Machine, "AN0" ) ) / 255; // steer
case ADC083X_CH1:
- return ( (double)5 * input_port_read_indexed(Machine, 10 ) ) / 255; // gas
+ return ( (double)5 * input_port_read(Machine, "AN1" ) ) / 255; // gas
case ADC083X_VREF:
return 5;
}
@@ -880,23 +880,23 @@ static double adc0834_callback( int input )
static READ32_HANDLER( le2_gun_H_r )
{
- int p1x = input_port_read_indexed(machine, 9)*287/0xff+22;
- int p2x = input_port_read_indexed(machine, 11)*287/0xff+22;
+ int p1x = input_port_read(machine, "LIGHT0_X")*287/0xff+22;
+ int p2x = input_port_read(machine, "LIGHT1_X")*287/0xff+22;
return (p1x<<16)|p2x;
}
static READ32_HANDLER( le2_gun_V_r )
{
- int p1y = input_port_read_indexed(machine, 10)*223/0xff+1;
- int p2y = input_port_read_indexed(machine, 12)*223/0xff+1;
+ int p1y = input_port_read(machine, "LIGHT0_Y")*223/0xff+1;
+ int p2y = input_port_read(machine, "LIGHT1_Y")*223/0xff+1;
return (p1y<<16)|p2y;
}
static READ32_HANDLER( service_r )
{
- int res = (input_port_read_indexed(machine, 1)<<24) | (input_port_read_indexed(machine, 8)<<8);
+ int res = (input_port_read(machine, "IN1")<<24) | (input_port_read_safe(machine, "IN6", 0)<<8);
if (init_eeprom_count)
{
@@ -909,7 +909,7 @@ static READ32_HANDLER( service_r )
static READ32_HANDLER( players_r )
{
- return (input_port_read_indexed(machine, 2)<<24) | (input_port_read_indexed(machine, 3)<<16) | (input_port_read_indexed(machine, 4)<<8) | (input_port_read_indexed(machine, 5));
+ return (input_port_read(machine, "IN2")<<24) | (input_port_read(machine, "IN3")<<16) | (input_port_read(machine, "IN4")<<8) | (input_port_read(machine, "IN5"));
}
@@ -1446,8 +1446,9 @@ MACHINE_DRIVER_END
/**********************************************************************************/
/* port maps */
-static INPUT_PORTS_START( konamigx )
- PORT_START
+/* here we collect players' inputs: they are shared among all the ports */
+static INPUT_PORTS_START( common )
+ PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1457,17 +1458,17 @@ static INPUT_PORTS_START( konamigx )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* for gun games */
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
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
+ PORT_START_TAG("IN2")
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)
@@ -1477,7 +1478,7 @@ static INPUT_PORTS_START( konamigx )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
- PORT_START
+ PORT_START_TAG("IN3")
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)
@@ -1487,7 +1488,7 @@ static INPUT_PORTS_START( konamigx )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START
+ PORT_START_TAG("IN4")
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)
@@ -1497,7 +1498,7 @@ static INPUT_PORTS_START( konamigx )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 )
- PORT_START
+ PORT_START_TAG("IN5")
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)
@@ -1506,8 +1507,13 @@ static INPUT_PORTS_START( konamigx )
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 )
+INPUT_PORTS_END
+
+
+static INPUT_PORTS_START( konamigx )
+ PORT_INCLUDE( common )
- PORT_START
+ PORT_START_TAG("DSW0")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x01, DEF_STR( Mono ))
@@ -1533,7 +1539,7 @@ static INPUT_PORTS_START( konamigx )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START
+ PORT_START_TAG("DSW1")
PORT_DIPNAME( 0x01, 0x01, "Foo")
PORT_DIPSETTING( 0x00, "Foo")
PORT_DIPSETTING( 0x01, "Bar")
@@ -1562,189 +1568,25 @@ INPUT_PORTS_END
static INPUT_PORTS_START( racinfrc )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_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 )
+ /* racin force needs Player 2 Button 1 ("IN3" & 0x10) set to get past the calibration screen */
+ PORT_INCLUDE( konamigx )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* for gun games */
- PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
- 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_TAG("IN6") /* no gun */
- PORT_START
- 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
- 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) // racin force needs this set to get past the calibration screen
- 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
- 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
- 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
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Stereo ))
- PORT_DIPSETTING( 0x00, DEF_STR( Stereo ))
- PORT_DIPSETTING( 0x01, DEF_STR( Mono ))
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_START
- PORT_DIPNAME( 0x01, 0x01, "Foo")
- PORT_DIPSETTING( 0x00, "Foo")
- PORT_DIPSETTING( 0x01, "Bar")
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_START /* no gun */
-
- PORT_START /* mask default type sens delta min max */
+ PORT_START_TAG("AN0") /* mask default type sens delta min max */
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x38,0xc8) PORT_SENSITIVITY(35) PORT_KEYDELTA(5)
- PORT_START
+ PORT_START_TAG("AN1")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,0x68) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) PORT_CODE_INC(KEYCODE_LCONTROL)
INPUT_PORTS_END
static INPUT_PORTS_START( le2 )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_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_INCLUDE( common )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("IN1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* for gun games */
- PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
- 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
- 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
- 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
- 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
- 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
+ PORT_START_TAG("DSW0")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x01, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x00, DEF_STR( Mono ))
@@ -1770,10 +1612,10 @@ static INPUT_PORTS_START( le2 )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START
+ PORT_START_TAG("DSW1")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* for gun games */
@@ -1783,81 +1625,26 @@ static INPUT_PORTS_START( le2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START /* mask default type sens delta min max */
+ PORT_START_TAG("LIGHT0_X") /* mask default type sens delta min max */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("LIGHT0_Y")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("LIGHT1_X")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(2)
- PORT_START
+ PORT_START_TAG("LIGHT1_Y")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( gokuparo )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_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_HIGH, IPT_UNKNOWN )
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
- 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_INCLUDE( common )
- PORT_START
- 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
- 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
- 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
- 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_MODIFY("IN0")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("DSW0")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x01, DEF_STR( Mono ))
@@ -1885,67 +1672,12 @@ static INPUT_PORTS_START( gokuparo )
INPUT_PORTS_END
static INPUT_PORTS_START( puzldama )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_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_HIGH, IPT_UNKNOWN )
+ PORT_INCLUDE( common )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
- 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
- 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
- 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
- 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
- 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_MODIFY("IN0")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("DSW0")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x01, DEF_STR( Mono ))
@@ -1974,47 +1706,12 @@ static INPUT_PORTS_START( puzldama )
INPUT_PORTS_END
static INPUT_PORTS_START( dragoonj )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_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_HIGH, IPT_UNKNOWN )
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
- 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
- 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_INCLUDE( common )
- PORT_START
- 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_MODIFY("IN0")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START
+ PORT_MODIFY("IN4")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
@@ -2024,7 +1721,7 @@ static INPUT_PORTS_START( dragoonj )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_MODIFY("IN5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2034,7 +1731,7 @@ static INPUT_PORTS_START( dragoonj )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("DSW0")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x01, DEF_STR( Mono ))
@@ -2063,67 +1760,12 @@ static INPUT_PORTS_START( dragoonj )
INPUT_PORTS_END
static INPUT_PORTS_START( type3 )
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_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_HIGH, IPT_UNKNOWN )
-
- PORT_START
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
- 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
- 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
- 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
- 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_INCLUDE( common )
- PORT_START
- 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_MODIFY("IN0")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("DSW0")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x00, DEF_STR( Stereo ))
PORT_DIPSETTING( 0x01, DEF_STR( Mono ))
diff --git a/src/mame/drivers/kopunch.c b/src/mame/drivers/kopunch.c
index 0e6db3b7ee7..64d014b8b7f 100644
--- a/src/mame/drivers/kopunch.c
+++ b/src/mame/drivers/kopunch.c
@@ -18,12 +18,12 @@ static INTERRUPT_GEN( kopunch_interrupt )
{
if (cpu_getiloops() == 0)
{
- if (~input_port_read_indexed(machine, 1) & 0x80) /* coin 1 */
+ if (~input_port_read(machine, "IN1") & 0x80) /* coin 1 */
{
cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0xf7); /* RST 30h */
return;
}
- else if (~input_port_read_indexed(machine, 1) & 0x08) /* coin 2 */
+ else if (~input_port_read(machine, "IN1") & 0x08) /* coin 2 */
{
cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0xef); /* RST 28h */
return;
@@ -39,7 +39,7 @@ static READ8_HANDLER( kopunch_in_r )
if (offset == 0)
return mame_rand(machine);
else
- return (mame_rand(machine) & 0x07) | input_port_read_indexed(machine, 1);
+ return (mame_rand(machine) & 0x07) | input_port_read(machine, "IN1");
}
static WRITE8_HANDLER( kopunch_lamp_w )
@@ -70,7 +70,7 @@ static ADDRESS_MAP_START( kopunch_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
static ADDRESS_MAP_START( kopunch_io_map, ADDRESS_SPACE_IO, 8 )
- AM_RANGE(0x30, 0x30) AM_READ(input_port_0_r)
+ AM_RANGE(0x30, 0x30) AM_READ_PORT("IN0")
AM_RANGE(0x31, 0x32) AM_READ(kopunch_in_r)
AM_RANGE(0x33, 0x33) AM_WRITENOP
AM_RANGE(0x34, 0x34) AM_WRITE(kopunch_coin_w)
@@ -79,7 +79,7 @@ static ADDRESS_MAP_START( kopunch_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x37, 0x37) AM_WRITENOP
AM_RANGE(0x38, 0x38) AM_WRITE(kopunch_lamp_w)
AM_RANGE(0x39, 0x39) AM_WRITENOP
- AM_RANGE(0x3a, 0x3a) AM_READ(input_port_2_r)
+ AM_RANGE(0x3a, 0x3a) AM_READ_PORT("DSW")
AM_RANGE(0x3b, 0x3b) AM_WRITENOP
AM_RANGE(0x3c, 0x3c) AM_WRITE(kopunch_scroll_x_w)
AM_RANGE(0x3d, 0x3d) AM_WRITE(kopunch_scroll_y_w)
@@ -89,7 +89,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( kopunch )
- PORT_START
+ PORT_START_TAG("IN0")
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_DOWN ) PORT_4WAY
@@ -99,7 +99,7 @@ static INPUT_PORTS_START( kopunch )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* punch strength (high 3 bits) */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
@@ -107,7 +107,7 @@ static INPUT_PORTS_START( kopunch )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1)
- PORT_START
+ PORT_START_TAG("DSW")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -133,7 +133,7 @@ static INPUT_PORTS_START( kopunch )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START
+ PORT_START_TAG("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_DOWN ) PORT_4WAY PORT_COCKTAIL
diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c
index ad3fdc35005..92d4cf0d980 100644
--- a/src/mame/drivers/ksys573.c
+++ b/src/mame/drivers/ksys573.c
@@ -301,11 +301,11 @@ static READ32_HANDLER( jamma_r )
switch (offset)
{
case 0:
- data = input_port_read_indexed(machine, 0);
+ data = input_port_read(machine, "IN0");
break;
case 1:
{
- data = input_port_read_indexed(machine, 1);
+ data = input_port_read(machine, "IN1");
data |= 0x000000c0;
if( has_ds2401[ security_cart_number ] )
@@ -341,10 +341,10 @@ static READ32_HANDLER( jamma_r )
break;
}
case 2:
- data = input_port_read_indexed(machine, 2);
+ data = input_port_read(machine, "IN2");
break;
case 3:
- data = input_port_read_indexed(machine, 3);
+ data = input_port_read(machine, "IN3");
break;
}
diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c
index b12fa9a410b..6e2cd0e638b 100644
--- a/src/mame/drivers/laserbat.c
+++ b/src/mame/drivers/laserbat.c
@@ -89,8 +89,9 @@ static WRITE8_HANDLER( laserbat_input_mux_w )
static READ8_HANDLER( laserbat_input_r )
{
- // Add coktail inputs
- return input_port_read_indexed(machine, 0 + laserbat_input_mux);
+ static const char *portnames[] = { "IN0", "IN1", "IN2", "IN3" };
+
+ return input_port_read(machine, portnames[laserbat_input_mux]);
}
static WRITE8_HANDLER( laserbat_cnteff_w )
@@ -221,7 +222,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( laserbat )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
@@ -231,7 +232,7 @@ static INPUT_PORTS_START( laserbat )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -253,7 +254,7 @@ static INPUT_PORTS_START( laserbat )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Reset")
- PORT_START
+ PORT_START_TAG("IN2")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
@@ -277,7 +278,7 @@ static INPUT_PORTS_START( laserbat )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START
+ PORT_START_TAG("IN3")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -295,12 +296,12 @@ static INPUT_PORTS_START( laserbat )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
- PORT_START /* SENSE */
+ PORT_START_TAG("SENSE") /* SENSE */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
INPUT_PORTS_END
static INPUT_PORTS_START( lazarian )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
@@ -310,7 +311,7 @@ static INPUT_PORTS_START( lazarian )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -332,7 +333,7 @@ static INPUT_PORTS_START( lazarian )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Reset")
- PORT_START
+ PORT_START_TAG("IN2")
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
@@ -355,7 +356,7 @@ static INPUT_PORTS_START( lazarian )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START
+ PORT_START_TAG("IN3")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -373,12 +374,12 @@ static INPUT_PORTS_START( lazarian )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
- PORT_START /* SENSE */
+ PORT_START_TAG("SENSE") /* SENSE */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
INPUT_PORTS_END
static INPUT_PORTS_START( catnmous )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
@@ -388,7 +389,7 @@ static INPUT_PORTS_START( catnmous )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -406,7 +407,7 @@ static INPUT_PORTS_START( catnmous )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Reset")
- PORT_START
+ PORT_START_TAG("IN2")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
@@ -430,7 +431,7 @@ static INPUT_PORTS_START( catnmous )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START
+ PORT_START_TAG("IN3")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -456,7 +457,7 @@ static INPUT_PORTS_START( catnmous )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* SENSE */
+ PORT_START_TAG("SENSE") /* SENSE */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
INPUT_PORTS_END
diff --git a/src/mame/drivers/lastfght.c b/src/mame/drivers/lastfght.c
index ee234ed2651..64881a6e88f 100644
--- a/src/mame/drivers/lastfght.c
+++ b/src/mame/drivers/lastfght.c
@@ -306,12 +306,12 @@ static READ16_HANDLER( lastfght_c00002_r )
{
// high byte:
// mask 0x1c: from sound?
- return (mame_rand(machine) & 0x1c00) | input_port_read_indexed(machine, 0);
+ return (mame_rand(machine) & 0x1c00) | input_port_read(machine, "IN0");
}
static READ16_HANDLER( lastfght_c00004_r )
{
- return input_port_read_indexed(machine, 1);
+ return input_port_read(machine, "IN1");
}
static READ16_HANDLER( lastfght_c00006_r )
@@ -319,7 +319,7 @@ static READ16_HANDLER( lastfght_c00006_r )
// low byte:
// bit 7 = protection?
// bit 5 = blitter?
- return input_port_read_indexed(machine, 2);
+ return input_port_read(machine, "IN2");
}
static WRITE16_HANDLER( lastfght_c00006_w )
@@ -384,7 +384,7 @@ ADDRESS_MAP_END
***************************************************************************/
static INPUT_PORTS_START( lastfght )
- PORT_START // IN0 - c00002&3
+ PORT_START_TAG("IN0") /* IN0 - c00002&3 */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Reset") PORT_CODE(KEYCODE_F1)
@@ -403,7 +403,7 @@ static INPUT_PORTS_START( lastfght )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN1 - c00004&5
+ PORT_START_TAG("IN1") /* IN1 - c00004&5 */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -422,7 +422,7 @@ static INPUT_PORTS_START( lastfght )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_START // IN2 - c00006&7
+ PORT_START_TAG("IN2") /* IN2 - c00006&7 */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/lazercmd.c b/src/mame/drivers/lazercmd.c
index e7445e9533d..6ca9464c3e7 100644
--- a/src/mame/drivers/lazercmd.c
+++ b/src/mame/drivers/lazercmd.c
@@ -286,7 +286,7 @@ static WRITE8_HANDLER( lazercmd_data_port_w )
static READ8_HANDLER( lazercmd_data_port_r )
{
int data;
- data = input_port_read_indexed(machine, 2) & 0x0f;
+ data = input_port_read(machine, "DSW") & 0x0f;
return data;
}
@@ -381,16 +381,16 @@ static READ8_HANDLER( lazercmd_hardware_r )
switch (offset)
{
case 0: /* player 1 joysticks */
- data = input_port_read_indexed(machine, 0);
+ data = input_port_read(machine, "IN0");
break;
case 1: /* player 2 joysticks */
- data = input_port_read_indexed(machine, 1);
+ data = input_port_read(machine, "IN1");
break;
case 2: /* player 1 + 2 buttons */
- data = input_port_read_indexed(machine, 4);
+ data = input_port_read(machine, "IN3");
break;
case 3: /* coin slot + start buttons */
- data = input_port_read_indexed(machine, 3);
+ data = input_port_read(machine, "IN2");
break;
case 4: /* vertical scan counter */
data = ((timer_count&0x10)>>1)|((timer_count&0x20)>>3)|((timer_count&0x40)>>5)|((timer_count&0x80)>>7);
@@ -451,21 +451,21 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( lazercmd )
- PORT_START /* IN0 player 1 controls */
+ PORT_START_TAG("IN0") /* IN0 player 1 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN1 player 2 controls */
+ PORT_START_TAG("IN1") /* IN1 player 2 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN2 dip switch */
+ PORT_START_TAG("DSW") /* IN2 dip switch */
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Game_Time ) )
PORT_DIPSETTING( 0x00, "60 seconds" )
PORT_DIPSETTING( 0x01, "90 seconds" )
@@ -482,7 +482,7 @@ static INPUT_PORTS_START( lazercmd )
// PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
// PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START /* IN3 coinage & start */
+ PORT_START_TAG("IN2") /* IN3 coinage & start */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
@@ -491,7 +491,7 @@ static INPUT_PORTS_START( lazercmd )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_START /* IN4 player 1 + 2 buttons */
+ PORT_START_TAG("IN3") /* IN4 player 1 + 2 buttons */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
@@ -500,19 +500,19 @@ static INPUT_PORTS_START( lazercmd )
INPUT_PORTS_END
static INPUT_PORTS_START( medlanes )
- PORT_START /* IN0 player 1 controls */
+ PORT_START_TAG("IN0") /* IN0 player 1 controls */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN1 player 1 controls */
+ PORT_START_TAG("IN1") /* IN1 player 1 controls */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hook Left") PORT_CODE(KEYCODE_Z)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hook Right") PORT_CODE(KEYCODE_X)
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_START /* IN2 dip switch */
+ PORT_START_TAG("DSW") /* IN2 dip switch */
PORT_DIPNAME( 0x01, 0x01, "Game Timer" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
@@ -530,7 +530,7 @@ static INPUT_PORTS_START( medlanes )
// PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
// PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START /* IN3 coinage & start */
+ PORT_START_TAG("IN2") /* IN3 coinage & start */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
@@ -538,26 +538,26 @@ static INPUT_PORTS_START( medlanes )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0xf4, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_START /* IN4 not used */
+ PORT_START_TAG("IN3") /* IN4 not used */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( bbonk )
- PORT_START /* IN0 player 1 controls */
+ PORT_START_TAG("IN0") /* IN0 player 1 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN1 player 2 controls */
+ PORT_START_TAG("IN1") /* IN1 player 2 controls */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* IN2 dip switch */
+ PORT_START_TAG("DSW") /* IN2 dip switch */
PORT_DIPNAME( 0x03, 0x02, "Games to win" )
PORT_DIPSETTING( 0x02, "2" )
PORT_DIPSETTING( 0x03, "3" )
@@ -572,7 +572,7 @@ static INPUT_PORTS_START( bbonk )
// PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
// PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START /* IN3 coinage & start */
+ PORT_START_TAG("IN2") /* IN3 coinage & start */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
@@ -580,7 +580,7 @@ static INPUT_PORTS_START( bbonk )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0xf4, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_START /* IN4 not used */
+ PORT_START_TAG("IN3") /* IN4 not used */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/leland.c b/src/mame/drivers/leland.c
index 4ac931bbdab..1b833e14ebb 100644
--- a/src/mame/drivers/leland.c
+++ b/src/mame/drivers/leland.c
@@ -126,43 +126,43 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( cerberus ) /* complete, verified from code */
- PORT_START /* 0x80 */
+ PORT_START_TAG("IN0") /* 0x80 */
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_START /* 0x81 */
+ PORT_START_TAG("IN1") /* 0x81 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x90 */
+ PORT_START_TAG("IN2") /* 0x90 */
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_START /* 0x91 */
+ PORT_START_TAG("IN3") /* 0x91 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_PLAYER(1)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog joystick 1 */
+ PORT_START_TAG("AN0") /* Analog joystick 1 */
PORT_BIT( 0xff, 0, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("AN1")
PORT_BIT( 0xff, 0, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* Analog joystick 2 */
- PORT_START
- PORT_START /* Analog joystick 3 */
- PORT_START
+ PORT_START_TAG("AN2") /* Analog joystick 2 */
+ PORT_START_TAG("AN3")
+ PORT_START_TAG("AN4") /* Analog joystick 3 */
+ PORT_START_TAG("AN5")
INPUT_PORTS_END
static INPUT_PORTS_START( mayhem ) /* complete, verified from code */
- PORT_START /* 0xC0 */
+ PORT_START_TAG("IN0") /* 0xC0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
@@ -172,14 +172,14 @@ static INPUT_PORTS_START( mayhem ) /* complete, verified from code */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_START /* 0xC1 */
+ PORT_START_TAG("IN1") /* 0xC1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0xD0 */
+ PORT_START_TAG("IN2") /* 0xD0 */
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_DOWN ) PORT_8WAY PORT_PLAYER(2)
@@ -189,209 +189,209 @@ static INPUT_PORTS_START( mayhem ) /* complete, verified from code */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_START /* 0xD1 */
+ PORT_START_TAG("IN3") /* 0xD1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog joystick 1 */
- PORT_START
- PORT_START /* Analog joystick 2 */
- PORT_START
- PORT_START /* Analog joystick 3 */
- PORT_START
+ PORT_START_TAG("AN0") /* Analog joystick 1 */
+ PORT_START_TAG("AN1")
+ PORT_START_TAG("AN2") /* Analog joystick 2 */
+ PORT_START_TAG("AN3")
+ PORT_START_TAG("AN4") /* Analog joystick 3 */
+ PORT_START_TAG("AN5")
INPUT_PORTS_END
static INPUT_PORTS_START( wseries ) /* complete, verified from code */
- PORT_START /* 0x80 */
+ PORT_START_TAG("IN0") /* 0x80 */
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Extra Base") PORT_PLAYER(1)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Go Back") PORT_PLAYER(1)
- PORT_START /* 0x81 */
+ PORT_START_TAG("IN1") /* 0x81 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x90 */
+ PORT_START_TAG("IN2") /* 0x90 */
PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Aim") PORT_PLAYER(1)
- PORT_START /* 0x91 */
+ PORT_START_TAG("IN3") /* 0x91 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_PLAYER(1)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog joystick 1 */
+ PORT_START_TAG("AN0") /* Analog joystick 1 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("AN1")
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog joystick 2 */
- PORT_START
- PORT_START /* Analog joystick 3 */
+ PORT_START_TAG("AN2") /* Analog joystick 2 */
+ PORT_START_TAG("AN3")
+ PORT_START_TAG("AN4") /* Analog joystick 3 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START
+ PORT_START_TAG("AN5")
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( alleymas ) /* complete, verified from code */
- PORT_START /* 0xC0 */
+ PORT_START_TAG("IN0") /* 0xC0 */
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_START /* 0xC1 */
+ PORT_START_TAG("IN1") /* 0xC1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0xD0 */
+ PORT_START_TAG("IN2") /* 0xD0 */
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* redundant inputs */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* redundant inputs */
- PORT_START /* 0xD1 */
+ PORT_START_TAG("IN3") /* 0xD1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_PLAYER(1)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog joystick 1 */
+ PORT_START_TAG("AN0") /* Analog joystick 1 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("AN1")
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0,224) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog joystick 2 */
- PORT_START
- PORT_START /* Analog joystick 3 */
- PORT_START
+ PORT_START_TAG("AN2") /* Analog joystick 2 */
+ PORT_START_TAG("AN3")
+ PORT_START_TAG("AN4") /* Analog joystick 3 */
+ PORT_START_TAG("AN5")
INPUT_PORTS_END
static INPUT_PORTS_START( upyoural ) /* complete, verified from code */
- PORT_START /* 0xC0 */
+ PORT_START_TAG("IN0") /* 0xC0 */
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_START /* 0xC1 */
+ PORT_START_TAG("IN1") /* 0xC1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0xD0 */
+ PORT_START_TAG("IN2") /* 0xD0 */
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 )
- PORT_START /* 0xD1 */
+ PORT_START_TAG("IN3") /* 0xD1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_PLAYER(1)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog joystick 1 */
+ PORT_START_TAG("AN0") /* Analog joystick 1 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("AN1")
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0,224) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog joystick 2 */
- PORT_START
- PORT_START /* Analog joystick 3 */
- PORT_START
+ PORT_START_TAG("AN2") /* Analog joystick 2 */
+ PORT_START_TAG("AN3")
+ PORT_START_TAG("AN4") /* Analog joystick 3 */
+ PORT_START_TAG("AN5")
INPUT_PORTS_END
static INPUT_PORTS_START( dangerz ) /* complete, verified from code */
- PORT_START /* 0x80 */
+ PORT_START_TAG("IN0") /* 0x80 */
PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x81 */
+ PORT_START_TAG("IN1") /* 0x81 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x90 */
+ PORT_START_TAG("IN2") /* 0x90 */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x91 */
+ PORT_START_TAG("IN3") /* 0x91 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog 1 */
+ PORT_START_TAG("AN0") /* Analog 1 */
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog 2 */
+ PORT_START_TAG("AN1") /* Analog 2 */
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
INPUT_PORTS_END
static INPUT_PORTS_START( basebal2 ) /* complete, verified from code */
- PORT_START /* 0x40/C0 */
+ PORT_START_TAG("IN0") /* 0x40/C0 */
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* read by strkzone, but never referenced */
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Extra Base") PORT_PLAYER(1)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Go Back") PORT_PLAYER(1)
- PORT_START /* 0x41/C1 */
+ PORT_START_TAG("IN1") /* 0x41/C1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x50/D0 */
+ PORT_START_TAG("IN2") /* 0x50/D0 */
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("R Run/Steal") PORT_PLAYER(1)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("L Run/Steal") PORT_PLAYER(1)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Run/Aim") PORT_PLAYER(1)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Run/Cutoff") PORT_PLAYER(1)
- PORT_START /* 0x51/D1 */
+ PORT_START_TAG("IN3") /* 0x51/D1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_PLAYER(1)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog joystick 1 */
+ PORT_START_TAG("AN0") /* Analog joystick 1 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START
+ PORT_START_TAG("AN1")
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog joystick 2 */
- PORT_START
- PORT_START /* Analog joystick 3 */
+ PORT_START_TAG("AN2") /* Analog joystick 2 */
+ PORT_START_TAG("AN3")
+ PORT_START_TAG("AN4") /* Analog joystick 3 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START
+ PORT_START_TAG("AN5")
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( redline ) /* complete, verified in code */
- PORT_START /* 0xC0 */
+ PORT_START_TAG("IN0") /* 0xC0 */
PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xe0, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(64) PORT_PLAYER(1)
- PORT_START /* 0xC1 */
+ PORT_START_TAG("IN1") /* 0xC1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
@@ -399,39 +399,39 @@ static INPUT_PORTS_START( redline ) /* complete, verified in code */
PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* used, but for what purpose? */
- PORT_START /* 0xD0 */
+ PORT_START_TAG("IN2") /* 0xD0 */
PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xe0, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(64) PORT_PLAYER(2)
- PORT_START /* 0xD1 */
+ PORT_START_TAG("IN3") /* 0xD1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog wheel 1 */
+ PORT_START_TAG("AN0") /* Analog wheel 1 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog wheel 2 */
+ PORT_START_TAG("AN1") /* Analog wheel 2 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( quarterb ) /* complete, verified in code */
- PORT_START /* 0x80 */
+ PORT_START_TAG("IN0") /* 0x80 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x81 */
+ PORT_START_TAG("IN1") /* 0x81 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x90 */
+ PORT_START_TAG("IN2") /* 0x90 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
@@ -441,39 +441,39 @@ static INPUT_PORTS_START( quarterb ) /* complete, verified in code */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
- PORT_START /* 0x91 */
+ PORT_START_TAG("IN3") /* 0x91 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog spring stick 1 */
+ PORT_START_TAG("AN0") /* Analog spring stick 1 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog spring stick 2 */
+ PORT_START_TAG("AN1") /* Analog spring stick 2 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog spring stick 3 */
- PORT_START /* Analog spring stick 4 */
- PORT_START /* Analog spring stick 5 */
- PORT_START /* Analog spring stick 6 */
+ PORT_START_TAG("AN2") /* Analog spring stick 3 */
+ PORT_START_TAG("AN3") /* Analog spring stick 4 */
+ PORT_START_TAG("AN4") /* Analog spring stick 5 */
+ PORT_START_TAG("AN5") /* Analog spring stick 6 */
INPUT_PORTS_END
static INPUT_PORTS_START( teamqb ) /* complete, verified in code */
- PORT_START /* 0x80 */
+ PORT_START_TAG("IN0") /* 0x80 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x81 */
+ PORT_START_TAG("IN1") /* 0x81 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x90 */
+ PORT_START_TAG("IN2") /* 0x90 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
@@ -483,25 +483,25 @@ static INPUT_PORTS_START( teamqb ) /* complete, verified in code */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
- PORT_START /* 0x91 */
+ PORT_START_TAG("IN3") /* 0x91 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog spring stick 1 */
+ PORT_START_TAG("AN0") /* Analog spring stick 1 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog spring stick 2 */
+ PORT_START_TAG("AN1") /* Analog spring stick 2 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog spring stick 3 */
- PORT_START /* Analog spring stick 4 */
- PORT_START /* Analog spring stick 5 */
+ PORT_START_TAG("AN2") /* Analog spring stick 3 */
+ PORT_START_TAG("AN3") /* Analog spring stick 4 */
+ PORT_START_TAG("AN4") /* Analog spring stick 5 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3)
- PORT_START /* Analog spring stick 6 */
+ PORT_START_TAG("AN5") /* Analog spring stick 6 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3)
- PORT_START /* 0x7C */
+ PORT_START_TAG("IN4") /* 0x7C */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
PORT_BIT( 0x0e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
@@ -509,7 +509,7 @@ static INPUT_PORTS_START( teamqb ) /* complete, verified in code */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
- PORT_START /* 0x7F */
+ PORT_START_TAG("IN5") /* 0x7F */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4)
@@ -522,51 +522,51 @@ INPUT_PORTS_END
static INPUT_PORTS_START( aafb2p ) /* complete, verified in code */
- PORT_START /* 0x80 */
+ PORT_START_TAG("IN0") /* 0x80 */
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x81 */
+ PORT_START_TAG("IN1") /* 0x81 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x90 */
+ PORT_START_TAG("IN2") /* 0x90 */
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
- PORT_START /* 0x91 */
+ PORT_START_TAG("IN3") /* 0x91 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog spring stick 1 */
+ PORT_START_TAG("AN0") /* Analog spring stick 1 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog spring stick 2 */
+ PORT_START_TAG("AN1") /* Analog spring stick 2 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog spring stick 3 */
- PORT_START /* Analog spring stick 4 */
- PORT_START /* Analog spring stick 5 */
+ PORT_START_TAG("AN2") /* Analog spring stick 3 */
+ PORT_START_TAG("AN3") /* Analog spring stick 4 */
+ PORT_START_TAG("AN4") /* Analog spring stick 5 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* Analog spring stick 6 */
+ PORT_START_TAG("AN5") /* Analog spring stick 6 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* 0x7C */
+ PORT_START_TAG("IN4") /* 0x7C */
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
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_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x7F */
+ PORT_START_TAG("IN5") /* 0x7F */
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
@@ -576,7 +576,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( offroad ) /* complete, verified from code */
- PORT_START /* 0xC0 */
+ PORT_START_TAG("IN0") /* 0xC0 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* read */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* read */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* read */
@@ -586,40 +586,40 @@ static INPUT_PORTS_START( offroad ) /* complete, verified from code */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0xC1 */
+ PORT_START_TAG("IN1") /* 0xC1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0xD0 */
+ PORT_START_TAG("IN2") /* 0xD0 */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0xD1 */
+ PORT_START_TAG("IN3") /* 0xD1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Analog pedal 1 */
+ PORT_START_TAG("AN0") /* Analog pedal 1 */
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog pedal 2 */
+ PORT_START_TAG("AN1") /* Analog pedal 2 */
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* Analog pedal 3 */
+ PORT_START_TAG("AN2") /* Analog pedal 3 */
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3)
- PORT_START /* Analog wheel 1 */
+ PORT_START_TAG("AN3") /* Analog wheel 1 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START /* Analog wheel 2 */
+ PORT_START_TAG("AN4") /* Analog wheel 2 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* Analog wheel 3 */
+ PORT_START_TAG("AN5") /* Analog wheel 3 */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3)
INPUT_PORTS_END
static INPUT_PORTS_START( pigout ) /* complete, verified from code */
- PORT_START /* 0x40 */
+ PORT_START_TAG("IN0") /* 0x40 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
@@ -629,14 +629,14 @@ static INPUT_PORTS_START( pigout ) /* complete, verified from code */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
- PORT_START /* 0x41 */
+ PORT_START_TAG("IN1") /* 0x41 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLAVEHALT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* read, but never referenced */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x50 */
+ PORT_START_TAG("IN2") /* 0x50 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
@@ -646,13 +646,13 @@ static INPUT_PORTS_START( pigout ) /* complete, verified from code */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
- PORT_START /* 0x51 */
+ PORT_START_TAG("IN3") /* 0x51 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_eeprom_DATA )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK )
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 0x7F */
+ PORT_START_TAG("IN4") /* 0x7F */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
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)
diff --git a/src/mame/drivers/lemmings.c b/src/mame/drivers/lemmings.c
index 9da275264a2..b2de9d8a885 100644
--- a/src/mame/drivers/lemmings.c
+++ b/src/mame/drivers/lemmings.c
@@ -32,10 +32,10 @@ static WRITE16_HANDLER( lemmings_control_w )
static READ16_HANDLER( lemmings_trackball_r )
{
switch (offset) {
- case 0: return input_port_read_indexed(machine, 4); break;
- case 1: return input_port_read_indexed(machine, 5); break;
- case 4: return input_port_read_indexed(machine, 6); break;
- case 5: return input_port_read_indexed(machine, 7); break;
+ case 0: return input_port_read(machine, "AN0"); break;
+ case 1: return input_port_read(machine, "AN1"); break;
+ case 4: return input_port_read(machine, "AN2"); break;
+ case 5: return input_port_read(machine, "AN3"); break;
}
return 0;
}
@@ -45,13 +45,13 @@ static READ16_HANDLER( lemmings_prot_r )
{
switch (offset<<1) {
case 0x41a: /* Player input */
- return input_port_read_indexed(machine, 0);
+ return input_port_read(machine, "IN0");
case 0x320: /* Coins */
- return input_port_read_indexed(machine, 1);
+ return input_port_read(machine, "IN1");
case 0x4e6: /* Dips */
- return (input_port_read_indexed(machine, 2) + (input_port_read_indexed(machine, 3) << 8));
+ return (input_port_read(machine, "DSW1") + (input_port_read(machine, "DSW2") << 8));
}
return 0;
diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c
index 24f73e99a46..f7998559e22 100644
--- a/src/mame/drivers/lethal.c
+++ b/src/mame/drivers/lethal.c
@@ -176,8 +176,11 @@ maybe some priority issues / sprite placement issues..
#define SOUND_CLOCK XTAL_18_432MHz
-#define GUNX( a ) (( ( input_port_read_indexed(machine, a ) * 287 ) / 0xff ) + 16)
-#define GUNY( a ) (( ( input_port_read_indexed(machine, a ) * 223 ) / 0xff ) + 10)
+static const char *gunnames[] = { "LIGHT0_X", "LIGHT0_Y", "LIGHT1_X", "LIGHT1_Y" };
+
+/* a = 1, 2 = player # */
+#define GUNX( a ) (( ( input_port_read(machine, gunnames[2 * (a - 1)]) * 287 ) / 0xff ) + 16)
+#define GUNY( a ) (( ( input_port_read(machine, gunnames[2 * (a - 1) + 1]) * 223 ) / 0xff ) + 10)
VIDEO_START(lethalen);
VIDEO_UPDATE(lethalen);
@@ -229,7 +232,7 @@ static NVRAM_HANDLER( lethalen )
static READ8_HANDLER( control2_r )
{
- return 0x02 | eeprom_read_bit() | (input_port_read_indexed(machine, 1) & 0xf0);
+ return 0x02 | eeprom_read_bit() | (input_port_read(machine, "IN1") & 0xf0);
}
static WRITE8_HANDLER( control2_w )
@@ -455,22 +458,22 @@ static READ8_HANDLER(guns_r)
switch (offset)
{
case 0:
- return GUNX(2)>>1;
+ return GUNX(1)>>1;
break;
case 1:
- if ((240-GUNY(3)) == 7)
+ if ((240-GUNY(1)) == 7)
return 0;
else
- return (240-GUNY(3));
+ return (240-GUNY(1));
break;
case 2:
- return GUNX(4)>>1;
+ return GUNX(2)>>1;
break;
case 3:
- if ((240-GUNY(5)) == 7)
+ if ((240-GUNY(2)) == 7)
return 0;
else
- return (240-GUNY(5));
+ return (240-GUNY(2));
break;
}
@@ -481,8 +484,8 @@ static READ8_HANDLER(gunsaux_r)
{
int res = 0;
- if (GUNX(2) & 1) res |= 0x80;
- if (GUNX(4) & 1) res |= 0x40;
+ if (GUNX(1) & 1) res |= 0x80;
+ if (GUNX(2) & 1) res |= 0x40;
return res;
}
@@ -499,7 +502,7 @@ static ADDRESS_MAP_START( le_main, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x40c8, 0x40d0) AM_WRITE(lethalen_palette_control) // PCU1-PCU3 on the schematics
AM_RANGE(0x40d4, 0x40d7) AM_READ(guns_r)
AM_RANGE(0x40d8, 0x40d8) AM_READ(control2_r)
- AM_RANGE(0x40d9, 0x40d9) AM_READ(input_port_0_r)
+ AM_RANGE(0x40d9, 0x40d9) AM_READ_PORT("IN0")
AM_RANGE(0x40db, 0x40db) AM_READ(gunsaux_r) // top X bit of guns
AM_RANGE(0x40dc, 0x40dc) AM_WRITE(le_bankswitch_w)
AM_RANGE(0x47fe, 0x47ff) AM_WRITE(le_bgcolor_w) // BG color
@@ -520,7 +523,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( lethalen )
/* IN 0 */
- PORT_START
+ PORT_START_TAG("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 )
@@ -531,14 +534,14 @@ static INPUT_PORTS_START( lethalen )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
/* IN 1 */
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR(Language) )
- PORT_DIPSETTING( 0x10, DEF_STR(English) )
- PORT_DIPSETTING( 0x00, DEF_STR(Spanish) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR(Language) )
+ PORT_DIPSETTING( 0x10, DEF_STR(English) )
+ PORT_DIPSETTING( 0x00, DEF_STR(Spanish) )
PORT_DIPNAME( 0x20, 0x00, "Game Type" )
PORT_DIPSETTING( 0x20, "Street" )
PORT_DIPSETTING( 0x00, "Arcade" )
@@ -550,25 +553,25 @@ static INPUT_PORTS_START( lethalen )
PORT_DIPSETTING( 0x0080, DEF_STR( Stereo ) )
/* IN 2 */
- PORT_START
+ PORT_START_TAG("LIGHT0_X")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
/* IN 3 */
- PORT_START
+ PORT_START_TAG("LIGHT0_Y")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
/* IN 4 */
- PORT_START
+ PORT_START_TAG("LIGHT1_X")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
/* IN 5 */
- PORT_START
+ PORT_START_TAG("LIGHT1_Y")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( lethalej )
/* IN 0 */
- PORT_START
+ PORT_START_TAG("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 )
@@ -579,7 +582,7 @@ static INPUT_PORTS_START( lethalej )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
/* IN 1 */
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -598,19 +601,19 @@ static INPUT_PORTS_START( lethalej )
PORT_DIPSETTING( 0x0080, DEF_STR( Stereo ) )
/* IN 2 */
- PORT_START
+ PORT_START_TAG("LIGHT0_X")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_REVERSE
/* IN 3 */
- PORT_START
+ PORT_START_TAG("LIGHT0_Y")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_REVERSE
/* IN 4 */
- PORT_START
+ PORT_START_TAG("LIGHT1_X")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_REVERSE
/* IN 5 */
- PORT_START
+ PORT_START_TAG("LIGHT1_Y")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_REVERSE
INPUT_PORTS_END
diff --git a/src/mame/drivers/lethalj.c b/src/mame/drivers/lethalj.c
index 45578764322..ba15eb07726 100644
--- a/src/mame/drivers/lethalj.c
+++ b/src/mame/drivers/lethalj.c
@@ -143,14 +143,14 @@ ADDRESS_MAP_END
*************************************/
static INPUT_PORTS_START( lethalj )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ??? Seems to be rigged up to the auto scroll, and acts as a fast forward*/
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -190,22 +190,22 @@ static INPUT_PORTS_START( lethalj )
PORT_DIPSETTING( 0x0000, "-2.5" )
PORT_DIPSETTING( 0x8000, "+0" )
- PORT_START /* fake analog X */
+ PORT_START_TAG("LIGHT0_X") /* fake analog X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT0_Y") /* fake analog Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10)
- PORT_START /* fake analog X */
+ PORT_START_TAG("LIGHT1_X") /* fake analog X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT1_Y") /* fake analog Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( eggventr )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -235,7 +235,7 @@ static INPUT_PORTS_START( eggventr )
PORT_DIPSETTING( 0x1000, DEF_STR( On ) ) // but not actually called (EC).
PORT_BIT( 0xe000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
@@ -244,22 +244,22 @@ static INPUT_PORTS_START( eggventr )
PORT_BIT( 0x7f00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START /* fake analog X */
+ PORT_START_TAG("LIGHT0_X") /* fake analog X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT0_Y") /* fake analog Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10)
- PORT_START /* fake analog X */
+ PORT_START_TAG("LIGHT1_X") /* fake analog X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT1_Y") /* fake analog Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( eggvntdx )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -286,7 +286,7 @@ static INPUT_PORTS_START( eggvntdx )
PORT_DIPSETTING( 0x0000, DEF_STR( Hard ) )
PORT_BIT( 0xe000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
@@ -295,28 +295,28 @@ static INPUT_PORTS_START( eggvntdx )
PORT_BIT( 0x7f00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START /* fake analog X */
+ PORT_START_TAG("LIGHT0_X") /* fake analog X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT0_Y") /* fake analog Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10)
- PORT_START /* fake analog X */
+ PORT_START_TAG("LIGHT1_X") /* fake analog X */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT1_Y") /* fake analog Y */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( ripribit )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL)
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -356,15 +356,15 @@ static INPUT_PORTS_START( ripribit )
PORT_DIPSETTING( 0x2000, "800" )
PORT_DIPSETTING( 0x0000, "1000" )
- PORT_START /* fake analog X */
- PORT_START /* fake analog Y */
- PORT_START /* fake analog X */
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT0_X") /* fake analog X */
+ PORT_START_TAG("LIGHT0_Y") /* fake analog Y */
+ PORT_START_TAG("LIGHT1_X") /* fake analog X */
+ PORT_START_TAG("LIGHT1_Y") /* fake analog Y */
INPUT_PORTS_END
static INPUT_PORTS_START( cfarm )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -404,7 +404,7 @@ static INPUT_PORTS_START( cfarm )
PORT_DIPSETTING( 0x2000, "8" )
PORT_DIPSETTING( 0x0000, "10" )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL)
PORT_BIT( 0x0006, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
@@ -412,15 +412,15 @@ static INPUT_PORTS_START( cfarm )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* fake analog X */
- PORT_START /* fake analog Y */
- PORT_START /* fake analog X */
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT0_X") /* fake analog X */
+ PORT_START_TAG("LIGHT0_Y") /* fake analog Y */
+ PORT_START_TAG("LIGHT1_X") /* fake analog X */
+ PORT_START_TAG("LIGHT1_Y") /* fake analog Y */
INPUT_PORTS_END
static INPUT_PORTS_START( cclownz )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -460,17 +460,17 @@ static INPUT_PORTS_START( cclownz )
PORT_DIPSETTING( 0x2000, "2400" )
PORT_DIPSETTING( 0x0000, "3000" )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cclownz_paddle, NULL)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL)
PORT_BIT( 0x0060, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* fake analog X */
- PORT_START /* fake analog Y */
- PORT_START /* fake analog X */
- PORT_START /* fake analog Y */
+ PORT_START_TAG("LIGHT0_X") /* fake analog X */
+ PORT_START_TAG("LIGHT0_Y") /* fake analog Y */
+ PORT_START_TAG("LIGHT1_X") /* fake analog X */
+ PORT_START_TAG("LIGHT1_Y") /* fake analog Y */
PORT_START_TAG("PADDLE")
PORT_BIT( 0x00ff, 0x0000, IPT_PADDLE ) PORT_PLAYER(1) PORT_SENSITIVITY(50) PORT_KEYDELTA(8) PORT_CENTERDELTA(0) PORT_REVERSE
diff --git a/src/mame/drivers/liberate.c b/src/mame/drivers/liberate.c
index 5f23cf9ebcd..8da64d5dda9 100644
--- a/src/mame/drivers/liberate.c
+++ b/src/mame/drivers/liberate.c
@@ -126,7 +126,7 @@ static ADDRESS_MAP_START( liberate_writemem, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
static ADDRESS_MAP_START( deco16_readport, ADDRESS_SPACE_IO, 8 )
- AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r)
+ AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
ADDRESS_MAP_END
static ADDRESS_MAP_START( deco16_writeport, ADDRESS_SPACE_IO, 8 )
@@ -134,15 +134,15 @@ static ADDRESS_MAP_START( deco16_writeport, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
static ADDRESS_MAP_START( liberatb_readmem, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x00fe, 0x00fe) AM_READ(input_port_0_r)
+ AM_RANGE(0x00fe, 0x00fe) AM_READ_PORT("IN0")
AM_RANGE(0x0000, 0x0fff) AM_READ(SMH_RAM)
AM_RANGE(0x1000, 0x3fff) AM_READ(SMH_ROM) /* Mirror of main rom */
AM_RANGE(0x4000, 0x7fff) AM_READ(deco16_bank_r)
- AM_RANGE(0xf000, 0xf000) AM_READ(input_port_1_r)
- AM_RANGE(0xf001, 0xf001) AM_READ(input_port_2_r)
- AM_RANGE(0xf002, 0xf002) AM_READ(input_port_3_r)
- AM_RANGE(0xf003, 0xf003) AM_READ(input_port_4_r)
- AM_RANGE(0xf004, 0xf004) AM_READ(input_port_5_r)
+ AM_RANGE(0xf000, 0xf000) AM_READ_PORT("IN1")
+ AM_RANGE(0xf001, 0xf001) AM_READ_PORT("IN2")
+ AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN3")
+ AM_RANGE(0xf003, 0xf003) AM_READ_PORT("DSW1")
+ AM_RANGE(0xf004, 0xf004) AM_READ_PORT("DSW2")
AM_RANGE(0x8000, 0xffff) AM_READ(SMH_ROM)
ADDRESS_MAP_END
@@ -497,13 +497,16 @@ GFXDECODE_END
static INTERRUPT_GEN( deco16_interrupt )
{
- static int latch=0;
- int p=~input_port_read_indexed(machine, 3);
- if (p&0x43 && !latch) {
- cpunum_set_input_line(machine, 0,DECO16_IRQ_LINE,ASSERT_LINE);
- latch=1;
- } else {
- if (!(p&0x43))
+ static int latch = 0;
+ int p = ~input_port_read(machine, "IN3");
+ if ((p & 0x43) && !latch)
+ {
+ cpunum_set_input_line(machine, 0, DECO16_IRQ_LINE, ASSERT_LINE);
+ latch = 1;
+ }
+ else
+ {
+ if (!(p & 0x43))
latch=0;
}
}
diff --git a/src/mame/drivers/liberatr.c b/src/mame/drivers/liberatr.c
index ef0481192fe..e646c14092b 100644
--- a/src/mame/drivers/liberatr.c
+++ b/src/mame/drivers/liberatr.c
@@ -177,8 +177,8 @@ static WRITE8_HANDLER( liberatr_trackball_reset_w )
/* input becomes the starting point for the trackball counters */
if (((data ^ ctrld) & 0x10) && (data & 0x10))
{
- UINT8 trackball = input_port_read_indexed(machine, 4);
- UINT8 switches = input_port_read_indexed(machine, 0);
+ UINT8 trackball = input_port_read(machine, "FAKE");
+ UINT8 switches = input_port_read(machine, "IN0");
trackball_offset = ((trackball & 0xf0) - (switches & 0xf0)) | ((trackball - switches) & 0x0f);
}
ctrld = data & 0x10;
@@ -190,13 +190,13 @@ static READ8_HANDLER( liberatr_input_port_0_r )
/* if ctrld is high, the /ld signal on the LS191 is NOT set, meaning that the trackball is counting */
if (ctrld)
{
- UINT8 trackball = input_port_read_indexed(machine, 4);
+ UINT8 trackball = input_port_read(machine, "FAKE");
return ((trackball & 0xf0) - (trackball_offset & 0xf0)) | ((trackball - trackball_offset) & 0x0f);
}
/* otherwise, the LS191 is simply passing through the raw switch inputs */
else
- return input_port_read_indexed(machine, 0);
+ return input_port_read(machine, "IN0");
}
@@ -246,7 +246,7 @@ static ADDRESS_MAP_START( liberat2_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0002, 0x0002) AM_READWRITE(liberatr_bitmap_xy_r, liberatr_bitmap_xy_w)
AM_RANGE(0x0000, 0x3fff) AM_RAM_WRITE(liberatr_bitmap_w) AM_BASE(&liberatr_bitmapram) /* overlapping for my convenience */
AM_RANGE(0x4000, 0x4000) AM_READ(liberatr_input_port_0_r)
- AM_RANGE(0x4001, 0x4001) AM_READ(input_port_1_r)
+ AM_RANGE(0x4001, 0x4001) AM_READ_PORT("IN1")
AM_RANGE(0x4000, 0x400f) AM_WRITE(SMH_RAM) AM_BASE(&liberatr_base_ram)
AM_RANGE(0x4200, 0x421f) AM_WRITE(SMH_RAM) AM_BASE(&liberatr_colorram)
AM_RANGE(0x4400, 0x4400) AM_WRITENOP
@@ -275,7 +275,7 @@ ADDRESS_MAP_END
*************************************/
static INPUT_PORTS_START( liberatr )
- PORT_START /* IN0 - $5000 */
+ PORT_START_TAG("IN0") /* IN0 - $5000 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
@@ -287,7 +287,7 @@ static INPUT_PORTS_START( liberatr )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
- PORT_START /* IN1 - $5001 */
+ PORT_START_TAG("IN1") /* IN1 - $5001 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 )
@@ -297,7 +297,7 @@ static INPUT_PORTS_START( liberatr )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_VBLANK )
- PORT_START /* IN2 - Game Option switches DSW @ D4 on PCB */
+ PORT_START_TAG("DSW1") /* IN2 - Game Option switches DSW @ D4 on PCB */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPSETTING( 0x01, "5" )
@@ -320,7 +320,7 @@ static INPUT_PORTS_START( liberatr )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START /* IN3 - Pricing Option switches DSW @ A4 on PCB */
+ PORT_START_TAG("DSW2") /* IN3 - Pricing Option switches DSW @ A4 on PCB */
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) )
@@ -345,7 +345,7 @@ static INPUT_PORTS_START( liberatr )
PORT_DIPSETTING ( 0xc0, "Freeze Mode" )
PORT_DIPSETTING ( 0xe0, "Freeze Mode" )
- PORT_START /* IN4 - FAKE - overlaps IN0 in the HW */
+ PORT_START_TAG("FAKE") /* IN4 - FAKE - overlaps IN0 in the HW */
PORT_BIT( 0x0f, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10)
PORT_BIT( 0xf0, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10)
INPUT_PORTS_END
diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c
index 10be08a707e..a74604dc7eb 100644
--- a/src/mame/drivers/limenko.c
+++ b/src/mame/drivers/limenko.c
@@ -38,7 +38,7 @@ static UINT32 *mainram;
static READ32_HANDLER( port2_r )
{
- return (eeprom_read_bit() << 23) | (input_port_read_indexed(machine, 2) & ~(1<<23));
+ return (eeprom_read_bit() << 23) | (input_port_read(machine, "IN2") & ~(1<<23));
}
static WRITE32_HANDLER( eeprom_w )
@@ -313,7 +313,7 @@ static VIDEO_UPDATE( limenko )
*****************************************************************************************************/
static INPUT_PORTS_START( legendoh )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
@@ -332,7 +332,7 @@ static INPUT_PORTS_START( legendoh )
PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
@@ -351,7 +351,7 @@ static INPUT_PORTS_START( legendoh )
PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4)
PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN2")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -373,7 +373,7 @@ static INPUT_PORTS_START( legendoh )
INPUT_PORTS_END
static INPUT_PORTS_START( sb2003 )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
@@ -384,7 +384,7 @@ static INPUT_PORTS_START( sb2003 )
PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
PORT_BIT( 0xff00ffff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
@@ -395,7 +395,7 @@ static INPUT_PORTS_START( sb2003 )
PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
PORT_BIT( 0xff00ffff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN2")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -411,7 +411,7 @@ static INPUT_PORTS_START( sb2003 )
INPUT_PORTS_END
static INPUT_PORTS_START( spotty )
- PORT_START
+ PORT_START_TAG("IN0")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Hold 1")
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Hold 2")
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Hold 3")
@@ -422,7 +422,7 @@ static INPUT_PORTS_START( spotty )
PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xff00ffff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN1")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -433,7 +433,7 @@ static INPUT_PORTS_START( spotty )
PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xff00ffff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START
+ PORT_START_TAG("IN2")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 )
diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c
index a53c076a3d5..0b4feda975f 100644
--- a/src/mame/drivers/lordgun.c
+++ b/src/mame/drivers/lordgun.c
@@ -110,7 +110,7 @@ static WRITE8_HANDLER(fake2_w)
static READ8_HANDLER( lordgun_eeprom_r )
{
- return input_port_read_indexed(machine, 0) | ((eeprom_read_bit() & 1) << 7);
+ return input_port_read(machine, "IN0") | ((eeprom_read_bit() & 1) << 7);
}
static WRITE8_HANDLER( lordgun_eeprom_w )
@@ -328,7 +328,7 @@ GFXDECODE_END
***************************************************************************/
static INPUT_PORTS_START( lordgun )
- PORT_START // IN0
+ PORT_START_TAG("IN0")
PORT_DIPNAME( 0x01, 0x01, "Game Mode" )
PORT_DIPSETTING( 0x01, "Arcade" )
PORT_DIPSETTING( 0x00, "Street" )
@@ -346,7 +346,7 @@ static INPUT_PORTS_START( lordgun )
PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // eeprom
- PORT_START // IN1
+ PORT_START_TAG("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -355,7 +355,7 @@ static INPUT_PORTS_START( lordgun )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE2 ) // cheat: skip ahead
- PORT_START // IN2
+ PORT_START_TAG("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -365,7 +365,7 @@ static INPUT_PORTS_START( lordgun )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN3
+ PORT_START_TAG("IN3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -375,7 +375,7 @@ static INPUT_PORTS_START( lordgun )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START //IN 4
+ PORT_START_TAG("IN4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -385,16 +385,16 @@ static INPUT_PORTS_START( lordgun )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START // IN5
+ PORT_START_TAG("LIGHT0_X")
PORT_BIT( 0x1ff, 0x100, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(0,0x1ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START // IN6
+ PORT_START_TAG("LIGHT1_X")
PORT_BIT( 0x1ff, 0x100, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(0,0x1ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2)
- PORT_START // IN7
+ PORT_START_TAG("LIGHT0_Y")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1)
- PORT_START // IN8
+ PORT_START_TAG("LIGHT1_Y")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
diff --git a/src/mame/drivers/lsasquad.c b/src/mame/drivers/lsasquad.c
index 382e44bd907..ef33e9722f5 100644
--- a/src/mame/drivers/lsasquad.c
+++ b/src/mame/drivers/lsasquad.c
@@ -171,14 +171,14 @@ static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM)
AM_RANGE(0x8000, 0x9fff) AM_READ(SMH_BANK1)
AM_RANGE(0xa000, 0xe5ff) AM_READ(SMH_RAM)
- AM_RANGE(0xe800, 0xe800) AM_READ(input_port_0_r) /* DSWA */
- AM_RANGE(0xe801, 0xe801) AM_READ(input_port_1_r) /* DSWB */
- AM_RANGE(0xe802, 0xe802) AM_READ(input_port_2_r) /* DSWC */
+ AM_RANGE(0xe800, 0xe800) AM_READ_PORT("DSWA") /* DSWA */
+ AM_RANGE(0xe801, 0xe801) AM_READ_PORT("DSWB") /* DSWB */
+ AM_RANGE(0xe802, 0xe802) AM_READ_PORT("DSWC") /* DSWC */
AM_RANGE(0xe803, 0xe803) AM_READ(lsasquad_mcu_status_r) /* COIN + 68705 status */
- AM_RANGE(0xe804, 0xe804) AM_READ(input_port_4_r) /* IN0 */
- AM_RANGE(0xe805, 0xe805) AM_READ(input_port_5_r) /* IN1 */
- AM_RANGE(0xe806, 0xe806) AM_READ(input_port_6_r) /* START */
- AM_RANGE(0xe807, 0xe807) AM_READ(input_port_7_r) /* SERVICE/TILT */
+ AM_RANGE(0xe804, 0xe804) AM_READ_PORT("IN0") /* IN0 */
+ AM_RANGE(0xe805, 0xe805) AM_READ_PORT("IN1") /* IN1 */
+ AM_RANGE(0xe806, 0xe806) AM_READ_PORT("IN2") /* START */
+ AM_RANGE(0xe807, 0xe807) AM_READ_PORT("IN3") /* SERVICE/TILT */
AM_RANGE(0xec00, 0xec00) AM_READ(lsasquad_sound_result_r)
AM_RANGE(0xec01, 0xec01) AM_READ(lsasquad_sound_status_r)
AM_RANGE(0xee00, 0xee00) AM_READ(lsasquad_mcu_r)
diff --git a/src/mame/drivers/lvcards.c b/src/mame/drivers/lvcards.c
index c8537ea70f5..fbba10807a5 100644
--- a/src/mame/drivers/lvcards.c
+++ b/src/mame/drivers/lvcards.c
@@ -136,7 +136,7 @@ static WRITE8_HANDLER(control_port_2a_w)
static READ8_HANDLER( payout_r )
{
- result = input_port_read_indexed(machine, 2);
+ result = input_port_read(machine, "IN2");
if (payout)
{
@@ -158,8 +158,8 @@ static ADDRESS_MAP_START( ponttehk_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(lvcards_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(lvcards_colorram_w) AM_BASE(&colorram)
- AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r)
- AM_RANGE(0xa001, 0xa001) AM_READ(input_port_1_r) AM_WRITENOP // lamps
+ AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
+ AM_RANGE(0xa001, 0xa001) AM_READ_PORT("IN1") AM_WRITENOP // lamps
AM_RANGE(0xa002, 0xa002) AM_READ(payout_r) AM_WRITE(control_port_2a_w)//AM_WRITENOP // ???
ADDRESS_MAP_END
@@ -168,9 +168,9 @@ static ADDRESS_MAP_START( lvcards_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(lvcards_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(lvcards_colorram_w) AM_BASE(&colorram)
- AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r)
- AM_RANGE(0xa001, 0xa001) AM_READ(input_port_1_r) AM_WRITENOP
- AM_RANGE(0xa002, 0xa002) AM_READ(input_port_2_r) AM_WRITENOP
+ AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
+ AM_RANGE(0xa001, 0xa001) AM_READ_PORT("IN1") AM_WRITENOP
+ AM_RANGE(0xa002, 0xa002) AM_READ_PORT("IN2") AM_WRITENOP
AM_RANGE(0xc000, 0xdfff) AM_ROM
ADDRESS_MAP_END
@@ -185,8 +185,8 @@ static ADDRESS_MAP_START( lvpoker_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(lvcards_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(lvcards_colorram_w) AM_BASE(&colorram)
- AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r)
- AM_RANGE(0xa001, 0xa001) AM_READ(input_port_1_r) AM_WRITENOP // lamps
+ AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
+ AM_RANGE(0xa001, 0xa001) AM_READ_PORT("IN1") AM_WRITENOP // lamps
AM_RANGE(0xa002, 0xa002) AM_READ(payout_r) AM_WRITE(control_port_2_w)
AM_RANGE(0xc000, 0xdfff) AM_ROM
ADDRESS_MAP_END
diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c
index 1bd5a64dafb..be9a3b86ad2 100644
--- a/src/mame/drivers/megadriv.c
+++ b/src/mame/drivers/megadriv.c
@@ -1438,8 +1438,9 @@ static void init_megadri6_io(void)
/* pointers to our io data read/write functions */
static UINT8 (*megadrive_io_read_data_port_ptr)(int offset);
static void (*megadrive_io_write_data_port_ptr)(int offset, UINT16 data);
+
INPUT_PORTS_START( megadri6 )
- PORT_START /* Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */
+ PORT_START_TAG("PAD1") /* Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */
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)
@@ -1454,7 +1455,7 @@ INPUT_PORTS_START( megadri6 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(1) PORT_NAME("P1 MODE") // mode
- PORT_START /* Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */
+ PORT_START_TAG("PAD2") /* Joypad 2 (6 button + start + mode) NOT READ DIRECTLY */
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)
@@ -1468,12 +1469,12 @@ INPUT_PORTS_START( megadri6 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME("P2 Z") // z
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(2) PORT_NAME("P2 MODE") // mode
- PORT_START /* 3rd I/O port */
+ PORT_START_TAG("IN0") /* 3rd I/O port */
- PORT_START_TAG("RESET") /* Buttons on Genesis Console */
+ PORT_START_TAG("RESET") /* Buttons on Genesis Console */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Reset Button") PORT_IMPULSE(1) // reset, resets 68k (and..?)
- PORT_START_TAG("REGION") /* Buttons on Genesis Console */
+ PORT_START_TAG("REGION") /* Buttons on Genesis Console */
/* Region setting for Console */
PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Region ) )
PORT_DIPSETTING( 0x0000, "Use HazeMD Default Choice" )
@@ -1486,7 +1487,7 @@ INPUT_PORTS_END
INPUT_PORTS_START( ssf2ghw )
- PORT_START /* Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */
+ PORT_START_TAG("PAD1") /* Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */
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)
@@ -1501,7 +1502,7 @@ INPUT_PORTS_START( ssf2ghw )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */
+ PORT_START_TAG("PAD2") /* Joypad 1 (6 button + start + mode) NOT READ DIRECTLY */
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)
@@ -1515,14 +1516,14 @@ INPUT_PORTS_START( ssf2ghw )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START /* 3rd I/O port */
+ PORT_START_TAG("IN0") /* 3rd I/O port */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
-// PORT_START_TAG("RESET") /* Buttons on Genesis Console */
+// PORT_START_TAG("RESET") /* Buttons on Genesis Console */
// PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Reset Button") PORT_IMPULSE(1) // reset, resets 68k (and..?)
-// PORT_START_TAG("REGION") /* Buttons on Genesis Console */
+// PORT_START_TAG("REGION") /* Buttons on Genesis Console */
// /* Region setting for Console */
// PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Region ) )
// PORT_DIPSETTING( 0x0000, "Use HazeMD Default Choice" )
@@ -1616,7 +1617,7 @@ INPUT_PORTS_END
*/
INPUT_PORTS_START( megadriv )
- PORT_START /* Joypad 1 (3 button + start) NOT READ DIRECTLY */
+ PORT_START_TAG("PAD1") /* Joypad 1 (3 button + start) NOT READ DIRECTLY */
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)
@@ -1626,7 +1627,7 @@ INPUT_PORTS_START( megadriv )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 C") // c
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("P1 START") // start
- PORT_START /* Joypad 2 (3 button + start) NOT READ DIRECTLY */
+ PORT_START_TAG("PAD2") /* Joypad 2 (3 button + start) NOT READ DIRECTLY */
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)
@@ -1636,12 +1637,12 @@ INPUT_PORTS_START( megadriv )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 C") // c
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("P2 START") // start
- PORT_START /* 3rd I/O port */
+ PORT_START_TAG("IN0") /* 3rd I/O port */
- PORT_START_TAG("RESET") /* Buttons on Genesis Console */
+ PORT_START_TAG("RESET") /* Buttons on Genesis Console */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Reset Button") PORT_IMPULSE(1) // reset, resets 68k (and..?)
- PORT_START_TAG("REGION") /* Region setting for Console */
+ PORT_START_TAG("REGION") /* Region setting for Console */
/* Region setting for Console */
PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Region ) )
PORT_DIPSETTING( 0x0000, "Use HazeMD Default Choice" )
@@ -1652,7 +1653,7 @@ INPUT_PORTS_END
INPUT_PORTS_START( aladbl )
- PORT_START /* Joypad 1 (3 button + start) NOT READ DIRECTLY */
+ PORT_START_TAG("PAD1") /* Joypad 1 (3 button + start) NOT READ DIRECTLY */
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)
@@ -1662,7 +1663,7 @@ INPUT_PORTS_START( aladbl )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Jump") // c
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) // start
- PORT_START /* Joypad 2 (3 button + start) NOT READ DIRECTLY - not used */
+ PORT_START_TAG("PAD2") /* Joypad 2 (3 button + start) NOT READ DIRECTLY - not used */
// 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)
@@ -1672,12 +1673,12 @@ INPUT_PORTS_START( aladbl )
// PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Jump") // c
// PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) // start
- PORT_START /* 3rd I/O port */
+ PORT_START_TAG("IN0") /* 3rd I/O port */
-// PORT_START_TAG("RESET") /* Buttons on Genesis Console */
+// PORT_START_TAG("RESET") /* Buttons on Genesis Console */
// PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Reset Button") PORT_IMPULSE(1) // reset, resets 68k (and..?)
-// PORT_START_TAG("REGION") /* Region setting for Console */
+// PORT_START_TAG("REGION") /* Region setting for Console */
// /* Region setting for Console */
// PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Region ) )
// PORT_DIPSETTING( 0x0000, "Use HazeMD Default Choice" )
@@ -1707,22 +1708,20 @@ INPUT_PORTS_START( aladbl )
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) /* needed to avoid credits getting mad */
INPUT_PORTS_END
-
-#define MODE_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x800) >> 11 )
-#define Z_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x400) >> 10 )
-#define Y_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x200) >> 9 )
-#define X_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x100) >> 8 )
-
+#define MODE_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x800) >> 11 )
+#define Z_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x400) >> 10 )
+#define Y_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x200) >> 9 )
+#define X_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x100) >> 8 )
#define START_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x80) >> 7 )
-#define C_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x40) >> 6 )
-#define B_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x20) >> 5 )
-#define A_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x10) >> 4 )
+#define C_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x40) >> 6 )
+#define B_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x20) >> 5 )
+#define A_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x10) >> 4 )
#define RIGHT_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x08) >> 3 )
-#define LEFT_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x04) >> 2 )
-#define DOWN_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x02) >> 1 )
-#define UP_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x01) >> 0 )
-#define MD_RESET_BUTTON ( (input_port_read_safe(Machine, "RESET",0x00) & 0x01) >> 0 )
+#define LEFT_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x04) >> 2 )
+#define DOWN_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x02) >> 1 )
+#define UP_BUTTON(player) ( (input_port_read_indexed(Machine, player) & 0x01) >> 0 )
+#define MD_RESET_BUTTON ( (input_port_read_safe(Machine, "RESET", 0x00) & 0x01) >> 0 )
static UINT8 megadrive_io_data_regs[3];
static UINT8 megadrive_io_ctrl_regs[3];
@@ -4755,7 +4754,7 @@ MACHINE_RESET( megadriv )
/* default state of z80 = reset, with bus */
mame_printf_debug("Resetting Megadrive / Genesis\n");
- switch (input_port_read_safe(machine, "REGION",0x00))
+ switch (input_port_read_safe(machine, "REGION", 0x00))
{
case 1: // US
diff --git a/src/mame/drivers/megaplay.c b/src/mame/drivers/megaplay.c
index 5623ee37974..c8027bc4f66 100644
--- a/src/mame/drivers/megaplay.c
+++ b/src/mame/drivers/megaplay.c
@@ -117,89 +117,114 @@ static INTERRUPT_GEN (megaplay_bios_irq)
static UINT32 readpos = 1; // serial bank selection position (9-bit)
-#define MEGAPLAY_TEST \
- PORT_START \
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Select") PORT_CODE(KEYCODE_0) \
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 1") PORT_CODE(KEYCODE_W) \
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 2") PORT_CODE(KEYCODE_E) \
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 3") PORT_CODE(KEYCODE_R) \
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 4") PORT_CODE(KEYCODE_T) \
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 5") PORT_CODE(KEYCODE_Y) \
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 6") PORT_CODE(KEYCODE_U) \
+static INPUT_PORTS_START ( megaplay )
+ PORT_START_TAG("P1_1") /* Player 1 Controls - part 1 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("P1_2") /* Player 1 Controls - part 2 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("P2_1") /* Player 2 Controls - part 1 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("P2_2") /* Player 2 Controls - part 2 */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("TEST")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Select") PORT_CODE(KEYCODE_0)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 1") PORT_CODE(KEYCODE_W)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 2") PORT_CODE(KEYCODE_E)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 3") PORT_CODE(KEYCODE_R)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 4") PORT_CODE(KEYCODE_T)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 5") PORT_CODE(KEYCODE_Y)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_NAME("0x6400 bit 6") PORT_CODE(KEYCODE_U)
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
-#define MEGAPLAY_COIN \
- PORT_START \
- PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) \
- PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) \
- PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \
- PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \
- PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) \
- PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) \
- PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) \
+ PORT_START_TAG("COIN")
+ PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* Caused 01081:
- * PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_START1 ) \
+ * PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_START1 )
* PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_START2 )
*/
-#define MEGAPLAY_DSWA \
- PORT_START \
- PORT_DIPNAME( 0x0f, 0x0f, "Coin slot 1" ) PORT_DIPLOCATION("SW1:1,2,3,4") \
- PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) \
- PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) \
- PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) \
- PORT_DIPSETTING( 0x05, "2 coins/1 credit - 5 coins/3 credits - 6 coins/4 credits" ) \
- PORT_DIPSETTING( 0x04, "2 coins/1 credit - 4 coins/3 credits" ) \
- PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) \
- PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) \
- PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) \
- 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( 0x03, "1 coin/1 credit - 5 coins/6 credits" ) \
- PORT_DIPSETTING( 0x02, "1 coin/1 credit - 4 coins/5 credits" ) \
- PORT_DIPSETTING( 0x01, "1 coin/1 credit - 2 coins/3 credits" ) \
+ PORT_START_TAG("DSW0")
+ PORT_DIPNAME( 0x0f, 0x0f, "Coin slot 1" ) PORT_DIPLOCATION("SW1:1,2,3,4")
+ PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x05, "2 coins/1 credit - 5 coins/3 credits - 6 coins/4 credits" )
+ PORT_DIPSETTING( 0x04, "2 coins/1 credit - 4 coins/3 credits" )
+ PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) )
+ 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( 0x03, "1 coin/1 credit - 5 coins/6 credits" )
+ PORT_DIPSETTING( 0x02, "1 coin/1 credit - 4 coins/5 credits" )
+ PORT_DIPSETTING( 0x01, "1 coin/1 credit - 2 coins/3 credits" )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
-#define MEGAPLAY_DSWB \
PORT_DIPNAME( 0xf0, 0xf0, "Coin slot 2" ) PORT_DIPLOCATION("SW2:1,2,3,4")\
- PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) \
- PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) \
- PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) \
- PORT_DIPSETTING( 0x50, "2 coins/1 credit - 5 coins/3 credits - 6 coins/4 credits" ) \
- PORT_DIPSETTING( 0x40, "2 coins/1 credit - 4 coins/3 credits" ) \
- PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \
- PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) \
- PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) \
- 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( 0x30, "1 coin/1 credit - 5 coins/6 credits" ) \
- PORT_DIPSETTING( 0x20, "1 coin/1 credit - 4 coins/5 credits" ) \
- PORT_DIPSETTING( 0x10, "1 coin/1 credit - 2 coins/3 credits" ) \
+ PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x50, "2 coins/1 credit - 5 coins/3 credits - 6 coins/4 credits" )
+ PORT_DIPSETTING( 0x40, "2 coins/1 credit - 4 coins/3 credits" )
+ PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) )
+ 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( 0x30, "1 coin/1 credit - 5 coins/6 credits" )
+ PORT_DIPSETTING( 0x20, "1 coin/1 credit - 4 coins/5 credits" )
+ PORT_DIPSETTING( 0x10, "1 coin/1 credit - 2 coins/3 credits" )
PORT_DIPSETTING( 0x00, " 1 coin/1 credit" )
-
-static INPUT_PORTS_START ( megaplay )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
INPUT_PORTS_END
static INPUT_PORTS_START ( mp_sonic )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x03, 0x01, "Initial Players" ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPSETTING( 0x01, "3" )
@@ -218,14 +243,9 @@ static INPUT_PORTS_START ( mp_sonic )
INPUT_PORTS_END
static INPUT_PORTS_START ( mp_gaxe2 )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:1")
PORT_DIPSETTING( 0x01, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
@@ -247,14 +267,9 @@ INPUT_PORTS_END
#ifdef UNUSED_DEFINITION
static INPUT_PORTS_START ( mp_col3 )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Language ) ) PORT_DIPLOCATION("SW3:1")
PORT_DIPSETTING( 0x01, DEF_STR( English ) )
PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) )
@@ -275,14 +290,9 @@ INPUT_PORTS_END
#endif
static INPUT_PORTS_START ( mp_twc )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x01, 0x01, "Time" ) PORT_DIPLOCATION("SW3:1")
PORT_DIPSETTING( 0x01, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x00, "Short" )
@@ -298,14 +308,9 @@ static INPUT_PORTS_START ( mp_twc )
INPUT_PORTS_END
static INPUT_PORTS_START ( mp_sor2 )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPSETTING( 0x01, "3" )
@@ -319,14 +324,9 @@ static INPUT_PORTS_START ( mp_sor2 )
INPUT_PORTS_END
static INPUT_PORTS_START ( mp_bio )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPSETTING( 0x01, "4" )
@@ -340,14 +340,9 @@ static INPUT_PORTS_START ( mp_bio )
INPUT_PORTS_END
static INPUT_PORTS_START ( mp_gslam )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x07, 0x04, DEF_STR ( Game_Time ) ) PORT_DIPLOCATION("SW3:1,2,3")
PORT_DIPSETTING( 0x00, "5:00" )
PORT_DIPSETTING( 0x01, "4:30" )
@@ -363,14 +358,9 @@ static INPUT_PORTS_START ( mp_gslam )
INPUT_PORTS_END
static INPUT_PORTS_START ( mp_mazin )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x01, 0x01, "Initial Player" ) PORT_DIPLOCATION("SW3:1")
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x00, "1" )
@@ -386,14 +376,9 @@ static INPUT_PORTS_START ( mp_mazin )
INPUT_PORTS_END
static INPUT_PORTS_START ( mp_soni2 )
- GENESIS_PORTS
- MEGAPLAY_TEST
- MEGAPLAY_COIN
- MEGAPLAY_DSWA
- MEGAPLAY_DSWB
-
- PORT_START
- // DSW C (per game settings)
+ PORT_INCLUDE( megaplay )
+
+ PORT_START_TAG("DSW1") /* DSW C (per game settings) */
PORT_DIPNAME( 0x03, 0x01, "Initial Players (Normal mode)" ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPSETTING( 0x01, "3" )
@@ -439,13 +424,118 @@ static WRITE8_HANDLER( megaplay_bios_gamesel_w )
}
+/* Old code, todo, update the new code instead */
+
+static READ16_HANDLER ( OLD_megaplay_genesis_io_r )
+{
+ /* 8-bit only, data is mirrored in both halves */
+
+ UINT8 return_value = 0;
+
+ switch (offset)
+ {
+ case 0:
+ /* Charles MacDonald ( http://cgfm2.emuviews.com/ )
+ D7 : Console is 1= Export (USA, Europe, etc.) 0= Domestic (Japan)
+ D6 : Video type is 1= PAL, 0= NTSC
+ D5 : Sega CD unit is 1= not present, 0= connected.
+ D4 : Unused (always returns zero)
+ D3 : Bit 3 of version number
+ D2 : Bit 2 of version number
+ D1 : Bit 1 of version number
+ D0 : Bit 0 of version number
+ */
+ return_value = 0x80; /* ? megatech is usa? */
+ break;
+
+ case 1: /* port A data (joypad 1) */
+
+ if (genesis_io_ram[offset] & 0x40)
+ return_value = input_port_read(machine, "P1_1") & (genesis_io_ram[4]^0xff);
+ else
+ {
+ return_value = input_port_read(machine, "P1_2") & (genesis_io_ram[4]^0xff);
+ return_value |= input_port_read(machine, "P1_1") & 0x03;
+ }
+ return_value = (genesis_io_ram[offset] & 0x80) | return_value;
+// logerror ("reading joypad 1 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f);
+ break;
+
+ case 2: /* port B data (joypad 2) */
+
+ if (genesis_io_ram[offset] & 0x40)
+ return_value = input_port_read(machine, "P2_1") & (genesis_io_ram[5]^0xff);
+ else
+ {
+ return_value = input_port_read(machine, "P2_2") & (genesis_io_ram[5]^0xff);
+ return_value |= input_port_read(machine, "P2_1") & 0x03;
+ }
+ return_value = (genesis_io_ram[offset] & 0x80) | return_value;
+// logerror ("reading joypad 2 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f);
+ break;
+
+// case 3: /* port C data */
+// return_value = bios_6402 << 3;
+// break;
+
+ default:
+ return_value = genesis_io_ram[offset];
+
+ }
+ return return_value | return_value << 8;
+}
+
+static WRITE16_HANDLER ( OLD_megaplay_genesis_io_w )
+{
+// logerror ("write io offset :%02x data %04x PC: 0x%06x\n",offset,data,activecpu_get_previouspc());
+
+ switch (offset)
+ {
+ case 0x00:
+ /*??*/
+ break;
+
+ case 0x01:/* port A data */
+ genesis_io_ram[offset] = (data & (genesis_io_ram[0x04])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x04]));
+ break;
+
+ case 0x02: /* port B data */
+ genesis_io_ram[offset] = (data & (genesis_io_ram[0x05])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x05]));
+ break;
+
+ case 0x03: /* port C data */
+ genesis_io_ram[offset] = (data & (genesis_io_ram[0x06])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x06]));
+ bios_6204 = data & 0x07;
+ break;
+
+ case 0x04: /* port A control */
+ genesis_io_ram[offset] = data;
+ break;
+
+ case 0x05: /* port B control */
+ genesis_io_ram[offset] = data;
+ break;
+
+ case 0x06: /* port C control */
+ genesis_io_ram[offset] = data;
+ break;
+
+ case 0x07: /* port A TxData */
+ genesis_io_ram[offset] = data;
+ break;
+
+ default:
+ genesis_io_ram[offset] = data;
+ }
+}
+
static READ8_HANDLER( bank_r )
{
UINT8* bank = memory_region(REGION_CPU3);
UINT8* game = memory_region(REGION_CPU1);
if(game_banksel == 0x142) // Genesis I/O
- return megaplay_genesis_io_r(machine, (offset & 0x1f) / 2, 0xffff);
+ return OLD_megaplay_genesis_io_r(machine, (offset & 0x1f) / 2, 0xffff);
if(bios_mode & MP_ROM)
{
@@ -478,7 +568,7 @@ static READ8_HANDLER( bank_r )
static WRITE8_HANDLER ( bank_w )
{
if(game_banksel == 0x142) // Genesis I/O
- genesis_io_w(machine, (offset & 0x1f) / 2, data, 0xffff);
+ OLD_megaplay_genesis_io_w(machine, (offset & 0x1f) / 2, data, 0xffff);
if(offset <= 0x1fff && (bios_width & 0x08))
ic37_ram[(0x2000 * (bios_bank & 0x03)) + offset] = data;
@@ -569,10 +659,10 @@ static ADDRESS_MAP_START( megaplay_bios_readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_READ(SMH_ROM)
AM_RANGE(0x4000, 0x4fff) AM_READ(SMH_RAM)
AM_RANGE(0x5000, 0x5fff) AM_READ(SMH_RAM)
- AM_RANGE(0x6200, 0x6200) AM_READ(input_port_7_r)
- AM_RANGE(0x6201, 0x6201) AM_READ(input_port_8_r)
- AM_RANGE(0x6400, 0x6400) AM_READ(input_port_5_r)
- AM_RANGE(0x6401, 0x6401) AM_READ(input_port_6_r)
+ AM_RANGE(0x6200, 0x6200) AM_READ_PORT("DSW0")
+ AM_RANGE(0x6201, 0x6201) AM_READ_PORT("DSW1")
+ AM_RANGE(0x6400, 0x6400) AM_READ_PORT("TEST")
+ AM_RANGE(0x6401, 0x6401) AM_READ_PORT("COIN")
AM_RANGE(0x6204, 0x6204) AM_READ(megaplay_bios_6204_r)
AM_RANGE(0x6203, 0x6203) AM_READ(megaplay_bios_banksel_r)
AM_RANGE(0x6402, 0x6402) AM_READ(megaplay_bios_6402_r)
@@ -853,111 +943,6 @@ static void megplay_stat(void)
}
}
-/* Old code, todo, update the new code instead */
-static READ16_HANDLER ( OLD_megaplay_genesis_io_r )
-{
- /* 8-bit only, data is mirrored in both halves */
-
- UINT8 return_value = 0;
-
- switch (offset)
- {
- case 0:
- /* Charles MacDonald ( http://cgfm2.emuviews.com/ )
- D7 : Console is 1= Export (USA, Europe, etc.) 0= Domestic (Japan)
- D6 : Video type is 1= PAL, 0= NTSC
- D5 : Sega CD unit is 1= not present, 0= connected.
- D4 : Unused (always returns zero)
- D3 : Bit 3 of version number
- D2 : Bit 2 of version number
- D1 : Bit 1 of version number
- D0 : Bit 0 of version number
- */
- return_value = 0x80; /* ? megatech is usa? */
- break;
-
- case 1: /* port A data (joypad 1) */
-
- if (genesis_io_ram[offset] & 0x40)
- return_value = input_port_read_indexed(machine, 1) & (genesis_io_ram[4]^0xff);
- else
- {
- return_value = input_port_read_indexed(machine, 2) & (genesis_io_ram[4]^0xff);
- return_value |= input_port_read_indexed(machine, 1) & 0x03;
- }
- return_value = (genesis_io_ram[offset] & 0x80) | return_value;
-// logerror ("reading joypad 1 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f);
- break;
-
- case 2: /* port B data (joypad 2) */
-
- if (genesis_io_ram[offset] & 0x40)
- return_value = input_port_read_indexed(machine, 3) & (genesis_io_ram[5]^0xff);
- else
- {
- return_value = input_port_read_indexed(machine, 4) & (genesis_io_ram[5]^0xff);
- return_value |= input_port_read_indexed(machine, 3) & 0x03;
- }
- return_value = (genesis_io_ram[offset] & 0x80) | return_value;
-// logerror ("reading joypad 2 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f);
- break;
-
-// case 3: /* port C data */
-// return_value = bios_6402 << 3;
-// break;
-
- default:
- return_value = genesis_io_ram[offset];
-
- }
- return return_value | return_value << 8;
-}
-
-static WRITE16_HANDLER ( OLD_megaplay_genesis_io_w )
-{
-// logerror ("write io offset :%02x data %04x PC: 0x%06x\n",offset,data,activecpu_get_previouspc());
-
- switch (offset)
- {
- case 0x00:
- /*??*/
- break;
-
- case 0x01:/* port A data */
- genesis_io_ram[offset] = (data & (genesis_io_ram[0x04])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x04]));
- break;
-
- case 0x02: /* port B data */
- genesis_io_ram[offset] = (data & (genesis_io_ram[0x05])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x05]));
- break;
-
- case 0x03: /* port C data */
- genesis_io_ram[offset] = (data & (genesis_io_ram[0x06])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x06]));
- bios_6204 = data & 0x07;
- break;
-
- case 0x04: /* port A control */
- genesis_io_ram[offset] = data;
- break;
-
- case 0x05: /* port B control */
- genesis_io_ram[offset] = data;
- break;
-
- case 0x06: /* port C control */
- genesis_io_ram[offset] = data;
- break;
-
- case 0x07: /* port A TxData */
- genesis_io_ram[offset] = data;
- break;
-
- default:
- genesis_io_ram[offset] = data;
- }
-}
-
-
static READ16_HANDLER( megadriv_68k_read_z80_extra_ram )
{
return ic36_ram[(offset<<1)^1] | (ic36_ram[(offset<<1)]<<8);
diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c
index 9999b3ae767..0cb295728f5 100644
--- a/src/mame/drivers/megatech.c
+++ b/src/mame/drivers/megatech.c
@@ -477,11 +477,6 @@ static WRITE8_HANDLER( bios_ctrl_w )
}
-static READ8_HANDLER( megaplay_r0) { return input_port_read(machine, "BIOS_IN0") ; }
-static READ8_HANDLER( megaplay_r1) { return input_port_read(machine, "BIOS_IN1") ; }
-static READ8_HANDLER( megaplay_r2) { return input_port_read(machine, "BIOS_DSW0") ; }
-static READ8_HANDLER( megaplay_r3) { return input_port_read(machine, "BIOS_DSW1") ; }
-
static int mt_bank_bank_pos = 0;
static int mt_bank_partial = 0;
static int mt_bank_addr = 0;
@@ -524,11 +519,11 @@ static ADDRESS_MAP_START( megatech_bios_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x3000, 0x3fff) AM_READWRITE(megatech_banked_ram_r, megatech_banked_ram_w) // copies instruction data here at startup, must be banked
AM_RANGE(0x4000, 0x5fff) AM_RAM // plain ram?
AM_RANGE(0x6000, 0x6000) AM_WRITE( mt_z80_bank_w )
- AM_RANGE(0x6400, 0x6400) AM_READ(megaplay_r2)
- AM_RANGE(0x6401, 0x6401) AM_READ(megaplay_r3)
+ AM_RANGE(0x6400, 0x6400) AM_READ_PORT("BIOS_DSW0")
+ AM_RANGE(0x6401, 0x6401) AM_READ_PORT("BIOS_DSW1")
AM_RANGE(0x6404, 0x6404) AM_READWRITE(megatech_cart_select_r, megatech_cart_select_w) // cart select & ram bank
- AM_RANGE(0x6800, 0x6800) AM_READ(megaplay_r0)
- AM_RANGE(0x6801, 0x6801) AM_READ(megaplay_r1)
+ AM_RANGE(0x6800, 0x6800) AM_READ_PORT("BIOS_IN0")
+ AM_RANGE(0x6801, 0x6801) AM_READ_PORT("BIOS_IN1")
AM_RANGE(0x6802, 0x6807) AM_READWRITE(bios_ctrl_r, bios_ctrl_w)
// AM_RANGE(0x6805, 0x6805) AM_READ(input_port_8_r)
AM_RANGE(0x7000, 0x77ff) AM_ROM // from bios rom (0x7000-0x77ff populated in ROM)
diff --git a/src/mame/drivers/nss.c b/src/mame/drivers/nss.c
index f8e0e13fd33..321b4e380b5 100644
--- a/src/mame/drivers/nss.c
+++ b/src/mame/drivers/nss.c
@@ -325,12 +325,12 @@ static ADDRESS_MAP_START( spc_mem, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
static INPUT_PORTS_START( snes )
- PORT_START /* IN 0 : Joypad 1 - L */
+ PORT_START_TAG("PAD1L") /* IN 0 : Joypad 1 - L */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Button A") PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Button X") PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Button L") PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Button R") PORT_PLAYER(1)
- PORT_START /* IN 1 : Joypad 1 - H */
+ PORT_START_TAG("PAD1H") /* IN 1 : Joypad 1 - H */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Button B") PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Button Y") PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("P1 Select")
@@ -340,12 +340,12 @@ static INPUT_PORTS_START( snes )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
- PORT_START /* IN 2 : Joypad 2 - L */
+ PORT_START_TAG("PAD2L") /* IN 2 : Joypad 2 - L */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Button A") PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Button X") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P2 Button L") PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P2 Button R") PORT_PLAYER(2)
- PORT_START /* IN 3 : Joypad 2 - H */
+ PORT_START_TAG("PAD2H") /* IN 3 : Joypad 2 - H */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Button B") PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Button Y") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("P2 Select")
@@ -355,12 +355,12 @@ static INPUT_PORTS_START( snes )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
- PORT_START /* IN 4 : Joypad 3 - L */
+ PORT_START_TAG("PAD3L") /* IN 4 : Joypad 3 - L */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3 Button A") PORT_PLAYER(3)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P3 Button X") PORT_PLAYER(3)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P3 Button L") PORT_PLAYER(3)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P3 Button R") PORT_PLAYER(3)
- PORT_START /* IN 5 : Joypad 3 - H */
+ PORT_START_TAG("PAD3H") /* IN 5 : Joypad 3 - H */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 Button B") PORT_PLAYER(3)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 Button Y") PORT_PLAYER(3)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE3 ) PORT_NAME("P3 Select")
@@ -370,12 +370,12 @@ static INPUT_PORTS_START( snes )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
- PORT_START /* IN 6 : Joypad 4 - L */
+ PORT_START_TAG("PAD4L") /* IN 6 : Joypad 4 - L */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4 Button A") PORT_PLAYER(4)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P4 Button X") PORT_PLAYER(4)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P4 Button L") PORT_PLAYER(4)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P4 Button R") PORT_PLAYER(4)
- PORT_START /* IN 7 : Joypad 4 - H */
+ PORT_START_TAG("PAD4H") /* IN 7 : Joypad 4 - H */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 Button B") PORT_PLAYER(4)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 Button Y") PORT_PLAYER(4)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_NAME("P4 Select")
@@ -385,7 +385,7 @@ static INPUT_PORTS_START( snes )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
- PORT_START /* IN 8 : dip-switches */
+ PORT_START_TAG("DSW") /* IN 8 : dip-switches */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x03, DEF_STR( Hard ) )
diff --git a/src/mame/drivers/puckpkmn.c b/src/mame/drivers/puckpkmn.c
index c348f9f2f1d..def9b2f6938 100644
--- a/src/mame/drivers/puckpkmn.c
+++ b/src/mame/drivers/puckpkmn.c
@@ -18,7 +18,7 @@ Puckman Pockimon - (c)2000 Genie? (there should be a way to show Sun Mixing copy
static UINT16* main_ram;
static INPUT_PORTS_START( puckpkmn ) /* Puckman Pockimon Input Ports */
- PORT_START /* Player 2 Controls ($700011.b) */
+ PORT_START_TAG("P2") /* Player 2 Controls ($700011.b) */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
@@ -28,7 +28,7 @@ static INPUT_PORTS_START( puckpkmn ) /* Puckman Pockimon Input Ports */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_START /* Player 1 Controls ($700013.b) */
+ PORT_START_TAG("P1") /* Player 1 Controls ($700013.b) */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
@@ -38,9 +38,9 @@ static INPUT_PORTS_START( puckpkmn ) /* Puckman Pockimon Input Ports */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_START /* ? ($700015.b) */
+ PORT_START_TAG("IN0") /* ? ($700015.b) */
- PORT_START /* DSW 1 ($700017.b) */
+ PORT_START_TAG("DSW1") /* DSW 1 ($700017.b) */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x03, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) )
@@ -65,7 +65,7 @@ static INPUT_PORTS_START( puckpkmn ) /* Puckman Pockimon Input Ports */
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
- PORT_START /* DSW 1 ($700019.b) */
+ PORT_START_TAG("DSW2") /* DSW 1 ($700019.b) */
PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c
index 1adeea1b582..8d5ca6c818a 100644
--- a/src/mame/drivers/segac2.c
+++ b/src/mame/drivers/segac2.c
@@ -355,6 +355,7 @@ static void recompute_palette_tables(void)
static READ16_HANDLER( io_chip_r )
{
+ static const char *portnames[] = { "P1", "P2", "PORTC", "PORTD", "SERVICE", "COINAGE", "DSW", "PORTH" };
offset &= 0x1f/2;
switch (offset)
@@ -374,8 +375,8 @@ static READ16_HANDLER( io_chip_r )
/* otherwise, return an input port */
if (offset == 0x04/2 && sound_banks)
- return (input_port_read_indexed(machine, offset) & 0xbf) | (upd7759_0_busy_r(machine,0) << 6);
- return input_port_read_indexed(machine, offset);
+ return (input_port_read(machine, portnames[offset]) & 0xbf) | (upd7759_0_busy_r(machine,0) << 6);
+ return input_port_read(machine, portnames[offset]);
/* 'SEGA' protection */
case 0x10/2:
diff --git a/src/mame/drivers/segas18.c b/src/mame/drivers/segas18.c
index 8558ad6b9c2..dfcb3764824 100644
--- a/src/mame/drivers/segas18.c
+++ b/src/mame/drivers/segas18.c
@@ -218,6 +218,7 @@ static MACHINE_RESET( system18 )
static READ16_HANDLER( io_chip_r )
{
+ static const char *portnames[] = { "P1", "P2", "PORTC", "PORTD", "SERVICE", "COINAGE", "DSW", "PORTH" };
offset &= 0x1f/2;
switch (offset)
@@ -236,7 +237,7 @@ static READ16_HANDLER( io_chip_r )
return misc_io_data[offset];
/* otherwise, return an input port */
- return input_port_read_indexed(machine, offset);
+ return input_port_read(machine, portnames[offset]);
/* 'SEGA' protection */
case 0x10/2:
@@ -320,7 +321,10 @@ static WRITE16_HANDLER( io_chip_w )
static READ16_HANDLER( misc_io_r )
{
+ static const char *portnames[] = { "SERVICE", "COINAGE" };
+
offset &= 0x1fff;
+
switch (offset & (0x3000/2))
{
/* I/O chip */
@@ -330,7 +334,7 @@ static READ16_HANDLER( misc_io_r )
/* video control latch */
case 0x2000/2:
- return input_port_read_indexed(machine, 4 + (offset & 1));
+ return input_port_read(machine, portnames[offset & 1]);
}
if (custom_io_r)
return custom_io_r(machine, offset, mem_mask);
diff --git a/src/mame/drivers/topshoot.c b/src/mame/drivers/topshoot.c
index 5338caf0963..c294cd663e0 100644
--- a/src/mame/drivers/topshoot.c
+++ b/src/mame/drivers/topshoot.c
@@ -138,7 +138,7 @@ connector, but of course, I can be wrong.
static INPUT_PORTS_START( topshoot ) /* Top Shooter Input Ports */
- PORT_START /* 16bit */
+ PORT_START_TAG("IN0") /* 16bit */
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
diff --git a/src/mame/includes/genesis.h b/src/mame/includes/genesis.h
index 5736bf86b63..5e8d3a42f47 100644
--- a/src/mame/includes/genesis.h
+++ b/src/mame/includes/genesis.h
@@ -21,7 +21,6 @@ extern UINT8 *genesis_z80_ram;
extern UINT16 *genesis_68k_ram;
extern MACHINE_START( genesis );
extern MACHINE_RESET( genesis );
-extern READ16_HANDLER ( megaplay_genesis_io_r );
extern WRITE16_HANDLER ( genesis_io_w );
extern UINT16 *genesis_io_ram;
extern READ16_HANDLER(genesis_ctrl_r);
@@ -31,7 +30,6 @@ extern READ8_HANDLER ( genesis_z80_bank_r );
extern WRITE8_HANDLER ( genesis_z80_w );
extern WRITE16_HANDLER(genesis_ctrl_w);
extern WRITE16_HANDLER ( genesis_68k_to_z80_w );
-extern READ16_HANDLER ( genesis_io_r );
extern READ16_HANDLER ( genesis_68k_to_z80_r );
extern INTERRUPT_GEN( genesis_vblank_interrupt );
extern void genesis_irq2_interrupt(running_machine *machine, int state);
@@ -56,49 +54,3 @@ void system18_vdp_update(bitmap_t *bitmap, const rectangle *cliprect);
READ16_HANDLER ( genesis_vdp_r );
WRITE16_HANDLER( genesis_vdp_w );
-
-/* Generic Input Ports */
-#define GENESIS_PORTS \
- PORT_START \
- \
- PORT_START /* Player 1 Controls - part 1 */ \
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) \
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) \
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) \
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) \
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) \
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) \
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) \
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) \
- \
- PORT_START /* Player 1 Controls - part 2 */ \
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) \
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) \
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) \
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) \
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) \
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) \
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) \
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) \
- \
- PORT_START /* Player 2 Controls - part 1 */ \
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) \
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) \
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) \
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) \
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) \
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) \
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) \
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) \
- \
- PORT_START /* Player 2 Controls - part 2 */ \
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) \
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) \
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) \
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) \
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) \
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) \
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) \
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) \
-
-
diff --git a/src/mame/machine/gaelco2.c b/src/mame/machine/gaelco2.c
index a38ae7c3513..7faae0a55a6 100644
--- a/src/mame/machine/gaelco2.c
+++ b/src/mame/machine/gaelco2.c
@@ -194,7 +194,7 @@ READ16_HANDLER( gaelco2_eeprom_r )
/* bit 6 is EEPROM data (DOUT) */
/* bit 7 is EEPROM ready */
/* bits 0-5, COINSW, STARTSW & Service */
- return (1 << 7) | (eeprom_read_bit() << 6) | (input_port_read_indexed(machine, 2) & 0x3f);
+ return (1 << 7) | (eeprom_read_bit() << 6) | (input_port_read(machine, "COIN") & 0x3f);
}
WRITE16_HANDLER( gaelco2_eeprom_cs_w )
diff --git a/src/mame/machine/galaxold.c b/src/mame/machine/galaxold.c
index 75783f939e0..4a1f718c6d0 100644
--- a/src/mame/machine/galaxold.c
+++ b/src/mame/machine/galaxold.c
@@ -15,12 +15,7 @@
static int irq_line;
static emu_timer *int_timer;
-static UINT8 kingball_speech_dip;
-static UINT8 kingball_sound;
-
static UINT8 _4in1_bank;
-static UINT8 gmgalax_selected_game;
-
static void galaxold_7474_9M_2_callback(void)
{
@@ -220,42 +215,6 @@ DRIVER_INIT( dingoe )
}
-
-/* Hack? If $b003 is high, we'll check our "fake" speech dipswitch (marked as SLAM) */
-static READ8_HANDLER( kingball_IN0_r )
-{
- if (kingball_speech_dip)
- return (input_port_read_indexed(machine, 0) & ~0x40) | ((input_port_read_indexed(machine, 3) & 0x01) << 6);
- else
- return input_port_read_indexed(machine, 0);
-}
-
-static READ8_HANDLER( kingball_IN1_r )
-{
- /* bit 5 is the NOISE line from the sound circuit. The code just verifies
- that it's working, doesn't actually use return value, so we can just use
- rand() */
-
- return (input_port_read_indexed(machine, 1) & ~0x20) | (mame_rand(machine) & 0x20);
-}
-
-WRITE8_HANDLER( kingball_speech_dip_w )
-{
- kingball_speech_dip = data;
-}
-
-WRITE8_HANDLER( kingball_sound1_w )
-{
- kingball_sound = (kingball_sound & ~0x01) | data;
-}
-
-WRITE8_HANDLER( kingball_sound2_w )
-{
- kingball_sound = (kingball_sound & ~0x02) | (data << 1);
- soundlatch_w (machine, 0, kingball_sound | 0xf0);
-}
-
-
READ8_HANDLER( scramblb_protection_1_r )
{
switch (activecpu_get_pc())
@@ -280,17 +239,6 @@ READ8_HANDLER( scramblb_protection_2_r )
}
-static READ8_HANDLER( azurian_IN1_r )
-{
- return (input_port_read_indexed(machine, 1) & ~0x40) | ((input_port_read_indexed(machine, 3) & 0x01) << 6);
-}
-
-static READ8_HANDLER( azurian_IN2_r )
-{
- return (input_port_read_indexed(machine, 2) & ~0x04) | ((input_port_read_indexed(machine, 3) & 0x02) << 1);
-}
-
-
WRITE8_HANDLER( _4in1_bank_w )
{
_4in1_bank = data & 0x03;
@@ -300,37 +248,16 @@ WRITE8_HANDLER( _4in1_bank_w )
READ8_HANDLER( _4in1_input_port_1_r )
{
- return (input_port_read_indexed(machine, 1) & ~0xc0) | (input_port_read_indexed(machine, 3+_4in1_bank) & 0xc0);
+ static const char *portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" };
+
+ return (input_port_read(machine, "IN1") & ~0xc0) | (input_port_read(machine, portnames[_4in1_bank]) & 0xc0);
}
READ8_HANDLER( _4in1_input_port_2_r )
{
- return (input_port_read_indexed(machine, 2) & 0x04) | (input_port_read_indexed(machine, 3+_4in1_bank) & ~0xc4);
-}
-
-
-static void gmgalax_select_game(running_machine *machine, int game)
-{
- gmgalax_selected_game = game;
-
- memory_set_bank(1, game);
-
- galaxold_gfxbank_w(machine, 0, gmgalax_selected_game);
-}
-
-READ8_HANDLER( gmgalax_input_port_0_r )
-{
- return input_port_read_indexed(machine, gmgalax_selected_game ? 3 : 0);
-}
-
-READ8_HANDLER( gmgalax_input_port_1_r )
-{
- return input_port_read_indexed(machine, gmgalax_selected_game ? 4 : 1);
-}
-
-READ8_HANDLER( gmgalax_input_port_2_r )
-{
- return input_port_read_indexed(machine, gmgalax_selected_game ? 5 : 2);
+ static const char *portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" };
+
+ return (input_port_read(machine, "DSW0") & 0x04) | (input_port_read(machine, portnames[_4in1_bank]) & ~0xc4);
}
@@ -352,15 +279,6 @@ DRIVER_INIT( dingo )
memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x3035, 0x3035, 0, 0, dingo_3035_r);
}
-DRIVER_INIT( kingball )
-{
- memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xa000, 0xa000, 0, 0, kingball_IN0_r);
- memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xa800, 0xa800, 0, 0, kingball_IN1_r);
-
- state_save_register_global(kingball_speech_dip);
- state_save_register_global(kingball_sound);
-}
-
static UINT8 decode_mooncrst(UINT8 data,offs_t addr)
{
@@ -473,14 +391,6 @@ Pin layout is such that links can replace the PAL if encryption is not used.
}
}
-DRIVER_INIT( azurian )
-{
- DRIVER_INIT_CALL(pisces);
-
- memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6800, 0x6800, 0, 0, azurian_IN1_r);
- memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x7000, 0x7000, 0, 0, azurian_IN2_r);
-}
-
DRIVER_INIT( 4in1 )
{
offs_t i, len = memory_region_length(REGION_CPU1);
@@ -508,30 +418,3 @@ DRIVER_INIT( ladybugg )
/* Doesn't actually use the bank, but it mustn't have a coin lock! */
memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6002, 0x6002, 0, 0, galaxold_gfxbank_w);
}
-
-DRIVER_INIT( gmgalax )
-{
- /* games are banked at 0x0000 - 0x3fff */
- UINT8 *RAM=memory_region(REGION_CPU1);
- memory_configure_bank(1, 0, 2, &RAM[0x10000], 0x4000);
-
- state_save_register_global(gmgalax_selected_game);
-
- gmgalax_select_game(machine, input_port_read_indexed(machine, 6) & 0x01);
-}
-
-INTERRUPT_GEN( gmgalax_vh_interrupt )
-{
- // reset the cpu if the selected game changed
- int new_game = input_port_read_indexed(machine, 6) & 0x01;
-
- if (gmgalax_selected_game != new_game)
- {
- gmgalax_select_game(machine, new_game);
-
- /* Ghost Muncher never clears this */
- galaxold_stars_enable_w(machine, 0, 0);
-
- cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, ASSERT_LINE);
- }
-}
diff --git a/src/mame/machine/gaplus.c b/src/mame/machine/gaplus.c
index 8487b5d4366..94de4e58300 100644
--- a/src/mame/machine/gaplus.c
+++ b/src/mame/machine/gaplus.c
@@ -38,7 +38,7 @@ READ8_HANDLER( gaplus_customio_3_r )
switch (offset)
{
case 0:
- return input_port_read_indexed(machine, 4 ); /* cabinet & test mode */
+ return input_port_read(machine, "IN2"); /* cabinet & test mode */
break;
case 2:
return 0x0f;
@@ -52,7 +52,7 @@ READ8_HANDLER( gaplus_customio_3_r )
switch (offset)
{
case 0:
- return input_port_read_indexed(machine, 4 ); /* cabinet & test mode */
+ return input_port_read(machine, "IN2"); /* cabinet & test mode */
break;
case 1:
return 0x0f;
diff --git a/src/mame/machine/kaneko16.c b/src/mame/machine/kaneko16.c
index 6270555f65c..4c58fefeb5e 100644
--- a/src/mame/machine/kaneko16.c
+++ b/src/mame/machine/kaneko16.c
@@ -342,7 +342,7 @@ static void calc3_mcu_run(running_machine *machine)
// execute the command:
- kaneko16_mcu_ram[param1 / 2] = ~input_port_read_indexed(machine, 4); // DSW
+ kaneko16_mcu_ram[param1 / 2] = ~input_port_read(machine, "DSW1"); // DSW
kaneko16_mcu_ram[param2 / 2] = 0xffff; // ? -1 / anything else
calc3_mcu_command_offset = param3 / 2; // where next command will be written?
@@ -616,7 +616,7 @@ void bloodwar_mcu_run(running_machine *machine)
case 0x03: // DSW
{
- kaneko16_mcu_ram[mcu_offset] = input_port_read_indexed(machine, 4);
+ kaneko16_mcu_ram[mcu_offset] = input_port_read(machine, "DSW1");
logerror("PC=%06X : MCU executed command: %04X %04X (read DSW)\n", activecpu_get_pc(), mcu_command, mcu_offset*2);
}
break;
@@ -743,7 +743,7 @@ void bonkadv_mcu_run(running_machine *machine)
case 0x03: // DSW
{
- kaneko16_mcu_ram[mcu_offset] = input_port_read_indexed(machine, 4);
+ kaneko16_mcu_ram[mcu_offset] = input_port_read(machine, "DSW1");
logerror("PC=%06X : MCU executed command: %04X %04X (read DSW)\n", activecpu_get_pc(), mcu_command, mcu_offset*2);
}
break;
@@ -851,7 +851,7 @@ void gtmr_mcu_run(running_machine *machine)
case 0x03: // DSW
{
- kaneko16_mcu_ram[mcu_offset] = input_port_read_indexed(machine, 4);
+ kaneko16_mcu_ram[mcu_offset] = input_port_read(machine, "DSW1");
}
break;
diff --git a/src/mame/machine/leland.c b/src/mame/machine/leland.c
index 53a8e9d046e..9d1632c3c57 100644
--- a/src/mame/machine/leland.c
+++ b/src/mame/machine/leland.c
@@ -128,16 +128,16 @@ static int dial_compute_value(int new_val, int indx)
READ8_HANDLER( cerberus_dial_1_r )
{
- int original = input_port_read_indexed(machine, 0);
- int modified = dial_compute_value(input_port_read_indexed(machine, 4), 0);
+ int original = input_port_read(machine, "IN0");
+ int modified = dial_compute_value(input_port_read(machine, "AN0"), 0);
return (original & 0xc0) | ((modified & 0x80) >> 2) | (modified & 0x1f);
}
READ8_HANDLER( cerberus_dial_2_r )
{
- int original = input_port_read_indexed(machine, 2);
- int modified = dial_compute_value(input_port_read_indexed(machine, 5), 1);
+ int original = input_port_read(machine, "IN0");
+ int modified = dial_compute_value(input_port_read(machine, "AN1"), 1);
return (original & 0xc0) | ((modified & 0x80) >> 2) | (modified & 0x1f);
}
@@ -181,8 +181,8 @@ WRITE8_HANDLER( alleymas_joystick_kludge )
static void update_dangerz_xy(running_machine *machine)
{
- UINT8 newy = input_port_read_indexed(machine, 4);
- UINT8 newx = input_port_read_indexed(machine, 5);
+ UINT8 newy = input_port_read(machine, "AN0");
+ UINT8 newx = input_port_read(machine, "AN1");
int deltay = newy - dial_last_input[0];
int deltax = newx - dial_last_input[1];
@@ -235,27 +235,27 @@ static const UINT8 redline_pedal_value[8] = { 0xf0, 0xe0, 0xc0, 0xd0, 0x90, 0xb0
READ8_HANDLER( redline_pedal_1_r )
{
- int pedal = input_port_read_indexed(machine, 0);
+ int pedal = input_port_read(machine, "IN0");
return redline_pedal_value[pedal >> 5] | 0x0f;
}
READ8_HANDLER( redline_pedal_2_r )
{
- int pedal = input_port_read_indexed(machine, 2);
+ int pedal = input_port_read(machine, "IN2");
return redline_pedal_value[pedal >> 5] | 0x0f;
}
READ8_HANDLER( redline_wheel_1_r )
{
- return dial_compute_value(input_port_read_indexed(machine, 4), 0);
+ return dial_compute_value(input_port_read(machine, "AN0"), 0);
}
READ8_HANDLER( redline_wheel_2_r )
{
- return dial_compute_value(input_port_read_indexed(machine, 5), 1);
+ return dial_compute_value(input_port_read(machine, "AN1"), 1);
}
@@ -268,19 +268,19 @@ READ8_HANDLER( redline_wheel_2_r )
READ8_HANDLER( offroad_wheel_1_r )
{
- return dial_compute_value(input_port_read_indexed(machine, 7), 0);
+ return dial_compute_value(input_port_read(machine, "AN3"), 0);
}
READ8_HANDLER( offroad_wheel_2_r )
{
- return dial_compute_value(input_port_read_indexed(machine, 8), 1);
+ return dial_compute_value(input_port_read(machine, "AN4"), 1);
}
READ8_HANDLER( offroad_wheel_3_r )
{
- return dial_compute_value(input_port_read_indexed(machine, 9), 2);
+ return dial_compute_value(input_port_read(machine, "AN5"), 2);
}
@@ -293,7 +293,9 @@ READ8_HANDLER( offroad_wheel_3_r )
READ8_HANDLER( ataxx_trackball_r )
{
- return dial_compute_value(input_port_read_indexed(machine, 3 + offset), offset);
+ static const char *tracknames[] = { "AN0", "AN1", "AN2", "AN3" };
+
+ return dial_compute_value(input_port_read(machine, tracknames[offset]), offset);
}
@@ -306,7 +308,9 @@ READ8_HANDLER( ataxx_trackball_r )
READ8_HANDLER( indyheat_wheel_r )
{
- return dial_compute_value(input_port_read_indexed(machine, 3 + offset), offset);
+ static const char *tracknames[] = { "AN0", "AN1", "AN2" };
+
+ return dial_compute_value(input_port_read(machine, tracknames[offset]), offset);
}
@@ -333,10 +337,12 @@ READ8_HANDLER( indyheat_analog_r )
WRITE8_HANDLER( indyheat_analog_w )
{
+ static const char *tracknames[] = { "AN3", "AN4", "AN5" };
+
switch (offset)
{
case 3:
- analog_result = input_port_read_indexed(machine, 6 + data);
+ analog_result = input_port_read(machine, tracknames[data]);
break;
case 0:
@@ -492,7 +498,7 @@ static TIMER_CALLBACK( ataxx_interrupt_callback )
INTERRUPT_GEN( leland_master_interrupt )
{
/* check for coins here */
- if ((input_port_read_indexed(machine, 1) & 0x0e) != 0x0e)
+ if ((input_port_read(machine, "IN1") & 0x0e) != 0x0e)
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, ASSERT_LINE);
}
@@ -843,7 +849,7 @@ void ataxx_init_eeprom(UINT8 default_val, const UINT16 *data, UINT8 serial_offse
READ8_HANDLER( ataxx_eeprom_r )
{
- int port = input_port_read_indexed(machine, 2);
+ int port = input_port_read(machine, "IN2");
if (LOG_EEPROM) logerror("%04X:EE read\n", safe_activecpu_get_pc());
return (port & ~0x01) | eeprom_read_bit();
}
@@ -1107,13 +1113,15 @@ READ8_HANDLER( leland_master_analog_key_r )
WRITE8_HANDLER( leland_master_analog_key_w )
{
+ static const char *portnames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5" };
+
switch (offset)
{
case 0x00: /* FD = analog port trigger */
break;
case 0x01: /* FE = analog port select/bankswitch */
- analog_result = input_port_read_indexed(machine, (data & 15) + 4);
+ analog_result = input_port_read(machine, portnames[data & 15]);
/* update top board banking for some games */
if (LOG_BANKSWITCHING_M)
@@ -1144,11 +1152,11 @@ READ8_HANDLER( leland_master_input_r )
switch (offset)
{
case 0x00: /* /GIN0 */
- result = input_port_read_indexed(machine, 0);
+ result = input_port_read(machine, "IN0");
break;
case 0x01: /* /GIN1 */
- result = input_port_read_indexed(machine, 1);
+ result = input_port_read(machine, "IN1");
if (cpunum_get_reg(1, Z80_HALT))
result ^= 0x01;
break;
@@ -1164,11 +1172,11 @@ READ8_HANDLER( leland_master_input_r )
break;
case 0x10: /* /GIN0 */
- result = input_port_read_indexed(machine, 2);
+ result = input_port_read(machine, "IN2");
break;
case 0x11: /* /GIN1 */
- result = input_port_read_indexed(machine, 3);
+ result = input_port_read(machine, "IN3");
if (LOG_EEPROM) logerror("%04X:EE read\n", safe_activecpu_get_pc());
result = (result & ~0x01) | eeprom_read_bit();
break;
@@ -1227,11 +1235,11 @@ READ8_HANDLER( ataxx_master_input_r )
switch (offset)
{
case 0x06: /* /GIN0 */
- result = input_port_read_indexed(machine, 0);
+ result = input_port_read(machine, "IN0");
break;
case 0x07: /* /SLVBLK */
- result = input_port_read_indexed(machine, 1);
+ result = input_port_read(machine, "IN1");
if (cpunum_get_reg(1, Z80_HALT))
result ^= 0x01;
break;
diff --git a/src/mame/machine/lsasquad.c b/src/mame/machine/lsasquad.c
index 83fcc9294d7..3c19fc9e2b3 100644
--- a/src/mame/machine/lsasquad.c
+++ b/src/mame/machine/lsasquad.c
@@ -181,7 +181,7 @@ READ8_HANDLER( lsasquad_mcu_r )
READ8_HANDLER( lsasquad_mcu_status_r )
{
- int res = input_port_read_indexed(machine, 3);
+ int res = input_port_read(machine, "MCU?");
/* bit 0 = when 1, mcu is ready to receive data from main cpu */
/* bit 1 = when 0, mcu has sent data to the main cpu */
diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c
index 7f294ed9ef2..be5fcd5767d 100644
--- a/src/mame/machine/snes.c
+++ b/src/mame/machine/snes.c
@@ -175,14 +175,14 @@ static TIMER_CALLBACK( snes_scanline_tick )
{
int i;
- joypad[0].low = input_port_read_indexed(machine, 0 );
- joypad[0].high = input_port_read_indexed(machine, 1 );
- joypad[1].low = input_port_read_indexed(machine, 2 );
- joypad[1].high = input_port_read_indexed(machine, 3 );
- joypad[2].low = input_port_read_indexed(machine, 4 );
- joypad[2].high = input_port_read_indexed(machine, 5 );
- joypad[3].low = input_port_read_indexed(machine, 6 );
- joypad[3].high = input_port_read_indexed(machine, 7 );
+ joypad[0].low = input_port_read(machine, "PAD1L");
+ joypad[0].high = input_port_read(machine, "PAD1H");
+ joypad[1].low = input_port_read(machine, "PAD2L");
+ joypad[1].high = input_port_read(machine, "PAD2H");
+ joypad[2].low = input_port_read(machine, "PAD3L");
+ joypad[2].high = input_port_read(machine, "PAD3H");
+ joypad[3].low = input_port_read(machine, "PAD4L");
+ joypad[3].high = input_port_read(machine, "PAD4H");
// avoid sending signals that could crash games
for (i = 0; i < 4; i++)
@@ -952,9 +952,9 @@ READ8_HANDLER( snes_r_io )
#ifndef MESS
case 0x4100: /* NSS Dip-Switches */
#ifdef MAME_DEBUG
- return input_port_read_indexed(machine, 12);
+ return input_port_read_safe(machine, "DEBUG1", 0);
#else
- return input_port_read_indexed(machine, 9);
+ return input_port_read(machine, "DSW");
#endif /* MAME_DEBUG */
// case 0x4101: //PC: a104 - a10e - a12a //only nss_actr
// case 0x420c: //PC: 9c7d - 8fab //only nss_ssoc
diff --git a/src/mame/video/lazercmd.c b/src/mame/video/lazercmd.c
index 15fe25fbddb..93dda5117f8 100644
--- a/src/mame/video/lazercmd.c
+++ b/src/mame/video/lazercmd.c
@@ -32,7 +32,7 @@ static void plot_pattern(running_machine *machine, bitmap_t *bitmap, int x, int
int xbit, ybit, size;
size = 2;
- if (input_port_read_indexed(machine, 2) & 0x40)
+ if (input_port_read(machine, "DSW") & 0x40)
{
size = 4;
}
@@ -57,7 +57,7 @@ VIDEO_UPDATE( lazercmd )
{
int i,x,y;
- int video_inverted = input_port_read_indexed(screen->machine, 2) & 0x20;
+ int video_inverted = input_port_read(screen->machine, "DSW") & 0x20;
/* The first row of characters are invisible */
for (i = 0; i < (VERT_RES - 1) * HORZ_RES; i++)
diff --git a/src/mame/video/lethal.c b/src/mame/video/lethal.c
index d06627f8d71..995d8f68acc 100644
--- a/src/mame/video/lethal.c
+++ b/src/mame/video/lethal.c
@@ -10,8 +10,6 @@
#include "driver.h"
#include "video/konamiic.h"
-#define GUNX( a ) ( ( input_port_read_indexed(machine, a ) * 287 ) / 0xff )
-#define GUNY( a ) ( ( input_port_read_indexed(machine, a ) * 223 ) / 0xff )
static int sprite_colorbase;
static int layer_colorbase[4];
diff --git a/src/mame/video/lethalj.c b/src/mame/video/lethalj.c
index b23fdd325e7..1524b0dab50 100644
--- a/src/mame/video/lethalj.c
+++ b/src/mame/video/lethalj.c
@@ -35,12 +35,13 @@ static UINT8 blank_palette;
INLINE void get_crosshair_xy(running_machine *machine, int player, int *x, int *y)
{
+ static const char *gunnames[] = { "LIGHT0_X", "LIGHT0_Y", "LIGHT1_X", "LIGHT1_Y" };
const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
int width = visarea->max_x + 1 - visarea->min_x;
int height = visarea->max_y + 1 - visarea->min_y;
- *x = ((input_port_read_indexed(machine, 2 + player * 2) & 0xff) * width) / 255;
- *y = ((input_port_read_indexed(machine, 3 + player * 2) & 0xff) * height) / 255;
+ *x = ((input_port_read(machine, gunnames[player * 2]) & 0xff) * width) / 255;
+ *y = ((input_port_read(machine, gunnames[1 + player * 2]) & 0xff) * height) / 255;
}
diff --git a/src/mame/video/lordgun.c b/src/mame/video/lordgun.c
index 3d428061286..ebdbd4b416c 100644
--- a/src/mame/video/lordgun.c
+++ b/src/mame/video/lordgun.c
@@ -186,22 +186,26 @@ static const int lordgun_gun_x_table[] =
0x1B3,0x1B4,0x1B5,0x1B6,0x1B7,0x1B8,0x1B9,0x1BA,0x1BB,0x1BC,0x1BD,0x1BE,0x1BF,0x1BF
};
+
+static const char *gunnames[] = { "LIGHT0_X", "LIGHT1_X", "LIGHT0_Y", "LIGHT1_Y" };
+
static void lorddgun_calc_gun_scr(running_machine *machine, int i)
{
- int x = input_port_read_indexed(machine, 5+i) - 0x3c;
+ int x = input_port_read(machine, gunnames[i]) - 0x3c;
+
if ( (x < 0) || (x > sizeof(lordgun_gun_x_table)/sizeof(lordgun_gun_x_table[0])) )
x = 0;
lordgun_gun[i].scr_x = lordgun_gun_x_table[x];
- lordgun_gun[i].scr_y = input_port_read_indexed(machine, 7+i);
+ lordgun_gun[i].scr_y = input_port_read(machine, gunnames[i+2]);
}
void lordgun_update_gun(running_machine *machine, int i)
{
const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
- lordgun_gun[i].hw_x = input_port_read_indexed(machine, 5+i);
- lordgun_gun[i].hw_y = input_port_read_indexed(machine, 7+i);
+ lordgun_gun[i].hw_x = input_port_read(machine, gunnames[i]);
+ lordgun_gun[i].hw_y = input_port_read(machine, gunnames[i+2]);
lorddgun_calc_gun_scr(machine, i);
diff --git a/src/mame/video/snes.c b/src/mame/video/snes.c
index 457a4a84ccf..c1ec2e196f8 100644
--- a/src/mame/video/snes.c
+++ b/src/mame/video/snes.c
@@ -1443,7 +1443,7 @@ static void snes_update_objects(UINT8 screen, UINT16 curline )
* Stop drawing if exceeded 32 objects and
* enforcing that limit is enabled */
range_over++;
- if( range_over == 32 ) //&& (input_port_read_indexed(machine, 16 ) & 0x10) )
+ if( range_over == 32 ) //&& (input_port_read(machine, "INTERNAL") & 0x01) )
{
/* Set the flag in STAT77 register */
snes_ram[STAT77] |= 0x40;
@@ -1984,7 +1984,7 @@ static UINT8 snes_dbg_video(bitmap_t *bitmap, UINT16 curline )
if( !debug_options.input_count-- )
{
- UINT8 toggles = input_port_read_indexed(machine, 10 );
+ UINT8 toggles = input_port_read_safe(machine, "DEBUG2", 0);
if( toggles & 0x1 )
debug_options.bg_disabled[0] = !debug_options.bg_disabled[0];
if( toggles & 0x2 )
@@ -2001,7 +2001,7 @@ static UINT8 snes_dbg_video(bitmap_t *bitmap, UINT16 curline )
debug_options.bg_disabled[5] = !debug_options.bg_disabled[5];
if( toggles & 0x80 )
debug_options.windows_disabled = !debug_options.windows_disabled;
- toggles = input_port_read_indexed(machine, 11 );
+ toggles = input_port_read_safe(machine, "DEBUG3", 0);
if( toggles & 0x4 )
debug_options.transparency_disabled = !debug_options.transparency_disabled;
debug_options.input_count = 5;
@@ -2111,9 +2111,9 @@ static UINT8 snes_dbg_video(bitmap_t *bitmap, UINT16 curline )
}
/* Just for testing, draw as many tiles as possible */
{
- UINT8 adjust = input_port_read_indexed(machine, 1 );
- UINT8 dip = input_port_read_indexed(machine, 9 );
- UINT8 inp = input_port_read_indexed(machine, 11 );
+ UINT8 adjust = input_port_read(machine, "PAD1H");
+ UINT8 dip = input_port_read_safe(machine, "DEBUG1", 0);
+ UINT8 inp = input_port_read_safe(machine, "DEBUG3", 0);
UINT8 dt = 1 << ((dip & 0x3) - 1);
UINT8 dm = 1 << (((dip & 0xc) >> 2) - 1);
if( dt )