WiFi arcade controller (x-OSC Java demo)

With a craving to play old Commodore 64 games and all my game controllers tangled into a interlaced web of wires, I figured I’d build a new one without wires using x-OSC. And so, the WiFi Arcade Controller was born.

The video above demonstrates the arcade controller in action with the laptop joining x-OSC’s ad hock network with a command line application written in Javaconverting the received OSC messages into emulated key strokes. These keystrokes are then fed to the Vice emulator running my favourite Commodore 64game: Thrust. Thrust is an amazingly addictive game which was well known for its advanced physics processing (for the time) and an outstanding soundtrack. The aim is to weave your way down through a maze, assisted by gravity, to collect a pod with your tractor beam and then ascend to the heavens (next level). However, after collecting the pod the ship becomes pretty hard to control; it becomes especially tricky when the gravity is inverted on level 7.

WiFi-Arcade-Screenshot

The open source software and designs for an arcade controller and a joystick can be downloaded from the project repository. The arcade controller uses aArcade Joystick – Short Handle, green button, pink button, yellow button, red button, dark green button and black button all available from sparkfun.

The joystick controller is a very similar design using the Arcade Joystick, again from sparkfun. No additional buttons this time.

The controllers each have designs for a wooden box mounting the arcade buttons/joystick and use x-OSC to stream control signals via WiFi. The parts making up each controller are designed to be laser-cut from 6 mm plywood and slot fit together with glue. The x-OSC is held in place with sugru. The parts are designed by Peter Bennett using Adobe Illustrator, where red lines should be a cut and blue or black areas, engraved. The source files include wiring diagrams and photos of the assembled controllers.

The Java software uses the Illposed OSC library to convert the x-OSC digital input messages to emulated key strokes. Instructions for compiling and running the Java app are provided in the accompanying Readme file. Different games will require different keystrokes so you will have to modify the Xosc.java file, replacing the VK_XX events accordingly; a complete list of key events is available here. Also included with the software is a Max/MSP patch for viewing the x-OSC digital input states. Both the Java and the Max programs act as a good starting points for connecting x-OSC to their respective languages.

WiFi-Arcade-Tester

 

Once the wiring for your joystick is good to go and you have configured the Java app with the appropriate key bindings for your game, connect to x-OSC’s ad hock WiFi network and then, in any web browser, navigate to the settings page at the address 169.254.1.1 and set inputs 1 – 10 to digital with pull-ups enabled. Have fun.

Open-source resources are released under the Creative Commons Share-alike 3.0 unless an alternative licence is specified in source files.