The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: baritonomarchetto on February 17, 2014, 03:29:39 am

Title: Mamehooker - easy scripting and a possible bug
Post by: baritonomarchetto on February 17, 2014, 03:29:39 am
Hi,

I have just posted this things in the "Driving & Racing Cabs" subforum but i had no luck getting an answer. I was definitely OT there being something software related, so let me write here too  ;D

recently i had success hooking a "big" DC rumble motor to my racing cab. Toying with mamehooker i noticed a couple of things:

- Xinput is actually able to tune the motors strenght

- Direct Input is not. Writing "ffa 1 %s% -1 0 0 10000" is equivalent to "ffa 1 %s% -1 0 0 0"

Trying to face weak rumbling in some games, i started toying with scripts (i wanted to slow down the on/off output switching frequency to increase the strenght of the motor vibration) and noticed that

ffa 1 0 -1 0 0 10000|ffa 1 1 -1 0 0 10000

is not equivalent to

ffa 1 %s% -1 0 0 10000

Not sure if they should be, really... anyone can confirm we are facing a bug here, or there's some assumption of mine wrong?

thanks!  :afro:
Title: Re: Mamehooker - easy scripting and a possible bug
Post by: Howard_Casto on February 17, 2014, 03:43:55 am
Remember I haven't released a new version of mamehooker in some time.  This issue has been fixed in my private build BUT.  Gamepads are not true force-feedback devices.  They work on force-feedback yes, but don't have a x/y axis value.  You have to tweak other aspects of the force feedback effect to control individual motor strength. 

Fortunately the next build allows you to import effect files and control them however you like. 
Title: Re: Mamehooker - easy scripting and a possible bug
Post by: baritonomarchetto on February 17, 2014, 04:36:18 am
Uh, curious to see what these effects are! Do you have a release date for the new version?

Gamepads are not true force feedbck, i know, but i couldn't see why the strenght was effective in Xinput and not in Dinput. Is this the thing the new version will fix? Having a fine tune of the strenght makes a big difference in the game experience!  ;)

Are

ffa 1 0 -1 0 0 10000|ffa 1 1 -1 0 0 10000

and

ffa 1 %s% -1 0 0 10000

equivalent or am i missing something here (or this was the thing you have actually fixed?).

Thanks for the help!


Title: Re: Mamehooker - easy scripting and a possible bug
Post by: Howard_Casto on February 17, 2014, 06:01:38 am
They are, so long as your script is coded properly.

You aren't adjusting strength btw, rather it's the constant force direction.  Since rumble motors don't have direction... well there you go.
Title: Re: Mamehooker - easy scripting and a possible bug
Post by: baritonomarchetto on February 17, 2014, 06:07:53 am
It was the first script "i wrote", just to see if i got the thing right, but they are not acting the same way. It's all there, should i define some other file?

I know that it doesn't change the strenght: the strenght parameter is the "10000" on the right (or is this parameter the force direction you said?)

Anyhow, if you test for "on" state and set the strenght to "zero"

ffa 1 1 -1 0 0 0

the motor is triggered on and you have no differencies in strenght even changing the value (from zero to the max 10000)... it should make a difference, right? It actually does with (the damn) xinput   :hissy: :D
Title: Re: Mamehooker - easy scripting and a possible bug
Post by: Howard_Casto on February 17, 2014, 06:20:18 am
With all due respect I'm not responding anymore.  I've already explained twice so I'm sorry if you aren't getting it.  Why do you keep bringing up Xinput?  Xinput has nothing to do with direct input and operates in a completely different manner with completely different variables. 
Title: Re: Mamehooker - easy scripting and a possible bug
Post by: baritonomarchetto on February 17, 2014, 06:27:33 am
Sorry Howard, I was not intended to annoy you, only trying to understand something obvious for you...

You wrote (readme.txt)

DirectX Force Feedback Adv   
ffa joystick# state duration x y strength   

So for me it was the rumble strenght  :)

I really appreciate your work, only trying to get the best from it   :notworthy: :D

Quote
You have to tweak other aspects of the force feedback effect to control individual motor strength

any example?
Title: Re: Mamehooker - easy scripting and a possible bug
Post by: Howard_Casto on February 17, 2014, 02:53:38 pm
Maybe I should explain it this way.  You know the old flight sticks with full force feedback that will move to various x/y coordinates on their own?  That is what that function was intended for.  Although it'll rumble a gamepad, it wasn't designed to control individual motors. 

Find a copy of microsoft's ffedit and play around with it and you'll see what I mean. 
Title: Re: Mamehooker - easy scripting and a possible bug
Post by: baritonomarchetto on February 18, 2014, 02:44:11 am
Ah, ok, got it!

I preferred to go with Direct Input because it makes Model 2, Cannonball (one of the next releases will port the upright effect) and possibly other racing games (Crazy Taxi or some patched OutrunC2C) rumble .

Not sure if it will be possible, but take into consideration the introduction of a parameter for the vibration strenght for the next release (probably is not or you would have placed that before, right?).

Thanks for the help  ;)
Title: Re: Mamehooker - easy scripting and a possible bug
Post by: Sky25es on February 18, 2014, 09:45:40 am
Look, what Howard tries to explain is that such an parameter can't be applied in the current state without tricks. A force feedback device does exactly what its name says: it applies force to a direction. I.e: a steering Wheel where you turn to the left and suddenly it applies force and turns automatically to the right. Whereas a rumble device is just a vibration (rumble) motor. As the rotor spins, the counter weight is 'thrown' in a circular motion causing the entire mechanism to shake. So, basically the rumble effect depends of the speed that the rotor spins. If the output system assumes that you have a force feedback device and tries to apply the correct amount of force to a direction but you have instead just a spinning (vibrating) motor, this last will work cause the current still flows but that's all.
As Howard said, let's wait for the next release of Mamehooker that allows to import and control effect files.  ;)


Title: Re: Mamehooker - easy scripting and a possible bug
Post by: baritonomarchetto on February 18, 2014, 10:16:34 am
Thanks

for sure we will have fun with the new release  :D