I am not sure if this is what you need to do, but here is what I did.
I have an multi-arcade machine with 4 joysticks:
- 2 normal d-pad and 6 buttons each
- 2 xbox-like USB joysticks (I will try the same with wifi controllers shortly but I assume that will work too).
I use the xbox joysticks to play games from new consoles that need several buttons (SNES and so). For the rest (NES, Atari and other old consoles) I use the normal arcade controllers.
So what I wanted to do was to have 2 joysticks groups:
- d-pad 1 and xbox joystick 1 for user 1
- d-pad 2 and xbox joystick 2 for user 2
I tried several ways and the one worked was thru joytokey.
I just set the user 2 keys on RetroArch manually (which are not configured by default, just for user 1) and then with joytokey set up the 4 joysticks in 2 groups. Even after reboots, the conf is still there and work perfectly.
The only issue is when I change the USB port for a joystick, it lost the order I wanted, but keeping them in a fixed USB port, all goes well.
Hope this helps.