From 2c05a1141d2b1e07bf38a129204e324c46c4822c Mon Sep 17 00:00:00 2001 From: j68k <99551701+j68k@users.noreply.github.com> Date: Sat, 12 Feb 2022 17:37:40 +0000 Subject: [PATCH 1/4] 8BitDo M30: Made USB and BT configs match again The M30 in DirectInput mode has exactly the same mapping when connected by USB or Bluetooth so we should autoconfigure it the same way in both cases. --- dinput/8Bitdo_M30_BT.cfg | 30 +++++++++++++++--------------- dinput/8Bitdo_M30_USB.cfg | 6 ++++-- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/dinput/8Bitdo_M30_BT.cfg b/dinput/8Bitdo_M30_BT.cfg index 4ccc1d9..63776da 100644 --- a/dinput/8Bitdo_M30_BT.cfg +++ b/dinput/8Bitdo_M30_BT.cfg @@ -1,5 +1,5 @@ # 8BitDo M30 BT - http://www.8bitdo.com/ - http://www.8bitdo.com/m30/ -# Firmware v1.14 - http://support.8bitdo.com/ +# Firmware v1.15 - http://support.8bitdo.com/ input_driver = "dinput" input_device = "Bluetooth Wireless Controller " @@ -10,28 +10,28 @@ input_product_id = "1617" # --------------------------------------- -input_b_btn = "1" -input_y_btn = "0" +input_b_btn = "0" +input_y_btn = "3" input_select_btn = "10" input_start_btn = "11" -input_a_btn = "7" +input_a_btn = "1" input_x_btn = "4" -input_l_btn = "3" -input_r_btn = "6" -input_l2_btn = "8" -input_r2_btn = "9" +input_l_btn = "8" +input_r_btn = "9" +input_l2_btn = "6" +input_r2_btn = "7" input_menu_toggle_btn = "2" -input_b_btn_label = "B" -input_y_btn_label = "A" +input_b_btn_label = "A" +input_y_btn_label = "X" input_select_btn_label = "Minus (-)" input_start_btn_label = "START" -input_a_btn_label = "C" +input_a_btn_label = "B" input_x_btn_label = "Y" -input_l_btn_label = "X" -input_r_btn_label = "Z" -input_l2_btn_label = "L" -input_r2_btn_label = "R" +input_l_btn_label = "L" +input_r_btn_label = "R" +input_l2_btn_label = "Z" +input_r2_btn_label = "C" input_menu_toggle_btn = "Heart" # --------------------------------------- diff --git a/dinput/8Bitdo_M30_USB.cfg b/dinput/8Bitdo_M30_USB.cfg index 4312d69..26ba05c 100644 --- a/dinput/8Bitdo_M30_USB.cfg +++ b/dinput/8Bitdo_M30_USB.cfg @@ -1,5 +1,5 @@ # 8BitDo M30 BT - http://www.8bitdo.com/ - http://www.8bitdo.com/m30/ -# Firmware v1.13 - http://support.8bitdo.com/ +# Firmware v1.15 - http://support.8bitdo.com/ input_driver = "dinput" input_device = "8BitDo M30 gamepad" @@ -20,10 +20,11 @@ input_l_btn = "8" input_r_btn = "9" input_l2_btn = "6" input_r2_btn = "7" +input_menu_toggle_btn = "2" input_b_btn_label = "A" input_y_btn_label = "X" -input_select_btn_label = "MODE" +input_select_btn_label = "Minus (-)" input_start_btn_label = "START" input_a_btn_label = "B" input_x_btn_label = "Y" @@ -31,6 +32,7 @@ input_l_btn_label = "L" input_r_btn_label = "R" input_l2_btn_label = "Z" input_r2_btn_label = "C" +input_menu_toggle_btn = "Heart" # --------------------------------------- From 27058c9d7a8a3cac6a5ac70c7bfbf7309f1b48bc Mon Sep 17 00:00:00 2001 From: j68k <99551701+j68k@users.noreply.github.com> Date: Sat, 12 Feb 2022 18:21:25 +0000 Subject: [PATCH 2/4] 8BitDo M30: Tidied up input labels and improved comments --- dinput/8Bitdo_M30_BT.cfg | 42 +++++++++++++++++++++++---------------- dinput/8Bitdo_M30_USB.cfg | 42 +++++++++++++++++++++++---------------- 2 files changed, 50 insertions(+), 34 deletions(-) diff --git a/dinput/8Bitdo_M30_BT.cfg b/dinput/8Bitdo_M30_BT.cfg index 63776da..4456320 100644 --- a/dinput/8Bitdo_M30_BT.cfg +++ b/dinput/8Bitdo_M30_BT.cfg @@ -1,5 +1,11 @@ -# 8BitDo M30 BT - http://www.8bitdo.com/ - http://www.8bitdo.com/m30/ -# Firmware v1.15 - http://support.8bitdo.com/ +# 8BitDo M30 Bluetooth controller +# https://www.8bitdo.com/m30/ +# https://support.8bitdo.com/ +# Firmware v1.15 +# +# This configuration is for when the controller is connected by Bluetooth, and there's a corresponding one for when it is connected by USB. +# +# It's best to use this controller in DirectInput mode (which the manual calls "Android (D - input)") rather than XInput mode because in XInput mode it identifies itself using a generic product ID and a generic name that is shared with other 8BitDo controllers. That means that it's impossible to change the RetroArch configuration for it without also affecting the configuration of other 8BitDo controllers that have different layouts. In DirectInput mode the controller uses a unique product ID so we can recognize and configure it distinctly. input_driver = "dinput" input_device = "Bluetooth Wireless Controller " @@ -8,7 +14,7 @@ input_device_display_name = "8BitDo M30" input_vendor_id = "11720" input_product_id = "1617" -# --------------------------------------- +# Buttons: input_b_btn = "0" input_y_btn = "3" @@ -25,7 +31,7 @@ input_menu_toggle_btn = "2" input_b_btn_label = "A" input_y_btn_label = "X" input_select_btn_label = "Minus (-)" -input_start_btn_label = "START" +input_start_btn_label = "Start" input_a_btn_label = "B" input_x_btn_label = "Y" input_l_btn_label = "L" @@ -34,34 +40,36 @@ input_l2_btn_label = "Z" input_r2_btn_label = "C" input_menu_toggle_btn = "Heart" -# --------------------------------------- +# D-Pad: input_up_btn = "h0up" input_down_btn = "h0down" input_left_btn = "h0left" input_right_btn = "h0right" -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_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" + +# The controller can be configured to have the D-Pad report inputs as either a left or right analog stick instead of as a digital D-Pad: 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_l_x_plus_axis_label = "D-PAD RIGHT" -input_l_x_minus_axis_label = "D-PAD LEFT" -input_l_y_plus_axis_label = "D-PAD DOWN" -input_l_y_minus_axis_label = "D-PAD UP" +input_l_x_plus_axis_label = "D-Pad Right (Analog Stick Mode)" +input_l_x_minus_axis_label = "D-Pad Left (Analog Stick Mode)" +input_l_y_plus_axis_label = "D-Pad Down (Analog Stick Mode)" +input_l_y_minus_axis_label = "D-Pad Up (Analog Stick Mode)" input_r_x_plus_axis = "+2" input_r_x_minus_axis = "-2" input_r_y_plus_axis = "+5" input_r_y_minus_axis = "-5" -input_r_x_plus_axis_label = "D-PAD RIGHT" -input_r_x_minus_axis_label = "D-PAD LEFT" -input_r_y_plus_axis_label = "D-PAD DOWN" -input_r_y_minus_axis_label = "D-PAD UP" +input_r_x_plus_axis_label = "D-Pad Right (Analog Stick Mode)" +input_r_x_minus_axis_label = "D-Pad Left (Analog Stick Mode)" +input_r_y_plus_axis_label = "D-Pad Down (Analog Stick Mode)" +input_r_y_minus_axis_label = "D-Pad Up (Analog Stick Mode)" diff --git a/dinput/8Bitdo_M30_USB.cfg b/dinput/8Bitdo_M30_USB.cfg index 26ba05c..3a47a22 100644 --- a/dinput/8Bitdo_M30_USB.cfg +++ b/dinput/8Bitdo_M30_USB.cfg @@ -1,5 +1,11 @@ -# 8BitDo M30 BT - http://www.8bitdo.com/ - http://www.8bitdo.com/m30/ -# Firmware v1.15 - http://support.8bitdo.com/ +# 8BitDo M30 Bluetooth controller +# https://www.8bitdo.com/m30/ +# https://support.8bitdo.com/ +# Firmware v1.15 +# +# This configuration is for when the controller is connected by USB, and there's a corresponding one for when it is connected by Bluetooth. +# +# It's best to use this controller in DirectInput mode (which the manual calls "Android (D - input)") rather than XInput mode because in XInput mode it identifies itself using a generic product ID and a generic name that is shared with other 8BitDo controllers. That means that it's impossible to change the RetroArch configuration for it without also affecting the configuration of other 8BitDo controllers that have different layouts. In DirectInput mode the controller uses a unique product ID so we can recognize and configure it distinctly. input_driver = "dinput" input_device = "8BitDo M30 gamepad" @@ -8,7 +14,7 @@ input_device_display_name = "8BitDo M30" input_vendor_id = "11720" input_product_id = "20486" -# --------------------------------------- +# Buttons: input_b_btn = "0" input_y_btn = "3" @@ -25,7 +31,7 @@ input_menu_toggle_btn = "2" input_b_btn_label = "A" input_y_btn_label = "X" input_select_btn_label = "Minus (-)" -input_start_btn_label = "START" +input_start_btn_label = "Start" input_a_btn_label = "B" input_x_btn_label = "Y" input_l_btn_label = "L" @@ -34,34 +40,36 @@ input_l2_btn_label = "Z" input_r2_btn_label = "C" input_menu_toggle_btn = "Heart" -# --------------------------------------- +# D-Pad: input_up_btn = "h0up" input_down_btn = "h0down" input_left_btn = "h0left" input_right_btn = "h0right" -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_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" + +# The controller can be configured to have the D-Pad report inputs as either a left or right analog stick instead of as a digital D-Pad: 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_l_x_plus_axis_label = "D-PAD RIGHT" -input_l_x_minus_axis_label = "D-PAD LEFT" -input_l_y_plus_axis_label = "D-PAD DOWN" -input_l_y_minus_axis_label = "D-PAD UP" +input_l_x_plus_axis_label = "D-Pad Right (Analog Stick Mode)" +input_l_x_minus_axis_label = "D-Pad Left (Analog Stick Mode)" +input_l_y_plus_axis_label = "D-Pad Down (Analog Stick Mode)" +input_l_y_minus_axis_label = "D-Pad Up (Analog Stick Mode)" input_r_x_plus_axis = "+2" input_r_x_minus_axis = "-2" input_r_y_plus_axis = "+5" input_r_y_minus_axis = "-5" -input_r_x_plus_axis_label = "D-PAD RIGHT" -input_r_x_minus_axis_label = "D-PAD LEFT" -input_r_y_plus_axis_label = "D-PAD DOWN" -input_r_y_minus_axis_label = "D-PAD UP" +input_r_x_plus_axis_label = "D-Pad Right (Analog Stick Mode)" +input_r_x_minus_axis_label = "D-Pad Left (Analog Stick Mode)" +input_r_y_plus_axis_label = "D-Pad Down (Analog Stick Mode)" +input_r_y_minus_axis_label = "D-Pad Up (Analog Stick Mode)" From 6c7b7d05073b040dd2395b582ff2a543433e3aa5 Mon Sep 17 00:00:00 2001 From: j68k <99551701+j68k@users.noreply.github.com> Date: Sat, 12 Feb 2022 19:34:12 +0000 Subject: [PATCH 3/4] 8BitDo M30: Reordered entries --- dinput/8Bitdo_M30_BT.cfg | 22 +++++++++++----------- dinput/8Bitdo_M30_USB.cfg | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dinput/8Bitdo_M30_BT.cfg b/dinput/8Bitdo_M30_BT.cfg index 4456320..3219bc5 100644 --- a/dinput/8Bitdo_M30_BT.cfg +++ b/dinput/8Bitdo_M30_BT.cfg @@ -7,38 +7,38 @@ # # It's best to use this controller in DirectInput mode (which the manual calls "Android (D - input)") rather than XInput mode because in XInput mode it identifies itself using a generic product ID and a generic name that is shared with other 8BitDo controllers. That means that it's impossible to change the RetroArch configuration for it without also affecting the configuration of other 8BitDo controllers that have different layouts. In DirectInput mode the controller uses a unique product ID so we can recognize and configure it distinctly. -input_driver = "dinput" -input_device = "Bluetooth Wireless Controller " input_device_display_name = "8BitDo M30" +input_driver = "dinput" +input_device = "Bluetooth Wireless Controller " input_vendor_id = "11720" input_product_id = "1617" # Buttons: -input_b_btn = "0" -input_y_btn = "3" -input_select_btn = "10" -input_start_btn = "11" input_a_btn = "1" +input_b_btn = "0" input_x_btn = "4" +input_y_btn = "3" input_l_btn = "8" input_r_btn = "9" input_l2_btn = "6" input_r2_btn = "7" +input_select_btn = "10" +input_start_btn = "11" input_menu_toggle_btn = "2" -input_b_btn_label = "A" -input_y_btn_label = "X" -input_select_btn_label = "Minus (-)" -input_start_btn_label = "Start" input_a_btn_label = "B" +input_b_btn_label = "A" input_x_btn_label = "Y" +input_y_btn_label = "X" input_l_btn_label = "L" input_r_btn_label = "R" input_l2_btn_label = "Z" input_r2_btn_label = "C" -input_menu_toggle_btn = "Heart" +input_select_btn_label = "Minus (-)" +input_start_btn_label = "Start" +input_menu_toggle_btn_label = "Heart" # D-Pad: diff --git a/dinput/8Bitdo_M30_USB.cfg b/dinput/8Bitdo_M30_USB.cfg index 3a47a22..a164373 100644 --- a/dinput/8Bitdo_M30_USB.cfg +++ b/dinput/8Bitdo_M30_USB.cfg @@ -7,38 +7,38 @@ # # It's best to use this controller in DirectInput mode (which the manual calls "Android (D - input)") rather than XInput mode because in XInput mode it identifies itself using a generic product ID and a generic name that is shared with other 8BitDo controllers. That means that it's impossible to change the RetroArch configuration for it without also affecting the configuration of other 8BitDo controllers that have different layouts. In DirectInput mode the controller uses a unique product ID so we can recognize and configure it distinctly. -input_driver = "dinput" -input_device = "8BitDo M30 gamepad" input_device_display_name = "8BitDo M30" +input_driver = "dinput" +input_device = "8BitDo M30 gamepad" input_vendor_id = "11720" input_product_id = "20486" # Buttons: -input_b_btn = "0" -input_y_btn = "3" -input_select_btn = "10" -input_start_btn = "11" input_a_btn = "1" +input_b_btn = "0" input_x_btn = "4" +input_y_btn = "3" input_l_btn = "8" input_r_btn = "9" input_l2_btn = "6" input_r2_btn = "7" +input_select_btn = "10" +input_start_btn = "11" input_menu_toggle_btn = "2" -input_b_btn_label = "A" -input_y_btn_label = "X" -input_select_btn_label = "Minus (-)" -input_start_btn_label = "Start" input_a_btn_label = "B" +input_b_btn_label = "A" input_x_btn_label = "Y" +input_y_btn_label = "X" input_l_btn_label = "L" input_r_btn_label = "R" input_l2_btn_label = "Z" input_r2_btn_label = "C" -input_menu_toggle_btn = "Heart" +input_select_btn_label = "Minus (-)" +input_start_btn_label = "Start" +input_menu_toggle_btn_label = "Heart" # D-Pad: From 7d6aa755ab234e5ed44fd301346a48246e26b740 Mon Sep 17 00:00:00 2001 From: j68k <99551701+j68k@users.noreply.github.com> Date: Sat, 12 Feb 2022 19:30:30 +0000 Subject: [PATCH 4/4] 8BitDo M30: Changed to match RetroArch convention for controllers with 6 face buttons See the comment for rationale. --- dinput/8Bitdo_M30_BT.cfg | 18 ++++++++++-------- dinput/8Bitdo_M30_USB.cfg | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/dinput/8Bitdo_M30_BT.cfg b/dinput/8Bitdo_M30_BT.cfg index 3219bc5..f734e2b 100644 --- a/dinput/8Bitdo_M30_BT.cfg +++ b/dinput/8Bitdo_M30_BT.cfg @@ -16,14 +16,16 @@ input_product_id = "1617" # Buttons: +# The RetroPad layout has four face buttons, whereas the M30 has six. We map the M30's L and R buttons to the RetroPad's triggers, and map the M30's Z and C buttons to the RetroPad's left and right shoulder buttons respectively. That may seem somewhat counterintuitive but it follows the convention that is used in many cores for systems that have six face buttons in this layout. That allows the controller to be autoconfigured and work in the natural way in the Beetle Saturn core, and in 6-button fighting games in the FinalBurn Neo and MAME cores. + input_a_btn = "1" input_b_btn = "0" input_x_btn = "4" input_y_btn = "3" -input_l_btn = "8" -input_r_btn = "9" -input_l2_btn = "6" -input_r2_btn = "7" +input_l_btn = "6" +input_r_btn = "7" +input_l2_btn = "8" +input_r2_btn = "9" input_select_btn = "10" input_start_btn = "11" input_menu_toggle_btn = "2" @@ -32,10 +34,10 @@ input_a_btn_label = "B" input_b_btn_label = "A" input_x_btn_label = "Y" input_y_btn_label = "X" -input_l_btn_label = "L" -input_r_btn_label = "R" -input_l2_btn_label = "Z" -input_r2_btn_label = "C" +input_l_btn_label = "Z" +input_r_btn_label = "C" +input_l2_btn_label = "L" +input_r2_btn_label = "R" input_select_btn_label = "Minus (-)" input_start_btn_label = "Start" input_menu_toggle_btn_label = "Heart" diff --git a/dinput/8Bitdo_M30_USB.cfg b/dinput/8Bitdo_M30_USB.cfg index a164373..7c34399 100644 --- a/dinput/8Bitdo_M30_USB.cfg +++ b/dinput/8Bitdo_M30_USB.cfg @@ -16,14 +16,16 @@ input_product_id = "20486" # Buttons: +# The RetroPad layout has four face buttons, whereas the M30 has six. We map the M30's L and R buttons to the RetroPad's triggers, and map the M30's Z and C buttons to the RetroPad's left and right shoulder buttons respectively. That may seem somewhat counterintuitive but it follows the convention that is used in many cores for systems that have six face buttons in this layout. That allows the controller to be autoconfigured and work in the natural way in the Beetle Saturn core, and in 6-button fighting games in the FinalBurn Neo and MAME cores. + input_a_btn = "1" input_b_btn = "0" input_x_btn = "4" input_y_btn = "3" -input_l_btn = "8" -input_r_btn = "9" -input_l2_btn = "6" -input_r2_btn = "7" +input_l_btn = "6" +input_r_btn = "7" +input_l2_btn = "8" +input_r2_btn = "9" input_select_btn = "10" input_start_btn = "11" input_menu_toggle_btn = "2" @@ -32,10 +34,10 @@ input_a_btn_label = "B" input_b_btn_label = "A" input_x_btn_label = "Y" input_y_btn_label = "X" -input_l_btn_label = "L" -input_r_btn_label = "R" -input_l2_btn_label = "Z" -input_r2_btn_label = "C" +input_l_btn_label = "Z" +input_r_btn_label = "C" +input_l2_btn_label = "L" +input_r2_btn_label = "R" input_select_btn_label = "Minus (-)" input_start_btn_label = "Start" input_menu_toggle_btn_label = "Heart"