Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

[Enhancement] Use full virtual DS4 output report when ViGEmBus implements it #2213

Closed
Ryochan7 opened this issue Jun 9, 2021 · 15 comments
Closed

Comments

@Ryochan7
Copy link
Owner

Ryochan7 commented Jun 9, 2021

As documented in another issue, the current virtual DS4 feedback handler cannot work properly due to a lack of information reported by ViGEmBus. The key issue is that ViGEmBus does not include the features byte from the output report so, depending on the game, it might not be possible to tell a rumble event from a lightbar color change event. Two common games that I use to test DS4 support are The Witcher 3 and Streets of Rage 4. Each game handles rumble and lightbar changes very differently. The current way DS4Windows handles the data only works okay on my end when playing The Witcher 3.

The next version of ViGEmBus is slated to include a new feedback handler that will give access to the full raw virtual DS4 output report as a byte array. It would be easy enough to map that byte array to a struct and grab the features byte from it. Based on my testing, having access to that features byte would be enough to work out the issues with the DS4 feedback handler used in DS4Windows.

#1389 (comment)

@Ryochan7
Copy link
Owner Author

Ryochan7 commented Aug 7, 2021

Looks like this probably won't happen this year. It is too bad that I have no means of making this change happen sooner.

@tamodolo
Copy link

tamodolo commented Aug 6, 2022

Just receave update by mail that Nefarius started working on this. This is very nice as it'll alow proper virtual DS4 and proper rumble support for virtual 360 when using DS4.

@Writingnon
Copy link

Oh boy, so this is the problem that's been plaguing my Tales of Berseria playthrough. It's either infinite rumble or the rumble just stops playing entirely.

It's a shame the game doesn't work with Steam's DirectInput like Tales of Arise.

@Kanuan
Copy link

Kanuan commented Aug 6, 2022

This is very nice as it'll alow proper virtual DS4 and proper rumble support for virtual 360 when using DS4.

Rumble functions correctly when a virtual Xbox 360 is being used with any controller. The issue mentioned here only affects the DS4 emulation regardless of which type of real controller is being used

@Writingnon
Copy link

Writingnon commented Aug 6, 2022

This is very nice as it'll alow proper virtual DS4 and proper rumble support for virtual 360 when using DS4.

Rumble functions correctly when a virtual Xbox 360 is being used with any controller. The issue mentioned here only affects the DS4 emulation regardless of which type of real controller is being used

No, I still have the problem with a real ds4 controller emulating Xbox's controller

@tamodolo
Copy link

tamodolo commented Aug 6, 2022

This is very nice as it'll alow proper virtual DS4 and proper rumble support for virtual 360 when using DS4.

Rumble functions correctly when a virtual Xbox 360 is being used with any controller. The issue mentioned here only affects the DS4 emulation regardless of which type of real controller is being used

No... the missing bits interfere with rumble. @Ryochan7 commented the reason here: #2439 (comment)

I don't understand how this can be messy when a real DS4 is used to emulate a 360 (as I myself freezed my version in the last working DS4Win with rumble and don't really notice problems... I miss the step rumble that PS games comonly have but not beying represented in DS4 at all.) but I can speculate that the bits coming from real hardware is also beying ignored so DS4win can't properly comunicate with it to make acurate rumble.

@Kanuan
Copy link

Kanuan commented Aug 8, 2022

@Ryochan7 There is a beta release of the ViGEmBus that allows applications to get the full Output Report of the Virtual DS4.


I don't understand how this can be messy when a real DS4 is used to emulate a 360
but I can speculate that the bits coming from real hardware is also beying ignored

This is not what is happening. The issue happens only when emulating a DS4 controller. This is the flow:

Game <-1-> ViGEm's DS4 <-2-> DS4Windows <-3-> Real Controller

DS4W has no troubles communicating with the controller in Link "3". The rumble issue happens in "Link 2" and occurs more or less in this order:

  1. The game informs the ViGEmBus' DS4 controller the following info (kinda): (SET LED Color to RED / Do NOT SET Rumble to 50%)
  2. ViGEmBus receives this info, but does not repass any SET or DO NOT SET part of the info to DS4Windows
  3. DS4Windows receives (LED Color to RED / Rumble to 50%). Even though rumble is in 50% in the data instruction, DS4W does not know that the game didn't want rumble to actually be set
  4. Without the missing pieces of info, DS4W may incorrectly set the Lightbar/rumble, which may cause the infinite rumble issue

This issue does not happen when ViGEm's Xbox 360 controller is used because the vigembus correctly passes the relevant data around.

@Writingnon
Copy link

How do you switch to ViGEm's Xbox 360 controller? Do you just have to have an Xbox 360 controller?

@tamodolo
Copy link

tamodolo commented Aug 8, 2022

This is not what is happening. The issue happens only when emulating a DS4 controller. This is the flow:

Game <-1-> ViGEm's DS4 <-2-> DS4Windows <-3-> Real Controller

DS4W has no troubles communicating with the controller in Link "3". The rumble issue happens in "Link 2" and occurs more or less in this order:

  1. The game informs the ViGEmBus' DS4 controller the following info (kinda): (SET LED Color to RED / Do NOT SET Rumble to 50%)
  2. ViGEmBus receives this info, but does not repass any SET or DO NOT SET part of the info to DS4Windows
  3. DS4Windows receives (LED Color to RED / Rumble to 50%). Even though rumble is in 50% in the data instruction, DS4W does not know that the game didn't want rumble to actually be set
  4. Without the missing pieces of info, DS4W may incorrectly set the Lightbar/rumble, which may cause the infinite rumble issue

This issue does not happen when ViGEm's Xbox 360 controller is used because the vigembus correctly passes the relevant data around.

Hum... What is the reason that causes rumble problems when 360 mode is used then? The issue #2439 clearly mention that @Ryochan7 is waiting for this to be implemented to actually fix rumble as a whole.

@tamodolo
Copy link

tamodolo commented Aug 8, 2022

How do you switch to ViGEm's Xbox 360 controller? Do you just have to have an Xbox 360 controller?

The emulated 360 mode is the default. The options can be changed going to Profiles tab, then select the one you want to use and click Edit. In the new windows, click in the Other tab (from the group on the right). It's the last option. This is the mode that the game will see regardless the gamepad you're actualy using.

I never change this to DS4 because the present issue is unresolved. I want to test this more deeply as I remember PS1 and PS2 games doing fine things with rumble like different strengh for different feedbacks (that was really cool at the time). I don't remember any PC game doing that btw...

@nefarius
Copy link

nefarius commented Aug 8, 2022

The issue #2439 clearly mention that @Ryochan7 is waiting for this to be implemented to actually fix rumble as a whole.

Which it is now 😉

@Writingnon
Copy link

How do you switch to ViGEm's Xbox 360 controller? Do you just have to have an Xbox 360 controller?

The emulated 360 mode is the default. The options can be changed going to Profiles tab, then select the one you want to use and click Edit. In the new windows, click in the Other tab (from the group on the right). It's the last option. This is the mode that the game will see regardless the gamepad you're actualy using.

I never change this to DS4 because the present issue is unresolved. I want to test this more deeply as I remember PS1 and PS2 games doing fine things with rumble like different strengh for different feedbacks (that was really cool at the time). I don't remember any PC game doing that btw...

No, even with that setting, my rumble still doesn't work properly. It either goes into infinite for a bit before disconnecting and reconnecting the controller or the rumble doesn't appear at all.

@tamodolo
Copy link

tamodolo commented Aug 8, 2022

The issue #2439 clearly mention that @Ryochan7 is waiting for this to be implemented to actually fix rumble as a whole.

Which it is now 😉

This is really wonderful!

How do you switch to ViGEm's Xbox 360 controller? Do you just have to have an Xbox 360 controller?

The emulated 360 mode is the default. The options can be changed going to Profiles tab, then select the one you want to use and click Edit. In the new windows, click in the Other tab (from the group on the right). It's the last option. This is the mode that the game will see regardless the gamepad you're actualy using.
I never change this to DS4 because the present issue is unresolved. I want to test this more deeply as I remember PS1 and PS2 games doing fine things with rumble like different strengh for different feedbacks (that was really cool at the time). I don't remember any PC game doing that btw...

No, even with that setting, my rumble still doesn't work properly. It either goes into infinite for a bit before disconnecting and reconnecting the controller or the rumble doesn't appear at all.

It seems there is more to it than meets the eyes. I'm still using 3.0.10 without any problems with rumble. But I confess that I'm not playing as much I'd like in recent years...

Now we wait for @Ryochan7 and @mika-n to implement a solution when they have time for it. I'll gladly serve as guinea pig for them if they release a test version. This and write a wiki page with new info is the best I can help right now.

@Yohoki
Copy link

Yohoki commented Aug 8, 2022

To be fair, a lot of games handled the rumble differently. So fixes for one game don't work in others. It's entirely possible that you both are experiencing different issues because your games are working with the rumble differently.

For now, it's best to just not use rumble and wait for an update for the newer version of ViGEmBus. Might be a good idea to give the devs some space to work on it. Great news that it's been fixed in ViGEm, though. It's a major fix that Ryochan's been waiting for and it was causing a lot of issues.

@Ryochan7
Copy link
Owner Author

Ryochan7 commented Nov 10, 2023

Never got around to play through Witcher 3. That was the main game where this feature would have been relevant. Only got to test and confirm that the newer API worked.

With how things are now, this whole drama was a waste of time. People creating mountains out of molehills.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants