“Since the old days of gaming with a joystick (they have all vanished, do they?) I have an Microsoft Sidewinder Precision Pro lying around here. I plan on building a Quadrocopter soon and it seemed like the perfect device to control such a flying vehicle.
Reading through Google and Wikipedia I stumbled across US Patent 5628686 which is titled as “Apparatus and Method for bidirectional Data Communication in a Game Port” and explains a Method used to communicate digitally through a traditional analog-style Gameport. The explanations in that Patent were the Basis of my Experiments with the Device I have. I found them to not 100% match the reality but backed with all that Information I was able to reverse engeneer the Protocol used to talk to the “Precision Pro”-Joystick, analyze and use the received data.
Looking at the Pinout of a Gameport we directly see the pins used to power the Gameport: 1, 8, 9 for VCC (5V) and 4, 5 for GND. After checking the Pins populated on the specific Device I have here, only the Pins 1 and 4 need to be connected to the respective voltage levels. As can be taken from the Patent, Pin 3 is the trigger used to request a data packet from the Joystick. Pins 2 and 7 are then used to transmit a clock and data back from the Joystick. The required Pins at a glance are:
1 => VCC
2 => Clock
3 => Trigger
4 => GND
7 => Data
I used an ArduinoMega to do my experiments but you can use all AVR Part with enough GPIO Pins. The Code in this Repo allows configuring the pinput to your needs. It contains everything needed to connect to a KS0108 comptatible 128x64 Pixel GLCD, visualizing the state of the Gamecontroller, as well as several timing signals used to measure the performance of different parts of the code using a Oscilloscope.”