-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathinpttype.h
354 lines (305 loc) · 6.73 KB
/
inpttype.h
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
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
/***************************************************************************
inpttype.ipp
Core-defined input types.
***************************************************************************/
#ifndef MAME_EMU_INPTTYPE_H
#define MAME_EMU_INPTTYPE_H
#pragma once
#include "interface/inputfwd.h"
#include "osdcomm.h"
enum ioport_type : osd::u32
{
// pseudo-port types
IPT_INVALID = 0,
IPT_UNUSED,
IPT_END,
IPT_UNKNOWN,
IPT_PORT,
IPT_DIPSWITCH,
IPT_CONFIG,
// start buttons
IPT_START1,
IPT_START2,
IPT_START3,
IPT_START4,
IPT_START5,
IPT_START6,
IPT_START7,
IPT_START8,
IPT_START9,
IPT_START10,
// coin slots
IPT_COIN1,
IPT_COIN2,
IPT_COIN3,
IPT_COIN4,
IPT_COIN5,
IPT_COIN6,
IPT_COIN7,
IPT_COIN8,
IPT_COIN9,
IPT_COIN10,
IPT_COIN11,
IPT_COIN12,
IPT_BILL1,
// service coin
IPT_SERVICE1,
IPT_SERVICE2,
IPT_SERVICE3,
IPT_SERVICE4,
// tilt inputs
IPT_TILT1,
IPT_TILT2,
IPT_TILT3,
IPT_TILT4,
// misc other digital inputs
IPT_POWER_ON,
IPT_POWER_OFF,
IPT_SERVICE,
IPT_TILT,
IPT_INTERLOCK,
IPT_MEMORY_RESET,
IPT_VOLUME_UP,
IPT_VOLUME_DOWN,
IPT_START, // use the numbered start button(s) for coin-ops
IPT_SELECT,
IPT_KEYPAD,
IPT_KEYBOARD,
// digital joystick inputs
IPT_DIGITAL_JOYSTICK_FIRST,
// use IPT_JOYSTICK for panels where the player has one single joystick
IPT_JOYSTICK_UP,
IPT_JOYSTICK_DOWN,
IPT_JOYSTICK_LEFT,
IPT_JOYSTICK_RIGHT,
// use IPT_JOYSTICKLEFT and IPT_JOYSTICKRIGHT for dual joystick panels
IPT_JOYSTICKRIGHT_UP,
IPT_JOYSTICKRIGHT_DOWN,
IPT_JOYSTICKRIGHT_LEFT,
IPT_JOYSTICKRIGHT_RIGHT,
IPT_JOYSTICKLEFT_UP,
IPT_JOYSTICKLEFT_DOWN,
IPT_JOYSTICKLEFT_LEFT,
IPT_JOYSTICKLEFT_RIGHT,
IPT_DIGITAL_JOYSTICK_LAST,
// action buttons
IPT_BUTTON1,
IPT_BUTTON2,
IPT_BUTTON3,
IPT_BUTTON4,
IPT_BUTTON5,
IPT_BUTTON6,
IPT_BUTTON7,
IPT_BUTTON8,
IPT_BUTTON9,
IPT_BUTTON10,
IPT_BUTTON11,
IPT_BUTTON12,
IPT_BUTTON13,
IPT_BUTTON14,
IPT_BUTTON15,
IPT_BUTTON16,
// mahjong inputs
IPT_MAHJONG_FIRST,
IPT_MAHJONG_A,
IPT_MAHJONG_B,
IPT_MAHJONG_C,
IPT_MAHJONG_D,
IPT_MAHJONG_E,
IPT_MAHJONG_F,
IPT_MAHJONG_G,
IPT_MAHJONG_H,
IPT_MAHJONG_I,
IPT_MAHJONG_J,
IPT_MAHJONG_K,
IPT_MAHJONG_L,
IPT_MAHJONG_M,
IPT_MAHJONG_N,
IPT_MAHJONG_O,
IPT_MAHJONG_P,
IPT_MAHJONG_Q,
IPT_MAHJONG_KAN,
IPT_MAHJONG_PON,
IPT_MAHJONG_CHI,
IPT_MAHJONG_REACH,
IPT_MAHJONG_RON,
IPT_MAHJONG_FLIP_FLOP,
IPT_MAHJONG_BET,
IPT_MAHJONG_SCORE,
IPT_MAHJONG_DOUBLE_UP,
IPT_MAHJONG_BIG,
IPT_MAHJONG_SMALL,
IPT_MAHJONG_LAST_CHANCE,
IPT_MAHJONG_LAST,
// hanafuda inputs
IPT_HANAFUDA_FIRST,
IPT_HANAFUDA_A,
IPT_HANAFUDA_B,
IPT_HANAFUDA_C,
IPT_HANAFUDA_D,
IPT_HANAFUDA_E,
IPT_HANAFUDA_F,
IPT_HANAFUDA_G,
IPT_HANAFUDA_H,
IPT_HANAFUDA_YES,
IPT_HANAFUDA_NO,
IPT_HANAFUDA_LAST,
// gambling inputs
IPT_GAMBLING_FIRST,
IPT_GAMBLE_KEYIN, // attendant
IPT_GAMBLE_KEYOUT, // attendant
IPT_GAMBLE_SERVICE, // attendant
IPT_GAMBLE_BOOK, // attendant
IPT_GAMBLE_DOOR, // attendant
// IPT_GAMBLE_DOOR2, // many gambling games have several doors.
// IPT_GAMBLE_DOOR3,
// IPT_GAMBLE_DOOR4,
// IPT_GAMBLE_DOOR5,
IPT_GAMBLE_PAYOUT, // player
IPT_GAMBLE_BET, // player
IPT_GAMBLE_DEAL, // player
IPT_GAMBLE_STAND, // player
IPT_GAMBLE_TAKE, // player
IPT_GAMBLE_D_UP, // player
IPT_GAMBLE_HALF, // player
IPT_GAMBLE_HIGH, // player
IPT_GAMBLE_LOW, // player
// poker-specific inputs
IPT_POKER_HOLD1,
IPT_POKER_HOLD2,
IPT_POKER_HOLD3,
IPT_POKER_HOLD4,
IPT_POKER_HOLD5,
IPT_POKER_CANCEL,
// slot-specific inputs
IPT_SLOT_STOP1,
IPT_SLOT_STOP2,
IPT_SLOT_STOP3,
IPT_SLOT_STOP4,
IPT_SLOT_STOP5,
IPT_SLOT_STOP_ALL,
IPT_GAMBLING_LAST,
// analog inputs
IPT_ANALOG_FIRST,
IPT_ANALOG_ABSOLUTE_FIRST,
IPT_AD_STICK_X, // absolute // autocenter
IPT_AD_STICK_Y, // absolute // autocenter
IPT_AD_STICK_Z, // absolute // autocenter
IPT_PADDLE, // absolute // autocenter
IPT_PADDLE_V, // absolute // autocenter
IPT_PEDAL, // absolute // autocenter
IPT_PEDAL2, // absolute // autocenter
IPT_PEDAL3, // absolute // autocenter
IPT_LIGHTGUN_X, // absolute
IPT_LIGHTGUN_Y, // absolute
IPT_POSITIONAL, // absolute // autocenter if not wraps
IPT_POSITIONAL_V, // absolute // autocenter if not wraps
IPT_ANALOG_ABSOLUTE_LAST,
IPT_DIAL, // relative
IPT_DIAL_V, // relative
IPT_TRACKBALL_X, // relative
IPT_TRACKBALL_Y, // relative
IPT_MOUSE_X, // relative
IPT_MOUSE_Y, // relative
IPT_ANALOG_LAST,
// analog adjuster support
IPT_ADJUSTER,
// the following are special codes for user interface handling - not to be used by drivers!
IPT_UI_FIRST,
IPT_UI_MENU,
IPT_UI_SELECT,
IPT_UI_BACK,
IPT_UI_CANCEL,
IPT_UI_CLEAR,
IPT_UI_HELP,
IPT_UI_UP,
IPT_UI_DOWN,
IPT_UI_LEFT,
IPT_UI_RIGHT,
IPT_UI_HOME,
IPT_UI_END,
IPT_UI_PAGE_UP,
IPT_UI_PAGE_DOWN,
IPT_UI_PREV_GROUP,
IPT_UI_NEXT_GROUP,
IPT_UI_ON_SCREEN_DISPLAY,
IPT_UI_TOGGLE_UI,
IPT_UI_DEBUG_BREAK,
IPT_UI_PAUSE,
IPT_UI_PAUSE_SINGLE,
IPT_UI_REWIND_SINGLE,
IPT_UI_SAVE_STATE,
IPT_UI_SAVE_STATE_QUICK,
IPT_UI_LOAD_STATE,
IPT_UI_LOAD_STATE_QUICK,
IPT_UI_RESET_MACHINE,
IPT_UI_SOFT_RESET,
IPT_UI_SHOW_GFX,
IPT_UI_FRAMESKIP_DEC,
IPT_UI_FRAMESKIP_INC,
IPT_UI_THROTTLE,
IPT_UI_FAST_FORWARD,
IPT_UI_SHOW_FPS,
IPT_UI_SNAPSHOT,
IPT_UI_RECORD_MNG,
IPT_UI_RECORD_AVI,
IPT_UI_TOGGLE_CHEAT,
IPT_UI_DISPLAY_COMMENT,
IPT_UI_ZOOM_IN,
IPT_UI_ZOOM_OUT,
IPT_UI_ZOOM_DEFAULT,
IPT_UI_ROTATE,
IPT_UI_SHOW_PROFILER,
IPT_UI_RELEASE_POINTER,
IPT_UI_PASTE,
IPT_UI_TAPE_START,
IPT_UI_TAPE_STOP,
IPT_UI_FOCUS_NEXT,
IPT_UI_FOCUS_PREV,
IPT_UI_DATS,
IPT_UI_FAVORITES,
IPT_UI_EXPORT,
IPT_UI_AUDIT,
// additional OSD-specified UI port types (up to 16)
IPT_OSD_1,
IPT_OSD_2,
IPT_OSD_3,
IPT_OSD_4,
IPT_OSD_5,
IPT_OSD_6,
IPT_OSD_7,
IPT_OSD_8,
IPT_OSD_9,
IPT_OSD_10,
IPT_OSD_11,
IPT_OSD_12,
IPT_OSD_13,
IPT_OSD_14,
IPT_OSD_15,
IPT_OSD_16,
IPT_UI_LAST,
IPT_OTHER, // not mapped to standard defaults
IPT_SPECIAL, // uninterpreted characters
IPT_CUSTOM, // handled by custom code
IPT_OUTPUT,
IPT_COUNT,
// aliases for some types
IPT_PADDLE_H = IPT_PADDLE,
IPT_PEDAL1 = IPT_PEDAL,
IPT_POSITIONAL_H = IPT_POSITIONAL,
IPT_DIAL_H = IPT_DIAL
};
DECLARE_ENUM_INCDEC_OPERATORS(ioport_type)
// sequence types for input_port_seq() call
enum input_seq_type : int
{
SEQ_TYPE_INVALID = -1,
SEQ_TYPE_STANDARD = 0,
SEQ_TYPE_INCREMENT,
SEQ_TYPE_DECREMENT,
SEQ_TYPE_TOTAL
};
DECLARE_ENUM_INCDEC_OPERATORS(input_seq_type)
#endif // MAME_EMU_INPTTYPE_H