Update SNES button mapping to match NES (A, B)#454
Conversation
Changed SNES button mapping to match NES buttons (eg: NES A = SNES A, NES B = SNES B) allowing for NES and SNES controllers to share the same controller port using a simple plug one-to-one adapter without requiring unique ES controller profiles.
|
mmmhhhhhhhhh ... And what if we upgrade gamecon to 1.2 ? does it solve this issue ? I was told it also solves the PS driver that can't handle more than 1 pad at once |
|
Gamecon 1.2 doesn't solve the issue, as RetroPie uses 1.2 and the code still exhibits the symptom. To clarify, my pull request isn't really an 'issue', but more of a feature request due to an easy oversight by the original gamecon developer. The NES buttons are a subset of the SNES buttons both on a physical button layout and on an electrical level they are encoded the same and operate the same. Programmatically the gamecon driver assigns arbitrarily different integer values in the NES and SNES buttons arrays. Meaning, NES A is assigned the integer value of 0 and SNES A is assigned integer value of 8 for their respective arrays. There may be a reason for this difference, but I was unable to determine it. I want the controller types to use the same integer array numbers so that I can simplify the controller hookups by using only one type of physical connector on my case (NES or SNES), then, for example, when I want to connect a SNES controller to an NES port I can (using a homemade one-to-one physical NES-SNES adapter) and the button mappings won't be thrown off. Hopefully that makes more sense ;) |
|
Thank you for the loooong explanation :) The only thing that concerns me is if it changes the button order from a linux point a view. For example, they would not trigger the same events as before (A and B swapped). Can you give me your regard on that ? |
|
You can swap or remap the buttons on a linux level, retroarch, etc. I think that would require the user to manually notify the system that, "hey, I'm using controller type X now" for it to perform the remap after the gamecon driver output. What I am proposing is transparent and intrinsically automatic to the end user since recalbox will be seeing the exact same output from the gamecon driver (without and intermediate modification) regardless if you are using a SNES or NES controller, i.e. no manual intervention is needed, nor should it be since one is a subset of another. Perhaps a better route would be for me to send a request directly to Marqs to ease future updates. I don't see a github for it, only his site https://www.niksula.hut.fi/~mhiienka/Rpi/ |
|
Alright. I'm not the one who decides, but this is what i can do. There is an ongoing PR for the 1.2 driver version : i'll add a patch with your submission. We're terribly lacking testers with gamecons, so digi is a little reluctant to it ;) |
Please make sure your PR is ready to be merged !
Fixes #1
Changes
- Allows NES and SNES controllers to share the same controller port using a simple plug one-to-one adapter without requiring unique ES controller profiles
Related to (put here the others PR in other repositories)