Page 2 of 8

Re: Reverse Engineering the Force Feedback Pro

Posted: Sun Mar 11, 2012 2:35 pm
by cal
The complied hex-file for Teensy 2, source code and some updates to the wiki are now available at the project pages as version with label "proto 2".

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed Mar 14, 2012 12:41 am
by wwweagle
With current development, if I turn off force feedback in the game, the FFP would work just like a FFP2 with force feedback turned off, right?
That alone is a great achievement.

Re: Reverse Engineering the Force Feedback Pro

Posted: Thu Mar 15, 2012 12:59 pm
by Merlin
Hi,

I am Merlin from the AmiBay forum. I want to say a massive thanks to all of the heroes in this thread, for working to get a USB adapter for my beloved Force Feedback Pro joysticks working. I still believe that these are the best joysticks ever made, bar none.

One question; I have the Sidewinder Force Feedback steering wheel too in my collection of Sidewinder controllers. Would it be possible to create a driver for this new adapter of yours for the steering wheel too? I would be prepared to help out if needed, just tell me what I need to do.

Thanks.

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue Apr 17, 2012 3:14 pm
by cal
Uh - the Real Life (tm) caught me a bit and is still keeping me in its grips for a while. Thus, the project has not really moved forward that much. I've used the adapter with FFB now for several hours tho when flying IL2 and even if its effects are not quite right yet (the MIDI-protocol has some number conversion quirks that I need to root out still - which is a tedious task to say the least) I have at least seen that it does not "crash" the joystick anymore even after couple of hours of use as some of the earlier versions did. This means that the principles and most of the details too in the USB and MIDI lines are pretty close what they should be.

Even if all of the effects work already now using FEdit, IL2 seem to use FFB a bit differently. It updates some of the effect parameters in ways that FEdit never does, which causes glitches and wrong effect gains/magnitudes in some of the effects. For example, the fluttering effect of turbulence under the wings of the airplane in IL2 is way too strong with the adapter now and the spring effect signifying the varying air pressure against the wing controls seem to throw the stick to wrong directions or at least too strongly at some directions.

Merlin, about your Sidewinder steering wheel. What you would need to get is to reverse engineer the protocol used in the game port to control the effects on the wheel. The USB side should be quite straight forward now that we got the Windows' FFB protocol there somewhat in order. I wonder if the wheel too is using some form of the MIDI protocol. Unfortunately, you need a working game port to see that. If you have a game port, you can dispatch the MIDI pin to a serial input (maybe with a small resistor in series for added safety) and read the MIDI data easily (while you play effects to it) since it is quite a basic serial protocol (31250 baud, 8N1).

You should also find out whether the wheel is using the analog inputs in the game port or that weird MS overdrive protocol to make it digital. I could imagine, the data is sent in analog format since a wheel and pedals could easily be modeled as a single analog joystick. Many pedals seem to model the break and gas pedals with a single axis. You can check this by seeing if the X and Y axis in the wheel's game port act like a joystick. There are numerous articles in the web about this. Some links about this are found also from the adapt-ffb-joy-project page discussed here.

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue May 08, 2012 9:57 am
by HackNFly
Cal, just wanted to say I'm very impressed by your work, and am looking forwards to trying it out. I have all the parts and a new Teensy 2.0 to try it out. However there's no apparent way to contact you through the google.code website. Just wanted to point that out as other people may have run into the project from other places on the web.

~Santiago

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed May 09, 2012 9:26 am
by HackNFly
Has anyone else got this working? I have the teensy wired up and it is working with the Grendel's code with an MS FFP, I trid loading adapt-ffb-joy-proto2.hex and nothing happens when I plug it in, just a blinking light. I tried moving D0->B0 D1->B1 D2->B2 D3->B3
But still just a blinking light. Were there any other wire changes other than that? I also suggest putting a link on the code website to link back here for more information.

Thanks for all the work, I'm looking forwards to having my FFP work completely again.

Re: Reverse Engineering the Force Feedback Pro

Posted: Thu May 10, 2012 5:08 pm
by Grendel
Besides moving Dx to Bx, you probably need to connect B0 to D0 as well. Looks like D3 is the MIDI output pin that needs to be wired to pin 12 or 15 on the D-SUB 15 connector (forgot which one of the two, probably 12...)

Re: Reverse Engineering the Force Feedback Pro

Posted: Mon May 14, 2012 8:37 am
by HackNFly
Just wanted to say that I successfully got it working. The problem was that I was following the original diagram for Grendel's adapter and I forgot that the FFP doesn't have a pin 13. I had to connect to pin 11 instead. The joystick initialized just fine without pin 11 connected, making the diagnosis more difficult. However this had to be connected to get force feedback to work. Cal was kind enough to send me a basic wiring diagram

AVR---D15
--------------

B0+D0 --- 2
B1 --- 7
B2 --- 10
B3 --- 14

D3 --- (R220) --- 12
B4 --- (R2.2k) --- 11
B5 --- (R2.2k) --- 3

+5V --- 1
GND --- 4

Its currently working without the two capacitors. Were those capacitors needed to get the other Sidewinder models to work, or are they there to stay within protocol?

Anyways, I'm happy to announce I have my force feedback pro up and running like it was back in '97.

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue May 15, 2012 8:46 am
by nic_swede
Hi guys!

I can see that you had success with the MS FFB joysticks, really good work!
My question is: did anyone manage to convert the SW FFB precision wheel as well?
I have a gameport one.

Regards,
Niclas

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue May 15, 2012 5:59 pm
by Grendel
nic_swede: no, sorry.

HackNFly: the caps are neccessary to create the pulses the sticks require to detect an "event". If you leave them out the only capacitance in the sytem will be the wire (probably in the low pF range) and there's no telling how reliable this will work in the long run. I would suggest to put 1nF caps in.

Re: Reverse Engineering the Force Feedback Pro

Posted: Fri May 18, 2012 9:00 pm
by HackNFly
Thanks for the update, I'll put the caps back in later this weekend.

Just wanted to share the news. I'm sure this is the nostalgia you descent fans feel when playing. I just got Mechwarrior 3 working on my computer with my Sidewinder FFP with the original forces. Theres still some work being done on the firmware, but I swear this was just like it was15 years ago when I first got the stick. I'm really happy with it. I also have another force feedback joystick that is usb enabled, and it simply doesn't compare. Its hard to imagine there being a more comfortable joystick out there.

Thanks Cal and Grendel for all the hard work that made this possible.

Re: Reverse Engineering the Force Feedback Pro

Posted: Thu May 24, 2012 9:33 am
by ffb.boy.30
Hi
I'm doing a FFB joystick and I've some question
I use a descriptor given on microchip forum like you I've 2 input report => 1:joystick data 2:PID info
My joystick work with the windows panel and the data seem to be ok with USBlyser.
But when I try to launch FFconst the software is blocked until I remove my card .
With USBlyser I've seen that an OUT request is done 0x0C 0x04 it is a reset.
What I've to do?
thanks
FFB.BOY.30

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed May 30, 2012 2:06 pm
by kbh01
Thank you for your work on this.
I'm experiencing two issues with the program:
1) When i plug the stick in nothing happens (the center spring effect stays deactivated) but then when I "use" the Force Feedback (e.g. by launching fedit) the stick seems to come out of FFB Mode into "normal" mode with activated spring effect - so basically the modes are in reverse. Any idea on this?
2) the stick randomly reports very short button presses from the Buttons 5 to 9 and the little directional pad on the top every couple of seconds. (can be seen in the windows configurationn window) Is it possible that maybe I'm using the wrong recistors? Or any other idea where these could come from?

Re: Reverse Engineering the Force Feedback Pro

Posted: Sat Jun 02, 2012 1:22 am
by joeykork
Very cool! I had been waiting for someone to implement HID-FF on the AVR, not being able to do it myself. Several people in the past seemed to have figured it out on PIC and kept the code to themselves :-(

After perusing the Google Code tree, I ran to my closet and pulled out the CH Force FX I have been wanting to convert to USB since I found it 3 years ago!

It is one of the very first consumer force feedback sticks, and uses I-Force API 1.0 over a serial cable for receiving force effects. MS licensed I-Force for their FF sticks (because of patents) but I do not know if they also licensed and used the same IForce protocol or stepper-controller implementation.

Looking at the I-Force API, I'm not sure if the direct-to-serial IForce protocol is the same as the MIDI streams sent to the MS FFP.

I'm thinking that to convert this stick to USB, i need make the following changes to the adapt-ffb-joy code:
[*] exchange the OverDrive controls with generic ADC I/O for internal connection to the stick's pots and buttons
[*] implement the differences between MS-FFP's and ForceFX's effect-set and I-Force encapsulation

I've got other AVR projects I need to complete first to try and build the required experience for me to pull that off, but please keep those kinds of changes in mind when/if you're going to restructure your code base to make it modular for other DIY FF stick conversions.

this is awesome stuff, thank you cal and Grendel!

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue Jul 24, 2012 6:25 pm
by cal
Back from dormancy - again...

The adapt-ffb-joy-project pages in Google Code contains a greatly improved version of the adapter code for AVR since version "proto2". Check the revision "r54" for the latest hex-file and source. It fixes the random button reports kbh01 mentioned about. It also fixes stuttering of e.g. a game application caused by the adapter (funny that a joystick may cause Windows app to hang for hundreds of milliseconds) and most of the issues with periodic effects. The random button presses were caused by spending too much time handling ADC-interrupts and the stutters were caused by debug logging slowing down the responsiveness to USB-events - and a undocumented quirk in Windows' USB PID driver (what a surprise indeed :P) that needed a workaround.

I now also added some documentation about the wiring to the pages. A proper circuit diagram is still missing, but you should get the picture. The wiring posted by HackNFly is what should work. I've extensively play tested the adapter with IL2 game and the latest version shows no issues.

As for the lack of center spring when when joystick initially comes online - yes, it does that. I didn't dig deeper into it, but I think it is the initalization sequence I make (I sniffed out the MIDI-sequence from an actual game port version and used it). Anyway, the current situation helps me to see if the stick initialization to FFB-mode really worked or not when plugging it in. And when I launch FEdit or a game, it works as expected i.e. the auto-center-spring is diabled. So the issue is not having the modes reversed, but that the initial default mode is auto-center-disabled instead of how it works when FFP is connected to a real game port. You get the auto-center-spring on if you switch to and away from any application using FFB. I need to consider to change this in future - I think this is an easy one to change. Good input!

About the caps and FFP - use them if needed. My setup did not work if I put the caps in place, so I'm running without them fine. I have two FFP sticks and both behave the same. There might be differences on inherent capacitances in FFP itself compared to e.g. 3DPro. But anyway, take the pragmatic approach and use whatever works - but just be aware that you might need them or need to avoid them :)

To ffb.boy.30: FFConst has trouble with adapt-ffb-joy too, but in the form that FFConst refuses to recognize the stick as FFB device at all. There is something different that FFConst expects than FEdit or any of the games tried do. FEdit and the games work. The adapt-ffb-joy-project also has a C#-source code submitted by saldsj3 that you can use to test the effects too. He's made serious testing on the adapt-ffb-joy and helped to iron out several issues there.

To joeykork: I noticed too that all of the people claiming to have nailed the HID/PID FFB never posted any code out (except for a couple that implemented only a simple vibrate-effect on e.g. XBox-controller or some Logitech mouse). Didn't help me or anyone else that they only claimed to make it work but never shared the results. This was the reason I decided to go public with all the info and code I made.

And you are right, it is likely that the serial IForce and MIDI-protocols differs quite a bit on certain level. But I would not expect too much differences in the deeper content since there are certain things you need to send for FFB. Thus, it should be quite doable as soon as you figure out the serial on-the-wire-protocol.

And this the kind of project is exactly what was my secondary goal on making the FFB for FFP. And now that there are only minor issues in the FFP-support, I'm very tempted to refactor the code a bit more modular. The current structure already separates the conversion of FFB-signaling from USB to joystick into separate file and set of functions (ffb.c, ffb.h). Reading the joystick's positinal data tho is more integrated into the main functions/files and could be more seprated. Basically, you just remove the 3DPro*-files, modify the input report construction and rewrite the ffb.c - just like that :) Let me know when you get to do the first run on the subject!

As for someone asking on contacting me, send me a message here or pick on tloimu at the G...

It sure is nice to see some interest on the force feedback topic.

BTW: I made the adapt-ffb-joy a composite USB device so that it now has USB serial device too for debugging and configuration. This part is quite preliminary still but already now you can enable/disable effects using a regular terminal application on the joystick. The project pages have some plans for this written out, but any further ideas on how it could be used would be welcome.

Re: Reverse Engineering the Force Feedback Pro

Posted: Sun Aug 12, 2012 3:01 pm
by Poil
A short message just to say thanks ! I loved this joystick and you revival it

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed Sep 19, 2012 2:51 pm
by duduke
A quick question, since I'm running Teensy++2 (AT90USB1286 instead of ATMEGA32U4) do I need to compile my own HEX?

P.S. I've already tried the one on site, but I keep getting - "Unknown USB Device" errors.

Thanks.

Re: Reverse Engineering the Force Feedback Pro

Posted: Thu Sep 20, 2012 1:11 pm
by duduke
A bit of progress...
I've modified the makefile to compile for TEENSY++ 2 (at90usb1286) and it now compiles and loads.
When i'm connecting my ForceFeedbackPro, it is detected and all buttons/movements work (woohoo!).
But, I cannot get forcefeedback effects to run. (using either fedit.exe or ForceTest.exe).

Any ideas? Help? anyone? :)

Re: Reverse Engineering the Force Feedback Pro

Posted: Fri Oct 19, 2012 10:38 am
by gez
Hi,

I tried to build a adapt-ffb-joy according to the doc on google code, unfortunately the device does not work perfectly - there seem to be some serious jitter on the different axes and it looks like some buttons are triggered randomly. Have anyone experienced the same? When I inserted the device for the first time Windows (7x64) found drivers for a HID-compliant game controller but complained about lacking drivers for LUFA Joystick wFFB could that have something to do with it? I rewired everything to make sure that wasn't the problem.

Thanks in advance,
Gez

Re: Reverse Engineering the Force Feedback Pro

Posted: Sun Oct 21, 2012 3:31 am
by Poil
Hi,

It's normal, but in peripherals and printers control pannel, you'll find your joystick

Cu

Re: Reverse Engineering the Force Feedback Pro

Posted: Sun Oct 21, 2012 10:30 pm
by gez
Yeah, I do see it there, so at least that's normal. It's the settings panel I reach through there where I noticed the flickering of the axes, random button triggering and non-functional tophat - I assume that isn't normal? :lol: Are you also running r54 on Teensy 2.0?

Gez

Re: Reverse Engineering the Force Feedback Pro

Posted: Sun Oct 28, 2012 1:22 pm
by Poil
Yep

I had the same problem, it was a bad contact on my midi connector.

Best regards

Re: Reverse Engineering the Force Feedback Pro

Posted: Sat Nov 10, 2012 9:41 am
by TMSio
Hi to all,
I m new in this forum, i hear speaking about this project, and i want to try do to this.
I build the circuit, and i put inside teensy adaptffbjoy-r54.hex code.
If i connect all to my laptop (win 7 32bit) it work fine (just x and y axes inverted ... if i move my ffb to right the mouse move in left direction and the same if i move uo the mouse goes down).
if i connenct to my desktop (win 7 64 bit ultimate) i see in the devices Lufa Joystick wFFB with yellow"!"
(the same in windows 32 bit) but the joystick don t work... no mouse moviment and no force feedback.

I try with adapt-ffb-joy-proto1 and adapt-ffb-joy-proto2 code but no change.

Can someone hlp to me?

Thank you

Best regards

Emiliano

Sorry for my english :(

Re: Reverse Engineering the Force Feedback Pro

Posted: Sat Nov 10, 2012 10:42 pm
by Overkill211
For those interested, I've whipped up a PCB adapter board to plug the pin-type Teensy 2.0 board into.

Just something I really wanted to try building. I've missed my FFPro, ever since I "upgraded" to the FF2. The newer stick just never felt as well laid-out as the original. Some games really needed that 9th button, too.

Image

Built 99% to the published circuit diagram, with 1 extra connection... I hope to make it compatible with all the MS overdrive sticks, code-wise. I'll probably have to get past the "Hello World" tutorial, though. :roll:

Might save you some assembly headaches. I've tested all 5 that I have assembled (made 6, but one's mine, naturally) with my FFPro... all working.

Contact me if you're interested.

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue Nov 20, 2012 1:10 pm
by Poil
Why have you got 4 resistors and 3 capacitors ?

On http://adapt-ffb-joy.googlecode.com/fil ... ircuit.png we have only 3/2 oO

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue Nov 20, 2012 10:18 pm
by Overkill211
I added those to re-connect pin 13 on the DB-15 connector. These are connected to B6 on the Teensy. It has no effect on current operation, but I figured that if someone changed a bit of code, the adapter could support the non-FFB Sidewinder sticks that use Pin 13, instead of 11. If not, oh well... an additional few cents in components.

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed Jan 30, 2013 3:42 am
by malaki
does this one fit into a box like the 3dpvert?

Re: Reverse Engineering the Force Feedback Pro

Posted: Sun Feb 03, 2013 12:55 pm
by Overkill211
If you can find a small enough box to accommodate it, and don't mind that the mini-usb will be recessed, then probably.
I didn't really design for a box... sorry. Works perfectly on a slot-mount plate, or mounted directly to a case wall. I plan on case-mount, myself.

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed Feb 20, 2013 2:27 am
by sdecorme
Hi,
I've been reading this post , I've tried the descriptor given below it seem to work like a charm in W7 64bits.
I can receive som FFB effects on my device
I've just a problem with the RAM function calculate . how it works ? is someone look at the PID description o fthe USB ?
Thanks

Re: Reverse Engineering the Force Feedback Pro

Posted: Fri Mar 22, 2013 7:45 pm
by Overkill211
First board is safely in it's new home in the Netherlands. Just 4 left, now.

Re: Reverse Engineering the Force Feedback Pro

Posted: Sat Aug 17, 2013 7:12 pm
by osterac
Hi!
Just finished making my own adapter on my breadboard. I'm making it for a friend, and he's the one who has the Sidewinder. The only thing I have to test it on at this point is a Sidewinder 3D Pro Plus, which showed up as a joystick, but not a working one - not really surprising, it's not a universal adapter (yet?). Next week I will hopefully try it out at my friend's place on his Sidewinder Force Feedback Pro joystick.
He also has a Sidewinder force feedback wheel. If anyone is interested, I can probably borrow it from him and hook it up to a computer with a gameport to get diagnostic data or whatever. My experience in electronics isn't super-extensive, but I have a friend who owns a publishing company and at his business there is a lab with an o-scope I can probably use.

Thanks for all your work on this, guys. I had been wrestling with this problem on and off for a while, and this solution is much nicer - and the build went very smoothly, thanks to all the documentation and stuff on the google code site.
Thanks again.

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue Aug 20, 2013 2:56 am
by osterac
Hmm, things just got a little more complicated....
Image

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed Aug 28, 2013 6:27 am
by osterac
Just got the whole thing working last night. Very cool! It works beautifully. I still have the Sidewinder Force Feedback Wheel if anyone wants me to do tests on it, I don't know if there is still a future plan to add support for it.

Re: USB Converter for MS Sidewinder 3DPro, PP, and FFP

Posted: Wed Oct 23, 2013 9:10 pm
by Scanjo
Thanks so much Grendel for this project and the time you have spent on it.

I have a FFP which has been collecting dust for a long time now. I am not a Descent player and never have been but I DO like flight simulators, and I'm worthless trying to fly with the keyboard. It's going to be SO nice to fly again (provided the software runs under Win7...) Force feedback would be nice but I'll learn to deal. ;)

I have parts ordered and will post a pic when I have it together.

Thanks again,

Scott

Re: USB Converter for MS Sidewinder 3DPro, PP, and FFP

Posted: Sun Oct 27, 2013 11:55 pm
by Scanjo
Well the parts finally arrived and I got the soldering iron out. I decided to use the plans from this site to see if I could get the force feedback to work as well. They use your plans with a couple further mods and of course software to support the mods they made.

I have it together and functioning using the JOY.CPL to test it. I haven't installed a flight sim yet so I'm not sure of the FFB effects.

As promised, I've got some pics to post.

Image
Image
Image
Image
Image
Image

Re: Reverse Engineering the Force Feedback Pro

Posted: Tue Nov 05, 2013 6:29 pm
by BlueMoon
Hello everybody!

I recently found my old Sidewinder and as I am getting annoyed by my new joystick with ffb, I came across the adapt-joy-ffb topic.
So, I ordered 2 teensy´s and got to work.

When using my breadboard, everytime I connect the sidewinder with my windows 8 x64, it shows up as a LUFA Joystick wFFB. Good so far, except from the driver issue (Yellow exclamation mark). But whenever I launch a game, the controls work fine but I do not get any ffb. If I connect the sidewinder directly to a gameport on XP (old pc), the same game gives me some nice ffb.

I thought the problem would be the breadboard as I used quite long cables etc so I made a PCB. Soldered everything and got exactly the same problem... Everything working fine except the FFB (which is why I want to use this joystick so bad)

I did try this using windows 7 x64 AND win 7 x86 both same problem.

Anybody an idea about what is going wrong? I am really desperate!

Thanks in advance!

BlueMoon

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed Nov 06, 2013 1:20 pm
by osterac
BlueMoon, what game did you try? Also, there's a light on the teensy that should blink whenever force feedback effects are being sent to the joystick. Was it blinking?
To test force feedback I use this program:
Force Test
Check one of the boxes for an effect, and make sure your hand is on the joystick because the Sidewinder FFBP has a sensor in the handle and will not do any FFB effects unless that sensor is active.
I had the yellow exclamation too, it's saying there is no driver installed. No driver is actually needed.
The game I used as a test was Rollcage, there's a free demo for it here if you want. I'm on Win 8 x64 too BTW.

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed Nov 06, 2013 4:31 pm
by BlueMoon
Thanks for the reaction!

When I use the force program, if I click on an option to test its functionality, the led blinks for a sec but than stops and no FFB is occurring...
I guess this is not right? Any possibilities of wrong configuration? Shall I upload my schematics and some pictures of my PCB?

Re: Reverse Engineering the Force Feedback Pro

Posted: Wed Nov 06, 2013 5:17 pm
by osterac
With the test program, I think the LED did a similar thing for me too. My friend has the joystick right now so I can't check for sure. Check what the LED does during a game too. It could be (guessing here, I'm no expert) that the teensy is getting the signal from the PC to send FFB events, but the connection between pin 12 on the gameport and PD3 is faulty somehow. Maybe a loose wire or something. Go ahead and upload schematics and pics.

Re: Reverse Engineering the Force Feedback Pro

Posted: Thu Nov 07, 2013 1:36 am
by Duper
If you have it open, try reflowing your solder joints. May have been iffy to begin with and degraded with age.