Skip to content
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.

Update SNES button mapping to match NES (A, B) #454

Open
wants to merge 1 commit into
base: rb-4.1.X
Choose a base branch
from

Conversation

munskey
Copy link

@munskey munskey commented Aug 24, 2016

Please make sure your PR is ready to be merged !

  • You added the changes in CHANGELOG.md
  • You choose the right repository branch to make the PR
  • You described the PR as below

Fixes #1

Changes

  • SNES button mapping updated to match NES buttons (eg: NES A = SNES A, NES B = SNES B)

- 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)

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.
@substring
Copy link
Contributor

substring commented Sep 15, 2016

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
see https://github.com/recalbox/recalbox-os/issues/1057

@munskey
Copy link
Author

munskey commented Oct 5, 2016

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 ;)

@substring
Copy link
Contributor

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 ?

@munskey
Copy link
Author

munskey commented Oct 5, 2016

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/

@substring
Copy link
Contributor

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 ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants