• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 170 171 172 173 174 ... 1132 Next »

DInput Rumble causes slowdown
View New Posts | View Today's Posts

Pages (2): « Previous 1 2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
DInput Rumble causes slowdown
11-03-2017, 07:23 AM
#11
MayImilae Offline
Princess of Optimism
**********
Administrators
Posts: 4,190
Threads: 112
Joined: Mar 2011
If you or DarkStalker can bisect it to the revision that causes the issue I'll make sure it's forwarded to the right person!
[Image: RPvlSEt.png]
Windows 10 x64 | Core i9-9900k | NVIDIA GeForce RTX 3090 EVGA FTW3 Ultra| 32GB DDR4-3000 | Asus Xonar Essence STX on Logitech Z-2300 | Logitech G903 Hero
MacBook Pro 13in mid-2018 with Touch Bar | macOS 10.15 | Core i7-8559U @ 4.5ghz | Intel Iris Plus Graphics 655 | 16GB 2133MHz LPDDR3
Find
Reply
11-03-2017, 09:04 AM
#12
DarkStalker Offline
Junior Member
**
Posts: 12
Threads: 2
Joined: Oct 2017
On 5739 it already has this problem.
idk exactly in which revision it started, but on Stable version this rumble problem really don't happen.

I will search and see if I found the exact version where it starts.
Find
Reply
11-03-2017, 09:13 AM
#13
AnyOldName3 Offline
First Random post over 9000
*******
Posts: 3,490
Threads: 1
Joined: Feb 2012
Make sure to bisect revisions, as it should massively reduce the amount of time testing takes. You can use the Dolphin Bisection Tool to help.
OS: Windows 10 64 bit Professional
CPU: Intel i5 4670K @3.4GHz... for now @4.6GHz with a quick and dirty (yet stable) OC. May get faster in a bit before the end of time.
RAM: 16GB (Down from 24 GB after some was given to siblings)
GPU: Radeon Vega 56
Find
Reply
11-03-2017, 10:04 AM
#14
DarkStalker Offline
Junior Member
**
Posts: 12
Threads: 2
Joined: Oct 2017
Found it doing my Ikaruga test reported here!

Problem starts on version 5522.

Version 5509 doesn't slowdown the Dolphin while it rumbles.
Also interesting thing is that until this version the Rumble is weaker (easily to notice it on Ikaruga presentation scene).
@5522 it is stronger but also introduces the problem I was reporting on this post.

Sry, but I don't know what is this bisection thing. Can you do it for me?

Anything can be done about this rumble problem with DInput?

Thx all.
Find
Reply
11-03-2017, 10:31 AM
#15
AnyOldName3 Offline
First Random post over 9000
*******
Posts: 3,490
Threads: 1
Joined: Feb 2012
Bisection is where when you have a known working revision and a known broken revision you test the revision in between to half the range you're looking at instead of having to test every build. If you've found the change without it (or without knowing that it had a name) then that's fine. It's something that we recommend quite frequently because lots of users think they have to waste a lot of time checking thousands of builds when in reality ten to fourteen is usually enough.
OS: Windows 10 64 bit Professional
CPU: Intel i5 4670K @3.4GHz... for now @4.6GHz with a quick and dirty (yet stable) OC. May get faster in a bit before the end of time.
RAM: 16GB (Down from 24 GB after some was given to siblings)
GPU: Radeon Vega 56
Find
Reply
11-03-2017, 10:40 AM (This post was last modified: 11-03-2017, 10:40 AM by DarkStalker.)
#16
DarkStalker Offline
Junior Member
**
Posts: 12
Threads: 2
Joined: Oct 2017
I used like an Binary Search to found it. :-)


Hope anything could be done about this issue.
Thx for the support.
Find
Reply
11-03-2017, 11:35 AM
#17
JMC47 Offline
Content Producer
*******
Content Creators (Moderators)
Posts: 6,471
Threads: 28
Joined: Feb 2013
Isn't this an issue with certain drivers? I thought we determined in the past this bug was outside of Dolphin?
Find
Reply
11-06-2017, 12:47 PM (This post was last modified: 11-06-2017, 02:00 PM by ulao.)
#18
ulao Offline
Above and Beyond
*******
Posts: 1,029
Threads: 79
Joined: May 2009
Ok I did have a chance to poll a few logs. Looks like my assumption was right. Someone had the notion that spamming the FFB engine was a good thing. Not only that but they did so at one frame before the usb polling. That is twice the "wrong" thing to do.

If you look at the screenshot you will see that the usb poll, in this case (and normally the case) is every 8 ms. You will also see the Force FB occurs at the same interval. Also just before the usb poll. 

1) Sending a control or out transfer just before you poll for controller data if not good practice. After would be preferred. 
2) Sending rumble (ffb) data at a rate of 8ms is not going to gain you anything. 

Once you give the GC controller the signal to turn on, process the command, and start up the motor, you are looking at somewhere around 120ms (slow in other cases like PC USB game pads). For the motor to complete once cycle could be another 10 ms.  This is all conjecture as I can not find the information online but I promises you it is not less then 8ms. 

The reason the issue does not occur in 5.0 was not clear at first but after a bit of experimenting I see it is because the rumble is not as frequent as the beta version. So this is not really a bug but an enhancement gone wrong. However this enhancement is showing a bug that has been here for a long time. Hard to really call it a bug, but IMO just bad practice. 

Two solutions I would suggest. 

One, simply put the rumble after the usb poll event. 
or
Two, rumble less often. 

The only part I can not explain: Why the engine slows down? It does not seem to have anything to do with the adapter in question but it also is only Direct X HID based controllers. As far as the adapter is concerned the spamming of FFB is harmless. However If someone would implement my second solution, the problem would be much lessened. Though I feel this is only a band-aid to the slow down effect. 


Anyways, this is as much help as I can be. To reproduce the effect just spam the FFB direct X engine and you will see the result. You do not need the Bliss-Box adapter, this is apparently irreverent. X input and driver based adapters may not have the problem. I think its is the PID interface that HID uses that is choking dolphin.  


One extra thing I noticed was that if I send NAK instead of ACK for the USB output transfer the game skipping is greater. This makes sense of course because a NAK tells the host to hold off. It would seem that the FFB request is waiting for ACK. On any usb 1.1 you are looking at 8ms per poll and that will cause this effect. This is all mild guessing on my part but I would think this should be put in another processor thread? Force Feedback should not halt the code and wait for a response?

Also the rumble in this game is sending a string like : turn on rumble, turn on rumble, turn on rumble, turn on rumble, turn on rumble, turn on rumble, .....turn [b]off[b] rumble, I'm guessing this is for support odd ball controllers? Why not turn on rumble, ................................turn [b]off[b] rumble, ? - just an observation.


Attached Files Thumbnail(s)
   
[Image: newLogo_white_small.png]

main page
Working controllers


[url=http://spreadsheets.google.com/pub?key=tGD-U_eW1Rc7rNyqkpgJuIg&output=html][/url]
Find
Reply
11-07-2017, 10:49 AM (This post was last modified: 11-08-2017, 03:16 AM by ulao.)
#19
ulao Offline
Above and Beyond
*******
Posts: 1,029
Threads: 79
Joined: May 2009
Hmm, ok two more bugs..

1) the rumble test does not send any data over the FFB engine. 5.0 does.
2) when this FFB spamming ends, the last command is turn on the rumble motor.  like so...
on,off, on,off, on,off, on,off, on,off, .....on (no off) so the controller just rumble endlessly.  I have prevention built in to my adapter so this does not happen but I noticed driver based adapter do. I attached a screen shot of that happening 

0a 01 01 01 means motor on  (or turn on constant force)
0a 01 03     means turn it off.    (or turn off constant force)

I guess I could add this
https://forums.dolphin-emu.org/Thread-dolphin-s-pad-plugins-wow-but-no-rumble-support?pid=261111#pid261111
Looks like this nik guy found the same to be true with spamming the FFB engine.


Attached Files Thumbnail(s)
   
[Image: newLogo_white_small.png]

main page
Working controllers


[url=http://spreadsheets.google.com/pub?key=tGD-U_eW1Rc7rNyqkpgJuIg&output=html][/url]
Find
Reply
08-01-2018, 08:38 AM
#20
ulao Offline
Above and Beyond
*******
Posts: 1,029
Threads: 79
Joined: May 2009
I was able to influence the way usb control data is sent in to rid of this issue. The fix started in 2.0 227. Bliss-Box will now accept FFB commands 1ms apart (shorter g in theory). Dolphin was observed at 3ms apart.
[Image: newLogo_white_small.png]

main page
Working controllers


[url=http://spreadsheets.google.com/pub?key=tGD-U_eW1Rc7rNyqkpgJuIg&output=html][/url]
Find
Reply
« Next Oldest | Next Newest »
Pages (2): « Previous 1 2


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode