summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/dynduke.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-08-06 13:56:38 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-08-06 13:56:38 +0000
commit5dcdb1d1c3e2fd3b3f71d7d418938bf83a17134c (patch)
tree17a7f72c151618bc0c227ada701df44d03672799 /src/mame/drivers/dynduke.c
parent4a36b515ed656ccdaffe01af527524503d2d7bf3 (diff)
NOTE: with this change, I have also removed PORT_START and renamed
PORT_START_TAG to PORT_START. From: Fabio Priuli [mailto:doge.fabio@gmail.com] Subject: let's say goodbye to untagged input ports ;) Hi, enclosed please find a few patches against 126u3 source * port01.diff -> port09.diff : these patches continues the cleanup of inputs in drivers starting with C (the remaining ones), D and E. No ambiguous situations this time, so I guess there should be no problem with the changes. Improvements include conditional dips added to dynduke and diplocations for chinagat, chqflag, circus, citycon, cloak, contra and dynduke * tag01.diff -> tag09.diff : these patches add tag to EVERY input port in drivers starting with F->Z. Notice that only tags are added, no AM_READ_PORT, nor PORT_INCLUDE (and I saw a lot of drivers would need it ;) ), nor other cleanups contained in the patches above. I'll keep cleaning input next week, probably, but at least we can definitely remove the untagged version of PORT_START :) Notice I was able to compile the source commenting out the definition of PORT_START, so I guess every occurrence is covered...
Diffstat (limited to 'src/mame/drivers/dynduke.c')
-rw-r--r--src/mame/drivers/dynduke.c172
1 files changed, 93 insertions, 79 deletions
diff --git a/src/mame/drivers/dynduke.c b/src/mame/drivers/dynduke.c
index c5816372af0..64664a200b4 100644
--- a/src/mame/drivers/dynduke.c
+++ b/src/mame/drivers/dynduke.c
@@ -19,6 +19,47 @@
Emulation by Bryan McPhail, mish@tendril.co.uk
+
+ SW#1
+ --------------------------------------------------------------------
+ DESCRIPTION 1 2 3 4 5 6 7 8
+ --------------------------------------------------------------------
+ COIN MODE MODE 1 OFF
+ MODE 2 ON
+ --------------------------------------------------------------------
+ COIN/CREDIT*
+ MODE #1 1C/1P OFF OFF OFF OFF
+ 2C/1P ON OFF OFF OFF
+ 3C/1P OFF ON OFF OFF
+ 4C/1P ON ON OFF OFF
+ FREE PLAY ON ON ON ON
+ MODE #2
+ COIN A 1C/1P OFF OFF
+ 2C/1P ON OFF
+ 3C/1P OFF ON
+ 5C/1P ON ON
+ COIN B 1C/2P OFF OFF
+ 1C/3P ON OFF
+ 1C/5P OFF ON
+ 1C/6P ON ON
+ --------------------------------------------------------------------
+ STARTING COIN NORMAL OFF
+ X2 ON
+ --------------------------------------------------------------------
+ CABINET TYPE TABLE ON
+ UPRIGHT OFF
+ --------------------------------------------------------------------
+ VIDEO SCREEN NORMAL OFF
+ FLIP ON
+ --------------------------------------------------------------------
+ FACTORY SETTINGS OFF OFF OFF OFF OFF OFF OFF OFF
+ --------------------------------------------------------------------
+
+
+2008-07
+Dip locations and factory settings verified with dip listing
+Also, implemented conditional port for Coin Mode (SW1:1)
+
***************************************************************************/
#include "driver.h"
@@ -46,8 +87,8 @@ static ADDRESS_MAP_START( master_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x07000, 0x07fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
AM_RANGE(0x08000, 0x080ff) AM_RAM AM_BASE(&dynduke_scroll_ram)
AM_RANGE(0x0a000, 0x0afff) AM_RAM AM_SHARE(1)
- AM_RANGE(0x0b000, 0x0b001) AM_READ(input_port_1_word_r)
- AM_RANGE(0x0b002, 0x0b003) AM_READ(input_port_2_word_r)
+ AM_RANGE(0x0b000, 0x0b001) AM_READ_PORT("P1_P2")
+ AM_RANGE(0x0b002, 0x0b003) AM_READ_PORT("DSW")
AM_RANGE(0x0b004, 0x0b005) AM_WRITENOP
AM_RANGE(0x0b006, 0x0b007) AM_WRITE(dynduke_control_w)
AM_RANGE(0x0c000, 0x0c7ff) AM_RAM_WRITE(dynduke_text_w) AM_BASE(&videoram16)
@@ -74,8 +115,8 @@ static ADDRESS_MAP_START( masterj_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x09000, 0x0900d) AM_READWRITE(seibu_main_word_r, seibu_main_word_w)
AM_RANGE(0x0c000, 0x0c0ff) AM_RAM AM_BASE(&dynduke_scroll_ram)
AM_RANGE(0x0e000, 0x0efff) AM_RAM AM_SHARE(1)
- AM_RANGE(0x0f000, 0x0f001) AM_READ(input_port_1_word_r)
- AM_RANGE(0x0f002, 0x0f003) AM_READ(input_port_2_word_r)
+ AM_RANGE(0x0f000, 0x0f001) AM_READ_PORT("P1_P2")
+ AM_RANGE(0x0f002, 0x0f003) AM_READ_PORT("DSW")
AM_RANGE(0x0f004, 0x0f005) AM_WRITENOP
AM_RANGE(0x0f006, 0x0f007) AM_WRITE(dynduke_control_w)
AM_RANGE(0xa0000, 0xfffff) AM_ROM
@@ -86,7 +127,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( dynduke )
SEIBU_COIN_INPUTS /* coin inputs read through sound cpu */
- PORT_START_TAG("IN0")
+ PORT_START("P1_P2")
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)
@@ -104,80 +145,53 @@ static INPUT_PORTS_START( dynduke )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
- /*
- SW#1
- --------------------------------------------------------------------
- DESCRIPTION 1 2 3 4 5 6 7 8
- --------------------------------------------------------------------
- COIN MODE MODE 1 OFF
- MODE 2 ON
- --------------------------------------------------------------------
- COIN/CREDIT*
- MODE #1 1C/1P OFF OFF OFF OFF
- 2C/1P ON OFF OFF OFF
- 3C/1P OFF ON OFF OFF
- 4C/1P ON ON OFF OFF
- FREE PLAY ON ON ON ON
- MODE #2
- COIN A 1C/1P OFF OFF
- 2C/1P ON OFF
- 3C/1P OFF ON
- 5C/1P ON ON
- COIN B 1C/2P OFF OFF
- 1C/3P ON OFF
- 1C/5P OFF ON
- 1C/6P ON ON
- --------------------------------------------------------------------
- STARTING COIN NORMAL OFF
- X2 ON
- --------------------------------------------------------------------
- CABINET TYPE TABLE ON
- UPRIGHT OFF
- --------------------------------------------------------------------
- VIDEO SCREEN NORMAL OFF
- FLIP ON
- --------------------------------------------------------------------
- FACTORY SETTINGS OFF OFF OFF OFF OFF OFF OFF OFF
- --------------------------------------------------------------------
- */
- PORT_START_TAG("DSW")
- PORT_DIPNAME( 0x0007, 0x0006, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x0006, DEF_STR( 1C_1C ) )
- PORT_DIPNAME( 0x0018, 0x0008, DEF_STR( Coin_B ) )
- PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x0008, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
- PORT_DIPNAME( 0x0020, 0x0020, "Starting Coin" )
- PORT_DIPSETTING( 0x0020, DEF_STR( Normal ) )
- PORT_DIPSETTING( 0x0000, "X 2" )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unused ) )
- PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Flip_Screen ) )
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_BIT( 0x0300, 0x0300, IPT_UNUSED )
- PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Bonus_Life ) )
- PORT_DIPSETTING( 0x0c00, "80K 100K+" )
- PORT_DIPSETTING( 0x0800, "100K 100K+" )
- PORT_DIPSETTING( 0x0400, "120K 100K+" )
- PORT_DIPSETTING( 0x0000, "120K 120K+" )
- PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x3000, DEF_STR( Normal ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Easy ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Hard ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Allow_Continue ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x4000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x8000, DEF_STR( On ) )
+ PORT_START("DSW")
+ PORT_DIPNAME( 0x0001, 0x0001, "Coin Mode" ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x0001, "Mode 1" )
+ PORT_DIPSETTING( 0x0000, "Mode 2" )
+ PORT_DIPNAME( 0x0006, 0x0006, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:2,3") PORT_CONDITION("DSW", 0x0001, PORTCOND_EQUALS, 0x0000)
+ PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x0004, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x0006, DEF_STR( 1C_1C ) )
+ PORT_DIPNAME( 0x0018, 0x0008, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5") PORT_CONDITION("DSW", 0x0001, PORTCOND_EQUALS, 0x0000)
+ PORT_DIPSETTING( 0x0018, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x0008, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0x001e, 0x001e, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4,5") PORT_CONDITION("DSW", 0x0001, PORTCOND_EQUALS, 0x0001)
+ PORT_DIPSETTING( 0x0018, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x001a, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x001c, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x001e, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0x0020, 0x0020, "Starting Coin" ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPSETTING( 0x0020, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x0000, "X 2" )
+ PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPSETTING( 0x0040, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( Cocktail ) )
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_BIT( 0x0300, 0x0300, IPT_UNUSED ) /* "SW2:1,2" - Always OFF according to the manual */
+ PORT_DIPNAME( 0x0c00, 0x0400, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:3,4")
+ PORT_DIPSETTING( 0x0c00, "80K 100K+" )
+ PORT_DIPSETTING( 0x0800, "100K 100K+" )
+ PORT_DIPSETTING( 0x0400, "120K 100K+" )
+ PORT_DIPSETTING( 0x0000, "120K 120K+" )
+ PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6")
+ PORT_DIPSETTING( 0x3000, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x2000, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x1000, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
+ PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:7")
+ PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x4000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x8000, DEF_STR( On ) )
INPUT_PORTS_END
/* Graphics Layouts */