~ubuntu-branches/debian/experimental/mednafen/experimental

« back to all changes in this revision

Viewing changes to src/nes/input.cpp

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2012-11-19 07:00:37 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20121119070037-jvknrm13zvim88oc
Tags: 0.9.26-1
* New upstream WIP version.
* Change priority to "extra" to match libvorbisidec1's.
* Drop "DM-Upload-Allowed" since it is no longer appropriate.
* Refresh patches, replacing MPC_STATUS_FAIL constant from older mpcdec
  versions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
 { "bd13", "Barcode Digit 13", -1, IDIT_BYTE_SPECIAL },
232
232
};
233
233
 
234
 
static InputDeviceInfoStruct InputDevice4Player[] = 
235
 
{
236
 
 {
237
 
  "gamepad",
238
 
  "Gamepad",
239
 
  NULL,
240
 
  sizeof(GamepadIDII) / sizeof(InputDeviceInputInfoStruct),
241
 
  GamepadIDII,
242
 
 }
243
 
};
244
 
 
245
 
static const InputPortInfoStruct PortInfo4Player[] =
246
 
{
247
 
 { -2, "port3", "Port 3", sizeof(InputDevice4Player) / sizeof(InputDeviceInfoStruct), InputDevice4Player, "gamepad" },
248
 
 { -2, "port4", "Port 4", sizeof(InputDevice4Player) / sizeof(InputDeviceInfoStruct), InputDevice4Player, "gamepad" },
249
 
};
250
 
 
251
234
static InputDeviceInfoStruct InputDeviceInfoNESPort34[] =
252
235
{
253
236
 // None
255
238
  "none",
256
239
  "none",
257
240
  NULL,
 
241
  NULL,
258
242
  0,
259
243
  NULL
260
244
 },
264
248
  "gamepad",
265
249
  "Gamepad",
266
250
  NULL,
 
251
  NULL,
267
252
  sizeof(GamepadIDII) / sizeof(InputDeviceInputInfoStruct),
268
253
  GamepadIDII,
269
254
 },
277
262
  "none",
278
263
  "none",
279
264
  NULL,
 
265
  NULL,
280
266
  0,
281
267
  NULL
282
268
 },
286
272
  "gamepad",
287
273
  "Gamepad",
288
274
  NULL,
 
275
  NULL,
289
276
  sizeof(GamepadIDII) / sizeof(InputDeviceInputInfoStruct),
290
277
  GamepadIDII,
291
278
 },
295
282
  "zapper",
296
283
  "Zapper",
297
284
  NULL,
 
285
  NULL,
298
286
  sizeof(ZapperIDII) / sizeof(InputDeviceInputInfoStruct),
299
287
  ZapperIDII,
300
288
 },
301
 
 
 
289
 
302
290
 // Powerpad A
303
291
 {
304
292
  "powerpada",
305
293
  "Power Pad Side A",
306
294
  NULL,
 
295
  NULL,
307
296
  sizeof(PowerpadIDII) / sizeof(InputDeviceInputInfoStruct),
308
297
  PowerpadIDII,
309
298
 },
313
302
  "powerpadb",
314
303
  "Power Pad Side B",
315
304
  NULL,
 
305
  NULL,
316
306
  sizeof(PowerpadIDII) / sizeof(InputDeviceInputInfoStruct),
317
307
  PowerpadIDII,
318
308
 },
322
312
  "arkanoid",
323
313
  "Arkanoid Paddle",
324
314
  NULL,
 
315
  NULL,
325
316
  sizeof(ArkanoidIDII) / sizeof(InputDeviceInputInfoStruct),
326
317
  ArkanoidIDII,
327
318
 },
336
327
  "none",
337
328
  "none",
338
329
  NULL,
 
330
  NULL,
339
331
  0,
340
332
  NULL
341
333
 },
345
337
  "arkanoid",
346
338
  "Arkanoid Paddle",
347
339
  NULL,
 
340
  NULL,
348
341
  sizeof(ArkanoidIDII) / sizeof(InputDeviceInputInfoStruct),
349
342
  ArkanoidIDII,
350
343
 },
354
347
  "shadow",
355
348
  "Space Shadow Gun",
356
349
  NULL,
 
350
  NULL,
357
351
  sizeof(ZapperIDII) / sizeof(InputDeviceInputInfoStruct),
358
352
  ZapperIDII,
359
353
 },
362
356
 {
363
357
  "4player",
364
358
  "4-player Adapter",
365
 
  PortInfo4Player,
366
 
  2,
 
359
  NULL,
 
360
  NULL,
 
361
  0,
367
362
  NULL,
368
363
 },
369
364
 // Family Keyboard
371
366
  "fkb",
372
367
  "Family Keyboard",
373
368
  NULL,
 
369
  NULL,
374
370
  sizeof(FKBIDII) / sizeof(InputDeviceInputInfoStruct),
375
371
  FKBIDII,
376
372
 },
380
376
  "hypershot",
381
377
  "Hypershot Paddles",
382
378
  NULL,
 
379
  NULL,
383
380
  sizeof(HypershotIDII) / sizeof(InputDeviceInputInfoStruct),
384
381
  HypershotIDII,
385
382
 },
389
386
  "mahjong",
390
387
  "Mahjong Controller",
391
388
  NULL,
 
389
  NULL,
392
390
  sizeof(MahjongIDII) / sizeof(InputDeviceInputInfoStruct),
393
391
  MahjongIDII,
394
392
 },
398
396
  "partytap",
399
397
  "Party Tap",
400
398
  NULL,
 
399
  NULL,
401
400
  sizeof(PartyTapIDII) / sizeof(InputDeviceInputInfoStruct),
402
401
  PartyTapIDII,
403
402
 },
407
406
  "ftrainera",
408
407
  "Family Trainer Side A",
409
408
  NULL,
 
409
  NULL,
410
410
  sizeof(FTrainerIDII) / sizeof(InputDeviceInputInfoStruct),
411
411
  FTrainerIDII,
412
412
 },
416
416
  "ftrainerb",
417
417
  "Family Trainer Side B",
418
418
  NULL,
 
419
  NULL,
419
420
  sizeof(FTrainerIDII) / sizeof(InputDeviceInputInfoStruct),
420
421
  FTrainerIDII,
421
422
 },
425
426
  "oekakids",
426
427
  "Oeka Kids Tablet",
427
428
  NULL,
 
429
  NULL,
428
430
  sizeof(OekaIDII) / sizeof(InputDeviceInputInfoStruct),
429
431
  OekaIDII,
430
432
 },
434
436
  "bworld",
435
437
  "Barcode World Scanner",
436
438
  NULL,
 
439
  NULL,
437
440
  sizeof(BWorldIDII) / sizeof(InputDeviceInputInfoStruct),
438
441
  BWorldIDII,
439
442
 },
440
443
 
441
444
};
442
445
 
 
446
// The temptation is there, but don't change the "fcexp" default setting to anything other than "none", as the presence of a device
 
447
// there by default will cause compatibility problems with games.
443
448
static const InputPortInfoStruct PortInfo[] =
444
449
{
445
 
 { 0, "port1", "Port 1", sizeof(InputDeviceInfoNESPort) / sizeof(InputDeviceInfoStruct), InputDeviceInfoNESPort, "gamepad" },
446
 
 { 0, "port2", "Port 2", sizeof(InputDeviceInfoNESPort) / sizeof(InputDeviceInfoStruct), InputDeviceInfoNESPort, "gamepad" },
447
 
 { 0, "port3", "Port 3", sizeof(InputDeviceInfoNESPort34) / sizeof(InputDeviceInfoStruct), InputDeviceInfoNESPort34, "gamepad" },
448
 
 { 0, "port4", "Port 4", sizeof(InputDeviceInfoNESPort34) / sizeof(InputDeviceInfoStruct), InputDeviceInfoNESPort34, "gamepad" },
449
 
 { 0, "fcexp", "Famicom Expansion Port", sizeof(InputDeviceInfoFamicomPort) / sizeof(InputDeviceInfoStruct), InputDeviceInfoFamicomPort, "none" },
 
450
 { "port1", "Port 1", sizeof(InputDeviceInfoNESPort) / sizeof(InputDeviceInfoStruct), InputDeviceInfoNESPort, "gamepad" },
 
451
 { "port2", "Port 2", sizeof(InputDeviceInfoNESPort) / sizeof(InputDeviceInfoStruct), InputDeviceInfoNESPort, "gamepad" },
 
452
 { "port3", "Port 3", sizeof(InputDeviceInfoNESPort34) / sizeof(InputDeviceInfoStruct), InputDeviceInfoNESPort34, "gamepad" },
 
453
 { "port4", "Port 4", sizeof(InputDeviceInfoNESPort34) / sizeof(InputDeviceInfoStruct), InputDeviceInfoNESPort34, "gamepad" },
 
454
 { "fcexp", "Famicom Expansion Port", sizeof(InputDeviceInfoFamicomPort) / sizeof(InputDeviceInfoStruct), InputDeviceInfoFamicomPort, "none" },
450
455
};
451
456
 
452
457
InputInfoStruct NESInputInfo =