diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-08-14 06:20:42 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-08-14 06:20:42 +0000 |
commit | 5ad309b60ffb645b9c438b04c61afaece1aa998f (patch) | |
tree | 25c956b336ad1d3672eb41bf25454cec077c8b4c /src/mame/drivers/magmax.c | |
parent | 51c1079953e4cc559dd019e1f40b1d6f3a04b9b3 (diff) |
From: Fabio Priuli [mailto:doge.fabio@gmail.com]
Subject: few more patches
Hi,
enclosed please find a few patches to continue the input port
clean up (and to fix a mistake in the previous submission). In
detail:
* hal21.diff: with my last submission I made a mistake in hal21.c
(I converted it only partially to custom inputs, still returning
1<<5 instead of 1 from the handler). please revert that change
(it was in u4_custom04.diff) and apply this one, to fix the
communication with sound cpu
* clean_new.diff: introduce AM_READ_PORT & c. in drivers starting
with M (only few of them updated, more to come)
* custom_new.diff: improves input handling in mainsnk.c and marvins.c
by using CUSTOM_INPUTs and AM_READ_PORTs
* gaelco3d.diff: converts radilkalb inputs to 32bit inputs (as
they are), removing the need of AM_READ16 for those
* itech32.diff: converts inputs of later games to 32bit inputs and
updates all the occurrences as needed. It also simplifies input
handling by removing special_port_r from most of the maps (replaced
by a CUSTOM_INPUT). Now only drivedge still uses 16bit inputs and
special_port_r, but I'll investigate it later.
* arkanoid.diff: changes mcu reads to CUSTOM_INPUTS (and muxed
inputs as well). Bootleg inputs has been slightly changed as well
to cope with the new implementation of the protection
* irem.diff: this patch changes a lot of input related things in
m10->m107 irem boards. First of all, it moves input definitions from
drivers/m92.h to include/iremipt.h (which was already there, just
a bit unused ;) ) and it removes completely drivers/m92.h (which
only contained those definitions). Moreover, it adds more common
inputs to iremipt.h and starts to use that file in m62->m107 instead
of local #defines. Finally, it adds diplocations to all the games in
m62->m107 which were missing and it implements coinage mode 2 through
dipconditions in the drivers which didn't support it.
I tested as much as I could these changes and I can see no regressions.
Regards,
Fabio
Diffstat (limited to 'src/mame/drivers/magmax.c')
-rw-r--r-- | src/mame/drivers/magmax.c | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c index a123e02ebc8..50b20bb6bc6 100644 --- a/src/mame/drivers/magmax.c +++ b/src/mame/drivers/magmax.c @@ -196,10 +196,10 @@ static ADDRESS_MAP_START( magmax_readmem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x018000, 0x018fff) AM_READ(SMH_RAM) AM_RANGE(0x020000, 0x0207ff) AM_READ(SMH_RAM) AM_RANGE(0x028000, 0x0281ff) AM_READ(SMH_RAM) - AM_RANGE(0x030000, 0x030001) AM_READ(input_port_0_word_r) - AM_RANGE(0x030002, 0x030003) AM_READ(input_port_1_word_r) - AM_RANGE(0x030004, 0x030005) AM_READ(input_port_2_word_r) - AM_RANGE(0x030006, 0x030007) AM_READ(input_port_3_word_r) + AM_RANGE(0x030000, 0x030001) AM_READ_PORT("P1") + AM_RANGE(0x030002, 0x030003) AM_READ_PORT("P2") + AM_RANGE(0x030004, 0x030005) AM_READ_PORT("SYSTEM") + AM_RANGE(0x030006, 0x030007) AM_READ_PORT("DSW") ADDRESS_MAP_END static ADDRESS_MAP_START( magmax_writemem, ADDRESS_SPACE_PROGRAM, 16 ) @@ -242,17 +242,17 @@ ADDRESS_MAP_END static INPUT_PORTS_START( magmax ) - PORT_START("P1") /* Player 1 controls */ + PORT_START("P1") 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 ) /*Maybe this is just a test button and as such is not available to player*/ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Maybe this is just a test button and as such is not available to player */ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("P2") /* Player 2 controls */ + PORT_START("P2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL @@ -262,7 +262,7 @@ static INPUT_PORTS_START( magmax ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("SYSTEM") /* Coin, Start, Test, Dipswitch */ + 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_COIN1 ) @@ -272,51 +272,43 @@ static INPUT_PORTS_START( magmax ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW") /* Dipswitch */ - PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") + PORT_START("DSW") + PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x0003, "3" ) PORT_DIPSETTING( 0x0002, "4" ) PORT_DIPSETTING( 0x0001, "5" ) PORT_DIPSETTING( 0x0000, "6" ) - PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:3,4") + PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:3,4") PORT_DIPSETTING( 0x000c, "30000 every" ) PORT_DIPSETTING( 0x0004, "70000 every" ) PORT_DIPSETTING( 0x0008, "50000 every" ) PORT_DIPSETTING( 0x0000, "90000 every" ) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:5") + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:5") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0010, DEF_STR( On ) ) - PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:6") + PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:6") PORT_DIPSETTING( 0x0000, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x0020, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW1:7" ) + PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW1:8" ) + PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2") PORT_DIPSETTING( 0x0100, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x0300, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x0200, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:3,4") + PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW2:3,4") PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x0400, DEF_STR( 2C_3C ) ) PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0800, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5") + PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5") PORT_DIPSETTING( 0x1000, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Hard ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:6") + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:6") PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown) ) PORT_DIPLOCATION("SW2:7") - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPUNKNOWN_DIPLOC( 0x4000, 0x4000, "SW2:7" ) + PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "SW2:8" ) INPUT_PORTS_END |