summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/konamipt.h
blob: 376499acec9d8e90cce8e3e9e3afb46cd4db5bcb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
// license:BSD-3-Clause
// copyright-holders:Manuel Abadia
/*******************************************************************************

    Input port macros used by many games in multiple KONAMI drivers

*******************************************************************************/


/***************************** 8bit Players Inputs ****************************/

/*********************** Prototypes 8bit ***********************/

#define KONAMI8_MONO_4WAY( direction1, direction2, button1, button2, button3 )  \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_4WAY    \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_4WAY    \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY              \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY            \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 )    \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 )    \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 )

#define KONAMI8_COCKTAIL_4WAY( direction1, direction2, button1, button2, button3 )  \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_4WAY PORT_COCKTAIL  \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_4WAY PORT_COCKTAIL  \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL            \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL          \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) PORT_COCKTAIL  \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) PORT_COCKTAIL  \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) PORT_COCKTAIL

#define KONAMI8_MONO_8WAY( direction1, direction2, button1, button2, button3 )  \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY    \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY    \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY              \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY            \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 )    \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 )    \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 )

#define KONAMI8_COCKTAIL_8WAY( direction1, direction2, button1, button2, button3 )  \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY PORT_COCKTAIL  \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY PORT_COCKTAIL  \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL            \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL          \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) PORT_COCKTAIL      \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) PORT_COCKTAIL      \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) PORT_COCKTAIL

#define KONAMI8_MULTI_8WAY( player, direction1, direction2, button1, button2, button3 ) \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction1 ) PORT_8WAY PORT_PLAYER(player)    \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_##direction2 ) PORT_8WAY PORT_PLAYER(player)    \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player)      \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player)    \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, button1 ) PORT_PLAYER(player)    \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, button2 ) PORT_PLAYER(player)    \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player)

#define KONAMI8_LR_40( player, button1, button2, button3 )              \
	KONAMI8_MULTI_8WAY( player, LEFT, RIGHT, button1, button2, button3 )

#define KONAMI8_RL_40( player, button1, button2, button3 )              \
	KONAMI8_MULTI_8WAY( player, RIGHT, LEFT, button1, button2, button3 )

/*********************** Actual Inputs 8bit ***********************/

/* Cocktail Cabinet 4Way Inputs */
#define KONAMI8_MONO_4WAY_B12_UNK   \
	KONAMI8_MONO_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_COCKTAIL_4WAY_B12_UNK   \
	KONAMI8_COCKTAIL_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_MONO_4WAY_B123_UNK  \
	KONAMI8_MONO_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_COCKTAIL_4WAY_B123_UNK  \
	KONAMI8_COCKTAIL_4WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )


/* Cocktail Cabinet 8Way Inputs */
/* 1 Button */
#define KONAMI8_MONO_B1_UNK \
	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_COCKTAIL_B1_UNK \
	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

/* 2 Buttons */
#define KONAMI8_MONO_B12_UNK    \
	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_COCKTAIL_B12_UNK    \
	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

/* 3 Buttons */
#define KONAMI8_MONO_B123_UNK   \
	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_COCKTAIL_B123_UNK   \
	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_MONO_B213_UNK   \
	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON2, IPT_BUTTON1, IPT_BUTTON3 ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_COCKTAIL_B213_UNK   \
	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON2, IPT_BUTTON1, IPT_BUTTON3 ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

/* 2 Buttons + Start */
#define KONAMI8_MONO_B12_START  \
	KONAMI8_MONO_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )

#define KONAMI8_COCKTAIL_B12_START  \
	KONAMI8_COCKTAIL_8WAY( LEFT, RIGHT, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN ) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )


/* Upright Multiplayer Cabinet Inputs */
/* 1 Button */
#define KONAMI8_B1( player )    \
	KONAMI8_LR_40( player, IPT_BUTTON1, IPT_UNKNOWN, IPT_UNKNOWN )

#define KONAMI8_B1_UNK( player )    \
	KONAMI8_B1( player )    \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

/* 2 Buttons */
#define KONAMI8_B12( player )   \
	KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN )

#define KONAMI8_B12_UNK( player )   \
	KONAMI8_B12( player )   \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

#define KONAMI8_B12_START( player ) \
	KONAMI8_B12( player )   \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player )

#define KONAMI8_B12_COIN_START( player )    \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(player)    \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(player)   \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player)      \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player)    \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player)    \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player)    \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN##player )       \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player )

#define KONAMI8_B21_UNK( player )   \
	KONAMI8_LR_40( player, IPT_BUTTON2, IPT_BUTTON1, IPT_UNKNOWN )  \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

/* 3 Buttons */
#define KONAMI8_B123( player )  \
	KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 )

#define KONAMI8_B123_UNK( player )  \
	KONAMI8_B123( player )  \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )

#define KONAMI8_B123_START( player )    \
	KONAMI8_B123( player )  \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player )

#define KONAMI8_B132( player )  \
	KONAMI8_LR_40( player, IPT_BUTTON1, IPT_BUTTON3, IPT_BUTTON2 )

#define KONAMI8_B321( player )  \
	KONAMI8_LR_40( player, IPT_BUTTON3, IPT_BUTTON2, IPT_BUTTON1 )


/* vendetta.c uses inputs with switched Left/Right directions. We add these inputs here as well
because they just need a few lines of code */
#define KONAMI8_RL_B12_COIN( player )   \
	KONAMI8_RL_40( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN )  \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN##player )


/* A few drivers uses bit0 for Start and shuffled joystick inputs */
#define KONAMI8_ALT( player, button1, button2, button3 )    \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START##player )  \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player)      \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player)    \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(player)    \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(player)   \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, button1 ) PORT_PLAYER(player)    \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, button2 ) PORT_PLAYER(player)    \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, button3 ) PORT_PLAYER(player)

#define KONAMI8_ALT_B12( player )   \
	KONAMI8_ALT( player, IPT_BUTTON1, IPT_BUTTON2, IPT_UNKNOWN )

#define KONAMI8_ALT_B21( player )   \
	KONAMI8_ALT( player, IPT_BUTTON2, IPT_BUTTON1, IPT_UNKNOWN )

#define KONAMI8_ALT_B123( player )  \
	KONAMI8_ALT( player, IPT_BUTTON1, IPT_BUTTON2, IPT_BUTTON3 )


/**************************** 16bit Players Inputs ****************************/

#define KONAMI16_LSB_40( player, button3 )  \
	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(player) \
	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \
	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(player) \
	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(player) \
	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1        ) PORT_PLAYER(player) \
	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2        ) PORT_PLAYER(player) \
	PORT_BIT(  0x0040, IP_ACTIVE_LOW, button3            ) PORT_PLAYER(player)

#define KONAMI16_MSB_40( player, button3 )  \
	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(player) \
	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \
	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(player) \
	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(player) \
	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1        ) PORT_PLAYER(player) \
	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2        ) PORT_PLAYER(player) \
	PORT_BIT(  0x4000, IP_ACTIVE_LOW, button3            ) PORT_PLAYER(player)

#define KONAMI16_LSB_40_UDLR( player, button3 ) \
	PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(player) \
	PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(player) \
	PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(player) \
	PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \
	PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1        ) PORT_PLAYER(player) \
	PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2        ) PORT_PLAYER(player) \
	PORT_BIT(  0x0040, IP_ACTIVE_LOW, button3            ) PORT_PLAYER(player)

#define KONAMI16_MSB_40_UDLR( player, button3 ) \
	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(player) \
	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(player) \
	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(player) \
	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) \
	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1        ) PORT_PLAYER(player) \
	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2        ) PORT_PLAYER(player) \
	PORT_BIT(  0x4000, IP_ACTIVE_LOW, button3            ) PORT_PLAYER(player)

#define KONAMI16_LSB( player, button3, start )  \
	KONAMI16_LSB_40( player, button3 )          \
	PORT_BIT(  0x0080, IP_ACTIVE_LOW, start )

#define KONAMI16_MSB( player, button3, start )  \
	KONAMI16_MSB_40( player, button3 )          \
	PORT_BIT(  0x8000, IP_ACTIVE_LOW, start )

#define KONAMI16_LSB_UDLR( player, button3, start ) \
	KONAMI16_LSB_40_UDLR( player, button3 )         \
	PORT_BIT(  0x0080, IP_ACTIVE_LOW, start )

#define KONAMI16_MSB_UDLR( player, button3, start ) \
	KONAMI16_MSB_40_UDLR( player, button3 )         \
	PORT_BIT(  0x8000, IP_ACTIVE_LOW, start )


/******************** System Inputs (Coin, Start & Service) *******************/

#define KONAMI8_SYSTEM_10   \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )      \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )      \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )   \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )     \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )

#define KONAMI8_SYSTEM_UNK  \
	KONAMI8_SYSTEM_10       \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )    \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
/**************************** Coinage Dip Switches ****************************/

/* Konami games from 80s-90s basically use only two kind of coinage dips. The only
difference is in the settings corresponding to 0x00, which could be either 4C_5C
or a "Free_Play"-related option. Actually, in the latter case the behavior may change
depending on the game code:
Coin A - 0x00 could produce the following effects
    Free_Play = nomen omen (for both players)
    Invalid = both coin slots disabled
Coin B - 0x00 could produce the following effects
    Free_Play = nomen omen (for both players)
    No Coin B = coin slot B open (coins produce sound), but no effect on coin counter
    None = coin slot B disabled
    No Credits = both coin slots open, but no effect on coin counters
    Invalid = both coin slots disabled
Accordingly, we pass below different strings for different games */

#define KONAMI_COINAGE_LOC( STRING_A, STRING_B, DIPBANK )   \
	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )       PORT_DIPLOCATION(#DIPBANK":1,2,3,4")    \
	PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )    \
	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )    \
	PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )    \
	PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )    \
	PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )    \
	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )    \
	PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )    \
	PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )    \
	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )    \
	PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )    \
	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )    \
	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )    \
	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )    \
	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )    \
	PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )    \
	PORT_DIPSETTING(    0x00, STRING_A )            \
	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )       PORT_DIPLOCATION(#DIPBANK":5,6,7,8")    \
	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )    \
	PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )    \
	PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )    \
	PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )    \
	PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )    \
	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )    \
	PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )    \
	PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )    \
	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )    \
	PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )    \
	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )    \
	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )    \
	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )    \
	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )    \
	PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )    \
	PORT_DIPSETTING(    0x00, STRING_B )

#define KONAMI_COINAGE( STRING_A, STRING_B )    \
	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )   \
	PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )    \
	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )    \
	PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )    \
	PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )    \
	PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )    \
	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )    \
	PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )    \
	PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )    \
	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )    \
	PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )    \
	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )    \
	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )    \
	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )    \
	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )    \
	PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )    \
	PORT_DIPSETTING(    0x00, STRING_A )            \
	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )   \
	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )    \
	PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )    \
	PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )    \
	PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )    \
	PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )    \
	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )    \
	PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )    \
	PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )    \
	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )    \
	PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )    \
	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )    \
	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )    \
	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )    \
	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )    \
	PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )    \
	PORT_DIPSETTING(    0x00, STRING_B )

#define KONAMI_COINAGE_ALT_LOC( DIPBANK )   \
	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )       PORT_DIPLOCATION(#DIPBANK":1,2,3,4")    \
	PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )    \
	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )    \
	PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )    \
	PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )    \
	PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )    \
	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )    \
	PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )    \
	PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )    \
	PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )    \
	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )    \
	PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )    \
	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )    \
	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )    \
	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )    \
	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )    \
	PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )    \
	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )       PORT_DIPLOCATION(#DIPBANK":5,6,7,8")    \
	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )    \
	PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )    \
	PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )    \
	PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )    \
	PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )    \
	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )    \
	PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )    \
	PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )    \
	PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )    \
	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )    \
	PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )    \
	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )    \
	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )    \
	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )    \
	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )    \
	PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )

#define KONAMI_COINAGE_ALT  \
	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )   \
	PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )    \
	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )    \
	PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )    \
	PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )    \
	PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )    \
	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )    \
	PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )    \
	PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )    \
	PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )    \
	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )    \
	PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )    \
	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )    \
	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )    \
	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )    \
	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )    \
	PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )    \
	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )   \
	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )    \
	PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )    \
	PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )    \
	PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )    \
	PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )    \
	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )    \
	PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )    \
	PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )    \
	PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )    \
	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )    \
	PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )    \
	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )    \
	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )    \
	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )    \
	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )    \
	PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )