summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/m92.h
blob: 57e868fa9f6b0ccb8bec2e28c792bc9eb698b586 (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
/*******************************************************************************

    Irem M92 input port macros

    Can probably be used for other Irem games..

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

/* Player 1 and 2 have the same IN */
#define IREM_JOYSTICK_1_2(_n_) \
	PORT_START	\
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(_n_) \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(_n_) \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(_n_) \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(_n_) \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_)

#define IREM_JOYSTICKS_1_2 \
	PORT_START_TAG("JOY12")	\
	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) \
	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) \
	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) \
	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) \
	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) \
	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) \
	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) \
	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) \
	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) \
	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) \
	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) \
	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) \
	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) \
	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) \
	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) \
	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)

/* Player 3 and 4 have IN similar to Player 1 and 2, but have the COIN and START buttons */
#define IREM_JOYSTICK_3_4(_n_) \
	PORT_START	\
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(_n_) \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(_n_) \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(_n_) \
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(_n_) \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START##_n_ ) /* If common slots, Coin3 if separate */ \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN##_n_ ) \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_)

#define IREM_JOYSTICKS_3_4 \
	PORT_START_TAG("JOY34")	\
	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) \
	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) \
	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) \
	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) \
	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START3 ) /* If common slots, Coin3 if separate */ \
	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN3 ) \
	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) \
	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) \
	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) \
	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) \
	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) \
	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) \
	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START4 ) /* If common slots, Coin3 if separate */ \
	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN4 ) \
	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) \
	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)

#define IREM_COINS \
	PORT_START	\
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) \
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) \
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) \
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) \
	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) \
	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE )  \
	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )  \
	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* Actually vblank, handled above */ \

	/* Coin Mode 1, the new one (m72 early games have different Coinage) */ \
#define IREM_COIN_MODE_1_NEW \
	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:5,6,7,8") \
	PORT_DIPSETTING(    0xa0, DEF_STR( 6C_1C ) ) \
	PORT_DIPSETTING(    0xb0, DEF_STR( 5C_1C ) ) \
	PORT_DIPSETTING(    0xc0, DEF_STR( 4C_1C ) ) \
	PORT_DIPSETTING(    0xd0, DEF_STR( 3C_1C ) ) \
	PORT_DIPSETTING(    0xe0, DEF_STR( 2C_1C ) ) \
	PORT_DIPSETTING(    0x10, "2 Coins to Start/1 to Continue") \
	PORT_DIPSETTING(    0x30, DEF_STR( 3C_2C ) ) \
	PORT_DIPSETTING(    0x20, DEF_STR( 4C_3C ) ) \
	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) ) \
	PORT_DIPSETTING(    0x40, DEF_STR( 2C_3C ) ) \
	PORT_DIPSETTING(    0x90, DEF_STR( 1C_2C ) ) \
	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) ) \
	PORT_DIPSETTING(    0x70, DEF_STR( 1C_4C ) ) \
	PORT_DIPSETTING(    0x60, DEF_STR( 1C_5C ) ) \
	PORT_DIPSETTING(    0x50, DEF_STR( 1C_6C ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )

#define IREM_COIN_MODE_1_NEW_HIGH \
	PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:5,6,7,8") \
	PORT_DIPSETTING(    0xa000, DEF_STR( 6C_1C ) ) \
	PORT_DIPSETTING(    0xb000, DEF_STR( 5C_1C ) ) \
	PORT_DIPSETTING(    0xc000, DEF_STR( 4C_1C ) ) \
	PORT_DIPSETTING(    0xd000, DEF_STR( 3C_1C ) ) \
	PORT_DIPSETTING(    0xe000, DEF_STR( 2C_1C ) ) \
	PORT_DIPSETTING(    0x1000, "2 Coins to Start/1 to Continue") \
	PORT_DIPSETTING(    0x3000, DEF_STR( 3C_2C ) ) \
	PORT_DIPSETTING(    0x2000, DEF_STR( 4C_3C ) ) \
	PORT_DIPSETTING(    0xf000, DEF_STR( 1C_1C ) ) \
	PORT_DIPSETTING(    0x4000, DEF_STR( 2C_3C ) ) \
	PORT_DIPSETTING(    0x9000, DEF_STR( 1C_2C ) ) \
	PORT_DIPSETTING(    0x8000, DEF_STR( 1C_3C ) ) \
	PORT_DIPSETTING(    0x7000, DEF_STR( 1C_4C ) ) \
	PORT_DIPSETTING(    0x6000, DEF_STR( 1C_5C ) ) \
	PORT_DIPSETTING(    0x5000, DEF_STR( 1C_6C ) ) \
	PORT_DIPSETTING(    0x0000, DEF_STR( Free_Play ) )

#define IREM_COIN_MODE_2 \
	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( 5C_1C ) ) \
	PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) ) \
	PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) ) \
	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) ) \
	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \
	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) ) \
	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) ) \
	PORT_DIPSETTING(    0x40, DEF_STR( 1C_5C ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )


#define IREM_SYSTEM_DIPSWITCH_4PLAYERS \
	PORT_START \
	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) \
	PORT_DIPSETTING(    0x01, DEF_STR( Off ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( On ) ) \
	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) \
	PORT_DIPSETTING(    0x02, "2 Players" ) \
	PORT_DIPSETTING(    0x00, "4 Players" ) \
	PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) \
	PORT_DIPSETTING(    0x04, "Common" ) \
	PORT_DIPSETTING(    0x00, "Separate" ) \
	PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Default 1 */ \
	PORT_DIPSETTING(    0x08, "1" ) \
	PORT_DIPSETTING(    0x00, "2" ) \
	IREM_COIN_MODE_1_NEW

#define IREM_SYSTEM_DIPSWITCH_3PLAYERS \
	PORT_START \
	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) \
	PORT_DIPSETTING(    0x01, DEF_STR( Off ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( On ) ) \
	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) \
	PORT_DIPSETTING(    0x02, "2 Players" ) \
	PORT_DIPSETTING(    0x00, "3 Players" ) \
	PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) \
	PORT_DIPSETTING(    0x04, "Common" ) \
	PORT_DIPSETTING(    0x00, "Separate" ) \
	PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Default 1 */ \
	PORT_DIPSETTING(    0x08, "1" ) \
	PORT_DIPSETTING(    0x00, "2" ) \
	IREM_COIN_MODE_1_NEW

#define IREM_SYSTEM_DIPSWITCH_CABINET \
	PORT_START \
	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) \
	PORT_DIPSETTING(    0x01, DEF_STR( Off ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( On ) ) \
	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) ) \
	PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) ) \
	PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) \
	PORT_DIPSETTING(    0x04, "Common" ) \
	PORT_DIPSETTING(    0x00, "Separate" ) \
	PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Default 1 */ \
	PORT_DIPSETTING(    0x08, "1" ) \
	PORT_DIPSETTING(    0x00, "2" ) \
	IREM_COIN_MODE_1_NEW

#define IREM_SYSTEM_DIPSWITCH \
	PORT_START \
	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) \
	PORT_DIPSETTING(    0x01, DEF_STR( Off ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( On ) ) \
	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) \
	PORT_DIPSETTING(    0x02, DEF_STR( Off ) ) \
	PORT_DIPSETTING(    0x00, DEF_STR( On ) ) \
	PORT_DIPNAME( 0x04, 0x04, "Coin Slots" ) \
	PORT_DIPSETTING(    0x04, "Common" ) \
	PORT_DIPSETTING(    0x00, "Separate" ) \
	PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Default 1 */ \
	PORT_DIPSETTING(    0x08, "1" ) \
	PORT_DIPSETTING(    0x00, "2" ) \
	IREM_COIN_MODE_1_NEW

#define IREM_COINS_SYSTEMDIPS(custom) \
	PORT_START_TAG("COINS_DIPS")	\
	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) \
	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) \
	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) \
	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN2 ) \
	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) \
	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE )  \
	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )  \
	PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom, 0) /* Actually vblank, handled above */ \
	PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Flip_Screen ) ) \
	PORT_DIPSETTING(      0x0100, DEF_STR( Off ) ) \
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) ) \
	PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) \
	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) ) \
	PORT_DIPSETTING(      0x0000, DEF_STR( On ) ) \
	PORT_DIPNAME( 0x0400, 0x0400, "Coin Slots" ) \
	PORT_DIPSETTING(      0x0400, "Common" ) \
	PORT_DIPSETTING(      0x0000, "Separate" ) \
	PORT_DIPNAME( 0x0800, 0x0800, "Coin Mode" ) /* Default 1 */ \
	PORT_DIPSETTING(      0x0800, "1" ) \
	PORT_DIPSETTING(      0x0000, "2" ) \
	PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:5,6,7,8") \
	PORT_DIPSETTING(      0xa000, DEF_STR( 6C_1C ) ) \
	PORT_DIPSETTING(      0xb000, DEF_STR( 5C_1C ) ) \
	PORT_DIPSETTING(      0xc000, DEF_STR( 4C_1C ) ) \
	PORT_DIPSETTING(      0xd000, DEF_STR( 3C_1C ) ) \
	PORT_DIPSETTING(      0xe000, DEF_STR( 2C_1C ) ) \
	PORT_DIPSETTING(      0x1000, "2 Coins to Start/1 to Continue") \
	PORT_DIPSETTING(      0x3000, DEF_STR( 3C_2C ) ) \
	PORT_DIPSETTING(      0x2000, DEF_STR( 4C_3C ) ) \
	PORT_DIPSETTING(      0xf000, DEF_STR( 1C_1C ) ) \
	PORT_DIPSETTING(      0x4000, DEF_STR( 2C_3C ) ) \
	PORT_DIPSETTING(      0x9000, DEF_STR( 1C_2C ) ) \
	PORT_DIPSETTING(      0x8000, DEF_STR( 1C_3C ) ) \
	PORT_DIPSETTING(      0x7000, DEF_STR( 1C_4C ) ) \
	PORT_DIPSETTING(      0x6000, DEF_STR( 1C_5C ) ) \
	PORT_DIPSETTING(      0x5000, DEF_STR( 1C_6C ) ) \
	PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )


#define IREM_PORT_UNUSED \
	PORT_START	\
	PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )