Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mystery of the XBCD FF configuration finally solved. (Classic Xbox controllers)  (Read 3272 times)

0 Members and 1 Guest are viewing this topic.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I'm not really sure if this should go in the software forum or this one, but since I think it's more applicable here. 

Years ago when I first added rudimentary support for FF in mamehooker the only FF device I had was a xbox controller (not 360, regular old xbox) running in windows with XBCD drivers.  I was disappointed to find that I couldn't control the motors independently of each other.  I'm not a driver writer, maybe they had a good reason for doing it the way they did, but instead of having each rumble motor as a separate FF axis, they merged the two.  Not only that, but they ignore the direction variable, so what could normally be solved via just setting the direction more left or more right doesn't work. 

Anyway now that mamehooker has all kinds of fancy FF functions and I know a bit more about it, here is what I discovered. 

From testing absolutely nothing allows you to control each motor individually, except for the ramp effect and even then only if used in a way that absolutely nobody uses the ramp effect.  You have to set the time to infinite (which completely defeats the purpose, as it'll stop "ramping up" pretty quickly and just top out) and set both the start and end values of the ramp to the same value. In other words don't ramp the ramp effect. ;)  A positive set of values (1 to 10000) control the right (soft) motor and a negative set of values (-1 to -10000) control the left.  If you want to control both motors at the same time, load a two layered effect file with two ramps... use -10000 as a multiplier on one and 10000 on the other. 

Yes it's THAT convoluted to control them.  So convoluted that in a future mamehooker version I'll probably write a custom function just for those.  That being said, if you have a specific purpose and want a cheap interface they do fit the bill.  Classic xbox controllers can be had new for as little as 6 dollars, less if you buy them used.

I'll eventually write a tutorial for mamehooker but in the mean time I might release a sample effect file and tweak file here.

I know that this isn't interesting to most people, but if you've ever played with the XBCD drivers (yes even the ones for 360 controllers) you've likely be confused with the results and I thought I would share.   

*edit... some errors corrected*
« Last Edit: April 16, 2014, 02:43:58 pm by Howard_Casto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I doubt many people are interested in this, but I added a function into mamehooker to handle these gamepads.  It pretty much works just like xinput rumble does now.  Of course that only helps you with arcade games, for pc games you are on your own. 

I'm also going to add the function to Outrun 2 FXT.  I figure it would be a good, cheap solution, for seat mounted rumblers/butt thumpers. 

twistedsymphony

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 584
  • Last login:February 03, 2024, 11:13:51 pm
  • Play stupid games... win stupid prizes.
    • solid-orange.com
    • CollectorsEdition.org
Thanks for sharing this....

I knew absolutely NOTHING about how FF and rumble effects in games worked until I started looking into it a few months ago and the more I learn the more it seems like none of the devs and engineers who build these systems had any idea of the "best way" to do it so everyone just kind of does their own thing  :D

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Yeah I mean this with the upmost respect to any developers out there but I think the reason Microsoft severely dumbed down FF with Xinput is because they realized that 90% of the hardware manufacturers out there as well as a decent amount of software developers were too confused to properly implement true force-feedback.  It's not entirely their fault though.  I've scoured through the MSDN website and although it explains various effects and variables, it doesn't explain which effects are best used on which devices or situations, how to properly layer effects, ect.  I've been messing with it on and off for a couple of years now and I'm still not 100% clear on some things. 

Actually I need to update my explanation a bit though.  DirectX uses 10,000 as a multiplier, not 65535.  I was still in Xinput mode.  ;)

I'm actually curious as to why M$ decided, in their infinite wisdom, to update the value to 65535.  I mean yeah, I'm a programmer, I know that 65535 is the largest number you can fit in 2 bytes, BUT hardware just isn't that sensitive.  Most outputs are based on avr-ish  chips and they have a logical limit of around 255 steps, really not that much, but just in theory mind you.  So even the 10,000 steps were overkill.  I'm wondering if the extra bytes have to do with the ill-fated 360 FF wheel?

twistedsymphony

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 584
  • Last login:February 03, 2024, 11:13:51 pm
  • Play stupid games... win stupid prizes.
    • solid-orange.com
    • CollectorsEdition.org
Yeah I mean this with the upmost respect to any developers out there but I think the reason Microsoft severely dumbed down FF with Xinput is because they realized that 90% of the hardware manufacturers out there as well as a decent amount of software developers were too confused to properly implement true force-feedback.  It's not entirely their fault though.  I've scoured through the MSDN website and although it explains various effects and variables, it doesn't explain which effects are best used on which devices or situations, how to properly layer effects, ect.  I've been messing with it on and off for a couple of years now and I'm still not 100% clear on some things. 

Actually I need to update my explanation a bit though.  DirectX uses 10,000 as a multiplier, not 65535.  I was still in Xinput mode.  ;)

I'm actually curious as to why M$ decided, in their infinite wisdom, to update the value to 65535.  I mean yeah, I'm a programmer, I know that 65535 is the largest number you can fit in 2 bytes, BUT hardware just isn't that sensitive.  Most outputs are based on avr-ish  chips and they have a logical limit of around 255 steps, really not that much, but just in theory mind you.  So even the 10,000 steps were overkill.  I'm wondering if the extra bytes have to do with the ill-fated 360 FF wheel?

yeah 255 is more than enough. heck the "resolution" of the HAPP FF PCB is just 4 bits + direction and I don't think I've ever played one of those games and felt the effects were lacking in terms of granularity.

--------

What's special about the 360 FF Wheel? I actually have one if you want me to run any tests or let you borrow it or whatever. I received it as a gift and I only used it a few times, mostly because I really never had a proper place to set it up in my TV room.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Nothing about it is special other than the fact that M$ decided not to support FF for it on the PC and basically doomed the wheel from ever being successful.  There are a few high-end racing games that support the thing on the pc, but they never released how they did it. 

It wouldn't be worth it at this point.  The wheel isn't all that great and now they go for 200 bucks on ebay. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Heh... well just when I thought I was making some leeway with this.....

My controller has decided to stop working.  Even the official Fedit.exe is complaining about not being able to disable the center spring and when I try to run FF effects it says it can't create the effect.  This is an official xbox controller mind you, not a third party one.  I don't turn my pc off, so I'm not sure what happened.