The Sidewinder line was a series of gaming peripherals produced by Microsoft, starting in the 1990s. After some initial stumbles, several cutting edge joysticks were released, at a time when the home computer market was in a state of flux, transitioning from legacy interfaces like serial and parallel to the more modern USB. In this interim period, Sidewinder joysticks used a special method to communicate digitally over the game port interface, which more typically used a kludge to read joysticks in an analog manner. [MaZderMind] managed to reverse engineer this protocol, and implemented the interface on an AVR microcontroller.
The technology is loosely described in US Patent 5628686, which discusses the method used to communicate bidirectionally with the Sidewinder joystick. [MaZderMind] found that the patent documents didn’t correspond exactly with how the Sidewinder Precision Pro communicated, but it was close enough that the operation could be reverse engineered.
The plan is to use the vintage joystick to control a quadcopter, so the interface was implemented on an AVR, and a graphical LCD installed to act as a display for testing the operation. [MaZderMind] also captured data on an oscilloscope to indicate in detail the quirks of the joystick’s operation.
Yes, it’s entirely possible to use a more modern microcontroller with a USB joystick. However, there are few that measure up to the standards of the old Sidewinder hardware, and sometimes the best tool for the job is the one you’ve got with you. A traditional single joystick is a different take on quadcopter control, but there’s other options – gesture control is possible, too.
27 thoughts on “Interfacing The Sidewinder Joystick To AVRs”
I thought the Linux kernel had a driver for this protocol. Much easier than going through a patent or reversing via scope.
* sw_read_packet() is a function which reads either a data packet, or an
* identification packet from a SideWinder joystick. The protocol is very,
* very, very braindamaged. Microsoft patented it in US patent #5628686.
I love it :)
Rip out the potentiometers in your transmitter and put them in the joystick via extension wires.
The beauty of the Sidewinder is that it does not have any pots and uses an IR camera and tracking markers instead! This was pretty revolutionaly for a $129 consumer device! Adding pots complete defies the purpose of this undertaking.
Typing on a phone is hard – apparently. You get the point.
Not a camera, but a 2D lateral-effect photodiode. Much more suitable for the application due to the very quick response time. By putting 2 LEDs on the bottom of the stick and multiplexing between them, it tracks rotation as well as position.
it is a camera, a very low res camera with a dsp on die. same kind of chip they use in optical mice.
There were several models. I doubt mine (3D Pro) has a camera. We are talking about the time when most people were still plugging joysticks to their analog gameports that used potentiometers for the axes. Microsoft probably used the same technology that has been used for decades in mice, i.e. optical encoders.
That sounds similar to how 4 photodiode beam tracking works in Sony CDroms?
Do you know of any detailed writeups on optical joysticks? or video tutorials?
I remember N64 had analog joypads, but I assumed they worked like ordinary mouse quadrature encoder.
The force feedback was actually done with two quite beefy motors. I took one apart in my youth to find out what made it tick. Interesting how complex they were inside in comparison to a regular joystick you’d plug into a game port. That particular model required an additional external power supply.
AFAIK nobody has made the joystick port force feedback sidewinder work with anything newer than Windows 98SE. In Windows XP it will work as a rather stiff joystick but there are no FF supporting drivers.
It has a light sensor to tell when there’s a hand gripping the stick. Let go and it falls over with the motors turned off. That’s to stop it flailing around in an FF game if the player lets go.
There’s at least one Sidewinder to USB adapter that was made in quantity some years ago, but it only works with the non-FF sticks. Even if it did work with the FF Sidewinder there’s still no FF driver for newer operating systems.
I was given one of those FF Sidewinder sticks. I eventually gave it to someone who wanted it for old games on 98SE.
Got the force feedback version, too. Worked out of the box with Win10 64 bit and the Windows Vista Software from Logitec driver download. Force feedback actively worked while in the joystick calibration part of the software.
isnt it the case of MS just dropping FF from the API? they went thru hmm 3 input APIs(standard message loop, DirectInput and XInput) over the years? and now pretty much standardized on whats available on Xbox (means no mice/keyboard input thru this API). No FF joypads/joysticks on xbox = no PC API support? = only wheel FF?
There is existing schematics and code to run the SWFFB Pro on a Teensy 2
it was a thing of beauty. i had to take mine apart several times for repairs and cleaning. but i got a good 8 years out of it.
I am looking for an adapter for the Sidewinder Gamepad (with gameport, obviously).
Does that exist?
Not sure but I want one too, thinking about just building it myself (got three of those gamepads in the shed).
They did make a USB version too.
Yes, but the USB is an adapter for the gamepad.
Most probably there was a usb compatible protocol that was enabled when the adapter was used.
It is there already and is called 3DP-Vert gameport to USB adapter. I did build one long time ago. Widows sees it as USB version of the same!
Old website is gone I think but there is still some info left
Found it here: https://code.google.com/archive/p/sw3dprousb/
But it does not say anything about gamepad
I already found that that webpage (I saw it like 3 years ago or so) but it doesn’t say anything about the gamepad.
Same thing about this ¿story/post/webpage?
I just realiased, this repo is from 5 years ago … T_T
those sidewinders were pretty cutting edge. they used optical sensors (the type normally found on mice) and had higher than 8 bit resolution (at least on x/y). i do believe they had a fallback compatibility mode. if i recall it used the midi pins for the computer to talk to the stick, and the stick would send back data on the button pins (one being the clock and the others being a 3-bit parallel interface). cool stuff. post sidewinder sticks had more features, more buttons/axes/hats/etc. but the quality took a sharp dive. i went through about 3 saitek hotas units, which gave me a year and a half on average each and i finally ended up with some ch gear that has lasted me about 12 years of fairly heavy use. i still use my throttle and pedals a lot, but my stick has a little too much play to be useful in anything but single player games on low difficulty settings. a few years ago i found a sidewinder in a bin at a thrift store. i was unable to figure out the protocol and just gutted it. the handle became part of the joystick of DOOM.
IIRC, the de facto “standard” game ports of most sound cards of time (such as the Sound Blaster from Creative Labs) included MIDI ports, which were ready-made bi-directional digital (serial) data ports. Seems strange to implement something totally new for this purpose. Maybe Microsoft offered bonuses for getting patents?
there were a lot of different protocols at the time. some didnt even use the joystick pins and just used the midi interface as a serial connection. and there were a hodgepodge of systems using button lines to clock out data. there were even hybrid systems where you had 2 hard button lines and dedicated potentiometers, and then anything extra was clocked out on the 2 remaining buttons. the gameport was a hackers paradise.
The basic IBM DA-15 game port supported two 2-axis analog joysticks with two buttons each. That made it easy to make basic flying controls with a stick, rudder pedals, throttle and four buttons, or driving controls with a wheel, brake, clutch, throttle and four buttons, no special software required.
Then for Windows someone got the bright idea that the number of buttons could be increased a bunch by software interpreting 2, 3, or 4 buttons pressed simultaneously as a single digital toggle. So for the DIY control builder that’s easy enough to hack together with just the knowledge of which of buttons 1-4 are ganged together for buttons 5 and higher. I suspect some early flight control setups for DOS did the same but relied on each game to provide support for reading the simultaneous buttons correctly.
But then controller manufacturers decided to get fancier and put electronics in the stick to send data in various proprietary ways to the computer, requiring specific drivers to work with each different stick or at least for each different brand. Thus those sticks only work for the operating systems that have drivers. Most of them can’t be plugged into a game port and used as a basic 2 axis 4 button stick for DOS. ISTR at least one rather complex flight control setup used an RS232 port along with the game port for DOS flight sims and combat games.
What really irritated me about joysticks in the pre-USB era is to get a stick with 4 buttons typically cost 2 to 3 times the price of a stick with only 2 buttons. Didn’t matter if the overall quality of the stick was no better, to get two more buttons, that required just two more cheap snap dome switches and two more wires in the cord, you were going to pay through the nose for them.
Then came USB and anything a stick designer wanted could be crammed in. No more limitations based on the small number of signal pins in the old game port.
I am in the process of trying to get a Sidewinder joystick to work with all of the usability of programming the buttons. Just plugging it in to my Win10 PC, I can get the joystick directions to work and button2. But the few downloads I have found of the Sidewinder Precision USB Game Controller Software wont run, install or anything on Win10. Not even in compatibility mode.
I am looking for a hack or other controller that may be out there for accessing the buttons and assigning commands or key press to them.
I am using Second Life through Firestorm for my trials.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)