Recently, I finished a little do-it-yourself project: Inspired by this biorhythm article, I decided to build my own iCade-gameplay adapter. During the planing stage, I soon realized that it would be nice, if I could also use the adapter with other available emulators out there, as well as for two-player games.

I used a not-so-up-to-date Arduino board and a ProtoShield to start with. A little note for everyone who wants to build his/her own adapter: The current Arduino Uno has the capability to implement a USB HID-device with its on-board USB-socket. This might make the assembling easier. I took the USB-Keyboard project from the book “Practical Arduino” as starting point and ordered some components that I would need for soldering. Regarding the sockets for the controllers I first ordered some NES sockets. However, there are only two buttons for playing on the NES-controllers. This would be far too less for many games and I came to buy two SNES extension cables from which I used the sockets so that SNES controllers could be used for playing.

DIY SNES-iCade-Adapter

After a bit of soldering, glueing, and programming I made it work. I made use of the V-USB library for Arduino, which is free for private, non-commercial use. Since iCade games expect a key press event followed by a key release event for every single state change of the joystick and buttons, in “iCade-mode” the method from the V-USB library for sending key strokes was used as provided by the library. For “normal mode”, however, I created a modified version of the method such that endlessly repeating keystrokes were allowed. Key presses and releases were then implemented by directly controlling the USB report buffer from within the main loop. For the first player the buttons were mapped to the arrow keys and to the keys “1” to “8”. The buttons for player two were mapped to “A”, “S”, “D”, “W” for steering and to the keys ERTYUIOP. The key codes, which were missing within the V-USB library can be found in the USB HID usage table. For reading the state of (S)NES controllers there exist quite a few sites. This site was a great help for me. A on/off button is used for switching between iCade- and normal-mode. I put a snapshot of the source code into a Github repository. Two LEDs indicate the state in which mode the adapter currently is.

On the one hand, the adapter can be used to emulate a standard USB keyboard for playing games with emulators like, for example, ZSNES or Nestopia (for which also Mac versions exists). On the other hand, the adapter can be switched to an “iCade-mode”, which allows the use of the adapter with iOS games that support the iCade input. All you need is the camera connection kit, the adapter is powered over the USB connection.

Right now, many wires are too long. But the prototyping was lot more easier in this way. Here is a short video demonstration of the adapter:

My next project is to shrink the design and to put the whole thing into a case which is more pleasant to look at.

If you have any questions or comments, feel free to say or ask!