1 // license:BSD-3-Clause 2 // copyright-holders:Nicola Salmoria 3 /******************************************************************************* 4 5 Input port macros used by games in the galpanic.c driver 6 7 *******************************************************************************/ 8 9 10 /**************************** Inputs ****************************/ 11 12 #define GALS_PANIC_JOYSTICK_4WAY(PL)\ 13 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(PL)\ 14 PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(PL)\ 15 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(PL)\ 16 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(PL)\ 17 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(PL)\ 18 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(PL) PORT_OPTIONAL\ 19 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 20 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) 21 22 #define GALS_PANIC_JOYSTICK_8WAY(PL)\ 23 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(PL)\ 24 PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(PL)\ 25 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(PL)\ 26 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(PL)\ 27 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(PL)\ 28 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(PL)\ 29 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(PL)\ 30 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) 31 32 #define SYSTEM_SERVICE\ 33 PORT_START("SYSTEM")\ 34 PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 35 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )\ 36 PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )\ 37 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )\ 38 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )\ 39 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 40 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT )\ 41 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )\ 42 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) 43 44 #define SYSTEM_NO_SERVICE\ 45 PORT_START("SYSTEM")\ 46 PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 47 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )\ 48 PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )\ 49 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )\ 50 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )\ 51 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 52 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_TILT )\ 53 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 54 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) 55 56 #define SYSTEM_NO_TILT\ 57 PORT_START("SYSTEM")\ 58 PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 59 PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )\ 60 PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )\ 61 PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )\ 62 PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )\ 63 PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 64 PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 65 PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ 66 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) 67 68 /**************************** Coinage & Dip Switches ****************************/ 69 70 #define COINAGE_WORLD\ 71 PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6")\ 72 PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) )\ 73 PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) )\ 74 PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) )\ 75 PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) )\ 76 PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8")\ 77 PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ) )\ 78 PORT_DIPSETTING( 0x0080, DEF_STR( 1C_3C ) )\ 79 PORT_DIPSETTING( 0x0040, DEF_STR( 1C_4C ) )\ 80 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) 81 82 #define COINAGE_JAPAN\ 83 PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6")\ 84 PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) )\ 85 PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) )\ 86 PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) )\ 87 PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) )\ 88 PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8")\ 89 PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ) )\ 90 PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) )\ 91 PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) )\ 92 PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) 93 94 #define COINAGE_NO_TEST_LOC\ 95 PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0001, "SW1:1" )\ 96 PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2")\ 97 PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )\ 98 PORT_DIPSETTING( 0x0000, DEF_STR( On ) )\ 99 PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0004, "SW1:3" )\ 100 PORT_DIPNAME( 0x0008, 0x0008, "Coin Mode" ) PORT_DIPLOCATION("SW1:4")\ 101 PORT_DIPSETTING( 0x0008, "Mode 1" )\ 102 PORT_DIPSETTING( 0x0000, "Mode 2" )\ 103 PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6")\ 104 PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) )\ 105 PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) )\ 106 PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ 107 PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ 108 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ 109 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ 110 PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8")\ 111 PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) )\ 112 PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) )\ 113 PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ 114 PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ 115 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ 116 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008) 117 118 #define COINAGE_TEST_LOC\ 119 PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0001, "SW1:1" )\ 120 PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2")\ 121 PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )\ 122 PORT_DIPSETTING( 0x0000, DEF_STR( On ) )\ 123 PORT_SERVICE_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW1:3" )\ 124 PORT_DIPNAME( 0x0008, 0x0008, "Coin Mode" ) PORT_DIPLOCATION("SW1:4")\ 125 PORT_DIPSETTING( 0x0008, "Mode 1" )\ 126 PORT_DIPSETTING( 0x0000, "Mode 2" )\ 127 PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6")\ 128 PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) )\ 129 PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) )\ 130 PORT_DIPSETTING( 0x0010, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ 131 PORT_DIPSETTING( 0x0010, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ 132 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ 133 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ 134 PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8")\ 135 PORT_DIPSETTING( 0x0080, DEF_STR( 2C_1C ) )\ 136 PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) )\ 137 PORT_DIPSETTING( 0x0040, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008)\ 138 PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ 139 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0000)\ 140 PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW1",0x0008,EQUALS,0x0008) 141 142 143 #define DIFFICULTY_DEMO_SOUNDS\ 144 PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2")\ 145 PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) )\ 146 PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )\ 147 PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) )\ 148 PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )\ 149 PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0004, "SW2:3" )\ 150 PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW2:4" )\ 151 PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:5,6")\ 152 PORT_DIPSETTING( 0x0010, "2" )\ 153 PORT_DIPSETTING( 0x0030, "3" )\ 154 PORT_DIPSETTING( 0x0020, "4" )\ 155 PORT_DIPSETTING( 0x0000, "5" )\ 156 PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:7")\ 157 PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )\ 158 PORT_DIPSETTING( 0x0040, DEF_STR( On ) )\ 159 PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "SW2:8" ) 160