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: Mamehooker - easy scripting and a possible bug  (Read 1990 times)

0 Members and 1 Guest are viewing this topic.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 822
  • Last login:July 02, 2025, 12:52:26 pm
Mamehooker - easy scripting and a possible bug
« 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:

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker - easy scripting and a possible bug
« Reply #1 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. 

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 822
  • Last login:July 02, 2025, 12:52:26 pm
Re: Mamehooker - easy scripting and a possible bug
« Reply #2 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!



Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker - easy scripting and a possible bug
« Reply #3 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.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 822
  • Last login:July 02, 2025, 12:52:26 pm
Re: Mamehooker - easy scripting and a possible bug
« Reply #4 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
« Last Edit: February 17, 2014, 06:17:33 am by baritonomarchetto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker - easy scripting and a possible bug
« Reply #5 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. 

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 822
  • Last login:July 02, 2025, 12:52:26 pm
Re: Mamehooker - easy scripting and a possible bug
« Reply #6 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?
« Last Edit: February 17, 2014, 06:30:13 am by baritonomarchetto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 03, 2025, 06:36:13 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker - easy scripting and a possible bug
« Reply #7 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. 

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 822
  • Last login:July 02, 2025, 12:52:26 pm
Re: Mamehooker - easy scripting and a possible bug
« Reply #8 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  ;)
« Last Edit: February 18, 2014, 02:46:25 am by baritonomarchetto »

Sky25es

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 173
  • Last login:July 03, 2025, 01:08:02 am
Re: Mamehooker - easy scripting and a possible bug
« Reply #9 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.  ;)



baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 822
  • Last login:July 02, 2025, 12:52:26 pm
Re: Mamehooker - easy scripting and a possible bug
« Reply #10 on: February 18, 2014, 10:16:34 am »
Thanks

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