8Bitdo M30 w/Retroarch

Happened across it in a thread on a different forum discussing the M30. I had no idea that remapping functionality was hidden in there either.

In fact I didn’t even notice it was automatically defined as the right analog when I was first testing it out, since the games I was testing on Switch used the same controls on both analog and dpad. But I can imagine this would be a massive pain to be setting it up with a Retroarch autoconfig and not realize that the dpad is automatically defined as the right analog.

1 Like

Load retroarch, a core and a game via commandline. I noticed that doing this, the input mapping screen will show buttons related only to that core. So a Saturn or Genesis core will show A,B,C,X,Y,Z allowing you to easily map the m30. If your setup allows it, you can then just do a per-core config setup (since different cores require different mappings).

Has anyone gotten the Home & Star buttons to work on Windows? They worked before and now I can’t get RA to read them. Trying to make Home the RGUI key

Honestly I’ve ignored those buttons entirely. What are they ‘supposed’ to do exactly? Home kinda makes sense… but star?

Basically extra function buttons, very useful for emulation. They’re probably more intended for the Mega SG.

On the Switch the Star button is set as the screen capture button. Switch support got added in to 8bitdo controllers firmware as a nice surprise a couple years back. Now their bluetooth controllers are arguably designed with the Switch foremost in mind and the function keys seem to reflect that.

If I get around to setting mine up with RA I’d imagine the Star button might make a nice secondary function key, like a turbo button.

I often use my old Saturn SLS USB pad with Retroarch, and while it’s great, it’s a bit too authentically modeled after a Saturn pad, lacking a dedicated Select Button or any sort of extra function keys.

How about adding the option to manually assign a specific button as the „RA menu button“?

In that case you‘d be able to manually remap an unused button (like the star or Home buttons on the new M30 for example) to bring up the RA interface.

As this would be an addition alongside the existing, hard-coded menu toggles, it would not interfere with the regular button mapping on other controllers that have fewer buttons.

You can assign specific buttons to various hotkeys–including to open the menu–in settings > input > hotkey binds. If you’d like to assign a button just for that controller, you can add it to the controller’s autoconfig profile via text editor and it will assign the hotkey just for that controller.

Here is a quickly put together autoconf file. This was made for when the pad is paired with bluetooth in Dinput mode and for use with the udev driver (Linux). I don’t know if it can be used as is for other drivers or if it is compliant with the official conventions (not sure about labeling - should it be the virtual RetroPad or real pad button names?)

I’ll gladly work on it some more (xinput pairing mode and other drivers) if no one else is working on it at the moment.

8Bitdo_M30_BT.cfg

# 8Bitdo M30                 - http://www.8bitdo.com/     - http://www.8bitdo.com/m30/
# Firmware v1.10             - http://support.8bitdo.com/ - http://download.8bitdo.com/Firmware/Controller/M30/M30_Firmware_V1.10.zip

input_driver = "udev"
input_device = "8BitDo M30 gamepad"
input_device_display_name = "8Bitdo M30"

# Hex vid:pid is found using "dmesg -w" or "tail -f /var/log/syslog" and converted to Decimal using http://www.binaryhexconverter.com/hex-to-decimal-converter
# Hex vid:pid = 2DC8:0651 -> Decimal vid:pid = 11720:1617
input_vendor_id = "11720"
input_product_id = "1617"

input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "10"
input_start_btn = "11"
input_a_btn = "1"
input_x_btn = "4"
input_l_btn = "6"
input_r_btn = "7"
input_l2_btn = "8"
input_r2_btn = "9"
input_menu_toggle_btn = "2"

input_b_btn_label = "A"
input_y_btn_label = "X"
input_select_btn_label = "Select"
input_start_btn_label = "Start"
input_a_btn_label = "B"
input_x_btn_label = "Y"
input_l_btn_label = "Z"
input_r_btn_label = "C"
input_l2_btn_label = "L"
input_r2_btn_label = "R"
input_menu_toggle_btn_label = "Home"

input_up_axis = "-1"
input_down_axis = "+1"
input_left_axis = "-0"
input_right_axis = "+0"

input_up_axis_label = "Dpad Up"
input_down_axis_label = "Dpad Down"
input_left_axis_label = "Dpad Left"
input_right_axis_label = "Dpad Right"

# -------------------------------------------------------------------------------------------------------------------------------------------------
# If RetroArch do NOT detect the controller when connected via Bluetooth and won't even recognize manual binding,
# fix it by adding this udev rule (the line below WITHOUT the # symbol at the beginning!) to "/etc/udev/rules.d/10-local.rules" and reboot.
# SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SFC30 GamePad", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
# -------------------------------------------------------------------------------------------------------------------------------------------------
2 Likes

great joypad! :wink:

Hey there!

I updated the cfg file to work for the M30 with the dinput driver out of the box once updated with the 1.13 version of the firmware. I tested it with Mortal Kombat II to make sure the buttons were mapped properly!

Thanks for giving me a template!

8Bitdo_M30_gamepad.cfg

# 8Bitdo M30                 - http://www.8bitdo.com/     - http://www.8bitdo.com/m30/
# Firmware v1.13             - http://support.8bitdo.com/ - http://download.8bitdo.com/Firmware/Controller/M30/M30_Firmware_V1.13.zip

input_driver = "dinput"
input_device = "8BitDo M30 gamepad"
input_device_display_name = "8Bitdo M30"

# Hex vid:pid is found using "dmesg -w" or "tail -f /var/log/syslog" and converted to Decimal using http://www.binaryhexconverter.com/hex-to-decimal-converter
# Hex vid:pid = 2DC8:5006 -> Decimal vid:pid = 11720:1617
input_vendor_id = "11720"
input_product_id = "20486"

input_b_btn = "1"
input_y_btn = "0"
input_select_btn = "10"
input_start_btn = "11"
input_a_btn = "7"
input_x_btn = "4"
input_l_btn = "3"
input_r_btn = "6"
input_l2_btn = "8"
input_r2_btn = "9"

input_b_btn_label = "B"
input_y_btn_label = "A"
input_select_btn_label = "Minus"
input_start_btn_label = "Start"
input_a_btn_label = "C"
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_up_axis = "-1"
input_down_axis = "+1"
input_left_axis = "-0"
input_right_axis = "+0"

input_up_axis_label = "Dpad Up"
input_down_axis_label = "Dpad Down"
input_left_axis_label = "Dpad Left"
input_right_axis_label = "Dpad Right"

# -------------------------------------------------------------------------------------------------------------------------------------------------
# If RetroArch do NOT detect the controller when connected via Bluetooth and won't even recognize manual binding,
# fix it by adding this udev rule (the line below WITHOUT the # symbol at the beginning!) to "/etc/udev/rules.d/10-local.rules" and reboot.
# SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SFC30 GamePad", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
# -------------------------------------------------------------------------------------------------------------------------------------------------
1 Like

For xinput mode (Start+X)

input_driver = "xinput"
input_device = "XInput Controller"
input_device_display_name = "8BitDo M30 XInput"
input_vendor_id = "1118"
input_product_id = "736"

# ---------------------------------------

input_b_btn = "1"
input_y_btn = "0"
input_select_btn = "7"
input_start_btn = "6"
input_x_btn = "3"
input_l_btn = "2"
input_r_btn = "5"
input_l2_btn = "4"


input_b_btn_label = "B"
input_y_btn_label = "A"
input_select_btn_label = "Mode"
input_start_btn_label = "Start"
input_x_btn_label = "Y"
input_l_btn_label = "X"
input_r_btn_label = "Z"
input_l2_btn_label = "L"

input_up_axis = "+1"
input_down_axis = "-1"
input_left_axis = "-0"
input_right_axis = "+0"

input_a_axis = "+5"
input_r2_axis = "+4"

input_up_axis_label = "Dpad Up"
input_down_axis_label = "Dpad Down"
input_left_axis_label = "Dpad Left"
input_right_axis_label = "Dpad Right"
input_r2_axis_label = "R"
input_a_axis_label = "C"

Hello. I use M30 on Android and OSX. Already configured the gamepad on Android correctly, but on the OSX works only 4 buttons (ABXY). On the OSX there is only a ‘hid’ input-driver. Is there a config for M30 on the ‘hid’ driver for the OSX? (so that all 6 buttons work)

Have you tried configuring it yourself in settings > input > port 1 binds?

Thanks! Really, I can “copy” configuration like Android device. And manually configure it. I still do not understand how the configurations settings work :relaxed:

1 Like

Sorry for bumping such an old thread.

As pointed out in other threads, most notably here, the current M30 Bluetooth autoconf from the repo is wrong. @ SirBedwyr has the right values in his thread. (complying with the LXR/YBA format for the 6 face buttons)

I have slightly reworked his profile for d-input adding the “Heart” key as the Menu Toggle key and renamed “Mode” as “Minus (-)” so that is is easier to remap SNES or other systems. L & R on the M30 also mapped as L2 and R2 of the RetroPad. It should help with Saturn.

Haven’t checked X-Input / udev / USB mode yet but they may have the same issue?

# 8BitDo M30 BT          - http://www.8bitdo.com/     - http://www.8bitdo.com/m30/
# Firmware v1.14         - http://support.8bitdo.com/

input_driver = "dinput"
input_device = "Bluetooth Wireless Controller   "
input_device_display_name = "8BitDo M30"

input_vendor_id = "11720"
input_product_id = "1617"

# ---------------------------------------

input_b_btn = "1"
input_y_btn = "0"
input_select_btn = "10"
input_start_btn = "11"
input_a_btn = "7"
input_x_btn = "4"
input_l_btn = "3"
input_r_btn = "6"
input_l2_btn = "8"
input_r2_btn = "9"
input_menu_toggle_btn = "2"

input_b_btn_label = "B"
input_y_btn_label = "A"
input_select_btn_label = "Minus (-)"
input_start_btn_label = "START"
input_a_btn_label = "C"
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_menu_toggle_btn = "Heart"

# ---------------------------------------

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_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_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"
1 Like

You are absolutely right. I keep meaning to put in a pull request for both this and the snes modkit from another thread and it’s just a lower priority while o get a bunch of RL stuff sorted. If you’re feeling ambitious, feel free to change the ID for both devices (I think I have the correct one cited in the snes thread) a pull request and beat me to it. Just let everyone know here you’re done and very sorry for not being on the ball.

I’ll look at udev / x-input and the IDs over the weekend and try submit a PR. I’m only familiar with Github as a “passive” user (pulling sources, following compiling guides). Will report here if I need help!

Thanks for the reply!

OK, looks like I managed to do the PR? Had no idea Github had such a neat web interface.

fix for 8Bitdo M30 Bluetooth controller layout

Thanks again!

2 Likes

@Tanuki

Thanks for this, I want to share the recent config since the configuration template has changed since with recent versions, but otherwise it matches yours content-wise. If I buy a Genesis looking gamepad, I expect it to work with Sega Gensis games, I really don’t understand the RetroArch developer approach here. I wonder if they have overwritten your pull request.

The content of 8Bitdo_M30_gamepad.cfg:

# 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_device_display_name = "8BitDo M30"

input_driver = "dinput"
input_device = "Bluetooth Wireless Controller   "
input_vendor_id = "11720"
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 = "7"
input_b_btn = "1"
input_x_btn = "4"
input_y_btn = "0"
input_l_btn = "3"
input_r_btn = "6"
input_l2_btn = "8"
input_r2_btn = "9"
input_select_btn = "10"
input_start_btn = "11"
input_menu_toggle_btn = "2"

input_a_btn_label = "C"
input_b_btn_label = "B"
input_x_btn_label = "Y"
input_y_btn_label = "A"
input_l_btn_label = "X"
input_r_btn_label = "Z"
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"

# 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"

# 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 (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 (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)"