diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-08-28 08:46:52 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-08-28 08:46:52 +0000 |
commit | 04303e0b3fa2a105de5997d0f64366f517f9e236 (patch) | |
tree | fd2e620578ecd0bc438e29116116b5ad865932f8 | |
parent | 951ab24aaa852ecd32668de553bd36006b396a10 (diff) |
From: Fabio Priuli [mailto:doge.fabio@gmail.com]
Subject: more patches
Hi,
enclosed please find the following patches:
spaceinv.diff : this is an important patch. Please revert (if applied)
my previous fix to bugs 2143 & 2144. It was wrong. This is the correct
fix for those two bugs and many other issues not reported on MT (e.g.
spaceatt, spaceat2 not starting because tilted, missing dips in many
invaders clones etc). Basically, in 8080bw.c all the "DSW0" input ports
should have been "IN2" for invaders_map to work correctly, and no
additional "IN2" is necessary. After this fix, you may want to change
all the "IN2" occurrences 8080bw.c and in mw8080bw.c with "DSW" since
they mostly are dips. But the latter is a cosmetic change, so it's up
to you decide if it's worth or not (the patch leaves "IN2").
avgdvg.diff : this correctly fixes avgdvg_done usage without using a
parameter, but using IPT_ACTIVE_LOW where needed (I'm a bit ashamed
because I should have thought to that since the beginning).
galaxold.diff : this changes ckongg coinage inputs to fix bug 2154.
Notice anyway that coinage settings in dips do not correspond to the
numbers which appear on screen. This is probably due to the conversion
to galaxian hardware (e.g. it's shown the value of coin2, but in ckongg
there is no coin2 at all, so the appearance of the coin 2 value has no
meaning). Notice also that an unused dips sets the possibility to play
in 2 or not. I defaulted this to 1 player because setting "2 players"
automatically gives 2/4 credits with a single coin, which I don't think
it was the default back then ;)
However, perhaps ckongg is worth further analysis when it will be
updated to the new galaxian driver.
stv.diff : this patch fixes the longstanding bug 650 (duplicated P1
button 4). After testing all sets which reach the test mode, I found
out that only batmanfr uses the button4 in port "P1", while all other
games with more than 3 buttons use the one in "EXTRA". Therefore I made
the "P1" 4th buttons a specific batmanfr input.
patch01.diff, patch02.diff, sys1.diff : these patches simplifies input
ports in the remaining driver starting with S (plus a few small changes
to other drivers I forgot previously), using PORT_INCLUDE, AM_READ_PORT
& converting 'fake' 8bit ports to full 16/32bit ports where suitable
Let me know if something fails to apply, or if there is any other problem
60 files changed, 1547 insertions, 2481 deletions
diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index 5d01327ab04..c5fbec99667 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -120,10 +120,7 @@ static INPUT_PORTS_START( sicv ) PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in1_control_r, NULL) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("IN2") /* referenced by invaders_io_map, used in several drivers; this is fairly hacky */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("DSW0") + PORT_START("IN2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -177,7 +174,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( invadrmr ) PORT_INCLUDE( sicv ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x00, "1500" ) PORT_DIPSETTING( 0x08, "3000" ) /* This is different to invaders */ @@ -192,7 +189,7 @@ INPUT_PORTS_END static ADDRESS_MAP_START( invadpt2_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, invadpt2_sh_port_1_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) @@ -209,7 +206,7 @@ static INPUT_PORTS_START( invadpt2 ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -249,7 +246,7 @@ MACHINE_DRIVER_END static ADDRESS_MAP_START( spcewars_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, spcewars_sh_port_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) @@ -262,7 +259,7 @@ static INPUT_PORTS_START( spcewars ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -309,7 +306,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cosmo_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITENOP AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_WRITENOP - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITENOP + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITENOP AM_RANGE(0x03, 0x03) AM_WRITE(invadpt2_sh_port_1_w) AM_RANGE(0x05, 0x05) AM_WRITE(cosmo_sh_port_2_w) AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) @@ -323,7 +320,7 @@ static INPUT_PORTS_START( cosmo ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "5" ) @@ -361,7 +358,7 @@ static INPUT_PORTS_START( searthin ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "2" ) PORT_DIPSETTING( 0x01, "3" ) @@ -385,7 +382,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( spaceatt ) PORT_INCLUDE( sicv ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW1:5" ) PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW1:6" ) PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "SW1:7" ) @@ -408,7 +405,7 @@ INPUT_PORTS_END static ADDRESS_MAP_START( invrvnge_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, invrvnge_sh_port_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) ADDRESS_MAP_END @@ -435,7 +432,7 @@ static INPUT_PORTS_START( invrvnge ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW0") + PORT_START("IN2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -482,10 +479,10 @@ static INPUT_PORTS_START( spclaser ) //PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2) /* This is not 2 Player ??? */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("IN2") /* referenced by invaders_io_map, used in several drivers; this is fairly hacky */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) +// PORT_START("IN2") /* referenced by invaders_io_map, used in several drivers; this is fairly hacky */ +// PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:1" ) PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW1:2" ) PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:3" ) @@ -514,7 +511,7 @@ static INPUT_PORTS_START( galxwars ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x00, "2" ) PORT_DIPSETTING( 0x01, "3" ) @@ -539,7 +536,7 @@ INPUT_PORTS_END static ADDRESS_MAP_START( lrescue_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, lrescue_sh_port_1_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x05, 0x05) AM_WRITE(lrescue_sh_port_2_w) @@ -552,7 +549,7 @@ static INPUT_PORTS_START( lrescue ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") /* SW1:3-8 Unused according to manual: "Factory Adjustments". Default is ON. */ PORT_DIPUNUSED_DIPLOC( 0x08, 0x00, "SW1:4" ) PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW1:8" ) @@ -594,7 +591,7 @@ static INPUT_PORTS_START( cosmicmo ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x00, "2" ) PORT_DIPSETTING( 0x01, "3" ) @@ -620,7 +617,7 @@ static INPUT_PORTS_START( invasion ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") /* SW1:5-8 Unused according to manual. */ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4,3") /* Default is OFF, OFF (6) */ PORT_DIPSETTING( 0x00, "3" ) @@ -651,7 +648,7 @@ static INPUT_PORTS_START( superinv ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:3" ) PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x08, "1500" ) @@ -678,7 +675,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( rollingc_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(rollingc_sh_port_w) AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READ(mb14241_0_shift_result_r) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) ADDRESS_MAP_END @@ -694,7 +691,7 @@ static INPUT_PORTS_START( rollingc ) PORT_MODIFY("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:4" ) /* Dummy port for cocktail mode (not used) */ @@ -737,7 +734,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( schaser_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, schaser_sh_port_1_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x05, 0x05) AM_WRITE(schaser_sh_port_2_w) @@ -766,7 +763,7 @@ static INPUT_PORTS_START( schaser ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_START("DSW0") // port 2 + PORT_START("IN2") // port 2 PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -838,7 +835,7 @@ MACHINE_DRIVER_END static ADDRESS_MAP_START( schasrcv_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, schasrcv_sh_port_1_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x05, 0x05) AM_WRITE(schasrcv_sh_port_2_w) @@ -854,7 +851,7 @@ static INPUT_PORTS_START( schasrcv ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -909,7 +906,7 @@ static ADDRESS_MAP_START( sflush_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE(&mw8080bw_ram) AM_SIZE(&mw8080bw_ram_size) AM_RANGE(0x8008, 0x8008) AM_READ_PORT("PADDLE") AM_RANGE(0x8009, 0x8009) AM_READ(mb14241_0_shift_result_r) - AM_RANGE(0x800a, 0x800a) AM_READ_PORT("DSW0") + AM_RANGE(0x800a, 0x800a) AM_READ_PORT("IN2") AM_RANGE(0x800b, 0x800b) AM_READ_PORT("IN0") AM_RANGE(0x8018, 0x8018) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x8019, 0x8019) AM_WRITE(mb14241_0_shift_count_w) @@ -943,7 +940,7 @@ static INPUT_PORTS_START( sflush ) PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_START("DSW0") + PORT_START("IN2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -972,7 +969,7 @@ INPUT_PORTS_END static ADDRESS_MAP_START( lupin3_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, lupin3_sh_port_1_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x05, 0x05) AM_WRITE(lupin3_sh_port_2_w) @@ -1000,7 +997,7 @@ static INPUT_PORTS_START( lupin3 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:3") PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) ) @@ -1076,7 +1073,7 @@ UINT8 polaris_get_cloud_pos(void) static ADDRESS_MAP_START( polaris_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(polaris_sh_port_1_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(polaris_sh_port_1_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, mb14241_0_shift_data_w) AM_RANGE(0x04, 0x04) AM_WRITE(polaris_sh_port_2_w) AM_RANGE(0x05, 0x05) AM_WRITE(watchdog_reset_w) @@ -1107,7 +1104,7 @@ static INPUT_PORTS_START( polaris ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") /* 0x04 should be Cabinet - Upright/Cocktail, but until the cocktail hack is changed, this will have to do. */ @@ -1173,7 +1170,7 @@ static INPUT_PORTS_START( ozmawars ) PORT_MODIFY("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPNAME( 0x03, 0x00, "Energy" ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x00, "15000" ) PORT_DIPSETTING( 0x01, "20000" ) @@ -1210,7 +1207,7 @@ static INPUT_PORTS_START( sinvemag ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:3" ) PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x08, "2000" ) @@ -1231,7 +1228,7 @@ static INPUT_PORTS_START( jspecter ) PORT_MODIFY("IN1") PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY //typo? declared twice - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:3" ) INPUT_PORTS_END @@ -1245,7 +1242,7 @@ INPUT_PORTS_END static ADDRESS_MAP_START( ballbomb_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, ballbomb_sh_port_1_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x05, 0x05) AM_WRITE(ballbomb_sh_port_2_w) @@ -1258,7 +1255,7 @@ static INPUT_PORTS_START( ballbomb ) PORT_MODIFY("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_MODIFY("DSW0") + PORT_MODIFY("IN2") PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:4" ) PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:8" ) INPUT_PORTS_END @@ -1367,7 +1364,7 @@ static INPUT_PORTS_START( indianbt ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW0") + PORT_START("IN2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -1424,7 +1421,7 @@ static READ8_HANDLER(indianbt_r) static ADDRESS_MAP_START( indianbt_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ(indianbt_r) AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0") - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW0") AM_WRITE(mb14241_0_shift_count_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w) AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, indianbt_sh_port_1_w) AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w) AM_RANGE(0x05, 0x05) AM_WRITE(indianbt_sh_port_2_w) diff --git a/src/mame/drivers/asteroid.c b/src/mame/drivers/asteroid.c index e4b3f08775f..b587cfd043f 100644 --- a/src/mame/drivers/asteroid.c +++ b/src/mame/drivers/asteroid.c @@ -265,7 +265,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( llander_map, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_GLOBAL_MASK(0x7fff) AM_RANGE(0x0000, 0x00ff) AM_RAM AM_MIRROR(0x1f00) - AM_RANGE(0x2000, 0x2000) AM_READ(llander_IN0_r) /* IN0 */ + AM_RANGE(0x2000, 0x2000) AM_READ_PORT("IN0") AM_RANGE(0x2400, 0x2407) AM_READ(asteroid_IN1_r) /* IN1 */ AM_RANGE(0x2800, 0x2803) AM_READ(asteroid_DSW1_r) /* DSW1 */ AM_RANGE(0x2c00, 0x2c00) AM_READ_PORT("PADDLE") @@ -287,13 +287,17 @@ ADDRESS_MAP_END * *************************************/ +static CUSTOM_INPUT( clock_r ) +{ + return (cpunum_gettotalcycles(0) & 0x100) ? 1 : 0; +} + static INPUT_PORTS_START( asteroid ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - /* Bit 2 and 3 are handled in the machine dependent part. */ /* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1) @@ -346,8 +350,8 @@ static INPUT_PORTS_START( asteroib ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - /* Bit 7 is VG_HALT, handled in the machine dependent part */ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + /* Bit 7 is VG_HALT */ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) PORT_MODIFY("IN1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) @@ -371,8 +375,10 @@ static INPUT_PORTS_START( asterock ) PORT_INCLUDE( asteroid ) PORT_MODIFY("IN0") - /* Bit 0 is VG_HALT, handled in the machine dependent part */ - /* Bit 2 is the 3 KHz source */ + /* Bit 0 is VG_HALT and Bit 2 is the 3 KHz source */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1) @@ -411,10 +417,9 @@ INPUT_PORTS_END static INPUT_PORTS_START( astdelux ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* According to schematics */ - /* Bit 2 and 3 are handled in the machine dependent part. */ /* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1) @@ -494,12 +499,13 @@ INPUT_PORTS_END static INPUT_PORTS_START( llander ) PORT_START("IN0") - /* Bit 0 is VG_HALT, handled in the machine dependent part */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + /* Bit 0 is VG_HALT */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* Of the rest, Bit 6 is the 3KHz source. 3,4 and 5 are unknown */ - PORT_BIT( 0x78, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1) PORT_START("IN1") @@ -873,7 +879,7 @@ ROM_END static DRIVER_INIT( asteroib ) { - memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x2000, 0x2000, 0, 0, asteroib_IN0_r); + memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x2000, 0x2000, 0, 0, input_port_read_handler8(machine->portconfig, "IN0")); memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x2003, 0x2003, 0, 0, input_port_read_handler8(machine->portconfig, "HS")); } diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c index 92b094005f5..b19ea73674c 100644 --- a/src/mame/drivers/galaxold.c +++ b/src/mame/drivers/galaxold.c @@ -2035,11 +2035,11 @@ static INPUT_PORTS_START( ckongg ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - 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( 2C_1C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coinage ) ) PORT_CONDITION("DSW0", 0x04, PORTCOND_EQUALS, 0x00) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) + PORT_DIPUNKNOWN( 0x40, 0x40 ) PORT_CONDITION("DSW0", 0x04, PORTCOND_EQUALS, 0x04) + PORT_DIPUNKNOWN( 0x80, 0x80 ) PORT_START("DSW0") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) @@ -2047,9 +2047,9 @@ static INPUT_PORTS_START( ckongg ) PORT_DIPSETTING( 0x01, "2" ) PORT_DIPSETTING( 0x02, "3" ) PORT_DIPSETTING( 0x03, "4" ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Players ) ) + PORT_DIPSETTING( 0x04, "1" ) + PORT_DIPSETTING( 0x00, "2" ) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Bonus_Life ) ) PORT_DIPSETTING( 0x08, "500000" ) PORT_DIPSETTING( 0x00, "750000" ) diff --git a/src/mame/drivers/mhavoc.c b/src/mame/drivers/mhavoc.c index 822e76ad228..c283e57a36a 100644 --- a/src/mame/drivers/mhavoc.c +++ b/src/mame/drivers/mhavoc.c @@ -253,22 +253,22 @@ static ADDRESS_MAP_START( alpha_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0200, 0x07ff) AM_RAMBANK(1) AM_BASE(&mhavoc_zram0) AM_RANGE(0x0800, 0x09ff) AM_RAM AM_RANGE(0x0a00, 0x0fff) AM_RAMBANK(1) AM_BASE(&mhavoc_zram1) - AM_RANGE(0x1000, 0x1000) AM_READ(mhavoc_gamma_r) /* Gamma Read Port */ - AM_RANGE(0x1200, 0x1200) AM_READWRITE(mhavoc_port_0_r, SMH_NOP) /* Alpha Input Port 0 */ - AM_RANGE(0x1400, 0x141f) AM_RAM AM_BASE(&mhavoc_colorram) /* ColorRAM */ - AM_RANGE(0x1600, 0x1600) AM_WRITE(mhavoc_out_0_w) /* Control Signals */ - AM_RANGE(0x1640, 0x1640) AM_WRITE(avgdvg_go_w) /* Vector Generator GO */ - AM_RANGE(0x1680, 0x1680) AM_WRITE(watchdog_reset_w) /* Watchdog Clear */ - AM_RANGE(0x16c0, 0x16c0) AM_WRITE(avgdvg_reset_w) /* Vector Generator Reset */ - AM_RANGE(0x1700, 0x1700) AM_WRITE(mhavoc_alpha_irq_ack_w) /* IRQ ack */ - AM_RANGE(0x1740, 0x1740) AM_WRITE(mhavoc_rom_banksel_w) /* Program ROM Page Select */ - AM_RANGE(0x1780, 0x1780) AM_WRITE(mhavoc_ram_banksel_w) /* Program RAM Page Select */ - AM_RANGE(0x17c0, 0x17c0) AM_WRITE(mhavoc_gamma_w) /* Gamma Communication Write Port */ - AM_RANGE(0x1800, 0x1fff) AM_RAM /* Shared Beta Ram */ - AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(2) /* Paged Program ROM (32K) */ - AM_RANGE(0x4000, 0x4fff) AM_RAM AM_BASE(&vectorram) AM_SIZE(&vectorram_size) AM_REGION("alpha", 0x4000)/* Vector Generator RAM */ - AM_RANGE(0x5000, 0x7fff) AM_ROM /* Vector ROM */ - AM_RANGE(0x8000, 0xffff) AM_READ(SMH_ROM) /* Program ROM (32K) */ + AM_RANGE(0x1000, 0x1000) AM_READ(mhavoc_gamma_r) /* Gamma Read Port */ + AM_RANGE(0x1200, 0x1200) AM_READ_PORT("IN0") AM_WRITENOP /* Alpha Input Port 0 */ + AM_RANGE(0x1400, 0x141f) AM_RAM AM_BASE(&mhavoc_colorram) /* ColorRAM */ + AM_RANGE(0x1600, 0x1600) AM_WRITE(mhavoc_out_0_w) /* Control Signals */ + AM_RANGE(0x1640, 0x1640) AM_WRITE(avgdvg_go_w) /* Vector Generator GO */ + AM_RANGE(0x1680, 0x1680) AM_WRITE(watchdog_reset_w) /* Watchdog Clear */ + AM_RANGE(0x16c0, 0x16c0) AM_WRITE(avgdvg_reset_w) /* Vector Generator Reset */ + AM_RANGE(0x1700, 0x1700) AM_WRITE(mhavoc_alpha_irq_ack_w) /* IRQ ack */ + AM_RANGE(0x1740, 0x1740) AM_WRITE(mhavoc_rom_banksel_w) /* Program ROM Page Select */ + AM_RANGE(0x1780, 0x1780) AM_WRITE(mhavoc_ram_banksel_w) /* Program RAM Page Select */ + AM_RANGE(0x17c0, 0x17c0) AM_WRITE(mhavoc_gamma_w) /* Gamma Communication Write Port */ + AM_RANGE(0x1800, 0x1fff) AM_RAM /* Shared Beta Ram */ + AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(2) /* Paged Program ROM (32K) */ + AM_RANGE(0x4000, 0x4fff) AM_RAM AM_BASE(&vectorram) AM_SIZE(&vectorram_size) AM_REGION("alpha", 0x4000) /* Vector Generator RAM */ + AM_RANGE(0x5000, 0x7fff) AM_ROM /* Vector ROM */ + AM_RANGE(0x8000, 0xffff) AM_READ(SMH_ROM) /* Program ROM (32K) */ ADDRESS_MAP_END @@ -283,7 +283,7 @@ static ADDRESS_MAP_START( gamma_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x07ff) AM_RAM /* Program RAM (2K) */ AM_RANGE(0x0800, 0x0fff) AM_RAM AM_MIRROR (0x1800) AM_RANGE(0x2000, 0x203f) AM_READWRITE(quad_pokey_r, quad_pokey_w) /* Quad Pokey read */ - AM_RANGE(0x2800, 0x2800) AM_READ(mhavoc_port_1_r) /* Gamma Input Port */ + AM_RANGE(0x2800, 0x2800) AM_READ_PORT("IN1") /* Gamma Input Port */ AM_RANGE(0x3000, 0x3000) AM_READ(mhavoc_alpha_r) /* Alpha Comm. Read Port*/ AM_RANGE(0x3800, 0x3803) AM_READ_PORT("DIAL") /* Roller Controller Input*/ AM_RANGE(0x4000, 0x4000) AM_READ_PORT("DSW2") AM_WRITE(mhavoc_gamma_irq_ack_w) /* DSW at 8S, IRQ Acknowledge*/ @@ -308,7 +308,7 @@ static ADDRESS_MAP_START( alphaone_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0800, 0x09ff) AM_RAM AM_RANGE(0x0a00, 0x0fff) AM_RAMBANK(1) AM_BASE(&mhavoc_zram1) AM_RANGE(0x1020, 0x103f) AM_READWRITE(dual_pokey_r, dual_pokey_w) - AM_RANGE(0x1040, 0x1040) AM_READWRITE(alphaone_port_0_r, SMH_NOP) /* Alpha Input Port 0 */ + AM_RANGE(0x1040, 0x1040) AM_READ_PORT("IN0") AM_WRITENOP /* Alpha Input Port 0 */ AM_RANGE(0x1060, 0x1060) AM_READ_PORT("IN1") /* Gamma Input Port */ AM_RANGE(0x1080, 0x1080) AM_READ_PORT("DIAL") /* Roller Controller Input*/ AM_RANGE(0x10a0, 0x10a0) AM_WRITE(alphaone_out_0_w) /* Control Signals */ @@ -334,24 +334,46 @@ ADDRESS_MAP_END * *************************************/ +static CUSTOM_INPUT( clock_r ) +{ + /* 2.4kHz (divide 2.5MHz by 1024) */ + return (cpunum_gettotalcycles(0) & 0x400) ? 0 : 1; +} + + +/* 2008-08 FP: + IN0 Bit 4 is tested in the second input test, but it's not clear its effect. + According to the memory map at top it should be Diagnostic Step, but it's + actually IN0 Bit 5 to have this function. I marked it as UNKNOWN for the moment */ static INPUT_PORTS_START( mhavoc ) - PORT_START("IN0") /* IN0 - alpha (player_1 = 0) */ - PORT_BIT ( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) - 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_JOYSTICK_UP ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diag Step/Coin C") PORT_CODE(KEYCODE_F1) - PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) /* Left Coin Switch */ - PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) /* Right Coin */ - - PORT_START("IN1") /* IN1 - gamma */ - PORT_BIT ( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) - - PORT_START("DIAL") /* IN2 - gamma */ + PORT_START("IN0") /* alpha */ + /* Bits 7-6 = selected based on player_1 */ + /* Bits 5-4 = common */ + /* Bit 3 = Gamma rcvd flag */ + /* Bit 2 = Gamma xmtd flag */ + /* Bit 1 = 2.4kHz (divide 2.5MHz by 1024) */ + /* Bit 0 = Vector generator halt flag */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gamma_xmtd_r, NULL) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gamma_rcvd_r, NULL) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diag Step/Coin C") PORT_CODE(KEYCODE_F1) + PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mhavoc_bit67_r, "COIN\0SERVICE") + + PORT_START("IN1") /* gamma */ + /* Bits 7-2 = input switches */ + /* Bit 1 = Alpha rcvd flag */ + /* Bit 0 = Alpha xmtd flag */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(alpha_xmtd_r, NULL) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(alpha_rcvd_r, NULL) + PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) + + PORT_START("DIAL") /* gamma */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40) PORT_REVERSE PORT_START("DSW1") /* DIP Switch at position 13/14S */ @@ -398,99 +420,51 @@ static INPUT_PORTS_START( mhavoc ) PORT_DIPSETTING( 0x60, "1 each 5" ) PORT_DIPSETTING( 0xe0, DEF_STR( None ) ) - PORT_START("IN2") /* IN5 - dummy for player_1 = 1 on alpha */ - PORT_BIT ( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) - PORT_DIPNAME( 0x40, 0x40, "Credit to start" ) - PORT_DIPSETTING( 0x40, "1" ) + PORT_START("COIN") /* dummy for player_1 = 0 on alpha */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) /* Left Coin Switch */ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) /* Right Coin */ + + PORT_START("SERVICE") /* dummy for player_1 = 1 on alpha */ + PORT_DIPNAME( 0x01, 0x01, "Credit to start" ) + PORT_DIPSETTING( 0x01, "1" ) PORT_DIPSETTING( 0x00, "2" ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) + PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) INPUT_PORTS_END +static INPUT_PORTS_START( mhavocrv ) + PORT_INCLUDE( mhavoc ) + + PORT_MODIFY("IN1") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tms5220_r, NULL) + PORT_BIT( 0x0b, IP_ACTIVE_LOW, IPT_UNKNOWN ) +INPUT_PORTS_END static INPUT_PORTS_START( mhavocp ) - PORT_START("IN0") /* IN0 - alpha (player_1 = 0) */ - PORT_BIT ( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) - PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diag Step/Coin C") PORT_CODE(KEYCODE_F1) - PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) /* Left Coin Switch */ - PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) /* Right Coin */ - - PORT_START("IN1") /* IN1 - gamma */ - PORT_BIT ( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) - - PORT_START("DIAL") /* IN2 - gamma */ - PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40) PORT_REVERSE + PORT_INCLUDE( mhavoc ) - PORT_START("DSW1") /* DIP Switch at position 13/14S */ + PORT_MODIFY("DSW1") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:7,8") PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x01, "2" ) PORT_DIPSETTING( 0x02, "3" ) PORT_DIPSETTING( 0x03, "4" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:5,6") - PORT_DIPSETTING( 0x0c, "50000") - PORT_DIPSETTING( 0x00, "100000") - PORT_DIPSETTING( 0x04, "200000") - PORT_DIPSETTING( 0x08, DEF_STR( None )) - PORT_DIPNAME( 0x30, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:3,4") - PORT_DIPSETTING( 0x10, DEF_STR( Easy )) - PORT_DIPSETTING( 0x00, DEF_STR( Medium )) - PORT_DIPSETTING( 0x30, DEF_STR( Hard )) - PORT_DIPSETTING( 0x20, "Demo") - PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING( 0x00, "3 (2 in Free Play)") - PORT_DIPSETTING( 0xc0, "4 (3 in Free Play)") - PORT_DIPSETTING( 0x80, "5 (4 in Free Play)") - PORT_DIPSETTING( 0x40, "6 (5 in Free Play)") - - PORT_START("DSW2") /* DIP Switch at position 8S */ - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:7,8") - PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Right Coin Mechanism" ) PORT_DIPLOCATION("SW2:5,6") - PORT_DIPSETTING( 0x0c, "x1" ) - PORT_DIPSETTING( 0x08, "x4" ) - PORT_DIPSETTING( 0x04, "x5" ) - PORT_DIPSETTING( 0x00, "x6" ) - PORT_DIPNAME( 0x10, 0x10, "Left Coin Mechanism" ) PORT_DIPLOCATION("SW2:4") - PORT_DIPSETTING( 0x10, "x1" ) - PORT_DIPSETTING( 0x00, "x2" ) - PORT_DIPNAME( 0xe0, 0xe0, "Bonus Credits" ) PORT_DIPLOCATION("SW2:1,2,3") - PORT_DIPSETTING( 0x80, "2 each 4" ) - PORT_DIPSETTING( 0x40, "1 each 3" ) - PORT_DIPSETTING( 0xa0, "1 each 4" ) - PORT_DIPSETTING( 0x60, "1 each 5" ) - PORT_DIPSETTING( 0xe0, DEF_STR( None ) ) - - PORT_START("IN2") /* IN5 - dummy for player_1 = 1 on alpha */ - PORT_BIT ( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) - PORT_DIPNAME( 0x40, 0x40, "Credit to start" ) - PORT_DIPSETTING( 0x40, "1" ) - PORT_DIPSETTING( 0x00, "2" ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) INPUT_PORTS_END - static INPUT_PORTS_START( alphaone ) - PORT_START("IN0") /* IN0 - alpha (player_1 = 0) */ - PORT_BIT ( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) - PORT_BIT ( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) - - PORT_START("IN1") /* IN1 - gamma */ - PORT_BIT ( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("IN0") /* alpha (player_1 = 0) */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) + PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) + + PORT_START("IN1") /* gamma */ + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) - PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_START("DIAL") /* IN2 - gamma */ + PORT_START("DIAL") /* gamma */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40) PORT_REVERSE INPUT_PORTS_END @@ -787,7 +761,6 @@ static DRIVER_INIT( mhavocrv ) { /* install the speech support that was only optionally stuffed for use */ /* in the Return to Vax hack */ - memory_install_read8_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x2800, 0x2800, 0, 0, mhavoc_port_1_sp_r); memory_install_write8_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x5800, 0x5800, 0, 0, speech_data_w); memory_install_write8_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x5900, 0x5900, 0, 0, speech_strobe_w); } @@ -802,7 +775,7 @@ static DRIVER_INIT( mhavocrv ) GAME( 1983, mhavoc, 0, mhavoc, mhavoc, 0, ROT0, "Atari", "Major Havoc (rev 3)", GAME_SUPPORTS_SAVE ) GAME( 1983, mhavoc2, mhavoc, mhavoc, mhavoc, 0, ROT0, "Atari", "Major Havoc (rev 2)", GAME_SUPPORTS_SAVE ) -GAME( 1983, mhavocrv, mhavoc, mhavocrv, mhavoc, mhavocrv, ROT0, "JMA", "Major Havoc (Return to Vax)", GAME_SUPPORTS_SAVE ) +GAME( 1983, mhavocrv, mhavoc, mhavocrv, mhavocrv, mhavocrv, ROT0, "JMA", "Major Havoc (Return to Vax)", GAME_SUPPORTS_SAVE ) GAME( 1983, mhavocp, mhavoc, mhavoc, mhavocp, 0, ROT0, "Atari", "Major Havoc (prototype)", GAME_SUPPORTS_SAVE ) GAME( 1983, alphaone, mhavoc, alphaone, alphaone, 0, ROT0, "Atari", "Alpha One (prototype, 3 lives)", GAME_SUPPORTS_SAVE ) GAME( 1983, alphaona, mhavoc, alphaone, alphaone, 0, ROT0, "Atari", "Alpha One (prototype, 5 lives)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/neodrvr.c b/src/mame/drivers/neodrvr.c index 8c76b688280..d1166a090e2 100644 --- a/src/mame/drivers/neodrvr.c +++ b/src/mame/drivers/neodrvr.c @@ -69,7 +69,7 @@ static INPUT_PORTS_START( mjneogeo ) PORT_DIPNAME( 0x0080, 0x0080, "Freeze" ) PORT_DIPLOCATION("SW:8") PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mahjong_controller_r, 0 ) + PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mahjong_controller_r, NULL) STANDARD_IN1 @@ -143,7 +143,7 @@ static INPUT_PORTS_START( irrmaze ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0 ) + PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) STANDARD_IN3 @@ -234,13 +234,13 @@ static INPUT_PORTS_START( vliner ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* this bit is used.. */ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* this bit is used.. */ - PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0 ) + PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN3") PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_calendar_status, 0 ) - PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_audio_result, 0 ) + PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_calendar_status, NULL) + PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_audio_result, NULL) STANDARD_IN4 @@ -273,7 +273,7 @@ static INPUT_PORTS_START( jockeygp ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Next Game") PORT_CODE(KEYCODE_7) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* game freezes with this bit enabled */ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Previous Game") PORT_CODE(KEYCODE_8) - PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0 ) + PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) STANDARD_IN3 diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c index 7a040d9021e..3fd0370cae7 100644 --- a/src/mame/drivers/neogeo.c +++ b/src/mame/drivers/neogeo.c @@ -1152,7 +1152,7 @@ static ym2610_interface ym2610_config = #define STANDARD_IN1 \ - PORT_START("IN1") \ + PORT_START("IN1") \ PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) \ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) \ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) \ @@ -1165,30 +1165,30 @@ static ym2610_interface ym2610_config = #define STANDARD_IN2 \ - PORT_START("IN2") \ + PORT_START("IN2") \ PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) \ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) \ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Next Game") PORT_CODE(KEYCODE_7) \ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 ) \ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Previous Game") PORT_CODE(KEYCODE_8) \ - PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, 0) \ + PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) \ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) #define STANDARD_IN3 \ - PORT_START("IN3") \ + PORT_START("IN3") \ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) \ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) \ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* having this ACTIVE_HIGH causes you to start with 2 credits using USA bios roms */ \ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* having this ACTIVE_HIGH causes you to start with 2 credits using USA bios roms */ \ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) /* what is this? */ \ - PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_calendar_status, 0) \ - PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_audio_result, 0) + PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_calendar_status, NULL) \ + PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_audio_result, NULL) #define STANDARD_IN4 \ - PORT_START("IN4") \ + PORT_START("IN4") \ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \ PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \ diff --git a/src/mame/drivers/omegrace.c b/src/mame/drivers/omegrace.c index c92f32a8cd9..d2af745ed2d 100644 --- a/src/mame/drivers/omegrace.c +++ b/src/mame/drivers/omegrace.c @@ -252,13 +252,6 @@ static READ8_HANDLER( omegrace_vg_go_r ) } -static READ8_HANDLER( omegrace_vg_status_r ) -{ - return avgdvg_done() ? 0x00 : 0x80; -} - - - /************************************* * * Input handlers @@ -347,7 +340,7 @@ static ADDRESS_MAP_START( port_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x08, 0x08) AM_READ(omegrace_vg_go_r) AM_RANGE(0x09, 0x09) AM_READ(watchdog_reset_r) AM_RANGE(0x0a, 0x0a) AM_WRITE(avgdvg_reset_w) - AM_RANGE(0x0b, 0x0b) AM_READ(omegrace_vg_status_r) /* vg_halt */ + AM_RANGE(0x0b, 0x0b) AM_READ_PORT("AVGDVG") /* vg_halt */ AM_RANGE(0x10, 0x10) AM_READ_PORT("DSW1") /* DIP SW C4 */ AM_RANGE(0x17, 0x17) AM_READ_PORT("DSW2") /* DIP SW C6 */ AM_RANGE(0x11, 0x11) AM_READ_PORT("IN0") /* Player 1 input */ @@ -355,7 +348,7 @@ static ADDRESS_MAP_START( port_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x13, 0x13) AM_WRITE(omegrace_leds_w) /* coin counters, leds, flip screen */ AM_RANGE(0x14, 0x14) AM_WRITE(omegrace_soundlatch_w) /* Sound command */ AM_RANGE(0x15, 0x15) AM_READ(omegrace_spinner1_r) /* 1st controller */ - AM_RANGE(0x16, 0x16) AM_READ(input_port_5_r) /* 2nd controller (cocktail) */ + AM_RANGE(0x16, 0x16) AM_READ_PORT("SPIN1") /* 2nd controller (cocktail) */ ADDRESS_MAP_END @@ -388,56 +381,56 @@ ADDRESS_MAP_END *************************************/ static INPUT_PORTS_START( omegrace ) - PORT_START("DSW1") /* SW0 */ - PORT_DIPNAME( 0x03, 0x03, "1st Bonus Life" ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING ( 0x00, "40k" ) - PORT_DIPSETTING ( 0x01, "50k" ) - PORT_DIPSETTING ( 0x02, "70k" ) - PORT_DIPSETTING ( 0x03, "100k" ) + PORT_START("DSW1") + PORT_DIPNAME( 0x03, 0x03, "1st Bonus Life" ) PORT_DIPLOCATION("SW1:1,2") + PORT_DIPSETTING( 0x00, "40k" ) + PORT_DIPSETTING( 0x01, "50k" ) + PORT_DIPSETTING( 0x02, "70k" ) + PORT_DIPSETTING( 0x03, "100k" ) PORT_DIPNAME( 0x0c, 0x0c, "2nd & 3rd Bonus Life" ) PORT_DIPLOCATION("SW1:3,4") - PORT_DIPSETTING ( 0x00, "150k 250k" ) - PORT_DIPSETTING ( 0x04, "250k 500k" ) - PORT_DIPSETTING ( 0x08, "500k 750k" ) - PORT_DIPSETTING ( 0x0c, "750k 1500k" ) - PORT_DIPNAME( 0x30, 0x30, "Credit(s)/Ships" ) PORT_DIPLOCATION("SW1:5,6") - PORT_DIPSETTING ( 0x00, "1C/2S 2C/4S" ) - PORT_DIPSETTING ( 0x10, "1C/2S 2C/5S" ) - PORT_DIPSETTING ( 0x20, "1C/3S 2C/6S" ) - PORT_DIPSETTING ( 0x30, "1C/3S 2C/7S" ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING ( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING ( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING ( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING ( 0x80, DEF_STR( On ) ) - - PORT_START("DSW2") /* SW1 */ - PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") - PORT_DIPSETTING ( 0x06, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING ( 0x07, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING ( 0x03, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING ( 0x04, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING ( 0x05, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING ( 0x00, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING ( 0x01, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING ( 0x02, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:4,5,6") - PORT_DIPSETTING ( 0x30, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING ( 0x38, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING ( 0x18, DEF_STR( 4C_5C ) ) - PORT_DIPSETTING ( 0x20, DEF_STR( 3C_4C ) ) - PORT_DIPSETTING ( 0x28, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING ( 0x00, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING ( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING ( 0x10, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x00, "150k 250k" ) + PORT_DIPSETTING( 0x04, "250k 500k" ) + PORT_DIPSETTING( 0x08, "500k 750k" ) + PORT_DIPSETTING( 0x0c, "750k 1500k" ) + PORT_DIPNAME( 0x30, 0x30, "Credit(s)/Ships" ) PORT_DIPLOCATION("SW1:5,6") + PORT_DIPSETTING( 0x00, "1C/2S 2C/4S" ) + PORT_DIPSETTING( 0x10, "1C/2S 2C/5S" ) + PORT_DIPSETTING( 0x20, "1C/3S 2C/6S" ) + PORT_DIPSETTING( 0x30, "1C/3S 2C/7S" ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:7") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + + PORT_START("DSW2") + PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") + PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 4C_5C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 3C_4C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_5C ) ) + PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:4,5,6") + PORT_DIPSETTING( 0x30, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x18, DEF_STR( 4C_5C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 3C_4C ) ) + PORT_DIPSETTING( 0x28, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_5C ) ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:7") - PORT_DIPSETTING ( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING ( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:8") - PORT_DIPSETTING ( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING ( 0x80, DEF_STR( Cocktail ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:8") + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) - PORT_START("IN0") /* IN2 - port 0x11 */ + PORT_START("IN0") /* port 0x11 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -447,7 +440,7 @@ static INPUT_PORTS_START( omegrace ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("IN1") /* IN3 - port 0x12 */ + PORT_START("IN1") /* port 0x12 */ 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_HIGH, IPT_START2 ) PORT_NAME("2 Players Start (1 credit)") @@ -457,11 +450,14 @@ static INPUT_PORTS_START( omegrace ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("1 Player Start (1 credit)") PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START3 ) PORT_NAME("1 Player Start (2 credits)") - PORT_START("SPIN0") /* IN4 - port 0x15 - spinner */ - PORT_BIT(0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) + PORT_START("SPIN0") /* port 0x15 - spinner */ + PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) + + PORT_START("SPIN1") /* port 0x16 - second spinner */ + PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) PORT_COCKTAIL - PORT_START("SPIN1") /* IN5 - port 0x16 - second spinner */ - PORT_BIT(0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) PORT_COCKTAIL + PORT_START("AVGDVG") /* port 0x0b */ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) INPUT_PORTS_END diff --git a/src/mame/drivers/phoenix.c b/src/mame/drivers/phoenix.c index bebaadb5e8b..89b6014f519 100644 --- a/src/mame/drivers/phoenix.c +++ b/src/mame/drivers/phoenix.c @@ -78,7 +78,7 @@ static INPUT_PORTS_START( phoenix ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(player_input_r, 0) + PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(player_input_r, NULL) PORT_START("DSW0") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" ) @@ -161,7 +161,7 @@ static INPUT_PORTS_START( condor ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(player_input_r, 0) + PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(player_input_r, NULL) PORT_START("DSW0") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" ) @@ -291,7 +291,7 @@ static INPUT_PORTS_START( pleiads ) PORT_INCLUDE( phoenix ) PORT_MODIFY("IN0") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(pleiads_protection_r, 0) /* Protection. See 0x0552 */ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(pleiads_protection_r, NULL) /* Protection. See 0x0552 */ PORT_MODIFY("DSW0") PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" ) diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c index 552dd28f472..e33f12610ff 100644 --- a/src/mame/drivers/r2dtank.c +++ b/src/mame/drivers/r2dtank.c @@ -462,7 +462,7 @@ static INPUT_PORTS_START( r2dtank ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_ttl74123_output, 0) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_ttl74123_output, NULL) PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL diff --git a/src/mame/drivers/segag80v.c b/src/mame/drivers/segag80v.c index 9f93feb7bb2..ce31ecb91e4 100644 --- a/src/mame/drivers/segag80v.c +++ b/src/mame/drivers/segag80v.c @@ -579,7 +579,7 @@ static INPUT_PORTS_START( elim4 ) PORT_INCLUDE( g80v_generic ) PORT_MODIFY("D7D6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(elim4_joint_coin_r, 0) /* combination of all four coin inputs */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(elim4_joint_coin_r, NULL) /* combination of all four coin inputs */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) diff --git a/src/mame/drivers/skullxbo.c b/src/mame/drivers/skullxbo.c index 882db73d37a..5c4734754f8 100644 --- a/src/mame/drivers/skullxbo.c +++ b/src/mame/drivers/skullxbo.c @@ -134,7 +134,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0xff4800, 0xff4fff) AM_WRITE(skullxbo_mobwr_w) AM_RANGE(0xff6000, 0xff6fff) AM_WRITE(atarigen_eeprom_w) AM_BASE(&atarigen_eeprom) AM_SIZE(&atarigen_eeprom_size) AM_RANGE(0xff5000, 0xff5001) AM_READ(atarigen_sound_r) - AM_RANGE(0xff5800, 0xff5801) AM_READ(input_port_0_word_r) + AM_RANGE(0xff5800, 0xff5801) AM_READ_PORT("FF5800") AM_RANGE(0xff5802, 0xff5803) AM_READ(special_port1_r) AM_RANGE(0xff6000, 0xff6fff) AM_READ(atarigen_eeprom_r) AM_RANGE(0xff8000, 0xff9fff) AM_RAM_WRITE(atarigen_playfield_latched_lsb_w) AM_BASE(&atarigen_playfield) @@ -154,7 +154,7 @@ ADDRESS_MAP_END *************************************/ static INPUT_PORTS_START( skullxbo ) - PORT_START("FF5800") /* ff5800 */ + PORT_START("FF5800") PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) @@ -165,7 +165,7 @@ static INPUT_PORTS_START( skullxbo ) 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("FF5802") /* ff5802 */ + PORT_START("FF5802") PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNUSED ) /* HBLANK */ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_VBLANK ) diff --git a/src/mame/drivers/skyarmy.c b/src/mame/drivers/skyarmy.c index e9e5db1cb5c..0321ecff80e 100644 --- a/src/mame/drivers/skyarmy.c +++ b/src/mame/drivers/skyarmy.c @@ -159,10 +159,10 @@ static ADDRESS_MAP_START( skyarmy_readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x8800, 0x93FF) AM_READ(SMH_RAM) /* Video RAM */ AM_RANGE(0x9800, 0x983F) AM_READ(SMH_RAM) /* Sprites */ AM_RANGE(0x9840, 0x985F) AM_READ(skyarmy_scrollram_r) /* Sroll RAM */ - AM_RANGE(0xA000, 0xA000) AM_READ(input_port_0_r) - AM_RANGE(0xA001, 0xA001) AM_READ(input_port_1_r) - AM_RANGE(0xA002, 0xA002) AM_READ(input_port_2_r) - AM_RANGE(0xA003, 0xA003) AM_READ(input_port_3_r) + AM_RANGE(0xA000, 0xA000) AM_READ_PORT("DSW") + AM_RANGE(0xA001, 0xA001) AM_READ_PORT("P1") + AM_RANGE(0xA002, 0xA002) AM_READ_PORT("P2") + AM_RANGE(0xA003, 0xA003) AM_READ_PORT("SYSTEM") ADDRESS_MAP_END static ADDRESS_MAP_START( skyarmy_writemem, ADDRESS_SPACE_PROGRAM, 8 ) diff --git a/src/mame/drivers/skydiver.c b/src/mame/drivers/skydiver.c index 20ac8a4d1c0..c8cda328738 100644 --- a/src/mame/drivers/skydiver.c +++ b/src/mame/drivers/skydiver.c @@ -199,20 +199,20 @@ static ADDRESS_MAP_START( skydiver_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x1008, 0x100b) AM_MIRROR(0x47f0) AM_WRITE(skydiver_whistle_w) AM_RANGE(0x100c, 0x100d) AM_MIRROR(0x47f0) AM_WRITE(skydiver_nmion_w) AM_RANGE(0x100e, 0x100f) AM_MIRROR(0x47f0) AM_WRITE(skydiver_width_w) - AM_RANGE(0x1800, 0x1800) AM_MIRROR(0x47e0) AM_READ(input_port_0_r) - AM_RANGE(0x1801, 0x1801) AM_MIRROR(0x47e0) AM_READ(input_port_1_r) - AM_RANGE(0x1802, 0x1802) AM_MIRROR(0x47e0) AM_READ(input_port_2_r) - AM_RANGE(0x1803, 0x1803) AM_MIRROR(0x47e0) AM_READ(input_port_3_r) - AM_RANGE(0x1804, 0x1804) AM_MIRROR(0x47e0) AM_READ(input_port_4_r) - AM_RANGE(0x1805, 0x1805) AM_MIRROR(0x47e0) AM_READ(input_port_5_r) - AM_RANGE(0x1806, 0x1806) AM_MIRROR(0x47e0) AM_READ(input_port_6_r) - AM_RANGE(0x1807, 0x1807) AM_MIRROR(0x47e0) AM_READ(input_port_7_r) - AM_RANGE(0x1808, 0x1808) AM_MIRROR(0x47e4) AM_READ(input_port_8_r) - AM_RANGE(0x1809, 0x1809) AM_MIRROR(0x47e4) AM_READ(input_port_9_r) - AM_RANGE(0x180a, 0x180a) AM_MIRROR(0x47e4) AM_READ(input_port_10_r) - AM_RANGE(0x180b, 0x180b) AM_MIRROR(0x47e4) AM_READ(input_port_11_r) - AM_RANGE(0x1810, 0x1810) AM_MIRROR(0x47e4) AM_READ(input_port_12_r) - AM_RANGE(0x1811, 0x1811) AM_MIRROR(0x47e4) AM_READ(input_port_13_r) + AM_RANGE(0x1800, 0x1800) AM_MIRROR(0x47e0) AM_READ_PORT("IN0") + AM_RANGE(0x1801, 0x1801) AM_MIRROR(0x47e0) AM_READ_PORT("IN1") + AM_RANGE(0x1802, 0x1802) AM_MIRROR(0x47e0) AM_READ_PORT("IN2") + AM_RANGE(0x1803, 0x1803) AM_MIRROR(0x47e0) AM_READ_PORT("IN3") + AM_RANGE(0x1804, 0x1804) AM_MIRROR(0x47e0) AM_READ_PORT("IN4") + AM_RANGE(0x1805, 0x1805) AM_MIRROR(0x47e0) AM_READ_PORT("IN5") + AM_RANGE(0x1806, 0x1806) AM_MIRROR(0x47e0) AM_READ_PORT("IN6") + AM_RANGE(0x1807, 0x1807) AM_MIRROR(0x47e0) AM_READ_PORT("IN7") + AM_RANGE(0x1808, 0x1808) AM_MIRROR(0x47e4) AM_READ_PORT("IN8") + AM_RANGE(0x1809, 0x1809) AM_MIRROR(0x47e4) AM_READ_PORT("IN9") + AM_RANGE(0x180a, 0x180a) AM_MIRROR(0x47e4) AM_READ_PORT("IN10") + AM_RANGE(0x180b, 0x180b) AM_MIRROR(0x47e4) AM_READ_PORT("IN11") + AM_RANGE(0x1810, 0x1810) AM_MIRROR(0x47e4) AM_READ_PORT("IN12") + AM_RANGE(0x1811, 0x1811) AM_MIRROR(0x47e4) AM_READ_PORT("IN13") AM_RANGE(0x2000, 0x201f) AM_MIRROR(0x47e0) AM_READWRITE(watchdog_reset_r, skydiver_2000_201F_w) AM_RANGE(0x2800, 0x2fff) AM_MIRROR(0x4000) AM_READ(SMH_ROM) AM_RANGE(0x3000, 0x37ff) AM_MIRROR(0x4000) AM_READ(SMH_ROM) @@ -229,47 +229,47 @@ ADDRESS_MAP_END *************************************/ static INPUT_PORTS_START( skydiver ) - PORT_START("IN0") /* IN0 */ + PORT_START("IN0") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_START("IN1") /* IN1 */ + PORT_START("IN1") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_START("IN2") /* IN2 */ + PORT_START("IN2") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* Jump 1 */ PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Chute 1 */ - PORT_START("IN3") /* IN3 */ + PORT_START("IN3") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* Jump 2 */ PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* Chute 2 */ - PORT_START("IN4") /* IN4 */ + PORT_START("IN4") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("(D) OPT SW NEXT TEST") PORT_CODE(KEYCODE_D) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("(F) OPT SW") PORT_CODE(KEYCODE_F) - PORT_START("IN5") /* IN5 */ + PORT_START("IN5") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("(E) OPT SW") PORT_CODE(KEYCODE_E) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("(H) OPT SW DIAGNOSTICS") PORT_CODE(KEYCODE_H) - PORT_START("IN6") /* IN6 */ + PORT_START("IN6") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) - PORT_START("IN7") /* IN7 */ + PORT_START("IN7") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) - PORT_START("IN8") /* IN8 */ + PORT_START("IN8") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) @@ -277,7 +277,7 @@ static INPUT_PORTS_START( skydiver ) PORT_DIPSETTING( 0x80, "5" ) PORT_DIPSETTING( 0xc0, "6" ) - PORT_START("IN9") /* IN9 */ + PORT_START("IN9") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) ) @@ -285,7 +285,7 @@ static INPUT_PORTS_START( skydiver ) PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_START("IN10") /* IN10 */ + PORT_START("IN10") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0x40, 0x00, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) @@ -294,7 +294,7 @@ static INPUT_PORTS_START( skydiver ) PORT_DIPSETTING( 0x80, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_START("IN11") /* IN11 */ + PORT_START("IN11") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Language ) ) PORT_DIPSETTING( 0x00, DEF_STR( English ) ) @@ -302,12 +302,12 @@ static INPUT_PORTS_START( skydiver ) PORT_DIPSETTING( 0x80, DEF_STR( Spanish ) ) PORT_DIPSETTING( 0xc0, DEF_STR( German ) ) - PORT_START("IN12") /* IN12 */ + PORT_START("IN12") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - PORT_START("IN13") /* IN13 */ + PORT_START("IN13") PORT_BIT (0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_TILT ) PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_UNUSED ) diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c index c0f2a801403..211124d240a 100644 --- a/src/mame/drivers/skylncr.c +++ b/src/mame/drivers/skylncr.c @@ -173,12 +173,12 @@ static WRITE8_HANDLER( skylncr_coin_w ) static ADDRESS_MAP_START( io_map_skylncr, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ( input_port_0_r ) - AM_RANGE(0x01, 0x01) AM_READ( input_port_1_r ) - AM_RANGE(0x02, 0x02) AM_READ( input_port_2_r ) - AM_RANGE(0x10, 0x10) AM_READ( input_port_3_r ) - AM_RANGE(0x11, 0x11) AM_READ( input_port_4_r ) - AM_RANGE(0x12, 0x12) AM_READ( input_port_5_r ) + AM_RANGE(0x00, 0x00) AM_READ_PORT("SYSTEM") + AM_RANGE(0x01, 0x01) AM_READ_PORT("BUTTONS") + AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW1") + AM_RANGE(0x10, 0x10) AM_READ_PORT("DSW2") + AM_RANGE(0x11, 0x11) AM_READ_PORT("COIN1") + AM_RANGE(0x12, 0x12) AM_READ_PORT("COIN2") AM_RANGE(0x20, 0x20) AM_WRITE( skylncr_coin_w ) @@ -262,8 +262,7 @@ static GFXDECODE_START( skylncr ) GFXDECODE_END static INPUT_PORTS_START( skylncr ) - - PORT_START("SYSTEM") // IN0 - $0 "PORT0 A" + PORT_START("SYSTEM") /* $0 "PORT0 A" */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START3) @@ -273,7 +272,7 @@ static INPUT_PORTS_START( skylncr ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4) - PORT_START("BUTTONS") // IN1 - $1 "PORT0 B" + PORT_START("BUTTONS") /* $1 "PORT0 B" */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3) @@ -283,7 +282,7 @@ static INPUT_PORTS_START( skylncr ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_PLAYER(2) - PORT_START("DSW1") // IN2 - $2 "DSW1" + PORT_START("DSW1") /* $2 "DSW1" */ PORT_DIPNAME( 0x01, 0x01, "DSW1" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -309,7 +308,7 @@ static INPUT_PORTS_START( skylncr ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW2") // IN3 - $10 "DSW2" + PORT_START("DSW2") /* $10 "DSW2" */ PORT_DIPNAME( 0x01, 0x01, "DSW2" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -335,7 +334,7 @@ static INPUT_PORTS_START( skylncr ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("COIN1") // IN4 - $11 "PORT1 B" + PORT_START("COIN1") /* $11 "PORT1 B" */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -345,7 +344,7 @@ static INPUT_PORTS_START( skylncr ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("COIN2") // IN5 - $12 "PORT1 C" + PORT_START("COIN2") /* $12 "PORT1 C" */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -355,7 +354,7 @@ static INPUT_PORTS_START( skylncr ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW4") // IN6 - AY8910 port A + PORT_START("DSW4") /* AY8910 port A */ PORT_DIPNAME( 0x01, 0x01, "DSW4" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -381,7 +380,7 @@ static INPUT_PORTS_START( skylncr ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") // IN7 - AY8910 port B + PORT_START("DSW3") /* AY8910 port B */ PORT_DIPNAME( 0x01, 0x01, "DSW3" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -406,7 +405,6 @@ static INPUT_PORTS_START( skylncr ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - INPUT_PORTS_END static const ay8910_interface ay8910_config = diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c index a2dc7b70420..58c29de18fb 100644 --- a/src/mame/drivers/sliver.c +++ b/src/mame/drivers/sliver.c @@ -406,9 +406,9 @@ static ADDRESS_MAP_START( sliver_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300004, 0x300005) AM_WRITE(io_offset_w) //unknown i/o device AM_RANGE(0x300006, 0x300007) AM_WRITE(io_data_w) - AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r) - AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r) - AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r) + AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1_P2") + AM_RANGE(0x400002, 0x400003) AM_READ_PORT("SYSTEM") + AM_RANGE(0x400004, 0x400005) AM_READ_PORT("DSW") AM_RANGE(0x400006, 0x400007) AM_WRITE(fifo_data_w) AM_RANGE(0x400008, 0x400009) AM_WRITE(fifo_clear_w) AM_RANGE(0x40000a, 0x40000b) AM_WRITE(fifo_flush_w) diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c index 20a2a38db79..b696dd1b40d 100644 --- a/src/mame/drivers/snowbros.c +++ b/src/mame/drivers/snowbros.c @@ -164,9 +164,9 @@ static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) AM_RANGE(0x100000, 0x103fff) AM_READ(SMH_RAM) AM_RANGE(0x300000, 0x300001) AM_READ(snowbros_68000_sound_r) - AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r) - AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r) - AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r) + AM_RANGE(0x500000, 0x500001) AM_READ_PORT("DSW1") + AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW2") + AM_RANGE(0x500004, 0x500005) AM_READ_PORT("SYSTEM") AM_RANGE(0x600000, 0x6001ff) AM_READ(SMH_RAM) AM_RANGE(0x700000, 0x701fff) AM_READ(pandora_spriteram_LSB_r) ADDRESS_MAP_END @@ -213,9 +213,9 @@ static ADDRESS_MAP_START( wintbob_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) AM_RANGE(0x100000, 0x103fff) AM_READ(SMH_RAM) AM_RANGE(0x300000, 0x300001) AM_READ(snowbros_68000_sound_r) - AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r) - AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r) - AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r) + AM_RANGE(0x500000, 0x500001) AM_READ_PORT("DSW1") + AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW2") + AM_RANGE(0x500004, 0x500005) AM_READ_PORT("SYSTEM") AM_RANGE(0x600000, 0x6001ff) AM_READ(SMH_RAM) AM_RANGE(0x700000, 0x701fff) AM_READ(SMH_RAM) ADDRESS_MAP_END @@ -238,9 +238,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( honeydol_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) AM_RANGE(0x100000, 0x10ffff) AM_READ(SMH_RAM) - AM_RANGE(0x900000, 0x900001) AM_READ(input_port_0_word_r) - AM_RANGE(0x900002, 0x900003) AM_READ(input_port_1_word_r) - AM_RANGE(0x900004, 0x900005) AM_READ(input_port_2_word_r) + AM_RANGE(0x900000, 0x900001) AM_READ_PORT("DSW1") + AM_RANGE(0x900002, 0x900003) AM_READ_PORT("DSW2") + AM_RANGE(0x900004, 0x900005) AM_READ_PORT("SYSTEM") AM_RANGE(0xa00000, 0xa007ff) AM_READ(SMH_RAM) AM_RANGE(0xb00000, 0xb01fff) AM_READ(SMH_RAM) ADDRESS_MAP_END @@ -298,9 +298,9 @@ static ADDRESS_MAP_START( twinadv_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) AM_RANGE(0x100000, 0x10ffff) AM_READ(SMH_RAM) AM_RANGE(0x300000, 0x300001) AM_READ(snowbros_68000_sound_r) - AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r) - AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r) - AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r) + AM_RANGE(0x500000, 0x500001) AM_READ_PORT("DSW1") + AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW2") + AM_RANGE(0x500004, 0x500005) AM_READ_PORT("SYSTEM") AM_RANGE(0x600000, 0x6001ff) AM_READ(SMH_RAM) AM_RANGE(0x700000, 0x701fff) AM_READ(SMH_RAM) ADDRESS_MAP_END @@ -365,9 +365,9 @@ static ADDRESS_MAP_START( hyperpac_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM) AM_RANGE(0x100000, 0x10ffff) AM_READ(SMH_RAM) - AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r) - AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r) - AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r) + AM_RANGE(0x500000, 0x500001) AM_READ_PORT("DSW1") + AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW2") + AM_RANGE(0x500004, 0x500005) AM_READ_PORT("SYSTEM") AM_RANGE(0x600000, 0x6001ff) AM_READ(SMH_RAM) AM_RANGE(0x700000, 0x701fff) AM_READ(pandora_spriteram_LSB_r) @@ -513,9 +513,9 @@ static ADDRESS_MAP_START( readmem3, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE( 0x000000, 0x03ffff) AM_READ(SMH_ROM) AM_RANGE( 0x100000, 0x103fff) AM_READ(SMH_RAM) AM_RANGE( 0x300000, 0x300001) AM_READ(sb3_sound_r) // ? - AM_RANGE( 0x500000, 0x500001) AM_READ(input_port_0_word_r) - AM_RANGE( 0x500002, 0x500003) AM_READ(input_port_1_word_r) - AM_RANGE( 0x500004, 0x500005) AM_READ(input_port_2_word_r) + AM_RANGE( 0x500000, 0x500001) AM_READ_PORT("DSW1") + AM_RANGE( 0x500002, 0x500003) AM_READ_PORT("DSW2") + AM_RANGE( 0x500004, 0x500005) AM_READ_PORT("SYSTEM") AM_RANGE( 0x600000, 0x6003ff) AM_READ(SMH_RAM) AM_RANGE( 0x700000, 0x7021ff) AM_READ(SMH_RAM) ADDRESS_MAP_END @@ -538,9 +538,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( finalttr_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM) AM_RANGE(0x100000, 0x103fff) AM_READ(SMH_RAM) - AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r) - AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r) - AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r) + AM_RANGE(0x500000, 0x500001) AM_READ_PORT("DSW1") + AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW2") + AM_RANGE(0x500004, 0x500005) AM_READ_PORT("SYSTEM") AM_RANGE(0x600000, 0x6001ff) AM_READ(SMH_RAM) AM_RANGE(0x700000, 0x701fff) AM_READ(pandora_spriteram_LSB_r) @@ -572,22 +572,22 @@ static INPUT_PORTS_START( snowbros ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x08, DEF_STR( On ) ) PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x00) - PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x00) - PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x00) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) + PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) + PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) + PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) + PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) - PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x01) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x00) - PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x00) - PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x00) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x01,PORTCOND_EQUALS,0x00) + PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) + PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x01) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) + PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1", 0x01, PORTCOND_EQUALS, 0x00) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY diff --git a/src/mame/drivers/solomon.c b/src/mame/drivers/solomon.c index 755459d1da5..dfda7390286 100644 --- a/src/mame/drivers/solomon.c +++ b/src/mame/drivers/solomon.c @@ -59,12 +59,12 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xdc00, 0xdfff) AM_RAM_WRITE(solomon_videoram2_w) AM_BASE(&solomon_videoram2) AM_RANGE(0xe000, 0xe07f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) AM_RANGE(0xe400, 0xe5ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_le_w) AM_BASE(&paletteram) - AM_RANGE(0xe600, 0xe600) AM_READ(input_port_0_r) - AM_RANGE(0xe601, 0xe601) AM_READ(input_port_1_r) - AM_RANGE(0xe602, 0xe602) AM_READ(input_port_2_r) + AM_RANGE(0xe600, 0xe600) AM_READ_PORT("P1") + AM_RANGE(0xe601, 0xe601) AM_READ_PORT("P2") + AM_RANGE(0xe602, 0xe602) AM_READ_PORT("SYSTEM") AM_RANGE(0xe603, 0xe603) AM_READ(solomon_0xe603_r) - AM_RANGE(0xe604, 0xe604) AM_READ(input_port_3_r) /* DSW1 */ - AM_RANGE(0xe605, 0xe605) AM_READ(input_port_4_r) /* DSW2 */ + AM_RANGE(0xe604, 0xe604) AM_READ_PORT("DSW1") + AM_RANGE(0xe605, 0xe605) AM_READ_PORT("DSW2") AM_RANGE(0xe600, 0xe600) AM_WRITE(interrupt_enable_w) AM_RANGE(0xe604, 0xe604) AM_WRITE(solomon_flipscreen_w) AM_RANGE(0xe800, 0xe800) AM_WRITE(solomon_sh_command_w) @@ -91,7 +91,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( solomon ) - PORT_START("P1") /* IN0 */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY @@ -101,7 +101,7 @@ static INPUT_PORTS_START( solomon ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("P2") /* IN1 */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL @@ -111,7 +111,7 @@ static INPUT_PORTS_START( solomon ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("SYSTEM") /* COIN */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -121,7 +121,7 @@ static INPUT_PORTS_START( solomon ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("DSW1") /* DSW1 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -144,7 +144,7 @@ static INPUT_PORTS_START( solomon ) PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0xc0, DEF_STR( 1C_3C ) ) - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) diff --git a/src/mame/drivers/sonson.c b/src/mame/drivers/sonson.c index c5691dd4d6f..5164066b4b5 100644 --- a/src/mame/drivers/sonson.c +++ b/src/mame/drivers/sonson.c @@ -85,11 +85,11 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(sonson_colorram_w) AM_BASE(&colorram) AM_RANGE(0x2020, 0x207f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) AM_RANGE(0x3000, 0x3000) AM_WRITE(sonson_scrollx_w) - AM_RANGE(0x3002, 0x3002) AM_READ(input_port_0_r) /* IN0 */ - AM_RANGE(0x3003, 0x3003) AM_READ(input_port_1_r) /* IN1 */ - AM_RANGE(0x3004, 0x3004) AM_READ(input_port_2_r) /* IN2 */ - AM_RANGE(0x3005, 0x3005) AM_READ(input_port_3_r) /* DSW0 */ - AM_RANGE(0x3006, 0x3006) AM_READ(input_port_4_r) /* DSW1 */ + AM_RANGE(0x3002, 0x3002) AM_READ_PORT("P1") + AM_RANGE(0x3003, 0x3003) AM_READ_PORT("P2") + AM_RANGE(0x3004, 0x3004) AM_READ_PORT("SYSTEM") + AM_RANGE(0x3005, 0x3005) AM_READ_PORT("DSW1") + AM_RANGE(0x3006, 0x3006) AM_READ_PORT("DSW2") AM_RANGE(0x3008, 0x3008) AM_WRITENOP // might be Y scroll, but the game always sets it to 0 AM_RANGE(0x3010, 0x3010) AM_WRITE(soundlatch_w) AM_RANGE(0x3018, 0x3018) AM_WRITE(sonson_flipscreen_w) @@ -110,7 +110,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( sonson ) - PORT_START("P1") /* IN0 */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY @@ -120,7 +120,7 @@ static INPUT_PORTS_START( sonson ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ - PORT_START("P2") /* IN1 */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) @@ -130,7 +130,7 @@ static INPUT_PORTS_START( sonson ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ - PORT_START("SYSTEM") /* IN2 */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ @@ -140,7 +140,7 @@ static INPUT_PORTS_START( sonson ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ - PORT_START("DSW1") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) @@ -167,7 +167,7 @@ static INPUT_PORTS_START( sonson ) PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("DSW2") /* DSW1 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "3" ) PORT_DIPSETTING( 0x02, "4" ) diff --git a/src/mame/drivers/spacefb.c b/src/mame/drivers/spacefb.c index 5c9c22f2ca1..973ac7ab4a3 100644 --- a/src/mame/drivers/spacefb.c +++ b/src/mame/drivers/spacefb.c @@ -213,10 +213,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( spacefb_main_io_map, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0x7) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) - AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r) - AM_RANGE(0x02, 0x02) AM_READ(input_port_2_r) - AM_RANGE(0x03, 0x03) AM_READ(input_port_3_r) + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") + AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") + AM_RANGE(0x02, 0x02) AM_READ_PORT("SYSTEM") + AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") AM_RANGE(0x04, 0x07) AM_READNOP /* yes, this is correct (1-of-8 decoder) */ AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_WRITE(spacefb_port_0_w) @@ -242,7 +242,7 @@ ADDRESS_MAP_END *************************************/ static INPUT_PORTS_START( spacefb ) - PORT_START("P1") /* IN0 */ + PORT_START("P1") 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 ) @@ -252,7 +252,7 @@ static INPUT_PORTS_START( spacefb ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_START("P2") /* IN1 */ + PORT_START("P2") 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 ) @@ -262,7 +262,7 @@ static INPUT_PORTS_START( spacefb ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_START("SYSTEM") /* Coin - Start */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -272,7 +272,7 @@ static INPUT_PORTS_START( spacefb ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE ) /* Test ? */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_START("DSW") /* DSW0 */ + PORT_START("DSW") PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:1,2") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) @@ -295,37 +295,9 @@ INPUT_PORTS_END /* same as Space Firebird, except for the difficulty switch */ static INPUT_PORTS_START( spacedem ) - PORT_START("P1") /* IN0 */ - 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 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - - PORT_START("P2") /* IN1 */ - 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 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - - PORT_START("SYSTEM") /* Coin - Start */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE ) /* Test ? */ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_INCLUDE( spacefb ) - PORT_START("DSW") /* DSW0 */ + PORT_MODIFY("DSW") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) diff --git a/src/mame/drivers/spbactn.c b/src/mame/drivers/spbactn.c index 030bff53f02..dc472302683 100644 --- a/src/mame/drivers/spbactn.c +++ b/src/mame/drivers/spbactn.c @@ -150,11 +150,11 @@ static ADDRESS_MAP_START( spbactn_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x60000, 0x67fff) AM_READ(SMH_RAM) AM_RANGE(0x70000, 0x77fff) AM_READ(SMH_RAM) AM_RANGE(0x80000, 0x82fff) AM_READ(SMH_RAM) - AM_RANGE(0x90000, 0x90001) AM_READ(input_port_0_word_r) - AM_RANGE(0x90010, 0x90011) AM_READ(input_port_1_word_r) - AM_RANGE(0x90020, 0x90021) AM_READ(input_port_2_word_r) - AM_RANGE(0x90030, 0x90031) AM_READ(input_port_4_word_r) - AM_RANGE(0x90040, 0x90041) AM_READ(input_port_3_word_r) + AM_RANGE(0x90000, 0x90001) AM_READ_PORT("IN0") + AM_RANGE(0x90010, 0x90011) AM_READ_PORT("IN1") + AM_RANGE(0x90020, 0x90021) AM_READ_PORT("SYSTEM") + AM_RANGE(0x90030, 0x90031) AM_READ_PORT("DSW1") + AM_RANGE(0x90040, 0x90041) AM_READ_PORT("DSW2") ADDRESS_MAP_END static ADDRESS_MAP_START( spbactn_writemem, ADDRESS_SPACE_PROGRAM, 16 ) @@ -216,7 +216,7 @@ static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_END static INPUT_PORTS_START( spbactn ) - PORT_START("IN0") /* IN0 */ + PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -226,7 +226,7 @@ static INPUT_PORTS_START( spbactn ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("IN1") /* IN1 */ + PORT_START("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 ) @@ -236,7 +236,7 @@ static INPUT_PORTS_START( spbactn ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SYSTEM") /* IN2 */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) // Press mulitple times for multiple players @@ -246,7 +246,7 @@ static INPUT_PORTS_START( spbactn ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW1") /* DSW1 */ + PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 3C_1C ) ) @@ -271,7 +271,7 @@ static INPUT_PORTS_START( spbactn ) PORT_DIPSETTING( 0x80, "4" ) PORT_DIPSETTING( 0x40, "5" ) - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c index 94bba62c2c1..b4634dae6ed 100644 --- a/src/mame/drivers/spcforce.c +++ b/src/mame/drivers/spcforce.c @@ -81,9 +81,9 @@ static WRITE8_HANDLER( spcforce_soundtrigger_w ) static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x3fff) AM_READ(SMH_ROM) AM_RANGE(0x4000, 0x43ff) AM_READ(SMH_RAM) - AM_RANGE(0x7000, 0x7000) AM_READ(input_port_0_r) - AM_RANGE(0x7001, 0x7001) AM_READ(input_port_1_r) - AM_RANGE(0x7002, 0x7002) AM_READ(input_port_2_r) + AM_RANGE(0x7000, 0x7000) AM_READ_PORT("DSW") + AM_RANGE(0x7001, 0x7001) AM_READ_PORT("P1") + AM_RANGE(0x7002, 0x7002) AM_READ_PORT("P2") AM_RANGE(0x8000, 0x83ff) AM_READ(SMH_RAM) AM_RANGE(0x9000, 0x93ff) AM_READ(SMH_RAM) AM_RANGE(0xa000, 0xa3ff) AM_READ(SMH_RAM) @@ -123,7 +123,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( spcforce ) - PORT_START("DSW") /* DSW */ + PORT_START("DSW") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) ) @@ -147,7 +147,7 @@ static INPUT_PORTS_START( spcforce ) PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_START("P1") /* IN0 */ + PORT_START("P1") PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -157,7 +157,7 @@ static INPUT_PORTS_START( spcforce ) PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_START("P2") /* IN1 */ + PORT_START("P2") PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -170,7 +170,7 @@ INPUT_PORTS_END /* same as spcforce, but no cocktail mode */ static INPUT_PORTS_START( spcforc2 ) - PORT_START("DSW") /* DSW */ + PORT_START("DSW") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) ) @@ -194,7 +194,7 @@ static INPUT_PORTS_START( spcforc2 ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - PORT_START("P1") /* IN0 */ + PORT_START("P1") PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -204,7 +204,7 @@ static INPUT_PORTS_START( spcforc2 ) PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_START("P2") /* IN1 */ + PORT_START("P2") PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW ) PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_VBLANK ) INPUT_PORTS_END diff --git a/src/mame/drivers/speedbal.c b/src/mame/drivers/speedbal.c index 3f6ac5e0d47..75fb7df6dff 100644 --- a/src/mame/drivers/speedbal.c +++ b/src/mame/drivers/speedbal.c @@ -83,10 +83,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( main_cpu_io_map, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) - AM_RANGE(0x10, 0x10) AM_READ(input_port_1_r) - AM_RANGE(0x20, 0x20) AM_READ(input_port_2_r) - AM_RANGE(0x30, 0x30) AM_READ(input_port_3_r) + AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW2") + AM_RANGE(0x10, 0x10) AM_READ_PORT("DSW1") + AM_RANGE(0x20, 0x20) AM_READ_PORT("P1") + AM_RANGE(0x30, 0x30) AM_READ_PORT("P2") AM_RANGE(0x40, 0x40) AM_WRITE(speedbal_coincounter_w) AM_RANGE(0x50, 0x50) AM_WRITENOP ADDRESS_MAP_END @@ -110,7 +110,30 @@ ADDRESS_MAP_END static INPUT_PORTS_START( speedbal ) - PORT_START("DSW2") /* DSW2 */ + PORT_START("DSW1") + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x00, "2" ) + PORT_DIPSETTING( 0x30, "3" ) + PORT_DIPSETTING( 0x20, "4" ) + PORT_DIPSETTING( 0x10, "5" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + + PORT_START("DSW2") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Bonus_Life ) ) PORT_DIPSETTING( 0x06, "70000 200000 1M" ) PORT_DIPSETTING( 0x07, "70000 200000" ) @@ -134,29 +157,6 @@ static INPUT_PORTS_START( speedbal ) PORT_DIPSETTING( 0x40, "Difficult" ) PORT_DIPSETTING( 0x00, "Very Difficult" ) - PORT_START("DSW1") /* DSW1 */ - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "2" ) - PORT_DIPSETTING( 0x30, "3" ) - PORT_DIPSETTING( 0x20, "4" ) - PORT_DIPSETTING( 0x10, "5" ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW , IPT_BUTTON1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW , IPT_BUTTON2 ) diff --git a/src/mame/drivers/speedspn.c b/src/mame/drivers/speedspn.c index e9f1873fd4f..dd47dcca017 100644 --- a/src/mame/drivers/speedspn.c +++ b/src/mame/drivers/speedspn.c @@ -147,11 +147,11 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x10, 0x10) AM_READ(input_port_0_r) // inputs - AM_RANGE(0x11, 0x11) AM_READ(input_port_1_r) // inputs - AM_RANGE(0x12, 0x12) AM_READ(input_port_2_r) // inputs - AM_RANGE(0x13, 0x13) AM_READ(input_port_3_r) - AM_RANGE(0x14, 0x14) AM_READ(input_port_4_r) // inputs + AM_RANGE(0x10, 0x10) AM_READ_PORT("SYSTEM") + AM_RANGE(0x11, 0x11) AM_READ_PORT("P1") + AM_RANGE(0x12, 0x12) AM_READ_PORT("P2") + AM_RANGE(0x13, 0x13) AM_READ_PORT("DSW1") + AM_RANGE(0x14, 0x14) AM_READ_PORT("DSW2") AM_RANGE(0x16, 0x16) AM_READ(speedspn_irq_ack_r) // @@@ could be watchdog, value is discarded ADDRESS_MAP_END @@ -185,7 +185,7 @@ static INPUT_PORTS_START( speedspn ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_START("P1") /* Player 1 Inputs */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) @@ -195,7 +195,7 @@ static INPUT_PORTS_START( speedspn ) 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("P2") /* Player 2 Inputs */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) @@ -205,7 +205,7 @@ static INPUT_PORTS_START( speedspn ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_START("DSW1") /* Dips */ + PORT_START("DSW1") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x01, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) ) @@ -241,7 +241,7 @@ static INPUT_PORTS_START( speedspn ) PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_START("DSW2") /* Dips */ + PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x01, "World Cup" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c index 84902cc4b68..30a903466c1 100644 --- a/src/mame/drivers/speglsht.c +++ b/src/mame/drivers/speglsht.c @@ -209,8 +209,8 @@ static ADDRESS_MAP_START( speglsht_mem, ADDRESS_SPACE_PROGRAM, 32 ) AM_RANGE(0x01000000, 0x01007fff) AM_RAM //tested - STATIC RAM AM_RANGE(0x01600000, 0x0160004f) AM_READWRITE(cop_r, cop_w) AM_BASE(&cop_ram) AM_RANGE(0x01800200, 0x01800203) AM_WRITE(videoreg_w) - AM_RANGE(0x01800300, 0x01800303) AM_READ(input_port_0_dword_r) - AM_RANGE(0x01800400, 0x01800403) AM_READ(input_port_1_dword_r) + AM_RANGE(0x01800300, 0x01800303) AM_READ_PORT("IN0") + AM_RANGE(0x01800400, 0x01800403) AM_READ_PORT("IN1") AM_RANGE(0x01a00000, 0x01afffff) AM_RAM AM_BASE(&speglsht_framebuffer) AM_RANGE(0x01b00000, 0x01b07fff) AM_RAM //cleared ... video related ? AM_RANGE(0x01c00000, 0x01dfffff) AM_READ(SMH_ROM) AM_WRITE(SMH_ROM) AM_REGION("user2", 0) @@ -223,68 +223,68 @@ ADDRESS_MAP_END static INPUT_PORTS_START( speglsht ) PORT_START("IN0") - PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) - 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) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) + PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN1") - PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0001, "1C/1C or 2C/3C" ) /* 1 coin/1 credit or 2 coins/3 credits */ - PORT_DIPSETTING( 0x0002, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0000, "2C Start/1C Continue" ) - PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x0018, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0008, "1C/1C or 2C/3C" ) /* 1 coin/1 credit or 2 coins/3 credits */ - PORT_DIPSETTING( 0x0010, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0000, "2C Start/1C Continue" ) - PORT_DIPNAME( 0x0040, 0x0040, "Unkown / Unused" ) - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, "Bonus for PAR Play" ) - PORT_DIPSETTING( 0x0080, DEF_STR( None ) ) - PORT_DIPSETTING( 0x0000, "Extra Hole" ) - PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x0300, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x0100, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) ) - PORT_DIPNAME( 0x0c00, 0x0c00, "Number of Players" ) - PORT_DIPSETTING( 0x0c00, "3" ) - PORT_DIPSETTING( 0x0800, "4" ) - PORT_DIPSETTING( 0x0400, "2" ) - PORT_DIPSETTING( 0x0000, "1" ) - PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x0000, "Control Panel" ) - PORT_DIPSETTING( 0x2000, "Double" ) - PORT_DIPSETTING( 0x0000, DEF_STR( Single ) ) - PORT_DIPNAME( 0x4000, 0x4000, "Country" ) - PORT_DIPSETTING( 0x4000, DEF_STR( Japan ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( USA ) ) + PORT_DIPNAME( 0x00000007, 0x00000007, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x00000003, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x00000004, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00000007, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00000001, "1C/1C or 2C/3C" ) /* 1 coin/1 credit or 2 coins/3 credits */ + PORT_DIPSETTING( 0x00000002, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x00000006, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x00000005, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x00000000, "2C Start/1C Continue" ) + PORT_DIPNAME( 0x00000038, 0x00000038, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x00000018, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x00000020, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00000038, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x00000008, "1C/1C or 2C/3C" ) /* 1 coin/1 credit or 2 coins/3 credits */ + PORT_DIPSETTING( 0x00000010, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x00000030, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x00000028, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x00000000, "2C Start/1C Continue" ) + PORT_DIPNAME( 0x00000040, 0x00000040, "Unkown / Unused" ) + PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) + PORT_DIPNAME( 0x00000080, 0x00000080, "Bonus for PAR Play" ) + PORT_DIPSETTING( 0x00000080, DEF_STR( None ) ) + PORT_DIPSETTING( 0x00000000, "Extra Hole" ) + PORT_DIPNAME( 0x00000300, 0x00000300, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x00000300, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x00000200, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x00000100, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( Very_Hard ) ) + PORT_DIPNAME( 0x00000c00, 0x00000c00, "Number of Players" ) + PORT_DIPSETTING( 0x00000c00, "3" ) + PORT_DIPSETTING( 0x00000800, "4" ) + PORT_DIPSETTING( 0x00000400, "2" ) + PORT_DIPSETTING( 0x00000000, "1" ) + PORT_DIPNAME( 0x00001000, 0x00000000, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x00001000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) + PORT_DIPNAME( 0x00002000, 0x00000000, "Control Panel" ) + PORT_DIPSETTING( 0x00002000, "Double" ) + PORT_DIPSETTING( 0x00000000, DEF_STR( Single ) ) + PORT_DIPNAME( 0x00004000, 0x00004000, "Country" ) + PORT_DIPSETTING( 0x00004000, DEF_STR( Japan ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( USA ) ) PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_SERVICE_NO_TOGGLE( 0x00010000, IP_ACTIVE_HIGH ) PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_TILT ) PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x80A00000, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80a00000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c index f9b57706ea3..f67d46af2a3 100644 --- a/src/mame/drivers/splash.c +++ b/src/mame/drivers/splash.c @@ -90,10 +90,10 @@ static WRITE16_HANDLER( roldf_sh_irqtrigger_w ) static ADDRESS_MAP_START( splash_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x3fffff) AM_READ(SMH_ROM) /* ROM */ AM_RANGE(0x800000, 0x83ffff) AM_READ(SMH_RAM) /* Pixel Layer */ - AM_RANGE(0x840000, 0x840001) AM_READ(input_port_0_word_r)/* DIPSW #1 */ - AM_RANGE(0x840002, 0x840003) AM_READ(input_port_1_word_r)/* DIPSW #2 */ - AM_RANGE(0x840004, 0x840005) AM_READ(input_port_2_word_r)/* INPUT #1 */ - AM_RANGE(0x840006, 0x840007) AM_READ(input_port_3_word_r)/* INPUT #2 */ + AM_RANGE(0x840000, 0x840001) AM_READ_PORT("DSW1") + AM_RANGE(0x840002, 0x840003) AM_READ_PORT("DSW2") + AM_RANGE(0x840004, 0x840005) AM_READ_PORT("P1") + AM_RANGE(0x840006, 0x840007) AM_READ_PORT("P2") AM_RANGE(0x880000, 0x8817ff) AM_READ(splash_vram_r) /* Video RAM */ AM_RANGE(0x881800, 0x881803) AM_READ(SMH_RAM) /* Scroll registers */ AM_RANGE(0x881804, 0x881fff) AM_READ(SMH_RAM) /* Work RAM */ @@ -174,10 +174,10 @@ static ADDRESS_MAP_START( roldfrog_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x407fff) AM_ROM AM_BASE(&roldfrog_protdata) /* Protection Data */ AM_RANGE(0x408000, 0x4087ff) AM_READ(SMH_RAM) /* Extra Ram */ AM_RANGE(0x800000, 0x83ffff) AM_READ(SMH_RAM) /* Pixel Layer */ - AM_RANGE(0x840000, 0x840001) AM_READ(input_port_0_word_r)/* DIPSW #1 */ - AM_RANGE(0x840002, 0x840003) AM_READ(input_port_1_word_r)/* DIPSW #2 */ - AM_RANGE(0x840004, 0x840005) AM_READ(input_port_2_word_r)/* INPUT #1 */ - AM_RANGE(0x840006, 0x840007) AM_READ(input_port_3_word_r)/* INPUT #2 */ + AM_RANGE(0x840000, 0x840001) AM_READ_PORT("DSW1") + AM_RANGE(0x840002, 0x840003) AM_READ_PORT("DSW2") + AM_RANGE(0x840004, 0x840005) AM_READ_PORT("P1") + AM_RANGE(0x840006, 0x840007) AM_READ_PORT("P2") AM_RANGE(0x880000, 0x8817ff) AM_READ(splash_vram_r) /* Video RAM */ AM_RANGE(0x881800, 0x881803) AM_READ(SMH_RAM) /* Scroll registers */ AM_RANGE(0x881804, 0x881fff) AM_READ(SMH_RAM) /* Work RAM */ @@ -223,10 +223,10 @@ static ADDRESS_MAP_START( funystrp_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x01ffff) AM_READ(SMH_ROM) /* ROM */ AM_RANGE(0x100000, 0x100fff) AM_READ(SMH_ROM) /* protection? RAM */ AM_RANGE(0x800000, 0x83ffff) AM_READ(SMH_RAM) /* Pixel Layer */ - AM_RANGE(0x840000, 0x840001) AM_READ(input_port_0_word_r)/* DIPSW #1 */ - AM_RANGE(0x840002, 0x840003) AM_READ(input_port_1_word_r)/* DIPSW #2 */ - AM_RANGE(0x840004, 0x840005) AM_READ(input_port_2_word_r)/* INPUT #1 */ - AM_RANGE(0x840006, 0x840007) AM_READ(input_port_3_word_r)/* INPUT #2 */ + AM_RANGE(0x840000, 0x840001) AM_READ_PORT("DSW1") + AM_RANGE(0x840002, 0x840003) AM_READ_PORT("DSW2") + AM_RANGE(0x840004, 0x840005) AM_READ_PORT("P1") + AM_RANGE(0x840006, 0x840007) AM_READ_PORT("P2") AM_RANGE(0x880000, 0x8817ff) AM_READ(splash_vram_r) /* Video RAM */ AM_RANGE(0x881800, 0x881803) AM_READ(SMH_RAM) /* Scroll registers */ AM_RANGE(0x881804, 0x881fff) AM_READ(SMH_RAM) /* Work RAM */ @@ -250,7 +250,7 @@ static ADDRESS_MAP_START( funystrp_writemem, ADDRESS_SPACE_PROGRAM, 16 ) ADDRESS_MAP_END static INPUT_PORTS_START( splash ) - PORT_START("DSW1") /* DSW #1 */ + PORT_START("DSW1") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x06, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) @@ -278,7 +278,7 @@ static INPUT_PORTS_START( splash ) PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) PORT_DIPSETTING( 0x00, "1C/1C or Free Play (if Coin A too)" ) - PORT_START("DSW2") /* DSW #2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) @@ -300,7 +300,7 @@ static INPUT_PORTS_START( splash ) PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("P1") /* 1P INPUTS & COINSW */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) @@ -310,7 +310,7 @@ static INPUT_PORTS_START( splash ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_START("P2") /* 2P INPUTS & STARTSW */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) @@ -322,7 +322,7 @@ static INPUT_PORTS_START( splash ) INPUT_PORTS_END static INPUT_PORTS_START( funystrp ) - PORT_START("DSW1") /* DSW #1 */ + PORT_START("DSW1") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x06, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) @@ -350,7 +350,7 @@ static INPUT_PORTS_START( funystrp ) PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) PORT_DIPSETTING( 0x00, "1C/1C or Free Play (if Coin A too)" ) - PORT_START("DSW2") /* DSW #2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x03, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) @@ -374,7 +374,7 @@ static INPUT_PORTS_START( funystrp ) PORT_DIPSETTING( 0x80, "Soft" ) PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) - PORT_START("P1") /* 1P INPUTS & COINSW */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) @@ -384,7 +384,7 @@ static INPUT_PORTS_START( funystrp ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_START("P2") /* 2P INPUTS & STARTSW */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) diff --git a/src/mame/drivers/sprcros2.c b/src/mame/drivers/sprcros2.c index 2906195e2d1..761fbbbe3e2 100644 --- a/src/mame/drivers/sprcros2.c +++ b/src/mame/drivers/sprcros2.c @@ -140,11 +140,11 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sprcros2_m_readport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) - AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r) - AM_RANGE(0x02, 0x02) AM_READ(input_port_2_r) - AM_RANGE(0x04, 0x04) AM_READ(input_port_3_r) - AM_RANGE(0x05, 0x05) AM_READ(input_port_4_r) + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") + AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") + AM_RANGE(0x02, 0x02) AM_READ_PORT("EXTRA") + AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1") + AM_RANGE(0x05, 0x05) AM_READ_PORT("DSW2") ADDRESS_MAP_END static ADDRESS_MAP_START( sprcros2_m_writeport, ADDRESS_SPACE_IO, 8 ) @@ -181,7 +181,7 @@ static ADDRESS_MAP_START( sprcros2_s_writeport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_END static INPUT_PORTS_START( sprcros2 ) - PORT_START("P1") /* IN0 */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY @@ -191,7 +191,7 @@ static INPUT_PORTS_START( sprcros2 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("P2") /* IN1 */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL @@ -201,7 +201,7 @@ static INPUT_PORTS_START( sprcros2 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("EXTRA") /* IN2 */ + PORT_START("EXTRA") 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_COIN3 ) @@ -210,7 +210,7 @@ static INPUT_PORTS_START( sprcros2 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("DSW1") /* IN3 */ + PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x07, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) @@ -222,7 +222,7 @@ static INPUT_PORTS_START( sprcros2 ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) ) PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("DSW2") /* IN4 */ + PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) diff --git a/src/mame/drivers/sprint4.c b/src/mame/drivers/sprint4.c index a59828e0078..8e32af7fabc 100644 --- a/src/mame/drivers/sprint4.c +++ b/src/mame/drivers/sprint4.c @@ -248,8 +248,8 @@ static ADDRESS_MAP_START( sprint4_cpu_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0040, 0x0047) AM_MIRROR(0x718) AM_READ(sprint4_collision_r) AM_RANGE(0x0060, 0x0063) AM_MIRROR(0x71c) AM_READ(sprint4_options_r) - AM_RANGE(0x1000, 0x17ff) AM_READ(input_port_0_r) - AM_RANGE(0x1800, 0x1fff) AM_READ(input_port_1_r) + AM_RANGE(0x1000, 0x17ff) AM_READ_PORT("IN0") + AM_RANGE(0x1800, 0x1fff) AM_READ_PORT("IN1") AM_RANGE(0x0000, 0x0000) AM_MIRROR(0x71f) AM_WRITE(sprint4_attract_w) AM_RANGE(0x0020, 0x0027) AM_MIRROR(0x718) AM_WRITE(sprint4_collision_reset_w) @@ -298,17 +298,17 @@ static INPUT_PORTS_START( sprint4 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) PORT_START("DIP") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Language )) PORT_DIPLOCATION("DIP:8,7") - PORT_DIPSETTING( 0x00, DEF_STR( German )) - PORT_DIPSETTING( 0x01, DEF_STR( French )) - PORT_DIPSETTING( 0x02, DEF_STR( Spanish )) - PORT_DIPSETTING( 0x03, DEF_STR( English )) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Coinage )) PORT_DIPLOCATION("DIP:6") - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C )) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_1C )) + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Language ) ) PORT_DIPLOCATION("DIP:8,7") + PORT_DIPSETTING( 0x00, DEF_STR( German ) ) + PORT_DIPSETTING( 0x01, DEF_STR( French ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Spanish ) ) + PORT_DIPSETTING( 0x03, DEF_STR( English ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP:6") + PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_1C ) ) PORT_DIPNAME( 0x08, 0x08, "Allow Late Entry" ) PORT_DIPLOCATION("DIP:5") - PORT_DIPSETTING( 0x08, DEF_STR( No )) - PORT_DIPSETTING( 0x00, DEF_STR( Yes )) + PORT_DIPSETTING( 0x08, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPNAME( 0xf0, 0xb0, "Play Time" ) PORT_DIPLOCATION("DIP:4,3,2,1") PORT_DIPSETTING( 0x70, "60 seconds" ) PORT_DIPSETTING( 0xb0, "90 seconds" ) diff --git a/src/mame/drivers/spy.c b/src/mame/drivers/spy.c index dd96affcc90..48ecf36387c 100644 --- a/src/mame/drivers/spy.c +++ b/src/mame/drivers/spy.c @@ -353,11 +353,11 @@ static WRITE8_HANDLER( sound_bank_w ) static ADDRESS_MAP_START( spy_readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x07ff) AM_READ(spy_bankedram1_r) AM_RANGE(0x0800, 0x1aff) AM_READ(SMH_RAM) - AM_RANGE(0x3fd0, 0x3fd0) AM_READ(input_port_4_r) - AM_RANGE(0x3fd1, 0x3fd1) AM_READ(input_port_0_r) - AM_RANGE(0x3fd2, 0x3fd2) AM_READ(input_port_1_r) - AM_RANGE(0x3fd3, 0x3fd3) AM_READ(input_port_2_r) - AM_RANGE(0x3fe0, 0x3fe0) AM_READ(input_port_3_r) + AM_RANGE(0x3fd0, 0x3fd0) AM_READ_PORT("SYSTEM") + AM_RANGE(0x3fd1, 0x3fd1) AM_READ_PORT("P1") + AM_RANGE(0x3fd2, 0x3fd2) AM_READ_PORT("P2") + AM_RANGE(0x3fd3, 0x3fd3) AM_READ_PORT("DSW1") + AM_RANGE(0x3fe0, 0x3fe0) AM_READ_PORT("DSW2") AM_RANGE(0x2000, 0x5fff) AM_READ(K052109_051960_r) AM_RANGE(0x6000, 0x7fff) AM_READ(SMH_BANK1) AM_RANGE(0x8000, 0xffff) AM_READ(SMH_ROM) diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c index 5741f0ad289..d055047c242 100644 --- a/src/mame/drivers/srmp5.c +++ b/src/mame/drivers/srmp5.c @@ -168,11 +168,11 @@ static ADDRESS_MAP_START( srmp5_mem, ADDRESS_SPACE_PROGRAM, 32 ) AM_RANGE(0x00000000, 0x000fffff) AM_RAM //maybe 0 - 2fffff ? AM_RANGE(0x002f0000, 0x002f7fff) AM_RAM AM_RANGE(0x01000000, 0x01000003) AM_WRITE(SMH_RAM) // 0xaa .. watchdog ? - AM_RANGE(0x01800004, 0x01800007) AM_READ(input_port_0_dword_r) - AM_RANGE(0x01800008, 0x0180000b) AM_READ(input_port_1_dword_r) + AM_RANGE(0x01800004, 0x01800007) AM_READ_PORT("IN0") + AM_RANGE(0x01800008, 0x0180000b) AM_READ_PORT("IN1") AM_RANGE(0x0180000c, 0x0180000f) AM_WRITE(bank_w) - AM_RANGE(0x01800010, 0x01800013) AM_READ(input_port_2_dword_r) //multiplexed controls (selected by writes to 1c) - AM_RANGE(0x01800014, 0x01800017) AM_READ(input_port_3_dword_r) + AM_RANGE(0x01800010, 0x01800013) AM_READ_PORT("IN2") //multiplexed controls (selected by writes to 1c) + AM_RANGE(0x01800014, 0x01800017) AM_READ_PORT("IN3") AM_RANGE(0x0180001c, 0x0180001f) AM_WRITE(SMH_RAM)//c1 c2 c4 c8 => mahjong inputs (at $10) - bits 0-3 AM_RANGE(0x01800200, 0x0180020f) AM_RAM //sound related ? only few writes after boot AM_RANGE(0x01a00000, 0x01bfffff) AM_READ(data_r) diff --git a/src/mame/drivers/srumbler.c b/src/mame/drivers/srumbler.c index 08900d73df9..bb14b3ffd1b 100644 --- a/src/mame/drivers/srumbler.c +++ b/src/mame/drivers/srumbler.c @@ -68,11 +68,11 @@ static INTERRUPT_GEN( srumbler_interrupt ) static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x3fff) AM_READ(SMH_RAM) /* RAM (of 1 sort or another) */ - AM_RANGE(0x4008, 0x4008) AM_READ(input_port_0_r) - AM_RANGE(0x4009, 0x4009) AM_READ(input_port_1_r) - AM_RANGE(0x400a, 0x400a) AM_READ(input_port_2_r) - AM_RANGE(0x400b, 0x400b) AM_READ(input_port_3_r) - AM_RANGE(0x400c, 0x400c) AM_READ(input_port_4_r) + AM_RANGE(0x4008, 0x4008) AM_READ_PORT("SYSTEM") + AM_RANGE(0x4009, 0x4009) AM_READ_PORT("P1") + AM_RANGE(0x400a, 0x400a) AM_READ_PORT("P2") + AM_RANGE(0x400b, 0x400b) AM_READ_PORT("DSW1") + AM_RANGE(0x400c, 0x400c) AM_READ_PORT("DSW2") AM_RANGE(0x5000, 0x5fff) AM_READ(SMH_BANK6) /* Banked ROM */ AM_RANGE(0x6000, 0x6fff) AM_READ(SMH_BANK7) /* Banked ROM */ AM_RANGE(0x7000, 0x7fff) AM_READ(SMH_BANK8) /* Banked ROM */ @@ -127,7 +127,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( srumbler ) - PORT_START("SYSTEM") /* IN0 */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -137,7 +137,7 @@ static INPUT_PORTS_START( srumbler ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_START("P1") /* IN1 */ + PORT_START("P1") 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_DOWN ) PORT_8WAY @@ -147,7 +147,7 @@ static INPUT_PORTS_START( srumbler ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("P2") /* IN2 */ + PORT_START("P2") 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( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL @@ -157,7 +157,7 @@ static INPUT_PORTS_START( srumbler ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW1") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_B ) ) PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) @@ -181,7 +181,7 @@ static INPUT_PORTS_START( srumbler ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW2") /* DSW1 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "3" ) PORT_DIPSETTING( 0x02, "4" ) diff --git a/src/mame/drivers/sshangha.c b/src/mame/drivers/sshangha.c index c18b89cc2b4..7dd96f29cec 100644 --- a/src/mame/drivers/sshangha.c +++ b/src/mame/drivers/sshangha.c @@ -97,12 +97,12 @@ static READ16_HANDLER( sshangha_protection16_r ) { switch (offset) { - case 0x050 >> 1: /* Player 1 & Player 2 joysticks & fire buttons */ - return (input_port_read(machine, "P1") + (input_port_read(machine, "P2") << 8)); - case 0x76a >> 1: /* Credits */ + case 0x050 >> 1: + return input_port_read(machine, "INPUTS"); + case 0x76a >> 1: return input_port_read(machine, "SYSTEM"); - case 0x0ac >> 1: /* DIPS */ - return (input_port_read(machine, "DSW1") + (input_port_read(machine, "DSW2") << 8)); + case 0x0ac >> 1: + return input_port_read(machine, "DSW"); // Protection TODO } @@ -115,12 +115,12 @@ static READ16_HANDLER( sshanghb_protection16_r ) { switch (offset) { - case 0x050 >> 1: /* Player 1 & Player 2 joysticks & fire buttons */ - return (input_port_read(machine, "P1") + (input_port_read(machine, "P2") << 8)); - case 0x76a >> 1: /* Credits */ + case 0x050 >> 1: + return input_port_read(machine, "INPUTS"); + case 0x76a >> 1: return input_port_read(machine, "SYSTEM"); - case 0x0ac >> 1: /* DIPS */ - return (input_port_read(machine, "DSW1") + (input_port_read(machine, "DSW2") << 8)); + case 0x0ac >> 1: + return input_port_read(machine, "DSW"); } return sshangha_prot_data[offset]; } @@ -202,94 +202,89 @@ ADDRESS_MAP_END /******************************************************************************/ static INPUT_PORTS_START( sshangha ) - PORT_START("P1") /* Player 1 controls (0xfec047.b) */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Pick Tile") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Cancel") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Help") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") /* Player 2 controls (0xfec046.b) */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Pick Tile") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Cancel") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Help") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("SYSTEM") /* Credits */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) - PORT_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("INPUTS") /* 0xfec046.b - 0xfec047.b */ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Pick Tile") + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Cancel") + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Help") + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Pick Tile") + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Cancel") + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Help") + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START("SYSTEM") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Dips seem inverted with respect to other Deco games */ - - PORT_START("DSW1") /* Dip switch bank 1 (0xfec04a.b, inverted bits order) */ - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) // To be confirmed - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x10, 0x10, "Coin Mode" ) // Check code at 0x0010f2 - PORT_DIPSETTING( 0x10, "Mode 1" ) - PORT_DIPSETTING( 0x00, "Mode 2" ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_EQUALS,0x10)//Mode 1 - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_EQUALS,0x10)//Mode 1 - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_EQUALS,0x10)//Mode 1 - PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_EQUALS,0x10)//Mode 1 - PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_NOTEQUALS,0x10)//Mode 2 - PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_NOTEQUALS,0x10)//Mode 2 - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_NOTEQUALS,0x10)//Mode 2 - PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_NOTEQUALS,0x10)//Mode 2 - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_EQUALS,0x10)//Mode 1 - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_EQUALS,0x10)//Mode 1 - PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_EQUALS,0x10)//Mode 1 - PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_EQUALS,0x10)//Mode 1 - PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_NOTEQUALS,0x10)//Mode 2 - PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_NOTEQUALS,0x10)//Mode 2 - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_NOTEQUALS,0x10)//Mode 2 - PORT_DIPSETTING( 0x01, DEF_STR( 1C_4C ) )PORT_CONDITION("DSW1",0x10,PORTCOND_NOTEQUALS,0x10)//Mode 2 - - PORT_START("DSW2") /* Dip switch bank 2 (0xfec04b.b, inverted bits order) */ - PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) + PORT_START("DSW") /* 0xfec04b.b - 0xfec04a.b, inverted bits order */ + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Demo_Sounds ) ) // To be confirmed + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_SERVICE( 0x0020, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x0010, 0x0010, "Coin Mode" ) // Check code at 0x000010f2 + PORT_DIPSETTING( 0x0010, "Mode 1" ) + PORT_DIPSETTING( 0x0000, "Mode 2" ) + PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 + PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 + PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 + PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 + PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 + PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 + PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 + PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 + PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 + PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 + PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 + PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_EQUALS, 0x0010) //Mode 1 + PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 + PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 + PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 + PORT_DIPSETTING( 0x0001, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW", 0x0010, PORTCOND_NOTEQUALS, 0x0010) //Mode 2 + PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x4000, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0xc000, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x8000, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) #if SSHANGHA_HACK - PORT_DIPNAME( 0x20, 0x20, "Debug Mode" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x2000, 0x2000, "Debug Mode" ) + PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) #else - PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) // See notes + PORT_DIPUNUSED( 0x2000, IP_ACTIVE_LOW ) // See notes #endif - PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x08, 0x08, "Tile Animation" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x04, 0x04, "Use Mahjong Tiles" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x02, "Adult Mode" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x01, 0x01, "Quest Mode" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) + PORT_DIPUNUSED( 0x1000, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x0800, 0x0800, "Tile Animation" ) + PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0800, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x0400, 0x0400, "Use Mahjong Tiles" ) + PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0400, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x0200, 0x0200, "Adult Mode" ) + PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0200, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x0100, 0x0100, "Quest Mode" ) + PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( Yes ) ) INPUT_PORTS_END /******************************************************************************/ diff --git a/src/mame/drivers/ssingles.c b/src/mame/drivers/ssingles.c index c8577fe1a51..859dfbf3481 100644 --- a/src/mame/drivers/ssingles.c +++ b/src/mame/drivers/ssingles.c @@ -144,10 +144,10 @@ static WRITE8_HANDLER(c001_w) prot_data^=data^0x11; } -static READ8_HANDLER(controls_r) +static CUSTOM_INPUT(controls_r) { - int data=7; - switch(input_port_read(machine, "IN1")) //multiplexed + int data = 7; + switch(input_port_read(field->port->machine, "EXTRA")) //multiplexed { case 0x01: data = 1; break; case 0x02: data = 2; break; @@ -157,7 +157,8 @@ static READ8_HANDLER(controls_r) case 0x20: data = 6; break; case 0x40: data = 0; break; } - return (input_port_read(machine, "IN0") & (~0x1c)) | (data << 2); + + return data; } static ADDRESS_MAP_START( ssingles_map, ADDRESS_SPACE_PROGRAM, 8 ) @@ -179,7 +180,7 @@ static ADDRESS_MAP_START( ssingles_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x0a, 0x0a) AM_WRITE(ay8910_write_port_1_w) AM_RANGE(0x16, 0x16) AM_READ_PORT("DSW0") AM_RANGE(0x18, 0x18) AM_READ_PORT("DSW1") - AM_RANGE(0x1c, 0x1c) AM_READ(controls_r) + AM_RANGE(0x1c, 0x1c) AM_READ_PORT("INPUTS") AM_RANGE(0x1a, 0x1a) AM_WRITENOP //video/crt related AM_RANGE(0xfe, 0xfe) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) AM_RANGE(0xff, 0xff) AM_DEVWRITE(MC6845, "crtc", mc6845_register_w) @@ -187,14 +188,15 @@ static ADDRESS_MAP_START( ssingles_io_map, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_END static INPUT_PORTS_START( ssingles ) - PORT_START("IN0") + PORT_START("INPUTS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) //must be LOW + PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(controls_r, NULL) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) - PORT_START("IN1") + PORT_START("EXTRA") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) diff --git a/src/mame/drivers/sspeedr.c b/src/mame/drivers/sspeedr.c index a949f340997..399a072bcb0 100644 --- a/src/mame/drivers/sspeedr.c +++ b/src/mame/drivers/sspeedr.c @@ -110,10 +110,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) - AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r) - AM_RANGE(0x03, 0x03) AM_READ(input_port_2_r) - AM_RANGE(0x04, 0x04) AM_READ(input_port_3_r) + AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") + AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") + AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") + AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") ADDRESS_MAP_END @@ -181,12 +181,11 @@ static INPUT_PORTS_START( sspeedr ) PORT_DIPSETTING( 0xA0, "RAM/ROM Test" ) PORT_DIPSETTING( 0xE0, "Accelerator Adjustment" ) - PORT_START("IN3") - PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_TOGGLE /* gear shift lever */ - PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) - + PORT_START("IN2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_TOGGLE /* gear shift lever */ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) INPUT_PORTS_END diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c index fcca7f7bd22..dff0f2c1521 100644 --- a/src/mame/drivers/sstrangr.c +++ b/src/mame/drivers/sstrangr.c @@ -135,15 +135,15 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sstrangr_io_map, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x41, 0x41) AM_READ(input_port_0_r) - AM_RANGE(0x42, 0x42) AM_READ(input_port_1_r) - AM_RANGE(0x44, 0x44) AM_READWRITE(input_port_2_r, port_w) + AM_RANGE(0x41, 0x41) AM_READ_PORT("DSW") + AM_RANGE(0x42, 0x42) AM_READ_PORT("INPUTS") + AM_RANGE(0x44, 0x44) AM_READ_PORT("EXT") AM_WRITE(port_w) ADDRESS_MAP_END static INPUT_PORTS_START( sstrangr ) - PORT_START("DSW0") + PORT_START("DSW") PORT_DIPNAME( 0x03, 0x01, "Extra Play" ) PORT_DIPSETTING( 0x00, "Never" ) PORT_DIPSETTING( 0x01, "3000" ) @@ -160,7 +160,7 @@ static INPUT_PORTS_START( sstrangr ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) - PORT_START("IN0") + PORT_START("INPUTS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) @@ -210,7 +210,7 @@ MACHINE_DRIVER_END /* color version of Space Stranger, board has Stranger 2 written on it */ static INPUT_PORTS_START( sstrngr2 ) - PORT_START("DSW0") + PORT_START("DSW") PORT_DIPNAME( 0x03, 0x01, "Extra Play" ) PORT_DIPSETTING( 0x00, "Never" ) PORT_DIPSETTING( 0x01, "3000" ) @@ -229,7 +229,7 @@ static INPUT_PORTS_START( sstrngr2 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) - PORT_START("IN0") + PORT_START("INPUTS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) diff --git a/src/mame/drivers/ssv.c b/src/mame/drivers/ssv.c index 60819302d21..4d4e0d0912f 100644 --- a/src/mame/drivers/ssv.c +++ b/src/mame/drivers/ssv.c @@ -420,22 +420,22 @@ static WRITE16_HANDLER( dsp_w ) static READ16_HANDLER( fake_r ) { return ssv_scroll[offset]; } #endif -#define SSV_READMEM( _ROM ) \ +#define SSV_READMEM( _ROM ) \ AM_RANGE(0x000000, 0x00ffff) AM_READ(SMH_RAM ) /* RAM */ \ AM_RANGE(0x100000, 0x13ffff) AM_READ(SMH_RAM ) /* Sprites */ \ AM_RANGE(0x140000, 0x15ffff) AM_READ(SMH_RAM ) /* Palette */ \ AM_RANGE(0x160000, 0x17ffff) AM_READ(SMH_RAM ) /* */ \ AM_RANGE(0x1c0000, 0x1c0001) AM_READ(ssv_vblank_r ) /* Vblank? */ \ /**/AM_RANGE(0x1c0002, 0x1c007f) AM_READ(SMH_RAM ) /* Scroll */ \ - AM_RANGE(0x210002, 0x210003) AM_READ(input_port_0_word_r ) /* DSW */ \ - AM_RANGE(0x210004, 0x210005) AM_READ(input_port_1_word_r ) /* DSW */ \ - AM_RANGE(0x210008, 0x210009) AM_READ(input_port_2_word_r ) /* P1 */ \ - AM_RANGE(0x21000a, 0x21000b) AM_READ(input_port_3_word_r ) /* P2 */ \ - AM_RANGE(0x21000c, 0x21000d) AM_READ(input_port_4_word_r ) /* Coins */ \ + AM_RANGE(0x210002, 0x210003) AM_READ_PORT("DSW1") \ + AM_RANGE(0x210004, 0x210005) AM_READ_PORT("DSW2") \ + AM_RANGE(0x210008, 0x210009) AM_READ_PORT("P1") \ + AM_RANGE(0x21000a, 0x21000b) AM_READ_PORT("P2") \ + AM_RANGE(0x21000c, 0x21000d) AM_READ_PORT("SYSTEM") \ AM_RANGE(0x21000e, 0x21000f) AM_READ(SMH_NOP ) /* */ \ AM_RANGE(0x300000, 0x30007f) AM_READ(es5506_data_0_word_r ) /* Sound */ \ - AM_RANGE(0x482000, 0x482fff) AM_RAM_WRITE(dsp_w) AM_BASE(&dsp_ram) \ - AM_RANGE(_ROM, 0xffffff) AM_READ(SMH_BANK1 ) /* ROM */ \ + AM_RANGE(0x482000, 0x482fff) AM_RAM_WRITE(dsp_w) AM_BASE(&dsp_ram) \ + AM_RANGE(_ROM, 0xffffff) AM_READ(SMH_BANK1 ) /* ROM */ \ //AM_RANGE(0x990000, 0x99007f) AM_READ(fake_r) #define SSV_WRITEMEM \ diff --git a/src/mame/drivers/stactics.c b/src/mame/drivers/stactics.c index 355b1304c04..c4a3ababb09 100644 --- a/src/mame/drivers/stactics.c +++ b/src/mame/drivers/stactics.c @@ -217,7 +217,7 @@ static INPUT_PORTS_START( stactics ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_motor_not_ready, 0) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_motor_not_ready, NULL) PORT_START("IN1") /* IN1 */ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_B ) ) @@ -246,8 +246,8 @@ static INPUT_PORTS_START( stactics ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("IN2") /* IN2 */ - PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_rng, 0) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_frame_count_d3, 0) + PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_rng, NULL) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_frame_count_d3, NULL) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) @@ -257,7 +257,7 @@ static INPUT_PORTS_START( stactics ) PORT_START("IN3") /* IN3 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_shot_standby, 0) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_shot_standby, NULL) PORT_DIPNAME( 0x04, 0x04, "Number of Barriers" ) PORT_DIPSETTING( 0x04, "4" ) PORT_DIPSETTING( 0x00, "6" ) @@ -269,7 +269,7 @@ static INPUT_PORTS_START( stactics ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_not_shot_arrive, 0) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_not_shot_arrive, NULL) PORT_START("FAKE") /* FAKE */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY diff --git a/src/mame/drivers/stadhero.c b/src/mame/drivers/stadhero.c index 7f1fd6ee339..789e454fdf7 100644 --- a/src/mame/drivers/stadhero.c +++ b/src/mame/drivers/stadhero.c @@ -31,13 +31,13 @@ static READ16_HANDLER( stadhero_control_r ) switch (offset<<1) { case 0: /* Player 1 & 2 joystick & buttons */ - return (input_port_read(machine, "P1") | (input_port_read(machine, "P2") << 8)); + return input_port_read(machine, "INPUTS"); case 2: /* Credits, start buttons */ return (input_port_read(machine, "COIN") | (input_port_read(machine, "COIN") << 8)); case 4: /* Dip switches */ - return (input_port_read(machine, "DSW1") | (input_port_read(machine, "DSW2") << 8)); + return input_port_read(machine, "DSW"); } logerror("CPU #0 PC %06x: warning - read unmapped memory address %06x\n",activecpu_get_pc(),0x30c000+offset); @@ -113,25 +113,23 @@ ADDRESS_MAP_END /******************************************************************************/ static INPUT_PORTS_START( stadhero ) - PORT_START("P1") /* 0x30c001 : Player 1 controls */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") /* 0x30c000 : Player 2 controls */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) 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("INPUTS") /* 0x30c000 - 0x30c001 */ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) PORT_START("COIN") /* 0x30c002 & 0x30c003 : Credits, start buttons */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ @@ -143,44 +141,42 @@ static INPUT_PORTS_START( stadhero ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) - PORT_START("DSW1") /* 0x30c005 : Dip switch bank 1 */ - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) - 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_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) - PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) - - PORT_START("DSW2") /* 0x30c004 : Dip switch bank 2 */ - PORT_DIPNAME( 0x03, 0x03, "Time (1P Vs CPU)" ) /* Table at 0x0014f6 */ - PORT_DIPSETTING( 0x02, "600" ) - PORT_DIPSETTING( 0x03, "500" ) - PORT_DIPSETTING( 0x01, "450" ) - PORT_DIPSETTING( 0x00, "400" ) - PORT_DIPNAME( 0x0c, 0x0c, "Time (1P Vs 2P)" ) /* Table at 0x0014fe */ - PORT_DIPSETTING( 0x08, "270" ) - PORT_DIPSETTING( 0x0c, "210" ) - PORT_DIPSETTING( 0x04, "180" ) - PORT_DIPSETTING( 0x00, "120" ) - PORT_DIPNAME( 0x30, 0x30, "Final Set" ) /* Table at 0x00078c */ - PORT_DIPSETTING( 0x20, "3 Credits" ) - PORT_DIPSETTING( 0x30, "4 Credits" ) - PORT_DIPSETTING( 0x10, "5 Credits" ) - PORT_DIPSETTING( 0x00, "6 Credits" ) - PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) - PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) + PORT_START("DSW") /* 0x30c004 - 0x30c005 */ + PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( 1C_2C ) ) + PORT_DIPUNUSED( 0x0010, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPUNUSED( 0x0080, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x0300, 0x0300, "Time (1P Vs CPU)" ) /* Table at 0x0014f6 */ + PORT_DIPSETTING( 0x0200, "600" ) + PORT_DIPSETTING( 0x0300, "500" ) + PORT_DIPSETTING( 0x0100, "450" ) + PORT_DIPSETTING( 0x0000, "400" ) + PORT_DIPNAME( 0x0c00, 0x0c00, "Time (1P Vs 2P)" ) /* Table at 0x0014fe */ + PORT_DIPSETTING( 0x0800, "270" ) + PORT_DIPSETTING( 0x0c00, "210" ) + PORT_DIPSETTING( 0x0400, "180" ) + PORT_DIPSETTING( 0x0000, "120" ) + PORT_DIPNAME( 0x3000, 0x3000, "Final Set" ) /* Table at 0x00078c */ + PORT_DIPSETTING( 0x2000, "3 Credits" ) + PORT_DIPSETTING( 0x3000, "4 Credits" ) + PORT_DIPSETTING( 0x1000, "5 Credits" ) + PORT_DIPSETTING( 0x0000, "6 Credits" ) + PORT_DIPUNUSED( 0x4000, IP_ACTIVE_LOW ) + PORT_DIPUNUSED( 0x8000, IP_ACTIVE_LOW ) INPUT_PORTS_END /******************************************************************************/ diff --git a/src/mame/drivers/starcrus.c b/src/mame/drivers/starcrus.c index 83474bd0d0c..73667c2abff 100644 --- a/src/mame/drivers/starcrus.c +++ b/src/mame/drivers/starcrus.c @@ -45,10 +45,10 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_END static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) - AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r) + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") + AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_RANGE(0x02, 0x02) AM_READ(starcrus_coll_det_r) - AM_RANGE(0x03, 0x03) AM_READ(input_port_2_r) + AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW") ADDRESS_MAP_END static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) @@ -69,42 +69,42 @@ ADDRESS_MAP_END static INPUT_PORTS_START( starcrus ) - PORT_START("P1") /* player 1 */ - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY /* ccw */ - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* engine */ - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY /* cw */ - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* torpedo */ - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* phaser */ - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("P2") /* player 2 */ - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) /* ccw */ - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* engine */ - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) /* cw */ - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* torpedo */ - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* phaser */ - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("P1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY /* ccw */ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* engine */ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY /* cw */ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* torpedo */ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* phaser */ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("P2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) /* ccw */ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* engine */ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) /* cw */ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* torpedo */ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* phaser */ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DSW") - PORT_DIPNAME ( 0x03, 0x02, DEF_STR( Game_Time ) ) - PORT_DIPSETTING ( 0x03, "60 secs" ) - PORT_DIPSETTING ( 0x02, "90 secs" ) - PORT_DIPSETTING ( 0x01, "120 secs" ) - PORT_DIPSETTING ( 0x00, "150 secs" ) - PORT_DIPNAME ( 0x04, 0x00, DEF_STR( Coinage )) - PORT_DIPSETTING ( 0x04, DEF_STR( 2C_1C )) - PORT_DIPSETTING ( 0x00, DEF_STR( 1C_1C )) - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_DIPNAME ( 0x20, 0x20, "Mode" ) - PORT_DIPSETTING ( 0x20, DEF_STR( Standard ) ) - PORT_DIPSETTING ( 0x00, DEF_STR( Alternate ) ) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_DIPNAME( 0x03, 0x02, DEF_STR( Game_Time ) ) + PORT_DIPSETTING( 0x03, "60 secs" ) + PORT_DIPSETTING( 0x02, "90 secs" ) + PORT_DIPSETTING( 0x01, "120 secs" ) + PORT_DIPSETTING( 0x00, "150 secs" ) + PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coinage )) + PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C )) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C )) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_DIPNAME( 0x20, 0x20, "Mode" ) + PORT_DIPSETTING( 0x20, DEF_STR( Standard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Alternate ) ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END diff --git a/src/mame/drivers/starshp1.c b/src/mame/drivers/starshp1.c index c866d5bbe38..93b1fb91356 100644 --- a/src/mame/drivers/starshp1.c +++ b/src/mame/drivers/starshp1.c @@ -64,33 +64,33 @@ static WRITE8_HANDLER( starshp1_collision_reset_w ) } -static READ8_HANDLER( starshp1_port_1_r ) +static CUSTOM_INPUT( starshp1_analog_r ) { int val = 0; switch (starshp1_analog_in_select) { case 0: - val = input_port_read(machine, "STICKY"); + val = input_port_read(field->port->machine, "STICKY"); break; case 1: - val = input_port_read(machine, "STICKX"); + val = input_port_read(field->port->machine, "STICKX"); break; case 2: val = 0x20; /* DAC feedback, not used */ break; case 3: - val = input_port_read(machine, "PLAYTIME"); + val = input_port_read(field->port->machine, "PLAYTIME"); break; } - return (val & 0x3f) | input_port_read(machine, "VBLANK"); + return val & 0x3f; } -static READ8_HANDLER( starshp1_port_2_r ) +static CUSTOM_INPUT( collision_latch_r ) { - return input_port_read(machine, "COINAGE") | (starshp1_collision_latch & 0x0f); + return starshp1_collision_latch & 0x0f; } @@ -166,9 +166,9 @@ static WRITE8_HANDLER( starshp1_misc_w ) static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x00ff) AM_READ(SMH_RAM) AM_MIRROR(0x100) AM_RANGE(0x2c00, 0x3fff) AM_READ(SMH_ROM) - AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) - AM_RANGE(0xb000, 0xb000) AM_READ(starshp1_port_1_r) - AM_RANGE(0xc400, 0xc400) AM_READ(starshp1_port_2_r) + AM_RANGE(0xa000, 0xa000) AM_READ_PORT("SYSTEM") + AM_RANGE(0xb000, 0xb000) AM_READ_PORT("VBLANK") + AM_RANGE(0xc400, 0xc400) AM_READ_PORT("COINAGE") AM_RANGE(0xd800, 0xd800) AM_READ(starshp1_rng_r) AM_RANGE(0xf000, 0xffff) AM_READ(SMH_ROM) ADDRESS_MAP_END @@ -205,16 +205,16 @@ static INPUT_PORTS_START( starshp1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_START("VBLANK") - PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_UNUSED ) /* analog in */ + PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(starshp1_analog_r, NULL) /* analog in */ PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) PORT_START("COINAGE") - PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) /* collision latch */ - PORT_DIPNAME( 0x70, 0x20, DEF_STR( Coinage )) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C )) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C )) - PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C )) + PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(collision_latch_r, NULL) /* collision latch */ + PORT_DIPNAME( 0x70, 0x20, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* ground */ PORT_START("PLAYTIME") diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c index 43bdbaa02da..81fd0bbbb62 100644 --- a/src/mame/drivers/statriv2.c +++ b/src/mame/drivers/statriv2.c @@ -325,8 +325,8 @@ static ADDRESS_MAP_START( supertr2_writemem, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_END static ADDRESS_MAP_START( statriv2_readport, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x20, 0x20) AM_READ(input_port_0_r) - AM_RANGE(0x21, 0x21) AM_READ(input_port_1_r) + AM_RANGE(0x20, 0x20) AM_READ_PORT("IN0") + AM_RANGE(0x21, 0x21) AM_READ_PORT("IN1") AM_RANGE(0x2b, 0x2b) AM_READ(statriv2_questions_read) // question data AM_RANGE(0xb1, 0xb1) AM_READ(ay8910_read_port_0_r) // ??? AM_RANGE(0xce, 0xce) AM_READ(SMH_NOP) // ??? @@ -343,8 +343,8 @@ static ADDRESS_MAP_START( statriv2_writeport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_END static ADDRESS_MAP_START( statriv4_readport, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x20, 0x20) AM_READ(input_port_0_r) - AM_RANGE(0x21, 0x21) AM_READ(input_port_1_r) + AM_RANGE(0x20, 0x20) AM_READ_PORT("IN0") + AM_RANGE(0x21, 0x21) AM_READ_PORT("IN1") AM_RANGE(0x28, 0x28) AM_READ(statriv2_questions_read) // question data AM_RANGE(0xb1, 0xb1) AM_READ(ay8910_read_port_0_r) // ??? AM_RANGE(0xce, 0xce) AM_READ(SMH_NOP) // ??? @@ -361,8 +361,8 @@ static ADDRESS_MAP_START( statriv4_writeport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_END static ADDRESS_MAP_START( supertr2_readport, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x20, 0x20) AM_READ(input_port_0_r) - AM_RANGE(0x21, 0x21) AM_READ(input_port_1_r) + AM_RANGE(0x20, 0x20) AM_READ_PORT("IN0") + AM_RANGE(0x21, 0x21) AM_READ_PORT("IN1") AM_RANGE(0x28, 0x28) AM_READ(supertr2_questions_read) // question data AM_RANGE(0xb1, 0xb1) AM_READ(ay8910_read_port_0_r) // ??? AM_RANGE(0xce, 0xce) AM_READ(SMH_NOP) // ??? @@ -390,24 +390,24 @@ static ADDRESS_MAP_START( trivquiz_writeport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_END static ADDRESS_MAP_START( trivquiz_readport, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x20, 0x20) AM_READ(input_port_0_r) - AM_RANGE(0x21, 0x21) AM_READ(input_port_1_r) + AM_RANGE(0x20, 0x20) AM_READ_PORT("IN0") + AM_RANGE(0x21, 0x21) AM_READ_PORT("IN1") AM_RANGE(0x2a, 0x2a) AM_READ(statriv2_questions_read) // question data AM_RANGE(0xb1, 0xb1) AM_READ(ay8910_read_port_0_r) // ??? AM_RANGE(0xce, 0xce) AM_READ(SMH_NOP) // ??? ADDRESS_MAP_END static ADDRESS_MAP_START( supertr3_readport, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x20, 0x20) AM_READ(input_port_0_r) - AM_RANGE(0x21, 0x21) AM_READ(input_port_1_r) + AM_RANGE(0x20, 0x20) AM_READ_PORT("IN0") + AM_RANGE(0x21, 0x21) AM_READ_PORT("IN1") AM_RANGE(0x28, 0x28) AM_READ(supertr3_questions_read) // question data AM_RANGE(0xb1, 0xb1) AM_READ(ay8910_read_port_0_r) // ??? AM_RANGE(0xce, 0xce) AM_READ(SMH_NOP) // ??? ADDRESS_MAP_END static ADDRESS_MAP_START( hangman_readport, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x20, 0x20) AM_READ(input_port_0_r) - AM_RANGE(0x21, 0x21) AM_READ(input_port_1_r) + AM_RANGE(0x20, 0x20) AM_READ_PORT("IN0") + AM_RANGE(0x21, 0x21) AM_READ_PORT("IN1") AM_RANGE(0x28, 0x28) AM_READ(hangman_questions_read) // question data AM_RANGE(0xb1, 0xb1) AM_READ(ay8910_read_port_0_r) // ??? AM_RANGE(0xce, 0xce) AM_READ(SMH_NOP) // ??? diff --git a/src/mame/drivers/stlforce.c b/src/mame/drivers/stlforce.c index 707f9e7ce80..0f66b9fb30d 100644 --- a/src/mame/drivers/stlforce.c +++ b/src/mame/drivers/stlforce.c @@ -84,11 +84,6 @@ WRITE16_HANDLER( stlforce_mhigh_videoram_w ); WRITE16_HANDLER( stlforce_mlow_videoram_w ); WRITE16_HANDLER( stlforce_bg_videoram_w ); -static READ16_HANDLER( stlforce_input_port_1_r ) -{ - return (input_port_read(machine, "SYSTEM") & ~0x40) | (eeprom_read_bit() << 6); -} - static WRITE16_HANDLER( eeprom_w ) { if( ACCESSING_BITS_0_7 ) @@ -120,7 +115,7 @@ static ADDRESS_MAP_START( stlforce_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x108000, 0x108fff) AM_RAM AM_BASE(&stlforce_spriteram) AM_RANGE(0x109000, 0x11ffff) AM_RAM AM_RANGE(0x400000, 0x400001) AM_READ_PORT("INPUT") - AM_RANGE(0x400002, 0x400003) AM_READ(stlforce_input_port_1_r) + AM_RANGE(0x400002, 0x400003) AM_READ_PORT("SYSTEM") AM_RANGE(0x400010, 0x400011) AM_WRITE(eeprom_w) AM_RANGE(0x400012, 0x400013) AM_WRITE(oki_bank_w) AM_RANGE(0x40001e, 0x40001f) AM_WRITENOP // sprites buffer commands @@ -153,7 +148,7 @@ static INPUT_PORTS_START( stlforce ) PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_VBLANK ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) /* eeprom */ + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* eeprom */ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END diff --git a/src/mame/drivers/strnskil.c b/src/mame/drivers/strnskil.c index 836fcf29c90..2eacf0ff73f 100644 --- a/src/mame/drivers/strnskil.c +++ b/src/mame/drivers/strnskil.c @@ -95,11 +95,11 @@ static ADDRESS_MAP_START( strnskil_readmem1, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xd000, 0xd7ff) AM_READ(SMH_RAM) /* videoram */ AM_RANGE(0xd800, 0xd800) AM_READ(strnskil_d800_r) - AM_RANGE(0xd801, 0xd801) AM_READ(input_port_0_r) /* dsw 1 */ - AM_RANGE(0xd802, 0xd802) AM_READ(input_port_1_r) /* dsw 2 */ - AM_RANGE(0xd803, 0xd803) AM_READ(input_port_4_r) /* other inputs */ - AM_RANGE(0xd804, 0xd804) AM_READ(input_port_2_r) /* player1 */ - AM_RANGE(0xd805, 0xd805) AM_READ(input_port_3_r) /* player2 */ + AM_RANGE(0xd801, 0xd801) AM_READ_PORT("DSW1") + AM_RANGE(0xd802, 0xd802) AM_READ_PORT("DSW2") + AM_RANGE(0xd803, 0xd803) AM_READ_PORT("SYSTEM") + AM_RANGE(0xd804, 0xd804) AM_READ_PORT("P1") + AM_RANGE(0xd805, 0xd805) AM_READ_PORT("P2") ADDRESS_MAP_END static ADDRESS_MAP_START( strnskil_writemem1, ADDRESS_SPACE_PROGRAM, 8 ) @@ -133,7 +133,7 @@ ADDRESS_MAP_END /****************************************************************************/ static INPUT_PORTS_START( strnskil ) - PORT_START("DSW1") /* dsw1 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -164,7 +164,7 @@ static INPUT_PORTS_START( strnskil ) PORT_DIPSETTING( 0xe0, "1C 2C / 1C 6C" ) PORT_DIPSETTING( 0xf0, DEF_STR( Free_Play ) ) - PORT_START("DSW2") /* dsw2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) @@ -190,7 +190,7 @@ static INPUT_PORTS_START( strnskil ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - PORT_START("P1") /* d804 */ + PORT_START("P1") /* d804 */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) @@ -200,7 +200,7 @@ static INPUT_PORTS_START( strnskil ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_START("P2") /* d805 */ + PORT_START("P2") /* d805 */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL @@ -210,7 +210,7 @@ static INPUT_PORTS_START( strnskil ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* d803 */ + PORT_START("SYSTEM") /* d803 */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_SERVICE( 0x20, IP_ACTIVE_HIGH ) @@ -222,7 +222,7 @@ static INPUT_PORTS_START( strnskil ) INPUT_PORTS_END static INPUT_PORTS_START( banbam ) - PORT_START("DSW1") /* dsw1 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "5" ) @@ -251,7 +251,7 @@ static INPUT_PORTS_START( banbam ) PORT_DIPSETTING( 0xe0, "1C 2C / 1C 6C" ) PORT_DIPSETTING( 0xf0, DEF_STR( Free_Play ) ) - PORT_START("DSW2") /* dsw2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -268,7 +268,7 @@ static INPUT_PORTS_START( banbam ) PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) - PORT_START("P1") /* d804 */ + PORT_START("P1") /* d804 */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -278,7 +278,7 @@ static INPUT_PORTS_START( banbam ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_START("P2") /* d805 */ + PORT_START("P2") /* d805 */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) @@ -288,7 +288,7 @@ static INPUT_PORTS_START( banbam ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* d803 */ + PORT_START("SYSTEM") /* d803 */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_SERVICE( 0x20, IP_ACTIVE_HIGH ) diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c index 1b41a548f40..77bc4a3cc14 100644 --- a/src/mame/drivers/stv.c +++ b/src/mame/drivers/stv.c @@ -2056,15 +2056,15 @@ static ADDRESS_MAP_START( sound_mem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x100000, 0x100fff) AM_READWRITE(scsp_0_r, scsp_0_w) ADDRESS_MAP_END -#define STV_PLAYER_INPUTS(_n_, _b1_, _b2_, _b3_, _b4_) \ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_##_b1_ ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_##_b2_ ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_##_b3_ ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_##_b4_ ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) +#define STV_PLAYER_INPUTS(_n_, _b1_, _b2_, _b3_) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_##_b1_ ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_##_b2_ ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_##_b3_ ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) static INPUT_PORTS_START( stv ) PORT_START("DSW1") @@ -2120,16 +2120,16 @@ static INPUT_PORTS_START( stv ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("P1") - STV_PLAYER_INPUTS(1, BUTTON1, BUTTON2, BUTTON3, BUTTON4) + STV_PLAYER_INPUTS(1, BUTTON1, BUTTON2, BUTTON3) PORT_START("P2") - STV_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3, BUTTON4) + STV_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3) /* PORT_START("P3") - STV_PLAYER_INPUTS(3, BUTTON1, BUTTON2, BUTTON3, BUTTON4) + STV_PLAYER_INPUTS(3, BUTTON1, BUTTON2, BUTTON3) PORT_START("P4") - STV_PLAYER_INPUTS(4, BUTTON1, BUTTON2, BUTTON3, BUTTON4) + STV_PLAYER_INPUTS(4, BUTTON1, BUTTON2, BUTTON3) */ PORT_START("SYSTEM") @@ -2146,7 +2146,7 @@ static INPUT_PORTS_START( stv ) PORT_START("UNUSED") PORT_BIT ( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - /* Extra button layout,used by Power Instinct 3 & Suikoenbu */ + /* Extra button layout, used by Power Instinct 3, Suikoenbu, Elan Doree, Golden Axe Duel & Astra SuperStar */ PORT_START("EXTRA") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) @@ -2199,10 +2199,19 @@ static INPUT_PORTS_START( critcrsh ) /* IN 8 */ PORT_START("LIGHTY") PORT_BIT( 0x3f, 0x00, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0x0,0x3f) PORT_SENSITIVITY(50) PORT_KEYDELTA(1) PORT_PLAYER(1) +INPUT_PORTS_END + +static INPUT_PORTS_START( batmanfr ) + PORT_INCLUDE( stv ) + + PORT_MODIFY("P1") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) + PORT_MODIFY("P2") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) INPUT_PORTS_END -/* Same as the regular one,but with an additional & optional mahjong panel */ +/* Same as the regular one, but with an additional & optional mahjong panel */ static INPUT_PORTS_START( stvmp ) PORT_INCLUDE( stv ) @@ -3703,15 +3712,15 @@ static DRIVER_INIT( sanjeon ) GAME( 1996, stvbios, 0, stv, stv, stv, ROT0, "Sega", "ST-V Bios", GAME_IS_BIOS_ROOT ) -//GBX YEAR, NAME, PARENT, BIOS, MACH,INP, INIT, MONITOR +//GAME YEAR, NAME, PARENT, MACH, INP, INIT, MONITOR /* Playable */ GAME( 1998, astrass, stvbios, stv, stv, astrass, ROT0, "Sunsoft", "Astra SuperStars (J 980514 V1.002)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1995, bakubaku, stvbios, stv, stv, bakubaku, ROT0, "Sega", "Baku Baku Animal (J 950407 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) -GAME( 1996, batmanfr, stvbios, stv, stv, batmanfr, ROT0, "Acclaim", "Batman Forever (JUE 960507 V1.000)", GAME_NO_SOUND ) +GAME( 1996, batmanfr, stvbios, stv, batmanfr,batmanfr, ROT0, "Acclaim", "Batman Forever (JUE 960507 V1.000)", GAME_NO_SOUND ) GAME( 1996, colmns97, stvbios, stv, stv, colmns97, ROT0, "Sega", "Columns '97 (JET 961209 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) GAME( 1997, cotton2, stvbios, stv, stv, cotton2, ROT0, "Success", "Cotton 2 (JUET 970902 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) GAME( 1998, cottonbm, stvbios, stv, stv, cottonbm, ROT0, "Success", "Cotton Boomerang (JUET 980709 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) -GAME( 1995, critcrsh, stvbios, stv, critcrsh, ic13, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) +GAME( 1995, critcrsh, stvbios, stv, critcrsh, ic13, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) GAME( 1999, danchih, stvbios, stv, stvmp,danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) GAME( 1996, diehard, stvbios, stv, stv, diehard, ROT0, "Sega", "Die Hard Arcade (UET 960515 V1.000)", GAME_IMPERFECT_SOUND ) GAME( 1996, dnmtdeka, diehard, stv, stv, dnmtdeka, ROT0, "Sega", "Dynamite Deka (J 960515 V1.000)", GAME_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c index cb648e0903a..b2968f4856e 100644 --- a/src/mame/drivers/suna16.c +++ b/src/mame/drivers/suna16.c @@ -105,12 +105,12 @@ static ADDRESS_MAP_START( bssoccer_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x4001ff) AM_READ(suna16_paletteram16_r ) // Banked Palette AM_RANGE(0x400200, 0x400fff) AM_READ(SMH_RAM ) // AM_RANGE(0x600000, 0x61ffff) AM_READ(SMH_RAM ) // Sprites - AM_RANGE(0xa00000, 0xa00001) AM_READ(input_port_0_word_r ) // P1 (Inputs) - AM_RANGE(0xa00002, 0xa00003) AM_READ(input_port_1_word_r ) // P2 - AM_RANGE(0xa00004, 0xa00005) AM_READ(input_port_2_word_r ) // P3 - AM_RANGE(0xa00006, 0xa00007) AM_READ(input_port_3_word_r ) // P4 - AM_RANGE(0xa00008, 0xa00009) AM_READ(input_port_4_word_r ) // DSWs - AM_RANGE(0xa0000a, 0xa0000b) AM_READ(input_port_5_word_r ) // Coins + AM_RANGE(0xa00000, 0xa00001) AM_READ_PORT("P1") + AM_RANGE(0xa00002, 0xa00003) AM_READ_PORT("P2") + AM_RANGE(0xa00004, 0xa00005) AM_READ_PORT("P3") + AM_RANGE(0xa00006, 0xa00007) AM_READ_PORT("P4") + AM_RANGE(0xa00008, 0xa00009) AM_READ_PORT("DSW1") + AM_RANGE(0xa0000a, 0xa0000b) AM_READ_PORT("DSW2") ADDRESS_MAP_END static ADDRESS_MAP_START( bssoccer_writemem, ADDRESS_SPACE_PROGRAM, 16 ) @@ -142,10 +142,10 @@ static ADDRESS_MAP_START( uballoon_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x2001ff) AM_READ(suna16_paletteram16_r ) // Banked Palette AM_RANGE(0x200200, 0x200fff) AM_READ(SMH_RAM ) // AM_RANGE(0x400000, 0x41ffff) AM_READ(SMH_RAM ) // Sprites - AM_RANGE(0x600000, 0x600001) AM_READ(input_port_0_word_r ) // P1 + Coins(Inputs) - AM_RANGE(0x600002, 0x600003) AM_READ(input_port_1_word_r ) // P2 + Coins - AM_RANGE(0x600004, 0x600005) AM_READ(input_port_2_word_r ) // DSW 1 - AM_RANGE(0x600006, 0x600007) AM_READ(input_port_3_word_r ) // DSW 2 + AM_RANGE(0x600000, 0x600001) AM_READ_PORT("P1") + AM_RANGE(0x600002, 0x600003) AM_READ_PORT("P2") + AM_RANGE(0x600004, 0x600005) AM_READ_PORT("DSW1") + AM_RANGE(0x600006, 0x600007) AM_READ_PORT("DSW2") AM_RANGE(0xa00000, 0xa0ffff) AM_READ(SMH_NOP ) // Protection ADDRESS_MAP_END @@ -171,10 +171,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sunaq_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM ) // ROM - AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r ) // P1 + Coins - AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r ) // P2 + Coins - AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r ) // DSW - AM_RANGE(0x500006, 0x500007) AM_READ(input_port_3_word_r ) // (unused?) + AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") + AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") + AM_RANGE(0x500004, 0x500005) AM_READ_PORT("DSW1") + AM_RANGE(0x500006, 0x500007) AM_READ_PORT("DSW2") // (unused?) AM_RANGE(0x540000, 0x5401ff) AM_READ(suna16_paletteram16_r ) // Banked Palette AM_RANGE(0x540200, 0x540fff) AM_READ(SMH_RAM ) // RAM AM_RANGE(0x580000, 0x583fff) AM_READ(SMH_RAM ) // RAM @@ -219,13 +219,13 @@ static WRITE16_HANDLER( bestbest_prot_w ) static ADDRESS_MAP_START( bestbest_map, ADDRESS_SPACE_PROGRAM, 16 ) - AM_RANGE( 0x000000, 0x03ffff ) AM_ROM AM_MIRROR(0xc0000) // ROM - AM_RANGE( 0x200000, 0x2fffff ) AM_ROM AM_REGION("user1", 0) // ROM - AM_RANGE( 0x500000, 0x500001 ) AM_READWRITE( input_port_0_word_r, suna16_soundlatch_w ) // P1 + Coins, To Sound CPU - AM_RANGE( 0x500002, 0x500003 ) AM_READWRITE( input_port_1_word_r, bestbest_flipscreen_w ) // P2 + Coins, Flip Screen - AM_RANGE( 0x500004, 0x500005 ) AM_READWRITE( input_port_2_word_r, bestbest_coin_w ) // Coin Counter - AM_RANGE( 0x500008, 0x500009 ) AM_WRITE( bestbest_prot_w ) // Protection - AM_RANGE( 0x500018, 0x500019 ) AM_READ ( bestbest_prot_r ) // + AM_RANGE( 0x000000, 0x03ffff ) AM_ROM AM_MIRROR(0xc0000) // ROM + AM_RANGE( 0x200000, 0x2fffff ) AM_ROM AM_REGION("user1", 0) // ROM + AM_RANGE( 0x500000, 0x500001 ) AM_READ_PORT("P1") AM_WRITE(suna16_soundlatch_w) // To Sound CPU + AM_RANGE( 0x500002, 0x500003 ) AM_READ_PORT("P2") AM_WRITE(bestbest_flipscreen_w) // P2 + Coins, Flip Screen + AM_RANGE( 0x500004, 0x500005 ) AM_READ_PORT("DSW") AM_WRITE(bestbest_coin_w) // Coin Counter + AM_RANGE( 0x500008, 0x500009 ) AM_WRITE( bestbest_prot_w ) // Protection + AM_RANGE( 0x500018, 0x500019 ) AM_READ ( bestbest_prot_r ) // AM_RANGE( 0x540000, 0x540fff ) AM_READWRITE( suna16_paletteram16_r, suna16_paletteram16_w ) // Banked(?) Palette AM_RANGE( 0x541000, 0x54ffff ) AM_RAM // AM_RANGE( 0x580000, 0x58ffff ) AM_RAM // RAM @@ -475,14 +475,14 @@ ADDRESS_MAP_END ***************************************************************************/ #define JOY(_n_) \ - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(_n_) \ - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(_n_) \ + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) /*************************************************************************** @@ -490,20 +490,19 @@ ADDRESS_MAP_END ***************************************************************************/ static INPUT_PORTS_START( bssoccer ) - - PORT_START("P1") // IN0 - $a00001.b - Player 1 + PORT_START("P1") /* $a00001.b */ JOY(1) - PORT_START("P2") // IN1 - $a00003.b - Player 2 + PORT_START("P2") /* $a00003.b */ JOY(2) - PORT_START("P3") // IN2 - $a00005.b - Player 3 + PORT_START("P3") /* $a00005.b */ JOY(3) - PORT_START("P4") // IN3 - $a00007.b - Player 4 + PORT_START("P4") /* $a00007.b */ JOY(4) - PORT_START("DSW1") // IN4 - $a00008.w - DSW x 2 + PORT_START("DSW1") /* $a00008.w */ PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) ) @@ -514,9 +513,9 @@ static INPUT_PORTS_START( bssoccer ) PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) PORT_DIPNAME( 0x0018, 0x0018, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x0018, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x0018, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0000, "Hardest?" ) PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) @@ -547,7 +546,7 @@ static INPUT_PORTS_START( bssoccer ) PORT_DIPSETTING( 0x4000, "2:00" ) PORT_DIPSETTING( 0x0000, "2:15" ) - PORT_START("DSW2") // IN5 - $a0000b.b - Coins + PORT_START("DSW2") /* $a0000b.b */ PORT_DIPNAME( 0x0001, 0x0001, "Copyright" ) // these 4 are shown in test mode PORT_DIPSETTING( 0x0001, "Distributer Unico" ) PORT_DIPSETTING( 0x0000, "All Rights Reserved" ) @@ -560,11 +559,10 @@ static INPUT_PORTS_START( bssoccer ) PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN4 ) - + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN4 ) INPUT_PORTS_END @@ -573,47 +571,46 @@ INPUT_PORTS_END ***************************************************************************/ static INPUT_PORTS_START( uballoon ) - - PORT_START("P1") // IN0 - $600000.w - Player 1 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) - - PORT_START("P2") // IN1 - $600002.w - Player 2 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("P1") /* $600000.w */ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) + + PORT_START("P2") /* $600002.w */ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0x3000, 0x3000, "Copyright" ) // Jumpers PORT_DIPSETTING( 0x3000, "Distributer Unico" ) PORT_DIPSETTING( 0x2000, "All Rights Reserved" ) // PORT_DIPSETTING( 0x1000, "Distributer Unico" ) // PORT_DIPSETTING( 0x0000, "All Rights Reserved" ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_START("DSW1") // IN2 - $600005.b - DSW 1 + PORT_START("DSW1") /* $600005.b */ PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) @@ -629,13 +626,13 @@ static INPUT_PORTS_START( uballoon ) PORT_DIPSETTING( 0x0008, "4" ) PORT_DIPSETTING( 0x0000, "5" ) PORT_DIPNAME( 0x0060, 0x0060, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x0040, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0060, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) - PORT_START("DSW2") // IN3 - $600007.b - DSW 2 + PORT_START("DSW2") /* $600007.b */ PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -660,7 +657,6 @@ static INPUT_PORTS_START( uballoon ) PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - INPUT_PORTS_END /*************************************************************************** @@ -668,28 +664,28 @@ INPUT_PORTS_END ***************************************************************************/ static INPUT_PORTS_START( sunaq ) - PORT_START("P1") // Player 1 - 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) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) - - - PORT_START("P2") // Player 2 - 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) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN2 ) - - PORT_START("DSW1") // Single 8 switch DSW + PORT_START("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) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) + + + PORT_START("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) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN2 ) + + PORT_START("DSW1") PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) @@ -713,6 +709,8 @@ static INPUT_PORTS_START( sunaq ) PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + + PORT_START("DSW2") /* Unused? */ INPUT_PORTS_END /*************************************************************************** @@ -720,43 +718,43 @@ INPUT_PORTS_END ***************************************************************************/ static INPUT_PORTS_START( bestbest ) - PORT_START("P1") // IN0 - 500000.w - Player 1 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) - - PORT_START("P2") // IN1 - 500002.w - Player 2 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 ) - - PORT_START("DSW1") // IN2 - 500004.w - DSW x 2 + PORT_START("P1") /* 500000.w */ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) + + PORT_START("P2") /* 500002.w */ + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 ) + + PORT_START("DSW") /* 500004.w */ PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) @@ -767,10 +765,10 @@ static INPUT_PORTS_START( bestbest ) PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) PORT_DIPNAME( 0x0018, 0x0010, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x0018, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0008, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) + PORT_DIPSETTING( 0x0018, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) PORT_DIPNAME( 0x0020, 0x0020, "Display Combos" ) PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c index f7229b2ef8b..30a6d89163b 100644 --- a/src/mame/drivers/supbtime.c +++ b/src/mame/drivers/supbtime.c @@ -35,11 +35,11 @@ static READ16_HANDLER( supbtime_controls_r ) { switch (offset<<1) { - case 0: /* Player 1 & Player 2 joysticks & fire buttons */ - return (input_port_read(machine, "P1") + (input_port_read(machine, "P2") << 8)); - case 2: /* Dips */ - return (input_port_read(machine, "DSW1") + (input_port_read(machine, "DSW2") << 8)); - case 8: /* Credits */ + case 0: + return input_port_read(machine, "INPUTS"); + case 2: + return input_port_read(machine, "DSW"); + case 8: return input_port_read(machine, "COIN"); case 10: /* ? Not used for anything */ case 12: @@ -153,167 +153,159 @@ ADDRESS_MAP_END /******************************************************************************/ static INPUT_PORTS_START( supbtime ) - PORT_START("P1") /* Player 1 controls */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 3 - unused */ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") /* Player 2 controls */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 3 - unused */ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("COIN") /* Credits */ - 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_HIGH, IPT_VBLANK ) - 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("DSW1") /* Dip switch bank 1 - inverted with respect to other Deco games */ - PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x18, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("DSW2") /* Dip switch bank 2 */ - PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x80, "1" ) - PORT_DIPSETTING( 0x00, "2" ) - PORT_DIPSETTING( 0xc0, "3" ) - PORT_DIPSETTING( 0x40, "4" ) - PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Allow_Continue ) ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("INPUTS") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 3 - unused */ + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 3 - unused */ + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START("COIN") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("DSW") /* inverted with respect to other Deco games */ + PORT_DIPNAME( 0x00e0, 0x00e0, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0060, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x001c, 0x001c, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x001c, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x000c, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x0014, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x0018, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x8000, "1" ) + PORT_DIPSETTING( 0x0000, "2" ) + PORT_DIPSETTING( 0xc000, "3" ) + PORT_DIPSETTING( 0x4000, "4" ) + PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x1000, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x3000, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x2000, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) + PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Allow_Continue ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0200, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( chinatwn ) - PORT_START("P1") /* Player 1 controls */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Used? */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* button 3 - unused */ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("P2") /* Player 2 controls */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) 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) /* Used? */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 3 - unused */ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("COIN") /* Credits */ - 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_HIGH, IPT_VBLANK ) - 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("DSW1") /* Dip switch bank 1 - inverted with respect to other Deco games */ - PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x18, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("DSW2") /* Dip switch bank 2 */ - PORT_DIPNAME( 0xc0, 0xc0, "Time" ) - PORT_DIPSETTING( 0x00, "1500" ) - PORT_DIPSETTING( 0x80, "2000" ) - PORT_DIPSETTING( 0xc0, "2500" ) - PORT_DIPSETTING( 0x40, "3000" ) - PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, 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( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("INPUTS") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Used? */ + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* button 3 - unused */ + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* Used? */ + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* button 3 - unused */ + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START("COIN") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_VBLANK ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("DSW") /* inverted with respect to other Deco games */ + PORT_DIPNAME( 0x00e0, 0x00e0, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00e0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0060, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x001c, 0x001c, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x001c, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x000c, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x0014, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x0018, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0xc000, 0xc000, "Time" ) + PORT_DIPSETTING( 0x0000, "1500" ) + PORT_DIPSETTING( 0x8000, "2000" ) + PORT_DIPSETTING( 0xc000, "2500" ) + PORT_DIPSETTING( 0x4000, "3000" ) + PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x1000, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x3000, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x2000, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) + PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0800, 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( 0x0200, 0x0200, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END /******************************************************************************/ diff --git a/src/mame/drivers/supdrapo.c b/src/mame/drivers/supdrapo.c index 5c0caa1d23c..388adb47295 100644 --- a/src/mame/drivers/supdrapo.c +++ b/src/mame/drivers/supdrapo.c @@ -48,16 +48,16 @@ static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x5800, 0x5817) AM_READ(SMH_RAM) AM_RANGE(0x6000, 0x67ff) AM_READ(SMH_RAM) AM_RANGE(0x6c00, 0x6fff) AM_READ(SMH_RAM) - AM_RANGE(0x8000, 0x8000) AM_READ(input_port_4_r) //? - AM_RANGE(0x8001, 0x8001) AM_READ(input_port_0_r) //input - AM_RANGE(0x8002, 0x8002) AM_READ(input_port_1_r) //input - AM_RANGE(0x8003, 0x8003) AM_READ(input_port_2_r) //input - AM_RANGE(0x8004, 0x8004) AM_READ(input_port_3_r) //input - AM_RANGE(0x8005, 0x8005) AM_READ(input_port_6_r) //? - AM_RANGE(0x8006, 0x8006) AM_READ(input_port_5_r) //dip? + AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN4") //? + AM_RANGE(0x8001, 0x8001) AM_READ_PORT("IN0") + AM_RANGE(0x8002, 0x8002) AM_READ_PORT("IN1") + AM_RANGE(0x8003, 0x8003) AM_READ_PORT("IN2") + AM_RANGE(0x8004, 0x8004) AM_READ_PORT("IN3") + AM_RANGE(0x8005, 0x8005) AM_READ_PORT("IN6") //? + AM_RANGE(0x8006, 0x8006) AM_READ_PORT("IN5") //dips? AM_RANGE(0x9000, 0x9097) AM_READ(SMH_RAM) AM_RANGE(0x909d, 0x909d) AM_READ(SMH_RAM) - AM_RANGE(0x9400, 0x9400) AM_READ(input_port_7_r) //need check + AM_RANGE(0x9400, 0x9400) AM_READ_PORT("IN7") //need check ADDRESS_MAP_END diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c index 3839584e647..a3a519822ce 100644 --- a/src/mame/drivers/superchs.c +++ b/src/mame/drivers/superchs.c @@ -115,8 +115,7 @@ static READ32_HANDLER( superchs_input_r ) switch (offset) { case 0x00: - return (input_port_read(machine, "SYSTEM") << 16) | input_port_read(machine, "INPUT") | - (eeprom_read_bit() << 7); + return input_port_read(machine, "INPUTS"); case 0x01: return coin_word<<16; @@ -273,55 +272,54 @@ ADDRESS_MAP_END /***********************************************************/ static INPUT_PORTS_START( superchs ) - PORT_START("SYSTEM") /* 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 ) - PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(1) /* Freeze input */ - PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("INPUT") /* 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 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* reserved for EEROM */ - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) /* seat center (cockpit only) */ - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Nitro") - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Gear Shift") - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Brake") - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("WHEEL") /* IN 2, steering wheel */ + PORT_START("INPUTS") + PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* reserved for EEROM */ + PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) /* seat center (cockpit only) */ + PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Nitro") + PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Gear Shift") + PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Brake") + PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_START1 ) + + PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(1) /* Freeze input */ + PORT_SERVICE_NO_TOGGLE( 0x00100000, IP_ACTIVE_LOW ) + PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("WHEEL") /* steering wheel */ PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) - PORT_START("ACCEL") /* IN 3, accel [effectively also brake for the upright] */ + PORT_START("ACCEL") /* accel [effectively also brake for the upright] */ PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_PLAYER(1) - PORT_START("SOUND") /* IN 4, sound volume */ + PORT_START("SOUND") /* sound volume */ PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2) - PORT_START("UNKNOWN") /* IN 5, unknown */ + PORT_START("UNKNOWN") /* unknown */ PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_PLAYER(2) - PORT_START("FAKE") /* IN 6, inputs and DSW all fake */ + PORT_START("FAKE") /* inputs and DSW all fake */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c index a2439f38197..4779a707488 100644 --- a/src/mame/drivers/supertnk.c +++ b/src/mame/drivers/supertnk.c @@ -292,10 +292,10 @@ static ADDRESS_MAP_START( supertnk_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x07ff) AM_ROM AM_RANGE(0x0800, 0x17ff) AM_ROMBANK(1) AM_RANGE(0x1800, 0x1bff) AM_RAM - AM_RANGE(0x1efc, 0x1efc) AM_READ(input_port_0_r) - AM_RANGE(0x1efd, 0x1efd) AM_READ(input_port_1_r) - AM_RANGE(0x1efe, 0x1efe) AM_READWRITE(input_port_2_r, ay8910_control_port_0_w) - AM_RANGE(0x1eff, 0x1eff) AM_READWRITE(input_port_3_r, ay8910_write_port_0_w) + AM_RANGE(0x1efc, 0x1efc) AM_READ_PORT("JOYS") + AM_RANGE(0x1efd, 0x1efd) AM_READ_PORT("INPUTS") + AM_RANGE(0x1efe, 0x1efe) AM_READ_PORT("DSW") AM_WRITE(ay8910_control_port_0_w) + AM_RANGE(0x1eff, 0x1eff) AM_READ_PORT("UNK") AM_WRITE(ay8910_write_port_0_w) AM_RANGE(0x2000, 0x3fff) AM_READWRITE(supertnk_videoram_r, supertnk_videoram_w) AM_SIZE(&supertnk_videoram_size) ADDRESS_MAP_END diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c index 88be589eb72..68f8adbbaaf 100644 --- a/src/mame/drivers/suprgolf.c +++ b/src/mame/drivers/suprgolf.c @@ -97,11 +97,11 @@ static READ8_HANDLER( suprgolf_random ) static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) // Player 1 controls - AM_RANGE(0x01, 0x01) AM_READ(input_port_1_r) // Player 2 controls - AM_RANGE(0x02, 0x02) AM_READ(input_port_2_r) // ?? - AM_RANGE(0x04, 0x04) AM_READ(input_port_3_r) // extra controls + coin + test - AM_RANGE(0x05, 0x05) AM_READ(input_port_4_r) AM_WRITE(rom_bank_select_w) + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") + AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") + AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") // ?? + AM_RANGE(0x04, 0x04) AM_READ_PORT("SYSTEM") + AM_RANGE(0x05, 0x05) AM_READ_PORT("IN4") AM_WRITE(rom_bank_select_w) AM_RANGE(0x06, 0x06) AM_READ(suprgolf_random) // game locks up or crashes? if this doesn't return right values? AM_RANGE(0x08, 0x08) AM_READ(ym2203_status_port_0_r) AM_WRITE(ym2203_control_port_0_w) @@ -109,7 +109,7 @@ static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_END static INPUT_PORTS_START( suprgolf ) - PORT_START("P1") /* PLAY1 */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -119,7 +119,7 @@ static INPUT_PORTS_START( suprgolf ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* CNT */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* SEL */ - PORT_START("P2") /* PLAY2 */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -129,7 +129,7 @@ static INPUT_PORTS_START( suprgolf ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* CNT */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* SEL */ - PORT_START("IN2") /* 8bit */ + PORT_START("IN2") PORT_DIPNAME( 0x01, 0x01, "2" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -155,7 +155,7 @@ static INPUT_PORTS_START( suprgolf ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SYSTEM") /* 8bit */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) /* 1P */ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* POW */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) /* 1P */ @@ -169,7 +169,7 @@ static INPUT_PORTS_START( suprgolf ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_START("IN4") /* 8bit */ + PORT_START("IN4") PORT_DIPNAME( 0x01, 0x01, "4" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -195,7 +195,7 @@ static INPUT_PORTS_START( suprgolf ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW0") /* 8bit */ + PORT_START("DSW0") PORT_DIPNAME( 0x01, 0x01, "DSW0" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -221,7 +221,7 @@ static INPUT_PORTS_START( suprgolf ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW1") /* 8bit */ + PORT_START("DSW1") PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) PORT_DIPNAME( 0x02, 0x02, "DSW1" ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c index 97a1bbae487..0e83ceea695 100644 --- a/src/mame/drivers/suprloco.c +++ b/src/mame/drivers/suprloco.c @@ -42,11 +42,11 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc1ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) - AM_RANGE(0xc800, 0xc800) AM_READ(input_port_0_r) - AM_RANGE(0xd000, 0xd000) AM_READ(input_port_1_r) - AM_RANGE(0xd800, 0xd800) AM_READ(input_port_2_r) - AM_RANGE(0xe000, 0xe000) AM_READ(input_port_3_r) - AM_RANGE(0xe001, 0xe001) AM_READ(input_port_4_r) + AM_RANGE(0xc800, 0xc800) AM_READ_PORT("SYSTEM") + AM_RANGE(0xd000, 0xd000) AM_READ_PORT("P1") + AM_RANGE(0xd800, 0xd800) AM_READ_PORT("P2") + AM_RANGE(0xe000, 0xe000) AM_READ_PORT("DSW1") + AM_RANGE(0xe001, 0xe001) AM_READ_PORT("DSW2") AM_RANGE(0xe800, 0xe800) AM_WRITE(suprloco_soundport_w) AM_RANGE(0xe801, 0xe801) AM_READWRITE(suprloco_control_r, suprloco_control_w) AM_RANGE(0xf000, 0xf6ff) AM_RAM_WRITE(suprloco_videoram_w) AM_BASE(&suprloco_videoram) @@ -66,7 +66,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( suprloco ) - PORT_START("IN0") + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) @@ -75,7 +75,7 @@ static INPUT_PORTS_START( suprloco ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("IN1") + PORT_START("P1") 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 @@ -84,7 +84,7 @@ static INPUT_PORTS_START( suprloco ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("IN2") + PORT_START("P2") 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( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL @@ -142,7 +142,6 @@ static INPUT_PORTS_START( suprloco ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) - INPUT_PORTS_END diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c index aa8534a7f4c..4219049a677 100644 --- a/src/mame/drivers/suprnova.c +++ b/src/mame/drivers/suprnova.c @@ -496,227 +496,155 @@ static INTERRUPT_GEN(skns_interrupt) Input port definitions - NOTE: The driver reads data from eight input ports, even if they are unused. - So I left them mapped. See for reference the READ32_HANDLERs : - "nova_input_port_0_r", "nova_input_port_3_r", "nova_input_port_dip_r" -**********************************************************************************/ + NOTE: The driver reads data from eight 8bit input ports, even if they + are unused. So I left them mapped. -static INPUT_PORTS_START( skns ) /* 3 buttons, 2 players */ +**********************************************************************************/ - PORT_START("IN0") /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("IN1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("IN2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("IN3") /* IN3 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) +static CUSTOM_INPUT( paddle_r ) +{ + const char *tag = param; + return input_port_read(field->port->machine, tag); +} - PORT_START("Paddle A") /* Paddle A */ +static INPUT_PORTS_START( skns ) /* 3 buttons, 2 players */ + PORT_START("400000") + PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_SERVICE ) + PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("400004") + PORT_SERVICE( 0x00000001, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x00000002, 0x00000002, DEF_STR( Flip_Screen ) ) // This port affects 0x000000040191c8 function + PORT_DIPSETTING( 0x00000002, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) + PORT_DIPNAME( 0x00000004, 0x00000004, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00000004, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) + PORT_DIPNAME( 0x00000008, 0x00000008, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00000008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) + PORT_DIPNAME( 0x00000010, 0x00000010, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00000010, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) + PORT_DIPNAME( 0x00000020, 0x00000020, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) + PORT_DIPNAME( 0x00000040, 0x00000040, "Use Backup Ram" ) + PORT_DIPSETTING( 0x00000000, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00000040, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x00000080, 0x00000080, "Freeze" ) + PORT_DIPSETTING( 0x00000000, "Freezes the game") + PORT_DIPSETTING( 0x00000080, "Right value") + PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(paddle_r, "Paddle C") + PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(paddle_r, "Paddle B") + PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(paddle_r, "Paddle A") + + PORT_START("40000c") + PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(paddle_r, "Paddle D") + PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("Paddle A") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("Paddle B") /* Paddle B */ + PORT_START("Paddle B") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("Paddle C") /* Paddle C */ + PORT_START("Paddle C") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("DSW") /* DSW */ - PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR(Flip_Screen) ) // This port affects 0x040191c8 function - 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, "Use Backup Ram" ) - PORT_DIPSETTING( 0x00, DEF_STR(No) ) - PORT_DIPSETTING( 0x40, DEF_STR(Yes) ) - PORT_DIPNAME( 0x80, 0x80, "Freeze" ) - PORT_DIPSETTING( 0x00, "Freezes the game") - PORT_DIPSETTING( 0x80, "Right value") - - PORT_START("Paddle D") /* Paddle D */ + PORT_START("Paddle D") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - INPUT_PORTS_END static INPUT_PORTS_START( skns_1p ) /* 2 buttons, 1 player */ + PORT_INCLUDE( skns ) - PORT_START("IN0") /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - + PORT_MODIFY("400000") /* jjparads and jjparad2 are 1 player only games ryouran and teljan have an unemulated feature that allows to play them in two player mode via a cable-network connection (untestable) Service mode test shows only P1 inputs */ - PORT_START("IN1") /* IN1 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - + PORT_BIT( 0x00ff0000, IP_ACTIVE_LOW, IPT_UNUSED ) /* same as above, coin 2 and start 2 are untestable in ryouran and teljan. So I left disabled for now */ - PORT_START("IN2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) -//PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) -//PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("IN3") /* IN3 */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("Paddle A") /* Paddle A */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("Paddle B") /* Paddle B */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("Paddle C") /* Paddle C */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("DSW") /* DSW */ - PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR(Flip_Screen) ) // This port affects 0x040191c8 function - 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, "Test Mode" ) - 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, "Use Backup Ram" ) - PORT_DIPSETTING( 0x00, DEF_STR(No) ) - PORT_DIPSETTING( 0x40, DEF_STR(Yes) ) - PORT_DIPNAME( 0x80, 0x80, "Freeze" ) - PORT_DIPSETTING( 0x00, "Freezes the game") - PORT_DIPSETTING( 0x80, "Right value") - - PORT_START("Paddle D") /* Paddle D */ - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - + PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_UNUSED ) /* Start 2 */ + PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNUSED ) /* Coin 2 */ + PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 3 */ + + PORT_MODIFY("400004") + PORT_DIPNAME( 0x00000010, 0x00000010, "Test Mode" ) + PORT_DIPSETTING( 0x00000010, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00000000, DEF_STR(On) ) INPUT_PORTS_END static INPUT_PORTS_START( cyvern ) /* 2 buttons, 2 players */ PORT_INCLUDE( skns ) - PORT_MODIFY("IN0") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_MODIFY("IN1") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - + PORT_MODIFY("400000") + PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 3 */ + PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 3 */ INPUT_PORTS_END static INPUT_PORTS_START( galpanis ) /* 1 button, 2 players */ PORT_INCLUDE( skns ) - PORT_MODIFY("IN0") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_MODIFY("IN1") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - + PORT_MODIFY("400000") + PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 2 */ + PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 3 */ + PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 2 */ + PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 3 */ INPUT_PORTS_END static INPUT_PORTS_START( puzzloop ) /* 2 buttons, 2 players, paddle */ PORT_INCLUDE( skns ) - PORT_MODIFY("IN0") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_MODIFY("IN1") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_MODIFY("400000") + PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 3 */ + PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNUSED ) /* No Button 3 */ PORT_MODIFY("Paddle A") /* Paddle A */ - PORT_BIT( 0xFF, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) + PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) PORT_MODIFY("Paddle B") /* Paddle B */ - PORT_BIT( 0xFF, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(2) - + PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(2) INPUT_PORTS_END static INPUT_PORTS_START( vblokbrk ) /* 3 buttons, 2 players, paddle */ PORT_INCLUDE( skns ) PORT_MODIFY("Paddle A") /* Paddle A */ - PORT_BIT( 0xFF, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) + PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) PORT_MODIFY("Paddle B") /* Paddle B */ - PORT_BIT( 0xFF, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(2) - + PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(2) INPUT_PORTS_END -static READ32_HANDLER( nova_input_port_0_r ) -{ - return input_port_read(machine, "IN0")<<24 | input_port_read(machine, "IN1")<<16 | input_port_read(machine, "IN2")<<8 | input_port_read(machine, "IN3"); -} - -static READ32_HANDLER( nova_input_port_3_r ) -{ - return input_port_read(machine, "Paddle D") | 0xffffff00; -} - -static READ32_HANDLER( nova_input_port_dip_r ) -{ - return input_port_read(machine, "Paddle A")<<24 | input_port_read(machine, "Paddle B")<<16 | input_port_read(machine, "Paddle C")<<8 | input_port_read(machine, "DSW"); -} - static UINT32 timer_0_temp[4]; static WRITE32_HANDLER( skns_msm6242_w ) @@ -862,11 +790,11 @@ static WRITE32_HANDLER( skns_ymz280_w ) static ADDRESS_MAP_START( skns_readmem, ADDRESS_SPACE_PROGRAM, 32 ) AM_RANGE(0x00000000, 0x0007ffff) AM_READ(SMH_ROM) /* BIOS ROM */ - AM_RANGE(0x00400000, 0x00400003) AM_READ(nova_input_port_0_r) - AM_RANGE(0x00400004, 0x00400007) AM_READ(nova_input_port_dip_r) + AM_RANGE(0x00400000, 0x00400003) AM_READ_PORT("400000") + AM_RANGE(0x00400004, 0x00400007) AM_READ_PORT("400004") AM_RANGE(0x00400008, 0x0040000b) AM_READ(SMH_RAM) /* In between is write only */ - AM_RANGE(0x0040000c, 0x0040000f) AM_READ(nova_input_port_3_r) + AM_RANGE(0x0040000c, 0x0040000f) AM_READ_PORT("40000c") AM_RANGE(0x00800000, 0x00801fff) AM_READ(SMH_RAM) /* 'backup' RAM */ // AM_RANGE(0x00c00000, 0x00c00003) AM_READ(skns_ymz280_r) /* ymz280 (sound) */ AM_RANGE(0x01000000, 0x0100000f) AM_READ(skns_msm6242_r) diff --git a/src/mame/drivers/suprridr.c b/src/mame/drivers/suprridr.c index 1ca4929e89b..a943edf7401 100644 --- a/src/mame/drivers/suprridr.c +++ b/src/mame/drivers/suprridr.c @@ -168,9 +168,9 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x9800, 0x983f) AM_RAM AM_RANGE(0x9840, 0x987f) AM_RAM AM_BASE(&spriteram) AM_RANGE(0x9880, 0x9bff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) - AM_RANGE(0xa800, 0xa800) AM_READ(input_port_1_r) - AM_RANGE(0xb000, 0xb000) AM_READWRITE(input_port_2_r, nmi_enable_w) + AM_RANGE(0xa000, 0xa000) AM_READ_PORT("INPUTS") + AM_RANGE(0xa800, 0xa800) AM_READ_PORT("SYSTEM") + AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW") AM_WRITE(nmi_enable_w) AM_RANGE(0xb002, 0xb003) AM_WRITE(coin_lock_w) AM_RANGE(0xb006, 0xb006) AM_WRITE(suprridr_flipx_w) AM_RANGE(0xb007, 0xb007) AM_WRITE(suprridr_flipy_w) @@ -237,17 +237,17 @@ static CUSTOM_INPUT( suprridr_control_r ) static INPUT_PORTS_START( suprridr ) - PORT_START("INPUTS") /* IN0 */ - PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(suprridr_control_r, 0) + PORT_START("INPUTS") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(suprridr_control_r, NULL) - PORT_START("SYSTEM") /* IN1 */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_START("DSW1") /* DSW0 */ + PORT_START("DSW") PORT_DIPNAME( 0x07, 0x01, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c index 996635d1470..eace373850b 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -142,11 +142,11 @@ static ADDRESS_MAP_START( suprslam_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0xff0000, 0xff1fff) AM_READ(SMH_RAM) AM_RANGE(0xff8000, 0xff8fff) AM_READ(SMH_RAM) AM_RANGE(0xffa000, 0xffafff) AM_READ(SMH_RAM) - AM_RANGE(0xfff000, 0xfff001) AM_READ(input_port_0_word_r) - AM_RANGE(0xfff002, 0xfff003) AM_READ(input_port_1_word_r) - AM_RANGE(0xfff004, 0xfff005) AM_READ(input_port_2_word_r) - AM_RANGE(0xfff006, 0xfff007) AM_READ(input_port_3_word_r) - AM_RANGE(0xfff008, 0xfff009) AM_READ(input_port_4_word_r) + AM_RANGE(0xfff000, 0xfff001) AM_READ_PORT("P1") + AM_RANGE(0xfff002, 0xfff003) AM_READ_PORT("P2") + AM_RANGE(0xfff004, 0xfff005) AM_READ_PORT("SYSTEM") + AM_RANGE(0xfff006, 0xfff007) AM_READ_PORT("DSW1") + AM_RANGE(0xfff008, 0xfff009) AM_READ_PORT("DSW2") ADDRESS_MAP_END static ADDRESS_MAP_START( suprslam_writemem, ADDRESS_SPACE_PROGRAM, 16 ) @@ -196,8 +196,7 @@ ADDRESS_MAP_END /*** INPUT PORTS *************************************************************/ static INPUT_PORTS_START( suprslam ) - - PORT_START("P1") /* IN1 */ + PORT_START("P1") 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) @@ -207,7 +206,7 @@ static INPUT_PORTS_START( suprslam ) PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) - PORT_START("P2") /* IN1 */ + PORT_START("P2") 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) @@ -217,7 +216,7 @@ static INPUT_PORTS_START( suprslam ) PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - PORT_START("SYSTEM") /* IN0 */ + PORT_START("SYSTEM") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) // Only in "test mode" @@ -227,7 +226,7 @@ static INPUT_PORTS_START( suprslam ) PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_TILT ) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_START("DSW1") /* DSW */ + PORT_START("DSW1") PORT_DIPNAME( 0x0001, 0x0001, "Coin Slots" ) PORT_DIPSETTING( 0x0001, "Common" ) PORT_DIPSETTING( 0x0000, "Separate" ) @@ -253,7 +252,7 @@ static INPUT_PORTS_START( suprslam ) PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_START("DSW2") /* DSW */ + PORT_START("DSW2") PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) diff --git a/src/mame/drivers/surpratk.c b/src/mame/drivers/surpratk.c index b51502da1fd..a4107b52a84 100644 --- a/src/mame/drivers/surpratk.c +++ b/src/mame/drivers/surpratk.c @@ -89,11 +89,11 @@ static ADDRESS_MAP_START( surpratk_readmem, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x07ff) AM_READ(bankedram_r) AM_RANGE(0x0800, 0x1fff) AM_READ(SMH_RAM) AM_RANGE(0x2000, 0x3fff) AM_READ(SMH_BANK1) /* banked ROM */ - AM_RANGE(0x5f8c, 0x5f8c) AM_READ(input_port_0_r) - AM_RANGE(0x5f8d, 0x5f8d) AM_READ(input_port_1_r) - AM_RANGE(0x5f8e, 0x5f8e) AM_READ(input_port_4_r) - AM_RANGE(0x5f8f, 0x5f8f) AM_READ(input_port_2_r) - AM_RANGE(0x5f90, 0x5f90) AM_READ(input_port_3_r) + AM_RANGE(0x5f8c, 0x5f8c) AM_READ_PORT("P1") + AM_RANGE(0x5f8d, 0x5f8d) AM_READ_PORT("P2") + AM_RANGE(0x5f8e, 0x5f8e) AM_READ_PORT("DSW3") + AM_RANGE(0x5f8f, 0x5f8f) AM_READ_PORT("DSW1") + AM_RANGE(0x5f90, 0x5f90) AM_READ_PORT("DSW2") // AM_RANGE(0x5f91, 0x5f91) AM_READ(ym2151_status_port_0_r) /* ? */ AM_RANGE(0x5fa0, 0x5faf) AM_READ(K053244_r) AM_RANGE(0x5fc0, 0x5fc0) AM_READ(watchdog_reset_r) @@ -123,7 +123,7 @@ ADDRESS_MAP_END ***************************************************************************/ static INPUT_PORTS_START( surpratk ) - PORT_START("P1") /* PLAYER 1 INPUTS */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) @@ -133,7 +133,7 @@ static INPUT_PORTS_START( surpratk ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("P2") /* PLAYER 2 INPUTS */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) @@ -143,7 +143,7 @@ static INPUT_PORTS_START( surpratk ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW1") /* DSW #1 */ + PORT_START("DSW1") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) @@ -179,7 +179,7 @@ static INPUT_PORTS_START( surpratk ) PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) // PORT_DIPSETTING( 0x00, "No Use" ) - PORT_START("DSW2") /* DSW #2 */ + PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "2" ) PORT_DIPSETTING( 0x02, "3" ) @@ -203,7 +203,7 @@ static INPUT_PORTS_START( surpratk ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW3") /* DSW #3 */ + PORT_START("DSW3") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index 8d347741021..dc973af28cd 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -240,16 +240,16 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) /* joy1 */ - AM_RANGE(0x04, 0x04) AM_READ(input_port_1_r) /* joy2 */ - AM_RANGE(0x08, 0x08) AM_READ(input_port_2_r) /* coin,start */ - AM_RANGE(0x0c, 0x0c) AM_READ(input_port_3_r) /* DIP2 */ - AM_RANGE(0x0e, 0x0e) AM_READ(input_port_3_r) /* DIP2 blckgalb reads it from here */ - AM_RANGE(0x0d, 0x0d) AM_READ(input_port_4_r) /* DIP1 some games read it from here... */ - AM_RANGE(0x10, 0x10) AM_READ(input_port_4_r) /* DIP1 ... and some others from here */ - /* but there are games which check BOTH! */ + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") + AM_RANGE(0x04, 0x04) AM_READ_PORT("P2") + AM_RANGE(0x08, 0x08) AM_READ_PORT("SYSTEM") + AM_RANGE(0x0c, 0x0c) AM_READ_PORT("DSW2") /* DIP2 */ + AM_RANGE(0x0e, 0x0e) AM_READ_PORT("DSW2") /* DIP2 blckgalb reads it from here */ + AM_RANGE(0x0d, 0x0d) AM_READ_PORT("DSW1") /* DIP1 some games read it from here... */ + AM_RANGE(0x10, 0x10) AM_READ_PORT("DSW1") /* DIP1 ... and some others from here */ + /* but there are games which check BOTH! */ - AM_RANGE(0x11, 0x11) AM_READ(input_port_3_r) /* DIP2 ... blockgal */ + AM_RANGE(0x11, 0x11) AM_READ_PORT("DSW2") /* DIP2 ... blockgal */ AM_RANGE(0x15, 0x15) AM_READ(system1_videomode_r) @@ -266,13 +266,13 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( wbml_readport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) /* joy1 */ - AM_RANGE(0x04, 0x04) AM_READ(input_port_1_r) /* joy2 */ - AM_RANGE(0x08, 0x08) AM_READ(input_port_2_r) /* coin,start */ - AM_RANGE(0x0c, 0x0c) AM_READ(input_port_3_r) /* DIP2 */ - AM_RANGE(0x0d, 0x0d) AM_READ(input_port_4_r) /* DIP1 some games read it from here... */ - AM_RANGE(0x10, 0x10) AM_READ(input_port_4_r) /* DIP1 ... and some others from here */ - /* but there are games which check BOTH! */ + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") + AM_RANGE(0x04, 0x04) AM_READ_PORT("P2") + AM_RANGE(0x08, 0x08) AM_READ_PORT("SYSTEM") + AM_RANGE(0x0c, 0x0c) AM_READ_PORT("DSW2") /* DIP2 */ + AM_RANGE(0x0d, 0x0d) AM_READ_PORT("DSW1") /* DIP1 some games read it from here... */ + AM_RANGE(0x10, 0x10) AM_READ_PORT("DSW1") /* DIP1 ... and some others from here */ + /* but there are games which check BOTH! */ AM_RANGE(0x15, 0x15) AM_READ(system1_videomode_r) AM_RANGE(0x16, 0x16) AM_READ(wbml_videoram_bank_latch_r) AM_RANGE(0x19, 0x19) AM_READ(system1_videomode_r) /* mirror address */ @@ -280,20 +280,20 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sht_readport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) -// AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) /* joy1 */ -// AM_RANGE(0x04, 0x04) AM_READ(input_port_1_r) /* joy2 */ - AM_RANGE(0x08, 0x08) AM_READ(input_port_2_r) /* coin,start */ - AM_RANGE(0x0c, 0x0c) AM_READ(input_port_3_r) /* DIP2 */ - AM_RANGE(0x0d, 0x0d) AM_READ(input_port_4_r) /* DIP1 some games read it from here... */ - AM_RANGE(0x10, 0x10) AM_READ(input_port_4_r) /* DIP1 ... and some others from here */ - /* but there are games which check BOTH! */ +/* AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") */ +/* AM_RANGE(0x04, 0x04) AM_READ_PORT("P2") */ + AM_RANGE(0x08, 0x08) AM_READ_PORT("SYSTEM") + AM_RANGE(0x0c, 0x0c) AM_READ_PORT("DSW2") /* DIP2 */ + AM_RANGE(0x0d, 0x0d) AM_READ_PORT("DSW1") /* DIP1 some games read it from here... */ + AM_RANGE(0x10, 0x10) AM_READ_PORT("DSW1") /* DIP1 ... and some others from here */ + /* but there are games which check BOTH! */ - AM_RANGE(0x12, 0x12) AM_READ(input_port_5_r) // trigger is here.. + AM_RANGE(0x12, 0x12) AM_READ_PORT("TRIGGER") - AM_RANGE(0x1c, 0x1c) AM_READ(input_port_6_r) // gunx - AM_RANGE(0x1d, 0x1d) AM_READ(input_port_7_r) // guny + AM_RANGE(0x1c, 0x1c) AM_READ_PORT("GUNX") + AM_RANGE(0x1d, 0x1d) AM_READ_PORT("GUNY") - AM_RANGE(0x18, 0x18) AM_READ(input_port_8_r) // ?? + AM_RANGE(0x18, 0x18) AM_READ_PORT("18") /* ?? */ AM_RANGE(0x15, 0x15) AM_READ(system1_videomode_r) @@ -305,11 +305,11 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( nobo_readport, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(input_port_0_r) /* Player 1 inputs */ - AM_RANGE(0x04, 0x04) AM_READ(input_port_1_r) /* Player 2 inputs */ - AM_RANGE(0x08, 0x08) AM_READ(input_port_2_r) /* System inputs */ - AM_RANGE(0x0c, 0x0c) AM_READ(input_port_3_r) /* DSW1 */ - AM_RANGE(0x0d, 0x0d) AM_READ(input_port_4_r) /* DSW0 */ + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") + AM_RANGE(0x04, 0x04) AM_READ_PORT("P2") + AM_RANGE(0x08, 0x08) AM_READ_PORT("SYSTEM") + AM_RANGE(0x0c, 0x0c) AM_READ_PORT("DSW2") /* DIP2 */ + AM_RANGE(0x0d, 0x0d) AM_READ_PORT("DSW1") /* DIP1 some games read it from here... */ AM_RANGE(0x15, 0x15) AM_READ(system1_videomode_r) AM_RANGE(0x16, 0x16) AM_READ(inport16_r) /* Used - check code at 0x05cb */ AM_RANGE(0x1c, 0x1c) AM_READ(inport1c_r) /* Shouldn't be called ! */ @@ -410,17 +410,7 @@ static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_END -#define IN0_PORT \ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) \ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) \ - PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) \ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - -#define DSW1_PORT \ +#define COINAGE_PORT \ PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW A:1,2,3,4") \ PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) \ PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) \ @@ -462,8 +452,8 @@ ADDRESS_MAP_END PORT_DIPSETTING( 0x80, "Port $0D" ) \ PORT_DIPSETTING( 0x00, "Port $10" ) -static INPUT_PORTS_START( starjack ) - PORT_START("P1") /* IN1 */ +static INPUT_PORTS_START( common ) + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) @@ -473,7 +463,7 @@ static INPUT_PORTS_START( starjack ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL @@ -483,13 +473,25 @@ static INPUT_PORTS_START( starjack ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT + PORT_START("SYSTEM") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("DSW2") + COINAGE_PORT +INPUT_PORTS_END - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - PORT_START("DSW0") /* DSW0 */ +static INPUT_PORTS_START( starjack ) + PORT_INCLUDE( common ) + + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -515,33 +517,9 @@ static INPUT_PORTS_START( starjack ) INPUT_PORTS_END static INPUT_PORTS_START( starjacs ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -566,33 +544,9 @@ static INPUT_PORTS_START( starjacs ) INPUT_PORTS_END static INPUT_PORTS_START( regulus ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT + PORT_INCLUDE( common ) - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -620,86 +574,24 @@ INPUT_PORTS_END /* Same as 'regulus', but no DEF_STR( Allow_Continue ) Dip Switch */ static INPUT_PORTS_START( reguluso ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( regulus ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x02, 0x02, "Unused SW 0-1" ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x0c, "3" ) - PORT_DIPSETTING( 0x08, "4" ) - PORT_DIPSETTING( 0x04, "5" ) - PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) - PORT_DIPNAME( 0x10, 0x10, "Unused SW 0-4" ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Unused SW 0-5" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) + PORT_MODIFY("DSW1") PORT_DIPNAME( 0x80, 0x80, "Unused SW 0-7" ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( upndown ) - PORT_START("P1") /* 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_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - - PORT_START("P2") /* IN2 */ - 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_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL + PORT_INCLUDE( common ) - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT + PORT_MODIFY("P1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no button 2 */ - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT + PORT_MODIFY("P2") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no button 2 */ - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -725,33 +617,17 @@ static INPUT_PORTS_START( upndown ) INPUT_PORTS_END static INPUT_PORTS_START( mrviking ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -777,49 +653,12 @@ INPUT_PORTS_END /* Same as 'mrviking', but no "Maximum Credits" Dip Switch and "Difficulty" Dip Switch is handled by bit 7 instead of bit 6 (so bit 6 is unused) */ static INPUT_PORTS_START( mrvikngj ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT + PORT_INCLUDE( mrviking ) - PORT_START("DSW0") /* DSW0 */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) + PORT_MODIFY("DSW1") PORT_DIPNAME( 0x02, 0x02, "Unused SW 0-1" ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x0c, "3" ) - PORT_DIPSETTING( 0x08, "4" ) - PORT_DIPSETTING( 0x04, "5" ) - PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) ) - PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x30, "10k, 30k then every 30k" ) - PORT_DIPSETTING( 0x20, "20k, 40k then every 30k" ) - PORT_DIPSETTING( 0x10, "30k, then every 30k" ) - PORT_DIPSETTING( 0x00, "40k, then every 30k" ) PORT_DIPNAME( 0x40, 0x40, "Unused SW 0-6" ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -829,33 +668,21 @@ static INPUT_PORTS_START( mrvikngj ) INPUT_PORTS_END static INPUT_PORTS_START( swat ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -882,33 +709,23 @@ static INPUT_PORTS_START( swat ) INPUT_PORTS_END static INPUT_PORTS_START( flicky ) - PORT_START("P1") /* 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_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no button 2 */ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* only 2way inputs */ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* only 2way inputs */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_START("P2") /* IN2 */ - 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_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no button 2 */ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* only 2way inputs */ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* only 2way inputs */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -932,7 +749,7 @@ static INPUT_PORTS_START( flicky ) INPUT_PORTS_END static INPUT_PORTS_START( wmatch ) - PORT_START("P1") /* IN1 */ + PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY @@ -942,7 +759,7 @@ static INPUT_PORTS_START( wmatch ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL @@ -952,20 +769,20 @@ static INPUT_PORTS_START( wmatch ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* IN0 */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* TURN P1 */ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL /* TURN P2 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* TURN P1 */ + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL /* TURN P2 */ - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT + PORT_START("DSW2") + COINAGE_PORT - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -990,33 +807,9 @@ static INPUT_PORTS_START( wmatch ) INPUT_PORTS_END static INPUT_PORTS_START( bullfgt ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1040,33 +833,9 @@ static INPUT_PORTS_START( bullfgt ) INPUT_PORTS_END static INPUT_PORTS_START( spatter ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1090,33 +859,9 @@ static INPUT_PORTS_START( spatter ) INPUT_PORTS_END static INPUT_PORTS_START( pitfall2 ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1143,33 +888,9 @@ static INPUT_PORTS_START( pitfall2 ) INPUT_PORTS_END static INPUT_PORTS_START( pitfallu ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT + PORT_INCLUDE( common ) - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") /* DSW0 */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1195,33 +916,15 @@ static INPUT_PORTS_START( pitfallu ) INPUT_PORTS_END static INPUT_PORTS_START( seganinj ) - PORT_START("P1") /* IN1 */ + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ + PORT_MODIFY("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1246,33 +949,9 @@ static INPUT_PORTS_START( seganinj ) INPUT_PORTS_END static INPUT_PORTS_START( imsorry ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1296,33 +975,17 @@ static INPUT_PORTS_START( imsorry ) INPUT_PORTS_END static INPUT_PORTS_START( teddybb ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1346,33 +1009,17 @@ static INPUT_PORTS_START( teddybb ) INPUT_PORTS_END static INPUT_PORTS_START( hvymetal ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - PORT_START("DSW0") /* DSW1 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1398,33 +1045,17 @@ static INPUT_PORTS_START( hvymetal ) INPUT_PORTS_END static INPUT_PORTS_START( myhero ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1448,7 +1079,7 @@ static INPUT_PORTS_START( myhero ) INPUT_PORTS_END static INPUT_PORTS_START( shtngmst ) - PORT_START("P1") /* IN1 */ + PORT_START("P1") /* PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) @@ -1460,7 +1091,7 @@ static INPUT_PORTS_START( shtngmst ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY */ - PORT_START("P2") /* IN2 */ + PORT_START("P2") /* PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL @@ -1472,11 +1103,18 @@ static INPUT_PORTS_START( shtngmst ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL */ - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT + PORT_START("SYSTEM") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW1") /* DSW1 */ - PORT_DIPNAME( 0x01, 0x01, "DSW1" ) + PORT_START("DSW2") + PORT_DIPNAME( 0x01, 0x01, "DSW2" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) @@ -1501,8 +1139,8 @@ static INPUT_PORTS_START( shtngmst ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW0") /* DSW0 */ - DSW1_PORT + PORT_START("DSW1") + COINAGE_PORT PORT_START("TRIGGER") /* trigger is in here */ PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1548,30 +1186,9 @@ INPUT_PORTS_END static INPUT_PORTS_START( chplft ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:1") PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1596,38 +1213,14 @@ static INPUT_PORTS_START( chplft ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW0") /* DSW0 */ - DSW1_PORT + PORT_START("DSW1") + COINAGE_PORT INPUT_PORTS_END static INPUT_PORTS_START( 4dwarrio ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1652,33 +1245,9 @@ static INPUT_PORTS_START( 4dwarrio ) INPUT_PORTS_END static INPUT_PORTS_START( brain ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1705,33 +1274,9 @@ static INPUT_PORTS_START( brain ) INPUT_PORTS_END static INPUT_PORTS_START( gardia ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1757,33 +1302,9 @@ static INPUT_PORTS_START( gardia ) INPUT_PORTS_END static INPUT_PORTS_START( raflesia ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_INCLUDE( common ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1807,33 +1328,25 @@ static INPUT_PORTS_START( raflesia ) INPUT_PORTS_END static INPUT_PORTS_START( wboy ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:1") PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1860,83 +1373,36 @@ static INPUT_PORTS_START( wboy ) INPUT_PORTS_END static INPUT_PORTS_START( wboy3 ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY + PORT_INCLUDE( wboy ) - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT - - PORT_START("DSW0") /* DSW0 */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:1") - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW B:2") - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_MODIFY("DSW1") /* DSW0 */ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW B:3,4") PORT_DIPSETTING( 0x0c, "1" ) PORT_DIPSETTING( 0x08, "2" ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW B:5") - PORT_DIPSETTING( 0x10, "30k 100k 170k 240k" ) - PORT_DIPSETTING( 0x00, "30k 120k 210k 300k" ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW B:6") - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW B:7") - PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW B:8") - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( wboysys2 ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW0 */ + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:1") PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -1961,90 +1427,27 @@ static INPUT_PORTS_START( wboysys2 ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW0") /* DSW1 */ - DSW1_PORT + PORT_START("DSW1") + COINAGE_PORT INPUT_PORTS_END /* same as wboy, additional Energy Consumption switch */ static INPUT_PORTS_START( wbdeluxe ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Has to be 0 otherwise the game resets */ - /* if you die after level 1. */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - - PORT_START("DSW1") /* DSW1 */ - DSW1_PORT + PORT_INCLUDE( wboy ) - PORT_START("DSW0") /* DSW0 */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:1") - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW B:2") - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW B:3,4") - PORT_DIPSETTING( 0x0c, "3" ) - PORT_DIPSETTING( 0x08, "4" ) - PORT_DIPSETTING( 0x04, "5" ) - PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW B:5") - PORT_DIPSETTING( 0x10, "30k 100k 170k 240k" ) - PORT_DIPSETTING( 0x00, "30k 120k 210k 300k" ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW B:6") - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW B:7") - PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) + PORT_MODIFY("P1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Has to be 0 otherwise the game resets */ + /* if you die after level 1. */ + PORT_MODIFY("DSW1") PORT_DIPNAME( 0x80, 0x00, "Energy Consumption" ) PORT_DIPLOCATION("SW B:8") PORT_DIPSETTING( 0x00, "Slow" ) PORT_DIPSETTING( 0x80, "Fast" ) INPUT_PORTS_END static INPUT_PORTS_START( wboyu ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* down - unused */ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* up - unused */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT + PORT_INCLUDE( wboy ) - PORT_START("DSW1") /* DSW0 */ + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -2069,7 +1472,7 @@ static INPUT_PORTS_START( wboyu ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW0") /* DSW1 */ + PORT_MODIFY("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) @@ -2141,13 +1544,13 @@ Useful addresses: */ static INPUT_PORTS_START( blockgal ) - PORT_START("P1") /* IN1 */ + PORT_START("P1") PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(60) PORT_KEYDELTA(15) PORT_REVERSE - PORT_START("P2") /* IN2 */ + PORT_START("P2") PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(60) PORT_KEYDELTA(15) PORT_REVERSE PORT_COCKTAIL - PORT_START("SYSTEM") /* IN0 */ + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2157,7 +1560,7 @@ static INPUT_PORTS_START( blockgal ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_START("DSW1") /* DSW0 */ + PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -2181,35 +1584,14 @@ static INPUT_PORTS_START( blockgal ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) - PORT_START("DSW0") /* DSW1 */ - DSW1_PORT + PORT_START("DSW1") + COINAGE_PORT INPUT_PORTS_END static INPUT_PORTS_START( tokisens ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT + PORT_INCLUDE( common ) - PORT_START("DSW1") /* DSW0 */ + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -2234,35 +1616,14 @@ static INPUT_PORTS_START( tokisens ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW0") /* DSW1 */ - DSW1_PORT + PORT_START("DSW1") + COINAGE_PORT INPUT_PORTS_END static INPUT_PORTS_START( wbml ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT + PORT_INCLUDE( common ) - PORT_START("DSW1") /* DSW1 */ + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -2287,42 +1648,22 @@ static INPUT_PORTS_START( wbml ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW0") /* DSW0 */ - DSW1_PORT + PORT_START("DSW1") + COINAGE_PORT INPUT_PORTS_END static INPUT_PORTS_START( noboranb ) - PORT_START("P1") /* IN1 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) // shot PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) // fly - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("P2") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // shot PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // fly - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW1") /* DSW1 */ + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) @@ -2345,7 +1686,7 @@ static INPUT_PORTS_START( noboranb ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "3" ) @@ -2377,30 +1718,15 @@ INPUT_PORTS_END */ static INPUT_PORTS_START( ufosensi ) - PORT_START("P1") /* IN1 */ + PORT_INCLUDE( common ) + + PORT_MODIFY("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_START("P2") /* IN2 */ + PORT_MODIFY("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("SYSTEM") /* IN0 */ - IN0_PORT - PORT_START("DSW1") /* DSW1 */ + PORT_MODIFY("DSW2") PORT_DIPNAME( 0x03, 0x01, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) @@ -2424,7 +1750,7 @@ static INPUT_PORTS_START( ufosensi ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW0") /* DSW0 */ + PORT_START("DSW1") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) diff --git a/src/mame/includes/asteroid.h b/src/mame/includes/asteroid.h index 8d049d2236a..9713d4594d6 100644 --- a/src/mame/includes/asteroid.h +++ b/src/mame/includes/asteroid.h @@ -13,7 +13,6 @@ INTERRUPT_GEN( asterock_interrupt ); INTERRUPT_GEN( llander_interrupt ); READ8_HANDLER( asteroid_IN0_r ); -READ8_HANDLER( asteroib_IN0_r ); READ8_HANDLER( asterock_IN0_r ); READ8_HANDLER( asteroid_IN1_r ); READ8_HANDLER( asteroid_DSW1_r ); @@ -24,8 +23,6 @@ WRITE8_HANDLER( astdelux_led_w ); MACHINE_RESET( asteroid ); -READ8_HANDLER( llander_IN0_r ); - extern UINT8 *asteroid_ram1, *asteroid_ram2; /*----------- defined in audio/asteroid.c -----------*/ diff --git a/src/mame/includes/mhavoc.h b/src/mame/includes/mhavoc.h index e5c2072f964..32d34b55e14 100644 --- a/src/mame/includes/mhavoc.h +++ b/src/mame/includes/mhavoc.h @@ -31,10 +31,12 @@ READ8_HANDLER( mhavoc_gamma_r ); WRITE8_HANDLER( mhavoc_ram_banksel_w ); WRITE8_HANDLER( mhavoc_rom_banksel_w ); -READ8_HANDLER( mhavoc_port_0_r ); -READ8_HANDLER( alphaone_port_0_r ); -READ8_HANDLER( mhavoc_port_1_r ); -READ8_HANDLER( mhavoc_port_1_sp_r ); +CUSTOM_INPUT( tms5220_r ); +CUSTOM_INPUT( gamma_rcvd_r ); +CUSTOM_INPUT( gamma_xmtd_r ); +CUSTOM_INPUT( alpha_rcvd_r ); +CUSTOM_INPUT( alpha_xmtd_r ); +CUSTOM_INPUT( mhavoc_bit67_r ); WRITE8_HANDLER( mhavoc_out_0_w ); WRITE8_HANDLER( alphaone_out_0_w ); diff --git a/src/mame/machine/asteroid.c b/src/mame/machine/asteroid.c index 841c0331b07..2d32aaf55be 100644 --- a/src/mame/machine/asteroid.c +++ b/src/mame/machine/asteroid.c @@ -35,21 +35,10 @@ INTERRUPT_GEN( llander_interrupt ) cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); } - READ8_HANDLER( asteroid_IN0_r ) { - - int res; - int bitmask; - - res=input_port_read(machine, "IN0"); - - bitmask = (1 << offset); - - if (activecpu_gettotalcycles() & 0x100) - res |= 0x02; - if (!avgdvg_done()) - res |= 0x04; + int res = input_port_read(machine, "IN0"); + int bitmask = (1 << offset); if (res & bitmask) res = 0x80; @@ -60,33 +49,10 @@ READ8_HANDLER( asteroid_IN0_r ) } -READ8_HANDLER( asteroib_IN0_r ) -{ - int res; - - res=input_port_read(machine, "IN0"); - -// if (activecpu_gettotalcycles() & 0x100) -// res |= 0x02; - if (!avgdvg_done()) - res |= 0x80; - - return res; -} - READ8_HANDLER( asterock_IN0_r ) { - int res; - int bitmask; - - res=input_port_read(machine, "IN0"); - - bitmask = (1 << offset); - - if (activecpu_gettotalcycles() & 0x100) - res |= 0x04; - if (!avgdvg_done()) - res |= 0x01; + int res = input_port_read(machine, "IN0"); + int bitmask = (1 << offset); if (res & bitmask) res = ~0x80; @@ -103,17 +69,15 @@ READ8_HANDLER( asterock_IN0_r ) READ8_HANDLER( asteroid_IN1_r ) { - int res; - int bitmask; - - res=input_port_read(machine, "IN1"); - bitmask = (1 << (offset & 0x7)); + int res = input_port_read(machine, "IN1"); + int bitmask = (1 << (offset & 0x7)); if (res & bitmask) res = 0x80; else res = ~0x80; - return (res); + + return res; } @@ -173,26 +137,3 @@ MACHINE_RESET( asteroid ) asteroid_bank_switch_w(machine,0,0); avgdvg_reset_w(machine,0,0); } - - -/* - * This is Lunar Lander's Inputport 0. - */ -READ8_HANDLER( llander_IN0_r ) -{ - int res; - - res = input_port_read(machine, "IN0"); - - if (avgdvg_done()) - res |= 0x01; - else - res &= ~0x01; - - if (activecpu_gettotalcycles() & 0x100) - res |= 0x40; - else - res &= ~0x40; - - return res; -} diff --git a/src/mame/machine/mhavoc.c b/src/mame/machine/mhavoc.c index 04e5739329c..9a878e07929 100644 --- a/src/mame/machine/mhavoc.c +++ b/src/mame/machine/mhavoc.c @@ -217,92 +217,41 @@ WRITE8_HANDLER( mhavoc_rom_banksel_w ) * *************************************/ -READ8_HANDLER( mhavoc_port_0_r ) +CUSTOM_INPUT( tms5220_r ) { - UINT8 res; - - /* Bits 7-6 = selected based on Player 1 */ - /* Bits 5-4 = common */ - if (player_1) - res = (input_port_read(machine, "IN0") & 0x30) | (input_port_read(machine, "IN2") & 0xc0); - else - res = input_port_read(machine, "IN0") & 0xf0; - - /* Bit 3 = Gamma rcvd flag */ - if (gamma_rcvd) - res |= 0x08; - - /* Bit 2 = Gamma xmtd flag */ - if (gamma_xmtd) - res |= 0x04; - - /* Bit 1 = 2.4kHz (divide 2.5MHz by 1024) */ - if (!(activecpu_gettotalcycles() & 0x400)) - res |= 0x02; - - /* Bit 0 = Vector generator halt flag */ - if (avgdvg_done()) - res |= 0x01; - - return res; + return tms5220_ready_r() ? 0 : 1; } - -READ8_HANDLER( alphaone_port_0_r ) +CUSTOM_INPUT( mhavoc_bit67_r ) { - /* Bits 7-2 = common */ - UINT8 res = input_port_read(machine, "IN0") & 0xfc; - - /* Bit 1 = 2.4kHz (divide 2.5MHz by 1024) */ - if (!(activecpu_gettotalcycles() & 0x400)) - res |= 0x02; - - /* Bit 0 = Vector generator halt flag */ - if (avgdvg_done()) - res |= 0x01; - - return res; + const char *tag1 = param; + const char *tag2 = tag1 + strlen(tag1) + 1; + return input_port_read(field->port->machine, player_1 ? tag2 : tag1) & 0x03; } - -READ8_HANDLER( mhavoc_port_1_r ) +CUSTOM_INPUT( gamma_rcvd_r ) { - /* Bits 7-2 = input switches */ - UINT8 res = input_port_read(machine, "IN1") & 0xfc; - - /* Bit 1 = Alpha rcvd flag */ - if (has_gamma_cpu && alpha_rcvd) - res |= 0x02; - - /* Bit 0 = Alpha xmtd flag */ - if (has_gamma_cpu && alpha_xmtd) - res |= 0x01; - - return res; + /* Gamma rcvd flag */ + return gamma_rcvd; } -READ8_HANDLER( mhavoc_port_1_sp_r ) +CUSTOM_INPUT( gamma_xmtd_r ) { - /* Bits 7-3 = input switches */ - UINT8 res = input_port_read(machine, "IN1") & 0xf8; - - /* Bit 2 = TMS5220 ready flag */ - if (!tms5220_ready_r()) - res |= 0x04; - - /* Bit 1 = Alpha rcvd flag */ - if (has_gamma_cpu && alpha_rcvd) - res |= 0x02; - - /* Bit 0 = Alpha xmtd flag */ - if (has_gamma_cpu && alpha_xmtd) - res |= 0x01; - - return res; + /* Gamma xmtd flag */ + return gamma_xmtd; } +CUSTOM_INPUT( alpha_rcvd_r ) +{ + /* Alpha rcvd flag */ + return (has_gamma_cpu && alpha_rcvd); +} - +CUSTOM_INPUT( alpha_xmtd_r ) +{ + /* Alpha xmtd flag */ + return (has_gamma_cpu && alpha_xmtd); +} /************************************* * diff --git a/src/mame/video/avgdvg.h b/src/mame/video/avgdvg.h index 5f860087a8c..4170b329270 100644 --- a/src/mame/video/avgdvg.h +++ b/src/mame/video/avgdvg.h @@ -6,7 +6,6 @@ extern UINT8 *mhavoc_colorram; extern UINT16 *quantum_colorram; extern UINT16 *quantum_vectorram; -int avgdvg_done(void); CUSTOM_INPUT( avgdvg_done_r ); WRITE8_HANDLER( avgdvg_go_w ); WRITE8_HANDLER( avgdvg_reset_w ); |