rpcs3
rpcs3 copied to clipboard
Confused diagonal inputs in Demon's Souls
Video: https://www.youtube.com/watch?v=fWKEuSKZUWQ
While walking in a diagonal direction, I'm very frequently getting my roll sent the wrong way. In the video I'm holding [↑→] and getting a lot of [↑←] rolls. On my (xinput) gamepad this doesn't happen while holding [↑←] or [↓→], but does happen holding [↑→] or [↓←]. [↓←] gives [↓→] rolls.
This is not a quirk of the game itself! When I switch to keyboard controls in RPCS3, the problem remains but in the other directions: now [↑→] and [↓←] rolls consistently go where they're supposed to, but [↑←] and [↓→] rolls are often sending me the wrong way. So Demon's Souls is ok with holding any of these diagonals and rolling; I can swap between keyboard and gamepad to get any particular roll I want every time. But that's not very fun.
I'm using a new install of RPCS3 0.0.19-13104-43b7d1fe Alpha, all default settings except for Write Color Buffers checked (required for Demon's Souls). On updated Windows 10, Ryzen 5 3600X. I've been testing this with no patches applied, though it's present with the 60fps patch as well.
Please upload a proper rpcs3.log file after running the game
also, post a screenshot of your gamepad settings dialog for xinput
This seems to be a game bug, unless it's some inaccuracy in emulation, which is unrelated to the actual input though.
The game seems to be unable to handle the far corners of the stick input during evasive rolls. The reason for this is most likely the fact that a real DS3 stick doesn't really reach a full square.
In the following example imagine the square is the full practical range of the input, ranging from 0 to 255 on both axis.
The center of the square is the resting position of the stick, some value like 128 for both x and y.
The green part is an exaggerated approximation of what the DS3 stick will be able to cover.
Keep in mind that a stick physically moves in a circular fashion, not like a square.
So while doing the evasion roll, the game probably doesn't expect the input that is inside the red corners.
Especially if it's exactly on each of the 4 corners (0,0), (0,255), (255,0) and (255,255).

I think you can work around this issue by setting your left stick multiplier to something between 0.95 and 1
I just tried with 0.99 for the left stick and the issue was completely gone during my test. So it's probably safe to assume that the game only freaks out for those 4 maxed corners.
Thanks so much for taking a look.
Your explanation about the corners makes perfect sense, thank you! Unfortunately I'm still getting the errors when I set 0.99, 0.95, 0.90, or even 0.85 as the left stick multiplier. I tried going berserk and setting it all the way down to 0.65, at which point my character is walking, and then it mostly went away but not quite (happening maybe 5-10% of the time instead of 50%+).
I would take any suggestion about how to better emulate the PS3 controller with my device (maybe by setting an outer deadzone somehow?) to work around this issue, but I'm not familiar with any software that might be relevant. Could changing the squircle value do this within RPCS3? I can't really understand the description of that setting.
Regardless, I appreciate you testing it out and not just telling me "yea DeS has some funky rolls, get good noob!"
Well. For some reason I can now reproduce the issue with the multiplier set to 0.8 as well. I think it's unrelated to the input logic then.
Regarding your questions:
-
By setting the multiplier to something below 1 you're basically already setting an outer deadzone.
-
The squircle value basically tries to map the circular stick area of your gamepad to the rounded square of a DS3. This means that by increasing the value you can artificially "extend" your range all the way to the corners if your stick would otherwise not reach them. I think a value of 0 will do nothing while higher values increase the range until at some point you will always get the full range of the square. You could theoretically achieve the same thing by increasing the multiplier, but then the regular stick movements to the left/right/up/down would be too intense.
There seems to be underlying game bug which is causing this. The fact that it seems to work best on dualshock controllers and then differently on other handlers suggests that the developers barely got it to work on DS3 and even slightest changes in the controller behavior breaks it.
Maybe the solution is to fix the game with a patch instead of trying to comb through the joystick handling and iron out miniscule differences?
There was a similar issue in dolphin-emu with some games (i.e. Tales of Symphonia).
https://bugs.dolphin-emu.org/issues/9739
Which was fixed a while ago.
https://github.com/dolphin-emu/dolphin/pull/7628
I would imagine a similar idea could work in rpcs3?
Had the same issue, reported it here https://www.reddit.com/r/rpcs3/comments/qtoxkb/demons_souls_rolling_in_wrong_direction/
I think DeS really likes original PS3 hardware, but it has some jank with rolling no matter what, from what I gathered online, I've read someone has this issue on PS5 remake too, so it's probably the game's coding no matter what, and emulation and/or non-PS3 gamepads only make it worse.
I also feel like this is some weird game bug and not really caused by us. I personally also tried on PS5 remake but couldn't reproduce, which isn't really surprising since it's a different game.
I also feel like this is some weird game bug and not really caused by us. I personally also tried on PS5 remake but couldn't reproduce, which isn't really surprising since it's a different game.
PS5 version has 8 diagonal rolls too... Unless we can find someone with DS2/DS3 controller to test this out, we can't really know. I do know that switching to KB+M didn't really help. I even emulated Gamepad > KB+M > RPCS3 :D
I changed my PC, and now I'm having an even bigger issue: if I simply start running diagonally, sometimes my character will roll, this is frankly horrible because it got me killed so many times. As if the game caught "diagonal + roll button press" instead of "diagonal + run button hold". Could it be tied to RPCS3 Sleep Timers or Driver Wake-Up Delay, just a wild guess, to cause the inputs to be dropped or something?
Also, squicle values seem to have no effect...
Small addendum: if you press Circle (especially if holding forward) to exit the final Menu, you character will roll forward.
This means that the game got 2x Circle inputs - one to close the menu and immediately one to roll. This points to a different problem than just analog stick/diagonals issue.
Is it possible to somehow measure inputs that RPCS3 receives from gamepad, and measure what it "sends" to the game?
A new "finding" is at 0.8 Multipliers - one is when holding Circle entire time and it shows that only ONE diagonal is peculiar in that it doesn't have a "stop and turn" animation when running. The other is when pressing Circle to start running each time, and again that peculiar diagonal has the wrong roll issue. This is on a Dinput gamepad ran thru x360ce, results may vary with direct Dinput in RPCS3 or with KB+M, but there is always ONE peculiar diagonal.
This also highlights a possible issue - at 0.8 cardinal direction results in player walking, but diagonals it's running, meaning that Squircle might not be applied properly?
https://user-images.githubusercontent.com/7749968/170171673-c73c98e0-fd5a-450b-8dbc-7cf0a0598f91.mp4
https://user-images.githubusercontent.com/7749968/170171679-f42d4a87-6c39-4827-bd03-cf6c43c19027.mp4
Seems the issue is also because some Dinput > Xinput apps don't send circles/squircles (rounded edges) inputs, but RPCS3 also doesn't apply a squircling effect on those rectangular Xinput shapes.
Try any random brand Dinput gamepad, run it thru x360ce or Xoutput, and in RPCS3 you WILL hit those edges, and it was to be expected that RPCS3 Xinput handler knows and applies a circling effect on those edges, but it doesn't. Same applies with keyboard, if you press two buttons for a diagonal direction, in Emulated section you can see the red dot going all the way into the corner.
Tested with a PS4 clone gamepad in Xinput mode from DS4Windows (RPCS3 DS4 handler wouldn't recognize the gamepad even without DS4Windows, it's a clone after all).
This gamepad natively has Squicle sticks, and DS4Windows translates this behavior in Xinput mode too.
What RPCS3 should be able to do is when using a swapped Dpad <> Stick (or Keyboard for that matter) for movement, and apply a Squircle effect on the diagonals. It is impossible to have a keyboard with Squircle movements, and it just ends up with fully square behavior instead of rounded edges - which causes issues as the game probably gets out of bounds values.
PS: There is also an issue with using KB+M, in games like this, about half a stick movement translates to walking, and full stick means running. KBM doesn't have a "half stick" toggle/press key for this.
Bump, this is still unresolved, no option to "force" squircle when using KBM, Dinput, or Dinput>Xinput wrappers.
