@edward_ci that's how I understand it, yeah. As far as the emulator is concerned, it's just another USB gamepad. If the two gamepads have identical device names/IDs, then they'll use the same config file. So whatever mapping like button_12 = "A" or whatever is set in the config file, will be the same for both gamepads. If "button 12" is whatever button is wired in position "6F" on the board or whatever, and you have that wired to a different physical button, then your "A" button will be that different physical button. They need to be exactly the same.
I would also add that you can usually get the order you want by the order of the ports you plug them into (so long as you don't use a USB hub). With the 4 ports on my Pi3b, I plug them in this order:
So, my pandora's box takes up 0 and 1, keyboard in 2, mouse in 3. if I add another controller, I replace the mouse or keyboard. My pandora's box always stays player 1 and 2 that way.
I use a usb hub for mouse/keyboard/sony and xbox controller.
Pandora is direct to Pi4.
@ts-x Great idea on dropping in on him. I might just do that. I have a wired number pad that I tried to use plugged into the USB port on my Mayflash (which would also avoid two long wires), but that didn't work. It's not a real USB port apparently. However, it would also be seen as another input device.
This issue is NUTS and across the whole retro industry. Someone needs to do something. Every joystick should come with the ability to ID itself as unique. If say, 8bitdo suddenly started offering controllers that all could send out unique IDs it would be a SHORT wait for someone in Retroarch and others to jump in and support that. That manufacturer would sell a ton of product and force everyone else to adopt that option as it would be SO brain-dead obvious. How has this NOT happened yet???
Okay, solved and this is one I recommend making more clear in the documentation. My issue was that I ALWAYS keep a wireless keyboard connected to my Retropie. It's just a tiny dongle taking one port so why not? It's so much easier for certain tasks.
However, I kept wondering why the test rom for Intellivision was reporting that I was on controller 2 and every other comment pointed to controller one. Then I noticed posts where people said that Daphne and Intellivion (jzintv anyway) assign the first controller they see, which in this case was the keyboard -- and that explained why the keyboard worked. Ugh.
I changed controller configuration for lr-snes9x and lr-pcsx_rearmed so I can use the two logitech (more confortable with shoulders and triggers) and works good. I connect Logitech only when I want to play snes or psx games.
How exactly did you do that ? If you configured it from RetroArch, using a control remaps, then you need to remove the remap.