Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing FFB in Grand Prix 4 #51

Closed
Tobe95 opened this issue Mar 27, 2023 · 4 comments
Closed

Missing FFB in Grand Prix 4 #51

Tobe95 opened this issue Mar 27, 2023 · 4 comments

Comments

@Tobe95
Copy link

Tobe95 commented Mar 27, 2023

Hi! I've just stumbled across this project after searching for a way to enable gamepad vibration in some older racing games for a while now.
I am currently trying to get FFB to function for Grand Prix 4 (2002) which has had its respective option in the game's settings greyed out by default.

I am using a kind of unusual setup, running the game through Proton on Steam Deck/Linux which is working fine though. Steam Deck uses XInput and is usually detected as an ordinary xbox360 or xboxone controller in more modern games with working pad vibration etc.

Now I've managed to get Xidi to work in combination with dinputto8, and the FFB setting is now actually selectable in the game's options, however there is no vibration whatsoever when starting a race.
I've created a Xidi.ini file according to the documentation and just tried playing around with the axis parameters for the left and right motor but unfortunately to no avail...

I've attached a log file below, any help would be appreciated!

Xidi_DInput8_GP4.exe_328.log

@samuelgr
Copy link
Owner

Could you please try with this configuration file and post another log:

[Workarounds]
ActiveVirtualControllerMask = 0x01

The game is trying to interface with the second virtual controller in a way that is incorrect. (0x80070057 means DIERR_INVALIDPARAM which is to say Xidi believes the application is doing something wrong.)

[03/27/2023 13:13:11] [I] Created virtual controller object with identifier 2.
[03/27/2023 13:13:11] [I] Invoked Xidi::VirtualDirectInputDevice<0>::GetCapabilities() on Xidi virtual controller 2, result = 0x00000000.
...
[03/27/2023 13:13:43] [I] Invoked Xidi::VirtualDirectInputDevice<0>::GetDeviceState() on Xidi virtual controller 2, result = 0x80070057.
[03/27/2023 13:13:43] [W] Invoked Xidi::VirtualDirectInputDevice<0>::Acquire() on Xidi virtual controller 2, result = 0x80070057.
[03/27/2023 13:13:43] [I] Invoked Xidi::VirtualDirectInputDevice<0>::GetDeviceState() on Xidi virtual controller 2, result = 0x80070057.
[03/27/2023 13:13:43] [W] Invoked Xidi::VirtualDirectInputDevice<0>::Acquire() on Xidi virtual controller 2, result = 0x80070057.
[03/27/2023 13:13:43] [I] Invoked Xidi::VirtualDirectInputDevice<0>::GetDeviceState() on Xidi virtual controller 2, result = 0x80070057.
[03/27/2023 13:13:43] [W] Invoked Xidi::VirtualDirectInputDevice<0>::Acquire() on Xidi virtual controller 2, result = 0x80070057.

I also notice that the game is trying to set a property that Xidi doesn't currently support. I should be able to make a development build that supports this property, and we can see if that helps.

[03/27/2023 13:13:11] [W] Skipped property header validation because the property DIPROP_CALIBRATIONMODE is not supported.
[03/27/2023 13:13:11] [I] Invoked function Xidi::VirtualDirectInputDevice<0>::SetProperty() on Xidi virtual controller 1, result = 0x80004001, property = DIPROP_CALIBRATIONMODE.

@Tobe95
Copy link
Author

Tobe95 commented Apr 1, 2023

Thanks for the reply!

Unfortunately there's still no noticeable rumble/FFB effect in-game. The error 0x80070057 seems to be gone though with the updated ini.

As far as I remember the FFB in Grand Prix 4 is pretty rudimentary. When playing with a wheel there's a self-align force to center steering and the wheel will pull left automatically when giving to much throttle and hence spin the car.

I also notice that the game is trying to set a property that Xidi doesn't currently support. I should be able to make a development build that supports this property, and we can see if that helps.

Having controller feedback when the car is about to spin would be cool, provided a development build is not too much of a hassle and might solve the issue. Not sure how many other games would profit from this.

I've attached the new log below:
Xidi_DInput8_GP4.exe_324.log

Btw, thanks to Xidi I actually have working controller rumble in Need for Speed Underground 2!

@samuelgr
Copy link
Owner

Please give this development build a try. I added support for the missing property.

Xidi-v4.1.2-dev.20.0+41885887.zip

By the way, do you know what the expected force feedback effects are for a standard gamepad controller (not a wheel)?

@Tobe95
Copy link
Author

Tobe95 commented Apr 24, 2023

It's actually working now, thank you very much! :D

To answer your question, I've never played GP4 with a gamepad to be honest, the game actually lets you choose from a list of input methods in the controls section.
A lot of modern racing games often apply unwanted assists like speed sensitivity when playing with a gamepad, so when setting up controls for the first time, I went ahead and selected "steering wheel" out of habit I suppose. It was an oversight on my part...

That being said, I've changed the input method to "gamepad" and the rumble feels very similar (if not the same) to what the steering wheel option does.
For "wheel" controls there was a funny side effect of almost constant rumble initially though, considering a real FFB wheel would provide a center-force and/or friction as soon as being turned to either side. This feature can be disabled however and leaves you with proper feedback when running over a kerb or going off-track now.

One thing I noticed switching from Xidi 4.1.1 to this development build was that I had to recalibrate all input axis in the controls menu of GP4, otherwise input would be completely messed up meaning the car would steer to one side and go full throttle without any input whatsoever. I'm not sure if the game is detecting the new build as a new controller for some reason but I think something similar happened already prior to me using Xidi. The game is quite picky about input devices and axis by default.

Closing this as solved :)

@Tobe95 Tobe95 closed this as completed Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants