libretro / flycast

Flycast is a multiplatform Sega Dreamcast emulator. NOTE: No longer actively developed, use upstream repo for libretro from now on - https://github.com/flyinghead/flycast
http://reicast.com
GNU General Public License v2.0
155 stars 77 forks source link

Unmapping/Remapping R2/L2 RT/LT They Still Work As Dreamcast R/L Triggers + The Other Function Chosen #1008

Closed Alextended closed 3 years ago

Alextended commented 3 years ago

Edit: TL;DR, buttons R2 and L2 on the x-input Hori Fighting Commander act as Dreamcast triggers R and L even when they're not mapped to anything at all and trying to map them to something else conflicts with the pad trying to do both both at once, some times giving priority to the one you actually set/want so it seems like it works but in some situations it's clear it does both.

Real final edit: This isn't just about x-input/the Hori Fighting Commander. Using my Dual Shock 4 in d-input mode and unmapping R2/L2 in the configuration, in-game they still act like the Dreamcast R/L triggers respectively. I just never noticed because I always have them mapped as those. I guess it's a general mapping issue that has R2/L2 in x-input and d-input pads alike always map to R/L.

Original long thoughts you might be better off skipping: So the Hori Fighting Commander is a PS4/PS3/PC gamepad with 6 face buttons, I use it with RetroArch on Windows 10 in its standard x-input mode for Sega Saturn and arcade emulation and fighting games and anything that doesn't require analog sticks.

With Flycast I first encountered this issue when setting it up as the 2nd controller for multiplayer in some games, but I've now reconfirmed it's for some reason problematic. I wanted to play Capcom vs. SNK 2 which uses the standard Street Fighter layout so I wanted to map that on its 6 face buttons. Bear with me as it's a little bit complicated to explain though the issue is simple.

In x-input mode, square is like an Xbox pad's X, triangle as an Xbox pad's Y, Cross as an Xbox pad's A, Circle as an Xbox pad's B, etc.

I set: Square as X, Triangle as Y, R1 as L Cross as A, Circle as B, R2 as R

And in-game mapped to the 3 levels of Punch and 3 levels of Kick Respectively.

Except when testing R2, it appears to do a Strong Punch, which is set to L. Switching it to L, like R1, then it does function as if it's L and does a heavy kick. I figured it just shows the mappings wrong but otherwise works so I left it like so:

Square as X, Triangle as Y, R1 as L Cross as A, Circle as B, R2 as L

In-game these are mapped to the 3 levels of Punch and 3 levels of Kick respectively and yes they appear to work even though R1 and R2 should be duplicates, they don't act like it, R2 rightfully acts as R, yet if I set it as R, it clearly only acts as L. I might have this part reversed, either way they have to be mapped to the same thing to act as the opposite each.

Except even so, if I'm doing a light punch, medium punch, heavy punch 3 hit combo, the last hit works even if I finish with R2/L that otherwise acts like heavy kick. Duplicating heavy kick on a different button that doesn't have this issue, that combo doesn't work, so it's not the game letting you off for not being accurate.

So it seems the problem is it retains the function of both L and R even though it's mapped to just one. Also, if I don't map it to anything, it still acts as L. Experimenting further, I just unmapped all the buttons on the controller. All blank. Yet, R2 and L2 specifically still do what L and R Dreamcast buttons are mapped to in game. All others do nothing so they work correctly, I guess.

So the problem seems to lie with the digital buttons that the Hori Fighting Commander maps as normally analog triggers in standard pads. But this only occurs in Flycast, no other cores that I use (but I only use like 4, FBN, Flycast, Beetle PSX & Saturn) do this.

hifihedgehog commented 3 years ago

I cannot replicate this behavior and I just successfully remapped the left and right triggers from L2 and R2 to L1 and R1 on my virtually XInput mapped arcade control panel. I think providing screenshots of your mapping settings would do much more justice than providing anecdotes. If there is an issue, it would start in the settings and those people need to see to clearly address your issue.

Alextended commented 3 years ago

I cannot replicate this behavior and I just successfully remapped the left and right triggers from L2 and R2 to L1 and R1 on my virtually XInput mapped arcade control panel. I think providing screenshots of your mapping settings would do much more justice than providing anecdotes. If there is an issue, it would start in the settings and those people need to see to clearly address your issue.

You can do that, yes, I can too. But if you press L2/R2 instead of L1/R1 you'll find they still act like L/R even if you unmapped them. Like I said even unmapping all buttons in the pad, L2/R2 will still do what Dreamcast L/R do. What good is showing a screen with all buttons unmapped going to do? If you insist I'll do it in a little bit, maybe catch it in the Soulcalibur button config screen that shows L or R being pressed yet the RA overlay showing the buttons unmapped. Using RA 1.9.0 stable, everything fresh from online updater.

Alextended commented 3 years ago

Here, quick menu, controls, screenshot 1 is my port 1 controls, screenshot 2 my port 2 controls, no other remapping was done, it's all default except I went in to unmap L/R to nothing, port 1 is d-input dual shock 4, port 2 is x-input Hori Fighting Commander, you can see L/R is not mapped where it was (or anywhere else, like I said it's all defaults but the screen isn't big enough to show all the controls) but that in the first image R on player 1 is being pressed and on the 2nd image L on Player 2 is being pressed as far as the virtual Dreamcast is concerned when I'm pressing the unmapped R2 and LT respectively (and it works the same for L2/RT but Soulcalibur's controls screen only shows one trigger at a time).

https://abload.de/img/retroarch_2021_01_08_1qkqo.png https://abload.de/img/retroarch_2021_01_08_rskqt.png

If I map L2/R2 to a different Dreamcast button like X or whatever then the game will try to do both functions when it's pressed, so in Soulcalibur with R set as Guard and X set as Horizontal Attack and R2 mapped as X instead of the default R, pressing R2 in game does a throw that requires Guard + Horizontal attack! I dunno how else to explain it or why this was closed.

Could be a general RA issue I guess, I don't have other cores with systems that have R/L triggers by default atm, only buttons.

dalborgo commented 2 years ago

I confirm the same problem with XBox Controller playing Shenmue.