Jump to content

Raine 0.92.3 : mer-curious version !


Tux

Recommended Posts

39 minutes ago, mer-curious said:

I'm still trying to figure out a way to easily reproduce this crazy bug so you can try it with your game pads and setup. I'll let you know if I ever find that.

No need I can do it even in linux, left and right, I thought you knew already. In fact until yesterday I thought it was simply because the ps3 was becoming too old, before getting a doubt because of you. The way to reproduce it before this version was simply to turn around the dpad until the left/right direction becomes unresponsive.
I couldn't do it with this version, hence the idea that you test it. I might be able to get a ps4 controller for testing, but it's not sure, and it's a hassle...

39 minutes ago, mer-curious said:

 

Ok, so what you mean is that it's not completely perfect yet? Because I've noticed the floor has been fixed in the stage, but Apocalypse is still merging with the scenery (we can't see his shoulders), take a look: https://imgur.com/a/8jZWH8p

Yeah I know it looks weird, but I don't know what it's supposed to look like !

39 minutes ago, mer-curious said:

 

This is my ASCII controller: https://segaretro.org/Seamic_Controller

You can remove the weird microphone from the controller face so it becomes like this:

https://external-preview.redd.it/Ol_CfRMT21xCTGQX_zD8WlOBb9EJc9vXzZrFclKWkBQ.jpg?width=640&crop=smart&auto=webp&s=99c2cbf5be030913ec4260b189b5463cdea3ea9c

And we have L and R as shoulder buttons.

And this is my Hori controller:

https://i.ebayimg.com/d/w1600/pict/283353630372_/SONY-PS3-Controller-Hori-Fighting-Commander-3-Black.jpg

As shoulder buttons we have L1 and R1, and as triggers, L2 and R2. The R1 and R2 buttons are repeated in the face buttons, so you can either use them above or in the front (that is, these buttons are internally connected, they are not independent, unfortunately).

The ASCII pad seems to fit the Sega button layout from the SDL database, but the Hori is similar to a Sony controller, which I can't see a layout available there. So I don't how this particular pad could be registered there.

Yeah it's just that xbox & sony are the 2 main ones, they just represented the less known ones.

For sony it's X = A, O = B, the square = X, the triangle = Y, I thought you knew that, everybody who tries to use a sony controller on windows has to learn this since windows tries very hard to force everyone to use the xbox controller convention. It's exactly the same layout as the xbox controller this way.

Yeah I agree your 1st looks like the sega, the 2nd is a little extreme since there are no sticks, but I guess it can be useful to know at least where the dpad is. It can't redirect the dpad to any stick in this configuration though, but it should work anyway. You didn't say if you need to upgrade your mappings to follow their choice of button layout, but probably for at least one of them. Well it's not an emergency but try to do it so that I'll update them and send all that...

39 minutes ago, mer-curious said:

Thank you so much again for your work. 👍

PS: I forgot to say that in the video comparison I provided above the buttons are mismatched between the emulators because they are mapped differently.

It's your mapping !

Well I don't have many ideas on how to follow on that for now, I'll try to get a ps4 controller for a while at least, it will be easier. Maybe the thing is easier to reproduce in windows than in linux ? At least it works better for 2 of your controllers, the xbox one already worked, so it's almost perfect, just the f*** ps4 one which has some problems left...

Link to comment
Share on other sites

Ok, I finally understood !

The problem is simply that the sticks on the ps3 / ps4 controllers are too sensitive ! The stick gets very easily moved from its center position and once that happens it keeps on sending move commands around the center position. While you use only the stick for direction it has no consequence, it's just a rounding problem, you don't even notice it.

But if you use the dpad for direction which is mapped to the same stick, the direction gets continually cancelled by the stick movement around the center position !

There are 2 solutions to deal with that : deal with the dead zones of the joysticks, that is, ignore these stupid parasite movements around the centre position, problem being this dead zone can change from 1 joystick to the next so we would have to add a way to define the dead zone for each joystick or try to define 1 large enough so that it will work everywhere.
Or decide that using the dpad at the same time as a stick for the direction was finally a very bad idea, and just forget it and remove all the code about it !

I'd say I am for the last solution, this thing was too much trouble. You'll still be able to use the dpad for direction if you want by mapping it explicitly in the inputs, but in this case it will replace the joystick, and you'll be able to save that as custom inputs if you want, that's what was done in sdl-1.2.
I'll sleep on it and decide tomorrow, but that was the problem, something stupid finally !

The sdl2 mappings for the game controllers are still useful to have sane defaults for all these controllers, but that's all.

After some more testing : linux has some builtin compensation for this dead zone, it's impossible to trigger it on the ps3 controller.
On windows, it's very easy, just move very slightly one of the sticks, it will start to report continually some movement, for me it's easier to do on the left one than on the right one.
So it's a driver problem in the end... ! I am tempted to try to ignore the dead zone at our level, it's not hard to do :
central position is 0,0, extremes are 32767, -32767, when this dead zone problem happens it sends moves around position +-1000-1200, so I could just ignore anything < 2500 in absolute value, it should get rid of all this mess in just 2 lines. I'll try it, it's just 2 lines of code.

But after this, if I have ever some other problem with this, it will be time to remove the dpad as a directional stick !

The shoulders problem is yet another problem with the priority bitmap in cps2. It's not fully implemented in raine, it's a very complex thing, they use masks instead of simple priorities... It was already broken in the versions before the rasters it's not directly related to them, it's "just" a priority problem, but a very complex one, so no promise here... !

Edited by Tux
Link to comment
Share on other sites

5 hours ago, Tux said:

Ok, I finally understood !

The problem is simply that the sticks on the ps3 / ps4 controllers are too sensitive ! The stick gets very easily moved from its center position and once that happens it keeps on sending move commands around the center position. While you use only the stick for direction it has no consequence, it's just a rounding problem, you don't even notice it.

But if you use the dpad for direction which is mapped to the same stick, the direction gets continually cancelled by the stick movement around the center position !

Hey Tux! I'm really glad you could pinpoint the source of this issue! 😃 I guess I would have never come to this assumption, even though I noticed from my tests that playing with the analog sticks in the SF2 Input test menu would greatly increase the chances of triggering the problem, just as you have reported in your testing with the PS3 controller. Now everything makes sense: I couldn't experience this problem with the previous SDL1.2 versions because they didn't have this connection between the d-pad and the analog stick. Also, it's interesting that although my PS4 controller is genuine and brand new, the analog stick wobbles very slightly when I shake the controller in my hand and the driver does register this movement in the Windows controller properties.

Anyway, thank you for this great troubleshooting! 👏

 

5 hours ago, Tux said:

After some more testing : linux has some builtin compensation for this dead zone, it's impossible to trigger it on the ps3 controller.
On windows, it's very easy, just move very slightly one of the sticks, it will start to report continually some movement, for me it's easier to do on the left one than on the right one.
So it's a driver problem in the end... ! I am tempted to try to ignore the dead zone at our level, it's not hard to do :
central position is 0,0, extremes are 32767, -32767, when this dead zone problem happens it sends moves around position +-1000-1200, so I could just ignore anything < 2500 in absolute value, it should get rid of all this mess in just 2 lines. I'll try it, it's just 2 lines of code.

But after this, if I have ever some other problem with this, it will be time to remove the dpad as a directional stick !

This seems to be a good solution to keep both d-pad and analog stick configured and working by default, but wouldn't it be possible to just completely ignore the analog data received in this connection? The directional pad is purely digital, so the analog variations are unimportant, no?

Also, have you thought about making the d-pad the default for the automatic binding of the directions? For me it makes more sense to use a d-pad with arcade games, no? But then if someone remapped the directions to the analog stick, would they possibly face the same issue with the controls?

Anyway, I'm opened to testing whatever solution you may try. You can share another test version here if you want. 👍

But something still bugs me: the apparent impossibility to reproduce this issue with my X360 controller, even if it has a very noticeable wobbling dead-zone. Perhaps the X Input drivers made the difference here, as you said? But what about the "controller inoperative" issue which I experienced sometimes with this controller in Raine, how could it be explained? An issue with the detection of X Input drivers maybe?

 

5 hours ago, Tux said:

The shoulders problem is yet another problem with the priority bitmap in cps2. It's not fully implemented in raine, it's a very complex thing, they use masks instead of simple priorities... It was already broken in the versions before the rasters it's not directly related to them, it's "just" a priority problem, but a very complex one, so no promise here... !

Ok, no problem. In case you need, this is how it should look like: https://imgur.com/a/mpeSAuz

  

On 12/12/2021 at 9:10 PM, mer-curious said:

- If I leave full-screen mode after a game has been loaded, the windowed screen will be blank. See: https://imgur.com/a/RUMYkdN

Even though the screen is blank, the game continues running because I can still listen to the game sound playing.

Just for information because I don't know if you checked this, but it's still not fixed in the test version. 👍

 

7 hours ago, Tux said:

For sony it's X = A, O = B, the square = X, the triangle = Y, I thought you knew that, everybody who tries to use a sony controller on windows has to learn this since windows tries very hard to force everyone to use the xbox controller convention. It's exactly the same layout as the xbox controller this way.

Yeah I agree your 1st looks like the sega, the 2nd is a little extreme since there are no sticks, but I guess it can be useful to know at least where the dpad is. It can't redirect the dpad to any stick in this configuration though, but it should work anyway. You didn't say if you need to upgrade your mappings to follow their choice of button layout, but probably for at least one of them. Well it's not an emergency but try to do it so that I'll update them and send all that...

I guess you can suggest the Sega layout for the ASCII pad and the Sony layout for the Hori one, if it's available in the SDL database.

There are some changes I would make to the mappings but they are more related to the arcade systems, so I don't know if they could be implemented in the database. For example, for six-button CPS1/2 games, it would be better to have six face buttons, so button 1, 2, 3 down and 4, 5, 6 up (in this order). For Neo-Geo games, the configuration is already good (it follows the NG game-pad layout: A, B down, C, D up, in this order, as seen here: http://www.hbgamespy.com/uploads/81lkb7rxjul-ac-sl1500-684.jpg).

 

I guess that's it for this long post. Thank you so much again for your great work and support. 🙏

 

PS: I went and test shaking my X360 controller with the Windows controller properties opened, and the axes didn't register a thing. So you are correct, the X Input drivers do have better detection of dead-zones (they seem less sensible to this kind of "natural" movement).

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

Yeah it could be a good idea to be able to use the dpad only for direction, fixing this problem for good. Also I'll limit the dead zone filtering to when using the dpad + the stick for direction only.

There was no magic here, I just added some printfs for all the events raine recieved for the controller, and sometimes it received storms of moves which never seemed to end, actually it's possible to end it by re centering the stick manually, but it's not so easy to do. With this, the problem became quite obvious !

No didn't see your fullscreen -> windowed problem, it's an old problem, windows only. So you start the emu in fullscreen, load a game, then use alt+return to switch back to windowed mode ? I'll try to have a look...

So you used already the sega layout in the mapping you sent, and the playstation one for the other ?

By the way all the arcade cabinets (or so) use real sticks and not dpads but it's right they are used like a dpad, contrary to the sticks on our modern game controllers.

Edit : can't seem to be able to reproduce your blank window. Normally if it happens pressing esc brings back the gui and after that it's ok but still I'd like to be able to reproduce it. Tried starting from fullscreen with a game loaded or not, switching using alt+return or the gui, the whole thing in opengl, everything worked fine. And tried in windows of course. Oh well... !

Edited by Tux
Link to comment
Share on other sites

@mer-curious can you please open the windows game controller dialogue: https://www.top-password.com/blog/open-game-controllers-settings-in-windows-10/

and carefully take notes of what each button of both your gamepads missing from the db are registering (eg. Hori FC3: X: button 2, O: button 3, etc.) and then post them here so that we can publish the correct mappings and resolve Tux’s submission?

Thank you,

 offalynne

 

 

  • Like 1
Link to comment
Share on other sites

17 hours ago, Tux said:

So you used already the sega layout in the mapping you sent, and the playstation one for the other ?

Hey Tux! Now I think I know what you mean about providing the correct layout. You're talking about the log files from the ControllerMap program, right? So, since the layout of the program is based on the X360 my previous mappings tried to follow that design. But now I've redone the mappings of my ASCII pad to follow that picture in the Git database which shows "Sega -> Microsoft". The Hori pad kept the same because I maintained the PS/XBox design. By the way, in the Git you informed that the Hori pad has 3 sticks, when it actually has only has one, the d-pad. Anyway, I'm attaching the updated logs to this post.

 

17 hours ago, Tux said:

Edit : can't seem to be able to reproduce your blank window. Normally if it happens pressing esc brings back the gui and after that it's ok but still I'd like to be able to reproduce it. Tried starting from fullscreen with a game loaded or not, switching using alt+return or the gui, the whole thing in opengl, everything worked fine. And tried in windows of course. Oh well... !

That's exactly what I do here. I load a game in windowed mode, then hit Esc or "Play game" to leave the GUI, press Alt + Enter to enter full-screen mode, finally Alt + Enter again to return to windowed mode and then the screen is blank. Yes, if I press Esc the GUI shows with the game picture again.

Perhaps it's related to the Intel OpenGL drivers because I currently only have integrated graphics to test (d-gpus are way too expensive in my country unfortunately). So in my old laptop I have a 3rd gen (Ivy-bridge) i3 CPU with Intel HD Graphics 4000, and in my desktop I have a 10th (Comet Lake) i5 with Intel UHD Graphics 630. From 6th (Skylake) to 10th (Comet Lake) Intel uses the same micro-architecture as far as I know, so if you have anything Skylake or above with integrated graphics you should probably be able to reproduce it. I'm using the latest drivers. Here's a quick video of the issue showing: https://drive.google.com/file/d/1OjWQ0ffO_xlkI7n13uvIvRJWAgb6DtxU/view?usp=sharing

Notice that OBS recording takes longer to show the picture in full-screen mode and introduces a glitch in the top left of the screen when I leave it, but I don't experience these symptoms using Raine.

I'll let you know if I come to test this issue with a NVIDIA or AMD video chip.

Thank you so much again for your work. 🙂👍

Ascii and Hori update.7z

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

Yep, that was it, yes you misunderstood for the axes, a d-pad is not a stick, but anyway. Thanks for the updated mappings, I just posted them to the pull request, and I just sent the photos too, it should be enough, thanks for that.

Well the issue of the blank window hasn't shown for me for a long time, it might be related to the video driver, I am not sure. I am able to test only on my nvidia desktop here, the laptop doesn't have windows ! (you know people that the linux world doesn't have all these problems ?)

After looking, I'll avoid the "d-pad only for movement" for now, on the modern pads with 2 sticks it makes the 2 sticks totally useless, it's obvious that it's just a way to work around a bug, and sticks can be used for something else too (combinations can be mapped to a stick direction for example). So we'll try 1st with the dead zone filtering only, and if some problems still happen for some people, I would advice to simply disable the feature in the inputs dialog in raine to use only the sticks for movement (but it shouldn't happen with such filtering, if it still does, there is quite a serious problem with the pad).

By the way it's not a sign the game controller is bad quality, my ps3 "six axis" (that's the way this model is called, no rumble functionality inside, but still the bluetooth inside) has lasted for more than 15 years, that's quite impressive for a game controller even if I didn't use it very much all this time.

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

On 12/13/2021 at 1:10 AM, mer-curious said:

Beware that if you load this state after the stage has been loaded, Raine will crash!

It's finally fixed, it's the kind of detail which pisses me off !

Your savegame can't be fixed automatically, if you load it while the rasters are active it will continue to crash, BUT !

if you make another save now, it will be "rasters resistant" !

And you can fix this one by doing this : launch the game as usual, then activate pause, load your savegame, once it's loaded and still in pause, save... !

Done it's fixed, now you'll be able to load it with rasters active ! It was a mess to fix, and that's just for cps2 rasters, but anyway I might use this one day in more drivers... !

Link to comment
Share on other sites

They replied this for the mappings :

not too sure on these.. could you please ask your user to refer to the Windows game controller dialogue and make careful note of what each of the buttons are registering to be sure ? for example A = 3, B = 5, C = 7, etc. thanks !

Well, it's really becoming too complicated just for something which should have taken 5 minutes. You can check that if you want, if you don't I'll understand and that's really no problem, I already told them that at this level it would make things easier if they just say they refuse the pull request !
I already merged these mappings here anyway.

  • Like 1
Link to comment
Share on other sites

6 hours ago, Tux said:

They replied this for the mappings :

not too sure on these.. could you please ask your user to refer to the Windows game controller dialogue and make careful note of what each of the buttons are registering to be sure ? for example A = 3, B = 5, C = 7, etc. thanks !

Well, it's really becoming too complicated just for something which should have taken 5 minutes. You can check that if you want, if you don't I'll understand and that's really no problem, I already told them that at this level it would make things easier if they just say they refuse the pull request !
I already merged these mappings here anyway.

Hey Tux! Thanks for letting me know. I've already replied there with my GitHub account. Let's see if they have all the info they need now.

 

On 12/16/2021 at 6:05 AM, Tux said:

By the way it's not a sign the game controller is bad quality, my ps3 "six axis" (that's the way this model is called, no rumble functionality inside, but still the bluetooth inside) has lasted for more than 15 years, that's quite impressive for a game controller even if I didn't use it very much all this time.

I understand. My brand new DS4 controller has the same dead-zone sensibility as we have noticed, so it's not a sign of wear in your PS3 controller, it's just the way they work with the drivers. I also have some PS2 controllers since 2001. They have been opened for cleaning a couple of times, but still work quite reliably. I hope my PS4 controller lasts as long as those.

 

8 hours ago, Tux said:

if you make another save now, it will be "rasters resistant" !

And you can fix this one by doing this : launch the game as usual, then activate pause, load your savegame, once it's loaded and still in pause, save... !

Done it's fixed, now you'll be able to load it with rasters active ! It was a mess to fix, and that's just for cps2 rasters, but anyway I might use this one day in more drivers... !

Great! This fix will be really useful when saving a long play during the activation of the raster effects. No more worries about that.
 

Thank you so much for your continuing work on Raine. 🙂👍

Link to comment
Share on other sites

Congratulations, it was merged because of your direct post (the pull request for the mappings), I'll be able to link directly their repository which will be easier, thanks.

And I added some hack to draw correctly the giant boss in xmvsf, I am not proud of it, but it works. As long as I can't emulate these broken priority masks I'll be forced to add hacks like that, but anyway it should do for now...

  • Like 1
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...