Multiple Input Devices Mapping per Player

Discussion of keyboards, gamepads, joysticks and other input related peripherals.
johey
Posts: 7
Joined: Tue Jul 27, 2021 1:08 pm

Multiple Input Devices Mapping per Player

Unread post by johey »

An update by Sorgelig from July 3'rd states:

Sorgelig wrote: Mon Jul 03, 2023 5:38 pm

Main:

  • input: support for multiple input devices mapping per player.

Can someone please explain how to use this? I am having a hard time getting my head around this. The WIKI seems not updated unless I'm reading it wrong.

I can map all different controllers in Main, and also in the cores, and sometimes I can use multiple of my devices as player one, but sometimes pressing the second controller maps it to player two. It would be awesome to understand the logic behind it.

Lightwave
Posts: 233
Joined: Sun May 24, 2020 10:06 pm
Has thanked: 113 times
Been thanked: 68 times

Re: Multiple Input Devices Mapping per Player

Unread post by Lightwave »

you need to do this in mister.ini

https://github.com/MiSTer-devel/Main_Mi ... MiSTer.ini

specifically this section:

Code: Select all

; Permanently assign specific controller to specific player.
; Normally you don't need to use this option, but if you use arcade cabinet with integrated controllers then
; you may want to use it for specific player regardless which controller is used first.
; To assign it, you need to provide unique part of this controller ID.
; In USB debug log you may see list of input devices right after core has been loaded. 
; For example:
;
; opened 0( 0): /dev/input/event8 (1915:0040) 0 "7c:10:c9:15:22:33/df:47:3a:12:44:55" "Flydigi APEX2"
; ...
; opened 7( 7): /dev/input/event3 (1997:2535) 0 "usb-ffb40000.usb-1.6/input0" "  mini keyboard"
; opened 9( 9): /dev/input/event0 (046d:4024) 0 "usb-ffb40000.usb-1.2/input2:1/4024-19-a2-39-0a" "Logitech K400"
;
; following part is unique identifier in system ^^^^^^^^^^^^^^^^^^^^^^^^^^^
; So you need to provide part of this string identifying exactly this device. Don't include inputX part as it may change after reboot.
; Wireless devices usually have format MAC/MAC, wired devices use usb-... format.
; UPDATE: you may define up to 8 devices to the same player. Use player_1_controller in several lines to assign multiple devices to player 1.
;
; Example of such unique part of strings:
;
;player_1_controller=usb-1.2/  ;include / at the end so it won't match with something like usb-1.2.3
;player_2_controller=7c:10:c9:15:22:33/df:47:3a:12:44:55
;player_3_controller=1915_0040_55c4dd0c ; VID_PID_HASH - VID, PID and unique HASH
;player_4_controller=1915_0040 ; VID_PID - warning, it will assign all input devices with these VID:PID to same player!
johey
Posts: 7
Joined: Tue Jul 27, 2021 1:08 pm

Re: Multiple Input Devices Mapping per Player

Unread post by johey »

Awesome! There is even an example in the .ini file. :) Thanks!

Post Reply