I post here some new findings in the gamepads configurations of RetroArch, because seems like the things I told in
one of the previous post were somehow working for pure luck... now I'm continuing to understand what is actually happening...
Some info about RetroArch:
1) Every "Joypad driver" (to be selected in the configuration) has a folder with its configuration files, and most of them, are already set up for the most common controllers, BUT,
not all drivers covers the same gamepads by default !!
2) A gamepad can also be recognized by its HARDWARE ID, and this will really make the gamepad-type unique for the emulator (so it will work with 2 similar BT gamepads, but I'm not sure what could happen with 2 identical gamepads anyway).
3) There is an option to make every gamepad be able to use the MENU, but seems broken... it at least should work for every controller mapped in one of the player ports, but still, it seems that only the "DEFAULT" gamepad will work in the MENU at the start.
Some facts about 8Bitdo gamepads:
1) When connected via
BT as d-input device, EVERY MODEL (at least SN30, M30, N30 Arcade...) is recognized as "Bluetooth Wireless Controller"
2) When connected via
BT as x-input device, EVERY MODEL (at least SN30, M30, N30 Arcade...) is recognized as "Xbox Bluetooth Gamepad", BUT
in this case, the gamepad is recognized ALWAYS present, even when the gamepad is turned off !!
3)
Firmware updates can change the HARDWARE ID of the devices
So, what did I found regarding my situation ?
1) The driver "xinput", with the first gamepad it worked ok, but after the second one, it was always a trouble to use them, the one I wanted to use was always not working... at least now I know why !! In the xinput folder, there are actually configurations (with HARDWARE IDS) for all my gamepads, so all of them were recognised as unique types... the problem is that if the first one connected to the system (that become "Default") is turned off, as "Xbox device" it doesn't disappear, and remain still the "default device"... so when RetroArch is started, the MENU will work ONLY with that default device, that is anyway turned off... and to change the active controller you have to use the mouse and select manually the controller that only you know it is currently turned on...
2) The driver "dinput" never worked out of the box for me... because I didn't know, that the "Xbox devices" I created before, were still giving the same issues as explained before... them were considered default even if turned off... so I actually weren't never able to understand why no one of my controllers were working at the start in d-input mode... Also, when I was selecting them by hand, I wasn't able to set different buttons configurations for every type of gamepad, and it was always a mess... In the dinput folder anyway I see already configurations with HARDWARE IDs set, but I had to correct them because weren't right after the firmware update... so before, without a corresponding HARDWARE ID, RetroArch was thinking that all my "Bluetooth Wireless Controller" were the same device, using the same button configuration for all of them...
3) The driver "sdl2" was working out of the box for 2 reasons, the first is that it doesn't recognize Xbox devices, so the previously problematic ones were excluded from the scan, and also in its folder, the "Bluetooth Wireless Controller" configuration didn't had a HARDWARE ID set... so it was recognising whoever 8bitdo gamepad was turned on in that moment as the default... and I was able to switch between them, and use the MENU with all of them, just because turning OFF one and turning ON the other, for RetroArch was always the same gamepad... but I found out that this way I can't use BOTH of them at the same time... I didn't found out the issues early, because I remapped gamepad buttons in a different way for every CORE, and was working... I didn't recognized that the M30 was using the same gamepad base configuration of the SN30, because I never used the SN30 to play Sega Genesis games, and never used the M30 to play Super Nintendo ones...
Now I understand better what is going on under the hood... but the main issue still stay, the MENU does work only with the default gamepad, and if it is turned off, you'll have every time to use the mouse to select the one you need...
launching RetroArch from EmulationStation means that for EVERY GAME YOU LAUNCH, you'll need to open RetroArch MENU to set, with the mouse, the actual gamepad to use...
So, right now, I have only 2 options:
1) Make RetroArch correctly recognise every type of gamepad, and having a correct button configuration for every one of them... but with the issue that if I'm not using the default gamepad, I'll have to select the right one at every launch, with the mouse
2) Make RetroArch consider that all my 8BitDo gamepads are the same one, and having a shared (wrong) button configuration for all of them... this could works if it is somehow corrected with a CORE level remap, considering that only the gamepad whose remap was made for will work correctly
This covers anyway only 8Bitdo devices... if I'll take into consideration all my other NOT-8BitDo gamepads the issue still stands...
EDIT:
DAMN FOUND THE DAMN EVIL OPTION !!
I'm not sure about what it does, but even if it's already configured that every player could use the MENU, if this option is active only the gamepad of "Player 1" will work:
Input -> Menu Controls -> Unified Menu Controls -> [OFF] !!!
So,
now I can use the MENU with ALL my gamepads/controllers (not only 8BitDo, all of them !!)
that are associated to a Player port... (the ones not associated to a port will just not work)...
A good thing is that RetroArch can manage A LOT of Player ports...
The drawback could be that if a specific game does differences from port numbers, like port 2 is always player 2 (maybe linked to a specific character in game), or only port 1 can start the game, then you are stuck probably with the wrong type of gamepad for that core... but at least you can interact with the game or the RetroArch MENU, instead of having to search for the keyboard and mouse to set up the gamepad every time...
I'll have to still try... but maybe I could find a way to even correct this (final ?) issue...
In the end seems like I'm getting closer to what I wanted to obtain, but there are really a lot of obscure options in RetroArch...