Mayflash Sega Saturn Adaptor 2nd controller not recognised
-
I have a problem that I can't seem to find a solution to anywhere on the web. I have tried asking other avenues - but not here strangely? Anyway..
I have a Mayflash Saturn to USB convertor which in general works absolutely perfectly (Unrelated, the Saturn pad is amazing for 2D games). Retropie reads the pad as a Huijia USB Gamepad
The problem is when I try and plug in a second Saturn pad into the adaptor. Retropie refuses to recognise that there are 2 controllers. When I try to configure buttons when 2 controllers plugged in, it does not recognise the 2nd controller at all. I assume it cannot differentiate between the 2
Is there any wizardry that can be done to make Retropie recognise the 2 different controllers at all? I will admit my technical abilities are not the greatestMany Thanks
-
Warning : I wouldn't recommend someone without the technical abilities to read the following, instead i would recommend him to buy Hori Fighting Commander controllers which are a really good replacement to the Saturn controllers.
So, your issue is not a Retropie issue, it's a linux kernel issue, most of the mayflash dual controllers adapter are not properly recognized by the linux kernel (they are recognized as a single controller containing buttons from both controller).
I have a fix, but it involves downloading kernel sources, modifying them, then building your own kernel.
You'll have to follow this guide : https://www.raspberrypi.org/documentation/linux/kernel/building.md , except after using "git clone" to retrieve the kernel sources, you'll have to edit the following 2 files in those sources :
drivers/hid/hid-ids.h :
after
#define USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD 0x3013
add
#define USB_DEVICE_ID_GREENASIA_DUAL_SAT_ADAPTOR 0x3010drivers/hid/usbhid/hid-quirks.c :
after
{ USB_VENDOR_ID_GREENASIA, USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD, HID_QUIRK_MULTI_INPUT },
add
{ USB_VENDOR_ID_GREENASIA, USB_DEVICE_ID_GREENASIA_DUAL_SAT_ADAPTOR, HID_QUIRK_MULTI_INPUT },Here i'm assuming you use the same adapter i have, but it would be a good idea to first make sure by running lsusb and searching for a "0e8f:3010 GreenAsia Inc." line.
That trick works with most mayflash dual adapters (i have 3 types of those adapters and had to add a line for each of them in the files i mentioned), to my knowledge only a N64 dual adapter is properly recognized (which is the "USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD" i add my lines after).
-
@barbudreadmon
Wow. Thank you for the very quick and detailed response. Yeah, that may be a little bit out of my limited linux knowledge comfort zone. I suppose it may be worth a go at attempting (naturally after backing up the SD card first!), I mean this is what the Pi is for hey? Tinkering around and getting your feet wetAnd if it all goes wrong, that pad you mentioned looks exactly like what I am after!
-
Hi there,
I wanted to let everyone know that this process works, and to thank you for your fix. I just bought the Mayflash Sega Saturn Adapter, and ran into issues with setting it up initially. I followed the instructions and it worked flawlessly. I have a Raspberry Pi 3, and compiled right on it; It took about 3 hours (of course if anyone wants it done faster, compile the kernel on a more powerful system (cross-compile)
I've only tested the Saturn "3D" controller so far, and it works well. I'll be testing a Sega Virtua-stick and a Hori Fighting Stick SS (when it arrives at my house).Everyone that may attempt this, beware that if you ever update your Kernel, via an apt-get, you'll eliminate this fix. You will then have to repeat this process of compiling your own kernel with these patches.
Hopefully, the change will get approved an merged into the Linux Kernel.
Thanks again.
-
@masseo1 Wouldn't it be easier to use the
usbhid
module quirks (https://raspberrypi.stackexchange.com/questions/3487/editing-quirks-for-a-usb-driver) to make this work, rather than re-compiling the whole kernel ? -
Hey, thanks, I want to see if I can utilize that. I never knew about that. What an awesome approach!
The thing is, I am quite familiar with compiling kernels, not so familiar with how "modular" and dynamic modules can actually be.
-
@barbudreadmon I'm curious... in the five years since this post, have the Linux kernels been updated to recognize Mayflash Saturn USB converters? Also, does this converter work with the analog controller or the twin sticks?
-
@stevethefish76 i haven't plugged my adapters for quite some time so i can't tell, if it doesn't i'd recommend using @mitu's usbhid quirk method instead of mine, and yeah the analogs should be recognized.
-
@barbudreadmon Thanks. I run Retropie on my Linux PC. I suppose I'll give it a try.
-
@mitu @barbudreadmon This week I bought the Saturn to USB converter by Mayflash and I was able to configure Retropie to use one Saturn pad. Retropie recognized it as a Generic X-Box pad and it created a "Generic X-Box pad.cfg" file. I haven't had luck getting it to configure the analog pad, so I haven't been able to test the second controller port.
I used to have a Nitiumi (generic) Saturn-style pad and had configured it for the Saturn and the MD/MCD/32X emulators through the core remap. I got into Street Fighter 2 for the MD and was able to remap buttons. The problem now is that button A has now become a RESET button. I deleted the core remap configuration, but it still wants to reset the game every time I press A.
Something else that's weid is that with the Nitiumi controller, I was able to bring up the Retroarch menu with Start+Y and from there I'd exit the game with the Saturn emulator. Now It is Start+Y+Z for some reason. I do not know how to configure that. For the MD, I had to mash buttons until I figured out that it is Start+A+Y to bring up the Retroarch. Some advice on this too would be appreciated. Thanks in advance.
-
@stevethefish76 said in Mayflash Sega Saturn Adaptor 2nd controller not recognised:
Retropie recognized it as a Generic X-Box pad
That's not normal, it should be something like "Mayflash Sega Saturn to USB Adapter", maybe you got a different adapter model hence why it's falling back to some generic autoconfig ? Could you run
lsusb
and post the output ? The model i have which is recognized by retroarch should look like this :... Bus 001 Device 011: ID 0e8f:3010 GreenAsia Inc. USB GamePad ...
-
@barbudreadmon OK, I did a lsusb command and it lists it as "DragonRise Inc. SS Controller Adapter-Xinput". I failed to mention that I am not using a RasPi, but actually my Linux Mint desktop. Would that make a difference?
-
@stevethefish76 said in Mayflash Sega Saturn Adaptor 2nd controller not recognised:
I failed to mention that I am not using a RasPi, but actually my Linux Mint desktop. Would that make a difference?
Not as far as
lsusb
is concerned. As @barbudreadmon mentioned, the name of the gamepad should not be Drangonrise.., that's a generic controller used in a lot of arcade boards and gamepads. Maybe it's a clone of the genuine Mayflash converter.Is your controller working correctly in EmulationStation ? Post the RetroArch auto-configuration profile from
/opt/retropie/configs/all/retroarch-joypads
- there should be a.cfg
file named similarly to your gamepad.
Also, get a verbose log and post it on pastebin.com, providing the link. -
@mitu Here is a paste from the Generic X-Box pad.cfg file.
input_device = "Generic X-Box pad"
input_driver = "udev"
input_enable_hotkey_btn = "0"
input_l_btn = "9"
input_load_state_btn = "9"
input_up_btn = "h0up"
input_up_btn_label = "Stick Up"
input_left_btn = "h0left"
input_left_btn_label = "Stick Left"
input_state_slot_decrease_btn = "h0left"
input_r2_btn = "5"
input_right_btn = "h0right"
input_right_btn_label = "Stick Right"
input_state_slot_increase_btn = "h0right"
input_l2_btn = "4"
input_l2_btn_label = "L"
input_r_btn = "10"
input_save_state_btn = "10"
input_y_btn = "2"
input_x_btn = "3"
input_menu_toggle_btn = "3"
input_down_btn = "h0down"
input_down_btn_label = "Stick Down"
input_start_btn = "7"
input_start_btn_label = "Plus"
input_exit_emulator_btn = "nul"
input_b_btn = "0"
input_reset_btn = "0"
input_a_btn = "1"
input_vendor_id = "121"
input_product_id = "6267"
input_gun_trigger_mbtn = "1"I added the "nul" for exit_emulator_btn because I had a problem with the old pad exiting the game every time I pressed the start button.
-
@stevethefish76 said in Mayflash Sega Saturn Adaptor 2nd controller not recognised:
DragonRise Inc. SS Controller Adapter-Xinput
What matters the most are the hexadecimals right before the name, autoconfig matching is based on those, but yeah it appears to be a different adapter, which explains why it's not automapped properly, especially since it mentions "Xinput".
-
I don't know how you got this mapping configuration, it doesn't seem to be produced by RetroPie's input configuration script (from EmulationStation).
You've got the same button (
0
) mapped as hotkey_enable, reset and exit, which is not ok. If the gamepad doesn't have a separate button for you to use as hotkey_enable and - as far as I know - the original Saturn controller doesn't have a Select button, you should disable any hotkey actions (reset/exit/menu/load/save/etc) and leave only the buttons and D-Pad mapped.
You can use use RetroArch's options to enable the menu with a button combo (L3 + R3, L1 + R1, Hold Start (2 sec), etc), which you can find under Settings -> Input -> Hotkeys. -
@mitu @barbudreadmon OK, I'm finally finding time to get back to this. My Mayflash USB converter seems to be a legitimate and not a clone. I have no way of knowing.
There is a switch between Xinput and Dinput. With Dinput, it says that two controllers are detected, but I cannot get Retropie to properly recognize the controller. However, it does say SS rather than Xbox. Here are lsub results:
0079:187a DragonRise Inc. SS Controller Adapter-Dinput
0079:187b DragonRise Inc. SS Controller Adapter-Xinput
Here. I've redone the mapping. Generic X-Box pad.cfg
input_device = "Generic X-Box pad"
input_driver = "udev"
input_enable_hotkey_btn = "7"
input_l_btn = "9"
input_load_state_btn = "9"
input_up_btn = "h0up"
input_up_btn_label = "Stick Up"
input_left_btn = "h0left"
input_left_btn_label = "Stick Left"
input_state_slot_decrease_btn = "h0left"
input_r2_btn = "5"
input_right_btn = "h0right"
input_right_btn_label = "Stick Right"
input_state_slot_increase_btn = "h0right"
input_l2_btn = "4"
input_l2_btn_label = "L"
input_r_btn = "10"
input_save_state_btn = "10"
input_y_btn = "2"
input_x_btn = "3"
input_menu_toggle_btn = "3"
input_down_btn = "h0down"
input_down_btn_label = "Stick Down"
input_start_btn = "7"
input_start_btn_label = "Plus"
input_exit_emulator_btn = "7"
input_b_btn = "0"
input_reset_btn = "0"
input_a_btn = "1"
input_exit_emulator_btn = "nul"I've tried deleting this .cfg file a few times tonight and remapping the joypad. At one point, I could bring up the Retroarch menu by pressing Start+Y+Z. Currently, I cannot bring it up, and upon pressing Start+Z it just quits the game, even though I have the input_exit_emulator_btn = "nul" in the cfg file.
I can't do a core remap without being able to load the Retroarch menu through a hotkey. From the main Retropie menu, I tried going into the Retroarch menu to configure the hotkeys so that pressing and holding the start button will bring up the menu. When I exit though, I get this message:
error: XDG_RUNTIME_DIR not set in the environment.This is all puzzling to me. Is it because Retropie on a Raspi is Debian-based, while Linux Mint is Ubuntu-based? I'm just guessing as I don't know what I'm talking about really. Megadrive and 32X just exit out of the game upon pressing the start button.
EDIT: The back of the packaging says this:
"Direct Input (standard HID protocol) supports 2 controllers at the same time. Xinput (Xbox 360 controller protocol) supports one controller per individual adapter. -
@stevethefish76 said in Mayflash Sega Saturn Adaptor 2nd controller not recognised:
I've tried deleting this .cfg file a few times tonight and remapping the joypad. At one point, I could bring up the Retroarch menu by pressing Start+Y+Z. Currently, I cannot bring it up, and upon pressing Start+Z it just quits the game, even though I have the input_exit_emulator_btn = "nul" in the cfg file.
Looking at your config file, you still have the same button (
7
) mapped to hotkey enable, Start and Exit.Don't map any hotkey button when asked (in EmulationStation). Add a value for
input_menu_toggle_gamepad_combo
in/opt/retropie/configs/all/retroarch.cfg
. You can choose from the values explained here - for instance to useL1+R1
for opening the menu, addinput_menu_toggle_gamepad_combo = "6"
-
@mitu Hi, perhaps I am misunderstanding, but the hotkey can be anything not used much, I thought. Usually it is the select button, but if you use the NES emulator, the select will still work. It's only when pressed in conjunction with another button that it brings up the Retroarch menu. The way I had the Nitiumi Saturn pad configured, Start was the hotkey, so when pressed with the Y button, it brought up the menu. Pressing start alone simply paused the game. What I want to do is designate which button in conjunction with the hotbutton (in this case, the start button) to bring up the menu.
-
OK, then try this way - keep the existing config, but remove the Exit hotkey line (
input_exit_emulator_btn = "7"
). Start + X should open up the menu - but if you want to open the menu with Y, then change the lineinput_menu_toggle_btn = "3"
to
input_menu_toggle_btn = "2"
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.