Author Topic: What I've been working on (iq_132's work in progress)  (Read 722185 times)

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: What I've been working on (iq_132's work in progress)
« Reply #315 on: September 11, 2009, 12:54:56 AM »
So I got tired of using keyboard for Atomiswave games in Demul and bought a very nice Xbox 360 wired controller. This gives me a reason to screw around with xinput and with rumble. :)

Anywho, with some poking around, I found that you can use XInput.lib & XInput.h from the dxsdk. With a little more poking around, I found an intensely simple/easy ('cause I'm kinda dumb) way to implement it. 

Right now I'm implementing some nice routines to get this working in a more generic way. :)


Offline Huggybaby

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +2/-0
Re: What I've been working on (iq_132's work in progress)
« Reply #316 on: September 11, 2009, 01:18:35 AM »
I gave up on demul because I DON'T have a 360 controller. Maybe one day they will support all regular gamepads.

Quote
Right now I'm implementing some nice routines to get this working in a more generic way.
That sounds exciting! But what does it mean? Rumble in FBA? Will your routines support only 360 controllers? Will you be able to implement the simple left/right controls for gyruss I asked about some time ago?  :p

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: What I've been working on (iq_132's work in progress)
« Reply #317 on: September 11, 2009, 02:23:37 AM »
That sounds exciting! But what does it mean? Rumble in FBA? Will your routines support only 360 controllers?

Yeah. Rumble.  And for any controller that supports XInput. Though I may take a look and see what it would take to implement ff for dinput.


*edit*
I've added a couple of routines that
A. Read a text tile called "support\rumble\xxxxx.ini" (xxxxx being the rom name) and get addresses to watch for changes (addresses holding health info for example)
B. A routine to go through the addresses and watch them for changes.
  - This routine uses FBA's built-in cheat engine to get the data from the addresses
  - This routine also triggers the rumble and sets it to a timer (hard-coded to 1/2 second).

*edit 2*
Just added an option to the ini for "versus fight" which makes it so that player 2 will vibrate (at 25%) if player 1 is hit and vice versa. 

Anyway. Any suggestions for features to implement?
« Last Edit: September 11, 2009, 03:20:57 AM by iq_132 »


Offline isamu

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +2/-2
Re: What I've been working on (iq_132's work in progress)
« Reply #318 on: September 11, 2009, 03:41:04 AM »
does this mean we'll be able to use our Force Feedback steering wheels with driving games such as OutRun and Outrunners? Because that would be simply AWESOME! I could never get the FFB effects working with Final Burn FF(a very old build from some other dude).

What other driving games with FFB effects does FBA support?
GENTLEMEN: START YOUR ENGINES!!

Daytona USA is emulated for the PC.

*NOTHING more needs to be said*

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: What I've been working on (iq_132's work in progress)
« Reply #319 on: September 11, 2009, 04:01:00 AM »
does this mean we'll be able to use our Force Feedback steering wheels with driving games such as OutRun and Outrunners? Because that would be simply AWESOME! I could never get the FFB effects working with Final Burn FF(a very old build from some other dude).

What other driving games with FFB effects does FBA support?

Well, if I can wrap my head around the FFB stuff in DirectInput (dinput), sure.  Otherwise, you're pretty much stuck using Xbox360 steering wheels if you want vibration in driving games.

As for arcade games using any sort of FFB, I honstly have no idea. As of right now, I'm just having it check "health" addresses of games (kof2003, for example), and when the value for health decreases, it vibrates.
« Last Edit: September 11, 2009, 04:04:42 AM by iq_132 »


Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: What I've been working on (iq_132's work in progress)
« Reply #320 on: September 11, 2009, 03:21:26 PM »
Here's my current xinput rumble stuff if anyone wants to try it out.

Instructions are in "how to.txt" they're just for Mingw.  If anyone wants to get it going in VC, please post instructions (I'm lazy).

Also, if you run into any trouble, let me know. I haven't tested the "how to" at all.


Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: What I've been working on (iq_132's work in progress)
« Reply #321 on: September 11, 2009, 03:53:17 PM »
Small update --

instead of doing this:

Find this:

   CheatApply();

Add this AFTER:

   RumbleApply();

Do this:

Find this:

   CheatApply();

Add this BEFORE:

   RumbleApply();


This should allow rumble and cheats to coexist peacefully.
« Last Edit: September 11, 2009, 03:55:11 PM by iq_132 »


Offline Huggybaby

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +2/-0
Re: What I've been working on (iq_132's work in progress)
« Reply #322 on: September 11, 2009, 04:03:14 PM »
If someone would upload a precompiled version, it would help those who would test but not compile. Regardless, I see this as a SIGNIFICANT development in FBA!

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: What I've been working on (iq_132's work in progress)
« Reply #323 on: September 11, 2009, 10:09:44 PM »
If someone would upload a precompiled version, it would help those who would test but not compile. Regardless, I see this as a SIGNIFICANT development in FBA!

lol, it's not that big of a deal. :p

Anywho:
www.fbadev.info/iq_132/fbarmbl.rar

you can see the rumble config files for the few games I'm tried out in support/rumble/


Offline Huggybaby

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +2/-0
Re: What I've been working on (iq_132's work in progress)
« Reply #324 on: September 11, 2009, 10:57:50 PM »
Awesome, I'll let you know if it works with my Saitek pad. I might install my PS1 pad too, no rumble has ever worked on it although I think it's supposed to.

<edit>
Nope, no rumble. My DirectInput plugin is grayed out if that makes a difference, but it's grayed out in the regular FBA too.

Input settings:
Selected module:   DirectInput7 input
Interface settings: keyboard 0 System keyboard: Keyboard
                          mouse    0 System mouse: Mouse
                          joystick 0 Saitek P2500 Rumble Pad
« Last Edit: September 11, 2009, 11:48:31 PM by Huggybaby »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: What I've been working on (iq_132's work in progress)
« Reply #325 on: September 12, 2009, 01:22:41 AM »
I guess I hadn't mentioned that it's still only XInput, not DInput. You'll need a 360 controller for vibrations. :S


Offline Huggybaby

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +2/-0
Re: What I've been working on (iq_132's work in progress)
« Reply #326 on: September 12, 2009, 01:58:10 AM »
Damn, oh well. The 360 controller is excellent so maybe I'll get one for Christmas. I have three regular xbox controllers but of course none have USB plugs.

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: What I've been working on (iq_132's work in progress)
« Reply #327 on: September 12, 2009, 02:37:26 AM »
Like I said before though, I will see what I can do to add dinput rumble. :)  It's just going to take a little while (since dinput rumble takes more than 4 lines like xinput lol).


Offline kenshiro

  • Expert
  • *****
  • Posts: 145
  • Karma: +21/-0
Re: What I've been working on (iq_132's work in progress)
« Reply #328 on: September 12, 2009, 06:55:38 AM »
Nice work iq, i'm curious to see your code  :biggrin:

Offline KaNyErO

  • Member
  • ***
  • Posts: 142
  • Karma: +4/-0
Re: What I've been working on (iq_132's work in progress)
« Reply #329 on: September 12, 2009, 05:27:16 PM »
I guess I hadn't mentioned that it's still only XInput, not DInput. You'll need a 360 controller for vibrations. :S

Or something like this:

http://kenxiao.blog.sohu.com/108300903.html