For a VR setup I need an iOS game controller but usually I have no time and money to waste and if I want something then I want it immediately.
So I thought it must be somehow possible to simulate an iCade controller via bluetooth by mapping the output of a normal USB gamepad to a virtual Mac keyboard and sending Macs keyboard output via bluetooth to the iOS device.
That works fine. So I thought I share how this works
What you need to simulate an iCade is:
- ControllerMate to map the keys (up and down separated): ControllerMate
-
list of the keys used by iCade: emulation - iCade bluetooth keyboard mappings for MAME? - Arqade
-
Type2Phone to simulate a bluetooth keyboard https://itunes.apple.com/de/app/type2phone/id472717129?mt=12
- Gametel Gamepad plugin: Unity Asset Store - The Best Assets for Game Making
How to do it:
-
install Type2Phone on your Mac to connect your Mac keyboard with your iOS device via bluetooth.
-
map the gamepad’s buttons in controller mate like shown on this picture (which shows 4 buttons only), you need to use the “NOT building block” to set a key when pressing the button down and a different key when releasing the button.
ControllerMate has a limitation for mapping buttons when it is not registered, no idea if that is enough for setting up a whole gamepad. (I own a license anyway because it is just an awesome tool, so you should consider buying a license)
Basically an iCade controller is just a bluetooth keyboard, the tricky thing is that when the user presses a button iCade sends for example “w” via bluetooth, when the user releases the stick iCade sends another key, in case of “d” the key send when releasing is “e”
As you can see this works extremely well: