I just got an iCade — it is technically for an Apple iPad, but it is basically a generic bluetooth keyboard arcade controller.
It's great! But once I paired it with my laptop as a bluetooth keyboard for testing, I discovered something odd that does not bode well for using the iCade with MAME. All inputs show up as two (and only two) keypresses – one key when pushed down, and another key when released. Like so:
Joystick
↑ w, e ← a, q → d, c ↓ x, z
Buttons
(1 red) y, t (2 blk) u, f (3 blk) i, m (4 wht) o, g (5 red) h, r (6 blk) j, n (7 blk) k, p (8 wht) l, v
Most MAME emulators expect standard keyboard behavior. That is, when you are pressing left you hold down left the entire duration of the movement.
This isn't a big deal for the buttons — buttons are instant activate so if I pressed y on my keyboard that is the same as, say, pressing fire in Galaxian.
But it makes the joystick a non starter since the keyboard key is not "held down" — that is, when I use the joystick and press ← one a is sent.. ever. But when I stop holding down ← q is sent.
How can I configure MAME or other emulators to work with the iCade joystick and its peculiar keyboard interface? Is there any way to create a MAME config file that will work with the iCade?
Best Answer
Unfortunately, this strange operation is a hack to support iOS due to limited API support for external hardware. Currently, the iOS SDK does not expose the internal UIEvents for keydown / keyup messages, so ION send two keypresses to allow developers to determine state transitions for emulators and games. Essentially a keydown/keyup when you press a button and then a second keydown/keyup when you release the button. This is not standard keyboard operation, as you have discovered.
I am willing to bet there is a combination of buttons that would change the iCade to behave like a regular keyboard, and I bid anyone good luck figuring that out! Other controllers, like the iControlPad have multiple operating modes, which is why I suspect the iCade is similar.
I created and released an MIT licensed SDK for iCade last night, but I doubt you are running this on an iPad.