summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2017-04-25 13:31:45 +1000
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2017-04-25 13:32:13 +1000
commite089f65fcf96c1c93ba95a30419c8414b3955730 (patch)
tree63366186404a10f30313c085c552dd1cee7ebf2a
parent01f17a6b05b8665c6e86bfdf06cb0b2ee28ab5fc (diff)
cherry-pick acchi DIP switches, clean up a little (nw)
-rw-r--r--src/mame/drivers/acchi.cpp88
1 files changed, 51 insertions, 37 deletions
diff --git a/src/mame/drivers/acchi.cpp b/src/mame/drivers/acchi.cpp
index dd45b92231d..d2349c5d9d4 100644
--- a/src/mame/drivers/acchi.cpp
+++ b/src/mame/drivers/acchi.cpp
@@ -203,47 +203,61 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( acchi ) // inputs register in test mode but not in game mode?
PORT_START("IN0")
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Reset")
- PORT_SERVICE( 0x0020, IP_ACTIVE_LOW )
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Reset")
+ PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper")
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("DSW1")
- PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:8")
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW1:7")
- PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW1:6")
- PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW1:5")
- PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW1:4")
- PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW1:3")
- PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW1:2")
- PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW1:1")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:8")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DSW1:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSW1:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DSW1:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSW1:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSW1:3" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSW1:2" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSW1:1" )
PORT_START("DSW2")
- PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "DSW2:8")
- PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "DSW2:7")
- PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "DSW2:6")
- PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "DSW2:5")
- PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "DSW2:4")
- PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "DSW2:3")
- PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "DSW2:2")
- PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "DSW2:1")
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DSW2:8" )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:7")
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW2:6,5,4")
+ 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_DIPSETTING( 0x10, DEF_STR( 1C_7C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_8C ) )
+ PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW2:3,2,1")
+ PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0xc0, 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 ) )
INPUT_PORTS_END
@@ -273,7 +287,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(acchi_state::scanline)
static MACHINE_CONFIG_START( acchi, acchi_state )
- MCFG_CPU_ADD("maincpu", M68000, 16000000) // 16 Mhz XTAL, 16 Mhz CPU
+ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) // 16 MHz XTAL, 16 MHz CPU
MCFG_CPU_PROGRAM_MAP(acchi_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", acchi_state, irq4_line_hold) // 1 + 4 valid? (4 main VBL)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", acchi_state, scanline, "screen", 0, 1)
@@ -293,10 +307,10 @@ static MACHINE_CONFIG_START( acchi, acchi_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_OKIM6295_ADD("oki1", 16000000/4, OKIM6295_PIN7_LOW) // not verified
+ MCFG_OKIM6295_ADD("oki1", XTAL_16MHz / 4, OKIM6295_PIN7_LOW) // not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
- MCFG_OKIM6295_ADD("oki2", 16000000/4, OKIM6295_PIN7_LOW) // not verified
+ MCFG_OKIM6295_ADD("oki2", XTAL_16MHz / 4, OKIM6295_PIN7_LOW) // not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_DEVICE_ADD("nmk112", NMK112, 0) // or 212? difficult to read (maybe 212 is 2* 112?)