wardner, wardnerj, pyros (wardner.c driver) :

- Fixed Dip Switches and Inputs (after verification of the Z80 code)
This commit is contained in:
stephh 2010-02-25 10:51:37 +00:00
parent cfa887f3de
commit 56c1f02268
3 changed files with 343 additions and 96 deletions

1
.gitattributes vendored
View File

@ -2819,6 +2819,7 @@ src/mame/includes/tmnt.h svneol=native#text/plain
src/mame/includes/tnzs.h svneol=native#text/plain
src/mame/includes/toaplan1.h svneol=native#text/plain
src/mame/includes/toaplan2.h svneol=native#text/plain
src/mame/includes/toaplipt.h svneol=native#text/plain
src/mame/includes/toobin.h svneol=native#text/plain
src/mame/includes/topspeed.h svneol=native#text/plain
src/mame/includes/toypop.h svneol=native#text/plain

View File

@ -18,8 +18,6 @@ Notes:
except for the Main CPU which is a Z80 here.
See twincobr.c machine and video drivers to complete the
hardware setup.
Also see Input Port definition header below, for instructions
on how to enter test mode.
**************************** Memory & I/O Maps *****************************
Z80:(0) Main CPU
@ -126,6 +124,7 @@ out:
#include "emu.h"
#include "cpu/z80/z80.h"
#include "cpu/tms32010/tms32010.h"
#include "includes/toaplipt.h"
#include "includes/twincobr.h"
#include "sound/3812intf.h"
@ -255,124 +254,78 @@ static ADDRESS_MAP_START( DSP_io_map, ADDRESS_SPACE_IO, 16 )
ADDRESS_MAP_END
/*****************************************************************************
Input Port definitions
There is a test mode for button/switch tests. To enter Test mode,
set the Cross Hatch Pattern DSW to on, restart and then press
player 1 start button when in the cross-hatch screen.
*****************************************************************************/
#define WARDNER_PLAYER_INPUT( player ) /* Player 1 button 3 skips video RAM tests */ \
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(player) PORT_8WAY \
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) PORT_8WAY \
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) PORT_8WAY \
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) PORT_8WAY \
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(player) /* Fire */ \
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(player) /* Jump */ \
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(player) /* Shot C */ \
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(player) /* Shot D */
static INPUT_PORTS_START( wardner )
PORT_START("SYSTEM") /* test button doesnt seem to do anything ? */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 ) /* Service button */
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* Test button */
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) /* V-Blank */
PORT_START("P1")
WARDNER_PLAYER_INPUT( 1 )
PORT_START("P2")
WARDNER_PLAYER_INPUT( 2 )
/* verified from Z80 code */
static INPUT_PORTS_START( wardner_generic )
PORT_START("DSWA")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x01, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x00, "Cross Hatch Pattern" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) )
TOAPLAN_MACHINE_COCKTAIL
TOAPLAN_COINAGE_WORLD
PORT_START("DSWB")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x01, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "30000 & 80000" )
PORT_DIPSETTING( 0x04, "50000 & 100000" )
PORT_DIPSETTING( 0x08, "50000" )
PORT_DIPSETTING( 0x0c, "100000" )
TOAPLAN_DIFFICULTY
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) /* table at 0x13ce ('wardner') or 0x13de ('wardnerj') */
PORT_DIPSETTING( 0x00, "30k 80k 50k+" )
PORT_DIPSETTING( 0x04, "50k 100k 50k+" )
PORT_DIPSETTING( 0x08, "30k Only" )
PORT_DIPSETTING( 0x0c, "50k Only" )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_DIPUNUSED( 0x40, IP_ACTIVE_HIGH )
PORT_DIPUNUSED( 0x80, IP_ACTIVE_HIGH )
PORT_START("P1")
TOAPLAN_JOY_UDLR_2_BUTTONS( 1 ) /* buttons 3 & 4 named "SHOTC" and "SHOTD" in "test mode" */
PORT_START("P2")
TOAPLAN_JOY_UDLR_2_BUTTONS( 2 ) /* buttons 3 & 4 named "SHOTC" and "SHOTD" in "test mode" */
PORT_START("SYSTEM") /* test button doesnt seem to do anything ? */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* "TEST" in "test mode" - no effect outside */
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) /* "V-BLANKING" in "test mode" */
INPUT_PORTS_END
/* verified from Z80 code */
static INPUT_PORTS_START( wardner )
PORT_INCLUDE( wardner_generic )
PORT_MODIFY("P1")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Skip Video RAM Tests") PORT_CODE(KEYCODE_F1)
/* code at 0x6d25 ('wardner'), 0x6d2f ('wardnerj') or 0x6d2c ('pyros') */
INPUT_PORTS_END
/* verified from Z80 code */
static INPUT_PORTS_START( wardnerj )
PORT_INCLUDE( wardner )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
TOAPLAN_COINAGE_JAPAN_OLD
INPUT_PORTS_END
/* verified from Z80 code */
static INPUT_PORTS_START( pyros )
PORT_INCLUDE( wardner )
PORT_MODIFY("DSWA")
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
PORT_INCLUDE( wardnerj )
PORT_MODIFY("DSWB")
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) /* table at 0x13ce */
PORT_DIPSETTING( 0x00, "30k 80k 50k+" )
PORT_DIPSETTING( 0x04, "50k 100k 50k+" )
PORT_DIPSETTING( 0x08, "50k Only" )
PORT_DIPSETTING( 0x0c, "100k Only" )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) /* additional code at 0x6037 */
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
INPUT_PORTS_END

View File

@ -0,0 +1,293 @@
/*******************************************************************************
Input port macros used by many games in multiple Toaplan drivers
(similar to Taito but bits are ACTIVE_HIGH instead of ACTIVE_LOW)
*******************************************************************************/
/**************************** Machine Dip Switches ****************************/
/* with location */
#define TOAPLAN_DSWA_BITS_2_TO_3_LOC(DIPBANK) \
PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_HIGH, #DIPBANK":3" ) \
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION(#DIPBANK":4") \
PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
#define TOAPLAN_DSWA_BITS_1_TO_3_LOC(DIPBANK) \
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION(#DIPBANK":2") \
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \
PORT_DIPSETTING( 0x02, DEF_STR( On ) ) \
TOAPLAN_DSWA_BITS_2_TO_3_LOC(DIPBANK)
#define TOAPLAN_MACHINE_COCKTAIL_LOC(DIPBANK) \
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION(#DIPBANK":1") \
PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) \
TOAPLAN_DSWA_BITS_1_TO_3_LOC(DIPBANK)
#define TOAPLAN_MACHINE_NO_COCKTAIL_LOC(DIPBANK) \
PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_HIGH, #DIPBANK":1" ) \
TOAPLAN_DSWA_BITS_1_TO_3_LOC(DIPBANK)
/* without location */
#define TOAPLAN_DSWA_BITS_2_TO_3 \
PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) \
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) \
PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
#define TOAPLAN_DSWA_BITS_1_TO_3 \
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \
PORT_DIPSETTING( 0x02, DEF_STR( On ) ) \
TOAPLAN_DSWA_BITS_2_TO_3
#define TOAPLAN_MACHINE_COCKTAIL \
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) \
PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) \
TOAPLAN_DSWA_BITS_1_TO_3
#define TOAPLAN_MACHINE_NO_COCKTAIL \
PORT_DIPUNUSED( 0x01, IP_ACTIVE_HIGH ) \
TOAPLAN_DSWA_BITS_1_TO_3
/**************************** Coinage Dip Swicthes ****************************/
/* with location */
#define TOAPLAN_COINAGE_JAPAN_OLD_COIN_A_LOC(DIPBANK) \
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":5,6") \
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
#define TOAPLAN_COINAGE_JAPAN_OLD_COIN_B_LOC(DIPBANK) \
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":7,8") \
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
#define TOAPLAN_COINAGE_JAPAN_NEW_COIN_A_LOC(DIPBANK) \
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":5,6") \
PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
#define TOAPLAN_COINAGE_JAPAN_NEW_COIN_B_LOC(DIPBANK) \
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":7,8") \
PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
#define TOAPLAN_COINAGE_WORLD_COIN_A_LOC(DIPBANK) \
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION(#DIPBANK":5,6") \
PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
#define TOAPLAN_COINAGE_WORLD_COIN_B_LOC(DIPBANK) \
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION(#DIPBANK":7,8") \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) \
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) )
#define TOAPLAN_COINAGE_US_COIN_START_LOC(DIPBANK) \
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION(#DIPBANK":5,6") \
PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
#define TOAPLAN_COINAGE_US_COIN_CONT_LOC(DIPBANK) \
PORT_DIPNAME( 0xc0, 0x00, "Price to Continue" ) PORT_DIPLOCATION(#DIPBANK":7,8") \
PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x00, "Same as Start" )
#define TOAPLAN_COINAGE_JAPAN_OLD_LOC(DIPBANK) \
TOAPLAN_COINAGE_JAPAN_OLD_COIN_A_LOC(DIPBANK) \
TOAPLAN_COINAGE_JAPAN_OLD_COIN_B_LOC(DIPBANK)
#define TOAPLAN_COINAGE_JAPAN_NEW_LOC(DIPBANK) \
TOAPLAN_COINAGE_JAPAN_NEW_COIN_A_LOC(DIPBANK) \
TOAPLAN_COINAGE_JAPAN_NEW_COIN_B_LOC(DIPBANK)
#define TOAPLAN_COINAGE_WORLD_LOC(DIPBANK) \
TOAPLAN_COINAGE_WORLD_COIN_A_LOC(DIPBANK) \
TOAPLAN_COINAGE_WORLD_COIN_B_LOC(DIPBANK)
#define TOAPLAN_COINAGE_US_LOC(DIPBANK) \
TOAPLAN_COINAGE_US_COIN_START_LOC(DIPBANK) \
TOAPLAN_COINAGE_US_COIN_CONT_LOC(DIPBANK)
/* without location */
#define TOAPLAN_COINAGE_JAPAN_OLD_COIN_A \
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
#define TOAPLAN_COINAGE_JAPAN_OLD_COIN_B \
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) \
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_3C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
#define TOAPLAN_COINAGE_JAPAN_NEW_COIN_A \
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) \
PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
#define TOAPLAN_COINAGE_JAPAN_NEW_COIN_B \
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) \
PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
#define TOAPLAN_COINAGE_WORLD_COIN_A \
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) \
PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
#define TOAPLAN_COINAGE_WORLD_COIN_B \
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) \
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) )
#define TOAPLAN_COINAGE_US_COIN_START \
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coinage ) ) \
PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
#define TOAPLAN_COINAGE_US_COIN_CONT \
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Continue_Price ) ) \
PORT_DIPSETTING( 0xc0, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x00, "Same as Start" )
#define TOAPLAN_COINAGE_JAPAN_OLD \
TOAPLAN_COINAGE_JAPAN_OLD_COIN_A \
TOAPLAN_COINAGE_JAPAN_OLD_COIN_B
#define TOAPLAN_COINAGE_JAPAN_NEW \
TOAPLAN_COINAGE_JAPAN_NEW_COIN_A \
TOAPLAN_COINAGE_JAPAN_NEW_COIN_B
#define TOAPLAN_COINAGE_WORLD \
TOAPLAN_COINAGE_WORLD_COIN_A \
TOAPLAN_COINAGE_WORLD_COIN_B
#define TOAPLAN_COINAGE_US \
TOAPLAN_COINAGE_US_COIN_START \
TOAPLAN_COINAGE_US_COIN_CONT
/************************** Difficulty Dip Switches ***************************/
/* with location */
#define TOAPLAN_DIFFICULTY_LOC(DIPBANK) \
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION(#DIPBANK":1,2") \
PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) \
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) \
PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) )
/* without location */
#define TOAPLAN_DIFFICULTY \
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) \
PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( Medium ) ) \
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) \
PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) )
/************************** Joysticks and buttons *****************************/
/* generic (might be moved elsewhere) */
#define INPUT_GENERIC_JOY_LOW_NIBBLE(PL, STATE, WAY, B01, B02, B04, B08) \
PORT_BIT( 0x01, STATE, IPT_JOYSTICK_##B01 ) WAY PORT_PLAYER(PL) \
PORT_BIT( 0x02, STATE, IPT_JOYSTICK_##B02 ) WAY PORT_PLAYER(PL) \
PORT_BIT( 0x04, STATE, IPT_JOYSTICK_##B04 ) WAY PORT_PLAYER(PL) \
PORT_BIT( 0x08, STATE, IPT_JOYSTICK_##B08 ) WAY PORT_PLAYER(PL)
/* Toaplan generic (more might be needed) */
#define TOAPLAN_GENERIC_JOY_MONO_UDLR(PL) \
INPUT_GENERIC_JOY_LOW_NIBBLE(PL, IP_ACTIVE_HIGH, PORT_8WAY, UP, DOWN, LEFT, RIGHT)
#define TOAPLAN_GENERIC_BUTTONS_HIGH_NIBBLE(PL, STATE, BUTTON_A, BUTTON_B) \
PORT_BIT( 0x10, STATE, IPT_##BUTTON_A ) PORT_PLAYER(PL) \
PORT_BIT( 0x20, STATE, IPT_##BUTTON_B ) PORT_PLAYER(PL) \
/* DO NOT fill bit 6 as it may be defined as START button ! */
#define TOAPLAN_GENERIC_1_BUTTON(PL) \
TOAPLAN_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_HIGH, BUTTON1, UNKNOWN) \
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
#define TOAPLAN_GENERIC_2_BUTTONS(PL) \
TOAPLAN_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_HIGH, BUTTON1, BUTTON2) \
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
#define TOAPLAN_GENERIC_3_BUTTONS(PL) \
TOAPLAN_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_HIGH, BUTTON1, BUTTON2) \
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(PL) \
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
#define TOAPLAN_GENERIC_1_BUTTON_START(PL) \
TOAPLAN_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_HIGH, BUTTON1, UNKNOWN) \
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START##PL ) \
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
#define TOAPLAN_GENERIC_2_BUTTONS_START(PL) \
TOAPLAN_GENERIC_BUTTONS_HIGH_NIBBLE(PL, IP_ACTIVE_HIGH, BUTTON1, BUTTON2) \
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START##PL ) \
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* Toaplan games (more might be needed) */
#define TOAPLAN_JOY_UDLR_1_BUTTON(PL) \
TOAPLAN_GENERIC_JOY_MONO_UDLR(PL) \
TOAPLAN_GENERIC_1_BUTTON(PL)
#define TOAPLAN_JOY_UDLR_2_BUTTONS(PL) \
TOAPLAN_GENERIC_JOY_MONO_UDLR(PL) \
TOAPLAN_GENERIC_2_BUTTONS(PL)
#define TOAPLAN_JOY_UDLR_3_BUTTONS(PL) \
TOAPLAN_GENERIC_JOY_MONO_UDLR(PL) \
TOAPLAN_GENERIC_3_BUTTONS(PL)
#define TOAPLAN_JOY_UDLR_1_BUTTON_START(PL) \
TOAPLAN_GENERIC_JOY_MONO_UDLR(PL) \
TOAPLAN_GENERIC_1_BUTTON_START(PL)
#define TOAPLAN_JOY_UDLR_2_BUTTONS_START(PL) \
TOAPLAN_GENERIC_JOY_MONO_UDLR(PL) \
TOAPLAN_GENERIC_2_BUTTONS_START(PL)