Jump to content

Raine 0.94.1


Tux

Recommended Posts

7 hours ago, Tux said:

There is a misunderstanding here, you are not saying your triggers can move the selection in the gui, just that they are interrupting the auto repeat feature of the dpad in the gui ? Well assuming they are seen as buttons too, and I guess it's the case here, it can't be avoided, the autorepeat works as long as it does not receive another button press. Eventually send the string for your controller either in userdb.txt or gamecontroller.txt to confirm they are seen as buttons, but if it's the case there's nothing which can be done, learn to live with it, that's all.

Hello Tux! I'm sorry if I haven't been so clear in my previous posts. But what I was trying to say is exactly what you have supposed here.

I can accept that the left analog stick may interfere in the continuation of a d-pad movement because this seems to be the way you have implemented it in Raine: both the d-pad and the left analog stick share the same configuration and work at the same time, so one may interfere in the other. But I don't understand why both the analog triggers and the right analog stick are also interrupting the d-pad movement if these analog inputs aren't even bound to anything in the inputs settings? This happens both in the GUI and in-game (respecting the condition that you first use the left analog stick, otherwise they won't interrupt the d-pad). This is my complain and what I think could be changed.

Anyway, I think it would be easier for you to reproduce and fix those issues if you had a DS4 controller to test. It's not a great controller for 2D fighting games in my opinion, but since you don't play those that much it could be an overall good acquisition for both old 2D arcade games and new 3D ones as an alternative for your cheap controller. Perhaps you could find a good deal for one used or new if you're ever interested.

 

7 hours ago, Tux said:

For info I use a very cheap generic Chinese controller found on amazon as my main one, it doesn't have this problem (although it has some other problems, the dpad is unprecise which can be very enerving at some places where you try to input some precise combination, and it can be used only wirelessly, the cable is only to recharge it, it can't be plugged as an usb controller, except that it's recognized as an xbox controller by default which is fine).

I have been noticing that for a few emulators such as Retroarch and Raine Xinput controllers are currently better supported. It's a pity that Sony went with Dinput drivers for both the DS3 and DS4 controllers (I'm not sure about the Dual Sense 5). But I would be surprised if your generic Xinput controller had analog triggers such as the DS4 and the XBox 360 (and newer consoles) controllers, so this may alleviate the symptoms that I experience here with the DS4.

Thank you so much again for your time and attention.

Link to comment
Share on other sites

yeah my cheap controller has analog triggers, although their resolution is not very high (it jumps very quickly from minimum to maximum, very hard to do something precise with that).

So you can interrupt the auto repeat with the right analog stick ? Well I have absolutely no idea how then, and no I can't do that here, with the dual shock ps3 controller or the chinese xbox one ! No I don't plan to buy a new controller specially to test your setup, that's too much to ask, eventually one day, but your problems are really not a motivation !

 

Link to comment
Share on other sites

On 9/14/2022 at 3:51 PM, mer-curious said:

Hello Tux! I'm sorry if I haven't been so clear in my previous posts. But what I was trying to say is exactly what you have supposed here.

I can accept that the left analog stick may interfere in the continuation of a d-pad movement because this seems to be the way you have implemented it in Raine: both the d-pad and the left analog stick share the same configuration and work at the same time, so one may interfere in the other. But I don't understand why both the analog triggers and the right analog stick are also interrupting the d-pad movement if these analog inputs aren't even bound to anything in the inputs settings? This happens both in the GUI and in-game (respecting the condition that you first use the left analog stick, otherwise they won't interrupt the d-pad). This is my complain and what I think could be changed.

Anyway, I think it would be easier for you to reproduce and fix those issues if you had a DS4 controller to test. It's not a great controller for 2D fighting games in my opinion, but since you don't play those that much it could be an overall good acquisition for both old 2D arcade games and new 3D ones as an alternative for your cheap controller. Perhaps you could find a good deal for one used or new if you're ever interested.

 

I have been noticing that for a few emulators such as Retroarch and Raine Xinput controllers are currently better supported. It's a pity that Sony went with Dinput drivers for both the DS3 and DS4 controllers (I'm not sure about the Dual Sense 5). But I would be surprised if your generic Xinput controller had analog triggers such as the DS4 and the XBox 360 (and newer consoles) controllers, so this may alleviate the symptoms that I experience here with the DS4.

Thank you so much again for your time and attention.

You are in luck, my nephew will lend me one tomorrow for testing ! (but I am almost certain I won't have that many problems !)

Edited by Tux
  • Like 1
Link to comment
Share on other sites

Ok tested this famous ds4 controller, well nothing fancy here, it didn't require any driver in linux or in windows, recognized immediately. In raine too, no need to add a mapping it's one of the most well known game controller.

With 0.94.1 yeah you can interrupt the auto-repeat from the gamepad either by the right stick or by L2 or R2, it's because these are axis movements and axis movement are used to move the selection like the gamepad. With latest binary since only the axis coming from the left stick are recognized, all the other axis are ignored in the gui and so the auto-repeat started by the dpad is never interrupted. Tested in win10 & linux, without any fancy mapping in both cases.

I guess I should finally release an official binary for 0.94.2 to finish all this for good... ! (+ the new sound associations need some testing from players anyway).

The only slight complaint I have against this controller is that if you are using testjoystick on it from the SDL distribution and move one of the analog sticks, it's impossible to stop the move, it's a dead zone nightmare, but if you use something which handles the dead zones correctly it's not really an issue.

Edited by Tux
  • Like 1
Link to comment
Share on other sites

Hello again Tux! Thank you so much for finding a way to get a DS4 controller in Raine in order to test this analog detection issue. If you couldn't borrow one from your nephew you could perhaps buy and then return it after testing if it was really necessary. I think most retailers accept returns in a due time, although you would have to go through the hassle of taking it back. Anyway, I think I also have a relative of mine which has a PS3 with some DS3 controllers and I should be contacting him to borrow one of his controllers to test in Raine and see if the analog issue happens there as well.

I took the time to hook my X360 controller to the PC again (it was stored in a drawer waiting some parts to arrive for maintenance) and interestingly I cannot reproduce the issue there neither in version 0.94.1 nor in the new 0.94.2 one. I have tried both in the GUI and in-game and the only analog source that interferes in the directional pad movements is the left analog stick, which is expected according to they way you have implement it (they share the same bindings). So the issue seems to be specific to Dinput controllers, no?

I just tested the new 0.94.2 official release with my DS4 pad and unfortunately I can still experience the same issues there as in the previous version: the right analog stick and the analog triggers will still interrupt the d-pad movements both in the GUI and in-game. So there's still something not working right for Dinput sources in Raine in comparison with Xinput ones.

I should post my results with a DS3 controller as soon as I get one. It will be a good addition for all of this report since the DS3 also uses Dinput drivers in Windows.

Thank you so much again for taking the time to test and solve this issue.

Edited by mer-curious
Link to comment
Share on other sites

4 minutes ago, mer-curious said:

Hello again Tux! Thank you so much for finding a way to get a DS4 controller in Raine in order to test this analog detection issue. If you couldn't borrow one from your nephew you could perhaps buy and then return it after testing if it was really necessary. I think most retailers accept returns in a due time, although you would have to go through the hassle of taking it back. Anyway, I think I also have a relative of mine which has a PS3 with some DS3 controllers and I should be contacting him to borrow one of his controllers to test in Raine and see if the analog issue happens there as well.

I took the time to hook my X360 controller to the PC again (it was stored in a drawer waiting some parts to arrive for maintenance) and interestingly I cannot reproduce the issue there neither in version 0.94.1 nor in the new 0.94.2 one. I have tried both in the GUI and in-game and the only analog source that interferes in the directional pad movements is the left analog stick, which is expected according to they way you have implement it (they share the same bindings). So the issue seems to be specific to Dinput controllers, no?

I just tested the new 0.94.2 official release with my DS4 pad and unfortunately I can still experience the same issues there as in the previous version: the right analog stick and the analog triggers will still interrupt the d-pad movements both in the GUI and in-game. So there's still something not working right for Dinput sources in Raine in comparison with Xinput ones.

I should post my results with a DS3 controller as soon as I get one. It will be a good addition for all of this report since the DS3 also uses Dinput drivers in Windows.

Thank you so much again for taking the time to test and solve this issue.

Well in this case you are on your own. Tested here, without any fancy configuration file or anything and it works, if it doesn't for you, it's something on your side, I can't help you there.

Link to comment
Share on other sites

19 minutes ago, mer-curious said:

Hello again Tux! Thank you so much for finding a way to get a DS4 controller in Raine in order to test this analog detection issue. If you couldn't borrow one from your nephew you could perhaps buy and then return it after testing if it was really necessary. I think most retailers accept returns in a due time, although you would have to go through the hassle of taking it back. Anyway, I think I also have a relative of mine which has a PS3 with some DS3 controllers and I should be contacting him to borrow one of his controllers to test in Raine and see if the analog issue happens there as well.

I took the time to hook my X360 controller to the PC again (it was stored in a drawer waiting some parts to arrive for maintenance) and interestingly I cannot reproduce the issue there neither in version 0.94.1 nor in the new 0.94.2 one. I have tried both in the GUI and in-game and the only analog source that interferes in the directional pad movements is the left analog stick, which is expected according to they way you have implement it (they share the same bindings). So the issue seems to be specific to Dinput controllers, no?

I just tested the new 0.94.2 official release with my DS4 pad and unfortunately I can still experience the same issues there as in the previous version: the right analog stick and the analog triggers will still interrupt the d-pad movements both in the GUI and in-game. So there's still something not working right for Dinput sources in Raine in comparison with Xinput ones.

I should post my results with a DS3 controller as soon as I get one. It will be a good addition for all of this report since the DS3 also uses Dinput drivers in Windows.

Thank you so much again for taking the time to test and solve this issue.

On 2nd thought I can add something : if your right stick still interrupts movement in 0.94.2 then it means it sends some left stick movement. I don't know if it comes from a bad mapping or from a hardware problem, but that's the only possibility.

  • Like 1
Link to comment
Share on other sites

Hello Tux! Thanks for the fast reply.

Just to be sure, did you observe the condition that I mentioned in my previous posts about the way to trigger the analog interference? You first need to use the left analog stick so the other analog sources (the right analog stick and the analog triggers) can interfere in the d-pad movements. If you don't touch the left analog stick first the other analog sources won't interrupt the d-pad movements, which is quite curious.

Also, there are two revisions of the DS4 controller as far as I know. I have the revision/generation 2, which has the light bar bleeding in the controller face. I think this is the most noticeable difference between the two versions. You can see a picture here:

https://www.neogaf.com/threads/ps4-controller-questions-differences-in-production-how-to-differentiate-v1-vs-v2-also-packaging.1605140/

Maybe your nephew has the version 1 model and then it would not show the issue in Raine because of that?

Anyway, I hope you can figure out what's happening. It's a pity I don't have the DS3 here now to enrich my report.

Thank you so much again for your help.

Link to comment
Share on other sites

53 minutes ago, mer-curious said:

Hello Tux! Thanks for the fast reply.

Just to be sure, did you observe the condition that I mentioned in my previous posts about the way to trigger the analog interference? You first need to use the left analog stick so the other analog sources (the right analog stick and the analog triggers) can interfere in the d-pad movements. If you don't touch the left analog stick first the other analog sources won't interrupt the d-pad movements, which is quite curious.

Also, there are two revisions of the DS4 controller as far as I know. I have the revision/generation 2, which has the light bar bleeding in the controller face. I think this is the most noticeable difference between the two versions. You can see a picture here:

https://www.neogaf.com/threads/ps4-controller-questions-differences-in-production-how-to-differentiate-v1-vs-v2-also-packaging.1605140/

Maybe your nephew has the version 1 model and then it would not show the issue in Raine because of that?

Anyway, I hope you can figure out what's happening. It's a pity I don't have the DS3 here now to enrich my report.

Thank you so much again for your help.

Ah yes you're right, forgot this "detail". Well good news : it doesn't change anything in linux, because there is some compensation built in the driver for this controller for its horrific dead zone.

But in windows where there is no compensation, indeed it happens. I'd say maybe there is a way to improve the dead zone compensation for that in raine, but really, the easiest solution is just to use the left stick in the gui instead of the dpad OR just not relying so heavily on the auto repeat, OR even better, just use the keyboard it's much faster to navigate the menus anyway !

Apparently the dead zone compensation works as long as there is only 1 axis moving, if there is more than 1 at the same time, it creates havoc and since this thing is a dead zone nightmare, moving the left sitck 1st as you do makes sure that raine will receive moves from the left stick forever after this, add either the right stick or one of the triggers, and the dead zone compensation becomes crazy !

I'll see if it can be improved, but it's super low priority because you have many ways to work around that.

Well the difference with the ds3 is that you can stop the perpetual movement with the ds3, it's not always easy, but always possible. Here it seems to have become impossible (in windows at least !). What's this horrible light for by the way, the big one they added on the controller ? It's a generation 2 too, yes.

edit : after looking at the code, I don't want to make it more complex. If you find a case where it's problematic without moving one axis while pressing the dpad (that is all the axis close to their neutral position), I'll have another look, but for now it's just not worth the trouble. I noticed that usually most games don't even bother adding an auto repeat for the joystick when it's usable in the gui, so it's already better than most here.

Edited by Tux
  • Like 1
Link to comment
Share on other sites

Hell Tux! I'm glad that you finally found the root of this problem with the DS4 controller. So in the end the controller was really necessary for that. Thanks to your nephew for his help!

Answering to your question, in fact I don't see many use cases for this fix. I stumbled upon this issue by accidentally playing with the left analog stick and later slightly pressing one of the analog triggers against my lap while trying to make some difficult combos in KOF97. So I guess it would mostly be a fix for this "rare" cases in which this could occur, and, of course, to improve the overall compatibility of this pad with the emulator.

There are some other open source emulators out there such as Duckstation, Dolphin, PCSX2, Cemu, Yuzu and Retroarch that don't show this issue as far as I've tested, so maybe you could see what they did in the code to work around the drivers issue in Windows?

By the way, now that you found the real issue perhaps the previous fixes could be reverted from the program once someone could potentially want to bind the "Confirm" and "Back" actions to other buttons rather than button 1 and 2 in the controllers, no? It wouldn't be so usual, but maybe depending on the controller button layout the user could need that, so it would be better to give them this possibility, as it was before these experimental changes.


Just to confirm that it is a problem really with the DS4, I've tested other two Dinput sources that I have here, one which is a generic dual PlayStation to USB adapter, like this:

https://www.aliexpress.com/item/1219835437.html

and the other which is a Mayflash PS/N64/SS to USB adapter, like this:

https://www.ebay.com/itm/204050755634

which I generally use to play with my official Sega Saturn pad.

Gladly none of these adapters show the issue with the right analog stick using my official PS2 DS2 controller (I cannot test the triggers because they aren't analog in the DS2 and the adapters don't support them either). So it wasn't a Dinput API issue as I had suggested.

Anyway, hopefully you will find an easy fix for that in the source of another emulator if you eventually try that and then it would put an end on this dead-zone issue in Windows.

Thank you so much again for your time and attention.

 

PS: as for the light bar meanings in the DS4, I also had this doubt. The light bar changes the color to indicate the player connected (player 1, 2, 3 or 4). It also interacts with some games and informs some diagnostic messages to the user. I don't know if all these features work in Windows games since I mostly play emulators. But when I connect the controller to the PC some times it glows orange, which I think means charging. I took this information from here:
https://www.ps4storage.com/ps4-controller-lights/

Link to comment
Share on other sites

Fixing : not interested, I guess some other emus used some generic code found elsewhere for that, I didn't have it, I don't really care, it's supposed to stay easy, I already spent way too much time on this.

Reverting : no need, with controllers buttons 0 & 1 are mapped to buttons A & B or X & O on playstation which means the main button to validate and to cancel, and anyway I don't plan ever to add something to map controls in the gui.

The light : it's actually more fun when you program it, you have access to its red, green and blue components from 0 to 255 and by combining these you can display whatever color you want. But it's still useless, I guess it's in the spirit of these pc cases with a glass panel to see neon lights inside... ! It's also much heavier than the DS3, making it more fragile if it falls (my nephew had to replace one because of a bad fall, my ds3 fell an incredible number of times without any problem ! And actually I had to reuse it lately on an old windoze game which doesn't allow to select the joystick to use and it insisted on using this one, and I had to press heavily on the square button which was almost dead... It actually made it return to life, now all buttons work correctly ! I don't remember the exact age of this ds3 controller but it must be more than 10 years old now !).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...