1 // license:BSD-3-Clause
2 // copyright-holders:Manuel Abadia
3 /*******************************************************************************
4 
5     Input port macros used by many games in multiple KONAMI drivers
6 
7 *******************************************************************************/
8 
9 
10 /***************************** 8bit Players Inputs ****************************/
11 
12 /*********************** Prototypes 8bit ***********************/
13 
14 #define KONAMI8_MONO_4WAY( direction1, direction2, button1, button2, button3 )  \
15 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_4WAY    \
16 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_4WAY    \
17 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY              \
18 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY            \
19 	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 )    \
20 	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 )    \
21 	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 )
22 
23 #define KONAMI8_COCKTAIL_4WAY( direction1, direction2, button1, button2, button3 )  \
24 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_4WAY PORT_COCKTAIL  \
25 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_4WAY PORT_COCKTAIL  \
26 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL            \
27 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL          \
28 	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) PORT_COCKTAIL  \
29 	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) PORT_COCKTAIL  \
30 	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) PORT_COCKTAIL
31 
32 #define KONAMI8_MONO_8WAY( direction1, direction2, button1, button2, button3 )  \
33 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY    \
34 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY    \
35 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY              \
36 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY            \
37 	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 )    \
38 	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 )    \
39 	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 )
40 
41 #define KONAMI8_COCKTAIL_8WAY( direction1, direction2, button1, button2, button3 )  \
42 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY PORT_COCKTAIL  \
43 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY PORT_COCKTAIL  \
44 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL            \
45 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL          \
46 	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) PORT_COCKTAIL      \
47 	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) PORT_COCKTAIL      \
48 	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) PORT_COCKTAIL
49 
50 #define KONAMI8_MULTI_8WAY( player, direction1, direction2, button1, button2, button3 ) \
51 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY PORT_PLAYER(player)    \
52 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY PORT_PLAYER(player)    \
53 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player)      \
54 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player)    \
55 	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) PORT_PLAYER(player)    \
56 	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) PORT_PLAYER(player)    \
57 	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player)
58 
59 #define KONAMI8_LR_40( player, button1, button2, button3 )              \
60 	KONAMI8_MULTI_8WAY( player, LEFT, RIGHT, button1, button2, button3 )
61 
62 #define KONAMI8_RL_40( player, button1, button2, button3 )              \
63 	KONAMI8_MULTI_8WAY( player, RIGHT, LEFT, button1, button2, button3 )
64 
65 /*********************** Actual Inputs 8bit ***********************/
66 
67 /* Cocktail Cabinet 4Way Inputs */
68 #define KONAMI8_MONO_4WAY_B12_UNK   \
69 	KONAMI8_MONO_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
70 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
71 
72 #define KONAMI8_COCKTAIL_4WAY_B12_UNK   \
73 	KONAMI8_COCKTAIL_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
74 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
75 
76 #define KONAMI8_MONO_4WAY_B123_UNK  \
77 	KONAMI8_MONO_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \
78 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
79 
80 #define KONAMI8_COCKTAIL_4WAY_B123_UNK  \
81 	KONAMI8_COCKTAIL_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \
82 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
83 
84 
85 /* Cocktail Cabinet 8Way Inputs */
86 /* 1 Button */
87 #define KONAMI8_MONO_B1_UNK \
88 	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN ) \
89 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
90 
91 #define KONAMI8_COCKTAIL_B1_UNK \
92 	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN ) \
93 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
94 
95 /* 2 Buttons */
96 #define KONAMI8_MONO_B12_UNK    \
97 	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
98 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
99 
100 #define KONAMI8_COCKTAIL_B12_UNK    \
101 	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
102 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
103 
104 /* 3 Buttons */
105 #define KONAMI8_MONO_B123_UNK   \
106 	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \
107 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
108 
109 #define KONAMI8_COCKTAIL_B123_UNK   \
110 	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \
111 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
112 
113 #define KONAMI8_MONO_B213_UNK   \
114 	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON2, IPT_BUTTON1, IPT_BUTTON3 ) \
115 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
116 
117 #define KONAMI8_COCKTAIL_B213_UNK   \
118 	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON2, IPT_BUTTON1, IPT_BUTTON3 ) \
119 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
120 
121 /* 2 Buttons + Start */
122 #define KONAMI8_MONO_B12_START  \
123 	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
124 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
125 
126 #define KONAMI8_COCKTAIL_B12_START  \
127 	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
128 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
129 
130 
131 /* Upright Multiplayer Cabinet Inputs */
132 /* 1 Button */
133 #define KONAMI8_B1( player )    \
134 	KONAMI8_LR_40( player, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN )
135 
136 #define KONAMI8_B1_UNK( player )    \
137 	KONAMI8_B1( player )    \
138 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
139 
140 /* 2 Buttons */
141 #define KONAMI8_B12( player )   \
142 	KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN )
143 
144 #define KONAMI8_B12_UNK( player )   \
145 	KONAMI8_B12( player )   \
146 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
147 
148 #define KONAMI8_B12_START( player ) \
149 	KONAMI8_B12( player )   \
150 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player )
151 
152 #define KONAMI8_B12_COIN_START( player )    \
153 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(player)    \
154 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(player)   \
155 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player)      \
156 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player)    \
157 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player)    \
158 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player)    \
159 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN##player )       \
160 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player )
161 
162 #define KONAMI8_B21_UNK( player )   \
163 	KONAMI8_LR_40( player, IPT_BUTTON2, IPT_BUTTON1, IPT_UNKNOWN )  \
164 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
165 
166 /* 3 Buttons */
167 #define KONAMI8_B123( player )  \
168 	KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 )
169 
170 #define KONAMI8_B123_UNK( player )  \
171 	KONAMI8_B123( player )  \
172 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
173 
174 #define KONAMI8_B123_START( player )    \
175 	KONAMI8_B123( player )  \
176 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player )
177 
178 #define KONAMI8_B132( player )  \
179 	KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON3, IPT_BUTTON2 )
180 
181 #define KONAMI8_B321( player )  \
182 	KONAMI8_LR_40( player, IPT_BUTTON3, IPT_BUTTON2, IPT_BUTTON1 )
183 
184 
185 /* vendetta.c uses inputs with switched Left/Right directions. We add these inputs here as well
186 because they just need a few lines of code */
187 #define KONAMI8_RL_B12_COIN( player )   \
188 	KONAMI8_RL_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN )  \
189 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN##player )
190 
191 
192 /* A few drivers uses bit0 for Start and shuffled joystick inputs */
193 #define KONAMI8_ALT( player, button1, button2, button3 )    \
194 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START##player )  \
195 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player)      \
196 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player)    \
197 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(player)    \
198 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(player)   \
199 	PORT_BIT( 0x20, IP_ACTIVE_LOW, button1 ) PORT_PLAYER(player)    \
200 	PORT_BIT( 0x40, IP_ACTIVE_LOW, button2 ) PORT_PLAYER(player)    \
201 	PORT_BIT( 0x80, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player)
202 
203 #define KONAMI8_ALT_B12( player )   \
204 	KONAMI8_ALT( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN )
205 
206 #define KONAMI8_ALT_B21( player )   \
207 	KONAMI8_ALT( player, IPT_BUTTON2, IPT_BUTTON1, IPT_UNKNOWN )
208 
209 #define KONAMI8_ALT_B123( player )  \
210 	KONAMI8_ALT( player, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 )
211 
212 
213 /**************************** 16bit Players Inputs ****************************/
214 
215 #define KONAMI16_LSB_40( player, button3 )  \
216 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(player) \
217 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \
218 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(player) \
219 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(player) \
220 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1        ) PORT_PLAYER(player) \
221 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2        ) PORT_PLAYER(player) \
222 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, button3            ) PORT_PLAYER(player)
223 
224 #define KONAMI16_MSB_40( player, button3 )  \
225 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(player) \
226 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \
227 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(player) \
228 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(player) \
229 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1        ) PORT_PLAYER(player) \
230 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2        ) PORT_PLAYER(player) \
231 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, button3            ) PORT_PLAYER(player)
232 
233 #define KONAMI16_LSB_40_UDLR( player, button3 ) \
234 	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(player) \
235 	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(player) \
236 	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(player) \
237 	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \
238 	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1        ) PORT_PLAYER(player) \
239 	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2        ) PORT_PLAYER(player) \
240 	PORT_BIT(  0x0040, IP_ACTIVE_LOW, button3            ) PORT_PLAYER(player)
241 
242 #define KONAMI16_MSB_40_UDLR( player, button3 ) \
243 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(player) \
244 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(player) \
245 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(player) \
246 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \
247 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1        ) PORT_PLAYER(player) \
248 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2        ) PORT_PLAYER(player) \
249 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, button3            ) PORT_PLAYER(player)
250 
251 #define KONAMI16_LSB( player, button3, start )  \
252 	KONAMI16_LSB_40( player, button3 )          \
253 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, start )
254 
255 #define KONAMI16_MSB( player, button3, start )  \
256 	KONAMI16_MSB_40( player, button3 )          \
257 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, start )
258 
259 #define KONAMI16_LSB_UDLR( player, button3, start ) \
260 	KONAMI16_LSB_40_UDLR( player, button3 )         \
261 	PORT_BIT(  0x0080, IP_ACTIVE_LOW, start )
262 
263 #define KONAMI16_MSB_UDLR( player, button3, start ) \
264 	KONAMI16_MSB_40_UDLR( player, button3 )         \
265 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, start )
266 
267 
268 /******************** System Inputs (Coin, Start & Service) *******************/
269 
270 #define KONAMI8_SYSTEM_10   \
271 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )      \
272 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )      \
273 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )   \
274 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )     \
275 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
276 
277 #define KONAMI8_SYSTEM_UNK  \
278 	KONAMI8_SYSTEM_10       \
279 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )    \
280 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    \
281 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
282 /**************************** Coinage Dip Switches ****************************/
283 
284 /* Konami games from 80s-90s basically use only two kind of coinage dips. The only
285 difference is in the settings corresponding to 0x00, which could be either 4C_5C
286 or a "Free_Play"-related option. Actually, in the latter case the behavior may change
287 depending on the game code:
288 Coin A - 0x00 could produce the following effects
289     Free_Play = nomen omen (for both players)
290     Invalid = both coin slots disabled
291 Coin B - 0x00 could produce the following effects
292     Free_Play = nomen omen (for both players)
293     No Coin B = coin slot B open (coins produce sound), but no effect on coin counter
294     None = coin slot B disabled
295     No Credits = both coin slots open, but no effect on coin counters
296     Invalid = both coin slots disabled
297 Accordingly, we pass below different strings for different games */
298 
299 #define KONAMI_COINAGE_LOC( STRING_A, STRING_B, DIPBANK )   \
300 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )       PORT_DIPLOCATION(#DIPBANK":1,2,3,4")    \
301 	PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )    \
302 	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )    \
303 	PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )    \
304 	PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )    \
305 	PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )    \
306 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )    \
307 	PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )    \
308 	PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )    \
309 	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )    \
310 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )    \
311 	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )    \
312 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )    \
313 	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )    \
314 	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )    \
315 	PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )    \
316 	PORT_DIPSETTING(    0x00, STRING_A )            \
317 	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )       PORT_DIPLOCATION(#DIPBANK":5,6,7,8")    \
318 	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )    \
319 	PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )    \
320 	PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )    \
321 	PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )    \
322 	PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )    \
323 	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )    \
324 	PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )    \
325 	PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )    \
326 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )    \
327 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )    \
328 	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )    \
329 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )    \
330 	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )    \
331 	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )    \
332 	PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )    \
333 	PORT_DIPSETTING(    0x00, STRING_B )
334 
335 #define KONAMI_COINAGE( STRING_A, STRING_B )    \
336 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )   \
337 	PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )    \
338 	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )    \
339 	PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )    \
340 	PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )    \
341 	PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )    \
342 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )    \
343 	PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )    \
344 	PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )    \
345 	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )    \
346 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )    \
347 	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )    \
348 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )    \
349 	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )    \
350 	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )    \
351 	PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )    \
352 	PORT_DIPSETTING(    0x00, STRING_A )            \
353 	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )   \
354 	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )    \
355 	PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )    \
356 	PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )    \
357 	PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )    \
358 	PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )    \
359 	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )    \
360 	PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )    \
361 	PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )    \
362 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )    \
363 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )    \
364 	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )    \
365 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )    \
366 	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )    \
367 	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )    \
368 	PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )    \
369 	PORT_DIPSETTING(    0x00, STRING_B )
370 
371 #define KONAMI_COINAGE_ALT_LOC( DIPBANK )   \
372 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )       PORT_DIPLOCATION(#DIPBANK":1,2,3,4")    \
373 	PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )    \
374 	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )    \
375 	PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )    \
376 	PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )    \
377 	PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )    \
378 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )    \
379 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )    \
380 	PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )    \
381 	PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )    \
382 	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )    \
383 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )    \
384 	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )    \
385 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )    \
386 	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )    \
387 	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )    \
388 	PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )    \
389 	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )       PORT_DIPLOCATION(#DIPBANK":5,6,7,8")    \
390 	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )    \
391 	PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )    \
392 	PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )    \
393 	PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )    \
394 	PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )    \
395 	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )    \
396 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )    \
397 	PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )    \
398 	PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )    \
399 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )    \
400 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )    \
401 	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )    \
402 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )    \
403 	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )    \
404 	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )    \
405 	PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
406 
407 #define KONAMI_COINAGE_ALT  \
408 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )   \
409 	PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )    \
410 	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )    \
411 	PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )    \
412 	PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )    \
413 	PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )    \
414 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )    \
415 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )    \
416 	PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )    \
417 	PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )    \
418 	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )    \
419 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )    \
420 	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )    \
421 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )    \
422 	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )    \
423 	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )    \
424 	PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )    \
425 	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )   \
426 	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )    \
427 	PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )    \
428 	PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )    \
429 	PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )    \
430 	PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )    \
431 	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )    \
432 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )    \
433 	PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )    \
434 	PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )    \
435 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )    \
436 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )    \
437 	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )    \
438 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )    \
439 	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )    \
440 	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )    \
441 	PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
442