Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N64 and MD/Gen 6B NSO Controller Profiles #801

Merged
merged 5 commits into from
Aug 29, 2022

Conversation

PitiBatou
Copy link
Contributor

@PitiBatou PitiBatou commented Nov 12, 2021

autoconf d-input profiles for the N64 and MD/Gen 6 Button pads (Japan version).

  1. MD/Gen profile follows the LXR/YBA layout found here.
  • Additional "Home" button map for toggling Menu.
  • "Mode" button mapped as "Select"
  • Switch "Screenshot" button NOT mapped
  1. N64 profile follows the layout found here
  • Additional input_a_btn map added for RetroArch menu navigation
  • Additional "Home" button bind for toggling Menu.
  • Switch "Screenshot" button NOT mapped

Second commit:

  • "ZR" mapped as "Select"

EDIT: Looks like the 6 button MD vendor id and product id are the same as the SNES Switch controller. How do we address this kind of duplicates?

autoconf d-input profiles for the N64 and MD/Gen 6 Button pads (Japan version).
@offalynne
Copy link
Contributor

input_a_btn = "0"
input_y_btn = "0"

?

@hizzlekizzle
Copy link
Contributor

@offalynne I believe that's to make it able to navigate the RetroArch menus more easily. A few of the N64 autoconfigs have that.

@PitiBatou Yeah, that's a problem. if it has an identical vid/pid, we generally have to pick one of them and then comment out the vid/pid on any others. We hope to someday have a better way of identifying them, but in the meantime, if the device name matches exactly, I think it'll go ahead and match even with the vid/pid commented out...?

@PitiBatou
Copy link
Contributor Author

PitiBatou commented Nov 18, 2021

@offalynne

On the N64 mapping:

input_a_btn = "0"
input_y_btn = "0"

This was lifted from the Hyperkin Adapter for N64 profile. As mentioned by @hizzlekizzle this makes menu navigation much easier. I happen to have the Hyperkin adapter as well and it works well.

On the MD 6Button Profile:
@hizzlekizzle I am getting a SNES Switch controller in the mail tomorrow. I'll try and confirm this weekend. But if the ids are one and the same, it is probably better to not include it for now. I don't expect many RetroArch users will have that particular pad being a Japan exclusive and all.

@offalynne
Copy link
Contributor

Deferring to the SNES labels for the config makes sense since they're a subset of the default Switch labels. Looks like L & R on the SNES Online pad are C and Z on the MD pad. Curious what it looks like for the Genesis 3 button variant, seems probable it's the same VID/PID as well.

@PitiBatou
Copy link
Contributor Author

@hizzlekizzle Got my SNES Switch controller. I was able confirm the SNES and MD/Gen 6B pad share the same ids. Commenting out the ids to "swap" works just fine.

@offalynne The mapping of 6 face button pads has always confused me. Should we prioritize mappings as physically close as possible to the virtual RetroPad layout or keep to the original platform layout?

For MD/Gen 6 button or 8BitDo MT30, is it better to do:
Physical A,B,C as RetroPad B,A,R
Physical X,Y,Z as RetroPad Y,X,L

This makes SNES/PSX plug & play but MD/Gen confusing

or

Physical A,B,C as RetroPad Y,B,A
Physical X,Y,Z as RertoPad L,X,R

This makes MD/Gen plug & play but SNES/PSX confusing

I know this is why we have remaps but it would be nice to have something more automated for this kind of pads. (remaps strike me as an intermediate/advanced user feature?). Definitely a niche thing though as 6 face button pads are definitely not that common...

Thanks both for your time!

@hizzlekizzle
Copy link
Contributor

There's unfortunately no perfect solution, and the cores themselves even vary. That is, GPGX's 6-button mapping puts ABC on YBA, while Blastem puts them on BAR (IIRC).

@RobLoach
Copy link
Member

RobLoach commented Dec 5, 2021

How is this looking? Good to meget?

@RobLoach RobLoach marked this pull request as draft December 27, 2021 04:12
@nfp0
Copy link
Contributor

nfp0 commented Jan 30, 2022

if the device name matches exactly, I think it'll go ahead and match even with the vid/pid commented out...?

@hizzlekizzle These are Bluetooth controllers, so dinput reports both their names as "Wireless Gamepad" or "Wireless Controller". I don't know why Windows has this behaviour.
I opened an issue for this here: libretro/RetroArch#13520 in the hopes that RetroArch has other ways to fetch the real controller names. Maybe from the Windows Bluetooth subsystem?

Meanwhile, on udev on Linux, all the NSO controllers (SNES, Genesis/Mega Drive 3btn and 6btn, and N64) can be distinguished through their reported name, so this is not an issue there.
@PitiBatou It would be lovely if you could get the udev mappings on Linux so that we could have these auto-configured there.
I already added the Genesis/Mega Drive 3btn controller here, but I don't have the 6btn nor the N64 NSO controllers.

@PitiBatou
Copy link
Contributor Author

PitiBatou commented Feb 5, 2022

@nfp0 Sorry for the late reply.

Here is the code for both. I can confirm indeed that udev has no issue distinguishing between the SNES and MD controllers.

Do you mind if I ask you to do the PR? I can't wrap my head around how to do a PR just for these two files...

input_driver = "udev"
input_device = "N64 Controller"
input_vendor_id = "1406"
input_product_id = "8217"

input_b_btn = "1"
input_a_btn = "0"
input_y_btn = "0"
input_start_btn = "9"
input_select_btn = "10"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "6"
input_r_x_plus_btn = "8"
input_r_x_minus_btn = "3"
input_r_y_plus_btn = "7"
input_r_y_minus_btn = "2"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_menu_toggle_btn = "12"

input_b_btn_label = "A"
input_y_btn_label = "B"
input_start_btn_label = "Start"
input_select_btn_label = "ZR"
input_up_btn_label = "D-Pad Up"
input_down_btn_label = "D-Pad Down"
input_left_btn_label = "D-Pad Left"
input_right_btn_label = "D-Pad Right"
input_l_btn_label = "L"
input_r_btn_label = "R"
input_l2_btn_label = "Z"
input_r_x_plus_btn_label = "C Right"
input_r_x_minus_btn_label = "C Left"
input_r_y_minus_btn_label = "C Up"
input_r_y_plus_btn_label = "C Down"
input_l_x_plus_axis_label = "Joystick Right"
input_l_x_minus_axis_label = "Joystick Left"
input_l_y_plus_axis_label = "Joystick Down"
input_l_y_minus_axis_label = "Joystick Up"
input_menu_toggle_btn_label = "Home"


input_driver = "udev"
input_device = "MD/Gen Control Pad"

input_vendor_id = "1406"
input_product_id = "8215"

input_b_btn = "0"
input_y_btn = "1"
input_select_btn = "7"
input_start_btn = "9"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "5"
input_x_btn = "2"
input_l_btn = "6"
input_r_btn = "4"
input_menu_toggle_btn = "12"

input_b_btn_label = "B"
input_y_btn_label = "A"
input_select_btn_label = "Mode"
input_start_btn_label = "Start"
input_up_btn_label = "D-Pad Up"
input_down_btn_label = "D-Pad Down"
input_left_btn_label = "D-Pad Left"
input_right_btn_label = "D-Pad Right"
input_a_btn_label = "C"
input_x_btn_label = "Y"
input_l_btn_label = "X"
input_r_btn_label = "Z"
input_menu_toggle_btn_label = "Home"

@nfp0
Copy link
Contributor

nfp0 commented Feb 10, 2022

@PitiBatou Thanks a lot!
Oh you can simply commit to your PitiBatou:Switch_Online_Controllers branch and it will automatically be added to this PR.
But still, if you want, I can open a separate PR.

@PitiBatou
Copy link
Contributor Author

@nfp0 Got it! Done & done!

@nfp0
Copy link
Contributor

nfp0 commented Feb 11, 2022

@PitiBatou Nice. Thanks!
@hizzlekizzle @offalynne So if we comment out the input_device, vid and pid, this should be good to merge, right?

@offalynne
Copy link
Contributor

offalynne commented Feb 11, 2022

Leave input_device uncommented on udev where unique so they can match on name. I believe the N64 VID & PID are unique as well, no ?

@nfp0
Copy link
Contributor

nfp0 commented Feb 13, 2022

@offalynne That's right, the N64 VID & PID are unique.

@nfp0
Copy link
Contributor

nfp0 commented Apr 23, 2022

Is there anything stopping this from being merged?

@RobLoach RobLoach marked this pull request as ready for review April 23, 2022 20:08
Copy link
Member

@RobLoach RobLoach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@LibretroAdmin
Copy link
Contributor

Sorry for the holdup, finally merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants