[WIP] Nintendont HID Config Wizard - Create controller ini files effortlessly

Discussion in 'Wii U - Hacking & Backup Loaders' started by Corgano, Nov 4, 2016.

  1. Corgano
    OP

    Corgano Newbie

    Newcomer
    9
    8
    Jul 15, 2015
    Canada
    HID config wizard is a program to assist in creating controller.ini files for using HID controllers with nintendont. Just plug in a controller, click one button, and then press the controller buttons one by one while prompted. Simple!

    THINGS I NEED HELP WITH (PLEASE READ)
    The following ini keys are ones that I have no idea how to use them properly. I need someone who knows to tell me what they do!
    • Polltype=
    • DPAD=
    • DigitalLR=
    • Power=
    • Rumble=
    • RumbleType=
    • RumbleDataLen=
    • RumbleDataOn=
    • RumbleDataOff=
    • RumbleTransferLen=
    • RumbleTransfers=
    • MultiIn=
    • MultiInValue=
    • ZL=

    About
    [​IMG]
    This program is a wrapper around Atomix Productions HID Trace (c) 2009. Full credit for that program goes to them. HID Config Wizard simply reads from it and provides the interface, ini generation / saving / loading, device name lookup, and other Nintendont specific features. HID Config Wizard is written in Autoit, freely available from Autoitscript.com, and is required to run it from source. Once it is more complete I'll be compiling and releasing compiled .exe's for ease of use
    Features
    • Automatic loading configs (if found)
    • Automatic controller name lookup
    • Creates and saves ini files
    • Wizard! Two clicks to set all buttons
    • Set / View individual button settings
    • Live hex readout
    • Select from multiple connected controllers (should support all HID)
    • More coming!
    How to run source
    To run from source code:​
    1. Download autoit from autoitscript.com, and download the script editor from their download page (SciTE with lexar and help files pre-packaged)
    2. Copy the source below and save it in a new .au3 file (right click in windows explorer -> new autoit v3 script, or save in notepad and rename .au3)
    3. Then double click the .au3 file to run (Or if selected when installing autoit it will open in SciTE, use F5 to run)
    4. more later :P
    Source code:

    Code:
    #include <Array.au3>
    #include <GuiComboBox.au3>
    #include <GUIConstantsEx.au3>
    
    ; Script Start - Add your code below here
    Global $usbIDs = ""
    If not FileExists("usb.ids") Then InetGet("http://www.linux-usb.org/usb.ids", "usb.ids")
    $usbIDs = FileRead("usb.ids")
    If not FileExists("hidtrace.exe") Then InetGet("http://www.virtualdj.com/download/hidtrace.exe", "hidtrace.exe")
    If not FileExists("hidtrace.exe") Then
        MsgBox(0, "ERROR", "This program acts as a wrapper for and requires hidtrace.exe to work."&@CRLF&"Attempts to automaticly download it has failed. Please download hidtrace.exe from"&@CRLF&"http://www.virtualdj.com/download/hidtrace.exe"&@CRLF&" and place it in the same folder as this program and run again."&@CRLF&@CRLF&"(The link has been copied to clipboard)")
        Exit
    EndIf
    
    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <EditConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    
    OnAutoItExitRegister("onExit")
    
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 706, 440)
    
    $Label1 = GUICtrlCreateLabel("A", 592, 144, 11, 17)
    $Label3 = GUICtrlCreateLabel("X", 592, 96, 11, 17)
    $Label4 = GUICtrlCreateLabel("Y", 640, 120, 11, 17)
    $Label5 = GUICtrlCreateLabel("C-Stick", 608, 216, 38, 17)
    $Label6 = GUICtrlCreateLabel("UpDown", 576, 240, 46, 17)
    $Label7 = GUICtrlCreateLabel("LeftRight", 632, 240, 47, 17)
    $Label8 = GUICtrlCreateLabel("Stick", 384, 112, 28, 17)
    $Label9 = GUICtrlCreateLabel("LeftRight", 400, 136, 47, 17)
    $Label10 = GUICtrlCreateLabel("UpDown", 344, 136, 46, 17)
    $Label14 = GUICtrlCreateLabel("Left", 344, 240, 22, 17)
    $Label15 = GUICtrlCreateLabel("Down", 382, 272, 32, 17)
    $Label16 = GUICtrlCreateLabel("Left Trig.", 344, 40, 46, 17)
    $Label17 = GUICtrlCreateLabel("Right Trig", 632, 40, 50, 17)
    $Label18 = GUICtrlCreateLabel("Zed", 576, 40, 23, 17)
    $Label11 = GUICtrlCreateLabel("Start", 480, 136, 26, 17)
    $Label2 = GUICtrlCreateLabel("B", 544, 168, 11, 17)
    $Label12 = GUICtrlCreateLabel("Up", 388, 208, 18, 17)
    $Label13 = GUICtrlCreateLabel("Right", 424, 240, 29, 17)
    $Label19 = GUICtrlCreateLabel("ZedL", 640, 376, 29, 17)
    
    $iStart = GUICtrlCreateDummy()
    $cJoy = GUICtrlCreateCombo("", 8, 8, 289-48, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    $bJoy = GUICtrlCreateButton("Refresh", 289-48+8, 7, 48,23)
    $eRaw = GUICtrlCreateEdit("", 8, 40, 289, 73)
    GUICtrlSetData(-1, "")
    GUICtrlSetFont(-1, 10, 400, 0, "Lucida Console")
    $eIni = GUICtrlCreateEdit("", 8, 120, 289, 305)
    GUICtrlSetFont(-1, 10, 400, 0, "Lucida Console")
    $iName = GUICtrlCreateInput("Controller Name", 304, 8, 393, 21)
    
    $bA = GUICtrlCreateButton("", 576, 160, 43, 25)
    GUICtrlSetBkColor(-1, 0x00FF00)
    $bB = GUICtrlCreateButton("", 528, 184, 43, 25)
    GUICtrlSetBkColor(-1, 0xFF0000)
    $bX = GUICtrlCreateButton("", 576, 112, 43, 25)
    $bY = GUICtrlCreateButton("", 624, 136, 43, 25)
    $bCStickY = GUICtrlCreateButton("", 576, 256, 43, 25)
    GUICtrlSetBkColor(-1, 0xFFFF00)
    $bCStickX = GUICtrlCreateButton("", 632, 256, 43, 25)
    GUICtrlSetBkColor(-1, 0xFFFF00)
    $bStickY = GUICtrlCreateButton("", 344, 152, 43, 25)
    $bStickX = GUICtrlCreateButton("", 400, 152, 43, 25)
    $bStart = GUICtrlCreateButton("", 472, 152, 43, 25)
    $bUp = GUICtrlCreateButton("", 376, 224, 43, 25)
    $bRight = GUICtrlCreateButton("", 416, 256, 43, 25)
    $bDown = GUICtrlCreateButton("", 376, 288, 43, 25)
    $bLeft = GUICtrlCreateButton("", 336, 256, 43, 25)
    $bL = GUICtrlCreateButton("", 344, 64, 43, 25)
    $bR = GUICtrlCreateButton("", 632, 56, 43, 25)
    $bZ = GUICtrlCreateButton("", 568, 56, 43, 25)
    GUICtrlSetBkColor(-1, 0x3399FF)
    
    $bWizzard = GUICtrlCreateButton("Set All", 304, 368, 115, 49)
    GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
    $bZmod = GUICtrlCreateButton("bZmod", 632, 392, 51, 25)
    $bSave = GUICtrlCreateButton("Save", 512, 392, 101, 25)
    $cDPAD = GUICtrlCreateCombo("", 424, 368, 81, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "DPAD = 0|DPAD = 1", "DPAD = 1")
    $cPollType = GUICtrlCreateCombo("", 424, 394, 81, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "PollType = 1|PollType = 0", "PollType = 1")
    $Combo1 = GUICtrlCreateCombo("", 512, 368, 89, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "DigitalLR = 1|DigitalLR = 0", "DigitalLR = 1")
    $iEnd = GUICtrlCreateDummy()
    #EndRegion ### END Koda GUI section ###
    
    Global $aButtons[17] = [16,"A","B","X","Y","CStickY","CStickX","StickY","StickX","Start","Up","Right","Left","Down","L","R","Z"]
    Global $aButtName[17] = [16,"A","B","X","Y","C Stick UP or DOWN","C Stick LEFT or RIGHT","Stick UP or DOWN","Stick LEFT or RIGHT","Start","D-Pad Up","D-Pad Right","D-Pad Left","D-Pad Down","Left Trigger","Right Trigger","Z"]
    For $i = 1 to $aButtons[0]
        Assign("v"&$aButtons[$i], -1)
    Next
    Global $VID, $PID, $JoyName, $WaitForButton = 0
    Global $hWin, $hEdit1, $hEdit2, $hCombo
    Global $IniPath = @ScriptDir&"\controllers"
    DirCreate($IniPath)
    ReloadJoyList()
    UpdateIni()
    HotKeySet("{esc}", "ExitProgram")
    
    GUISetState(@SW_SHOW)
    
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
    
            Case $bJoy
                ProcessClose("hidTrace.exe")
                ProcessClose("hidTrace.exe")
                sleep(200)
                For $i = $iStart To $iEnd
                    GUICtrlSetState($i, $GUI_DISABLE)
                Next
                ReloadJoyList()
                ; runs LoadJoy after
                For $i = $iStart To $iEnd
                    GUICtrlSetState($i, $GUI_ENABLE)
                Next
    
            Case $cJoy
                LoadJoy(GUICtrlRead($cJoy))
    
            Case $bWizzard
                dowizzard()
    
            Case $iName
                $JoyName = GUICtrlRead($iName)
                UpdateIni()
    
            Case $bSave
                SaveIni()
    
        EndSwitch
    
        For $iButton = 1 to $aButtons[0]
            If $nMsg = Eval("b"&$aButtons[$iButton]) Then
    ;~             ConsoleWrite(Eval("b"&$aButtons[$iButton])&"    "&"Button "&"$b"&$aButtons[$iButton]&" pushed!"&@CRLF)
                If SetButton($iButton) Then
                    UpdateIni()
                EndIf
            EndIf
        Next
    
    
    
        If StringTrimLeft(ControlGetText($hWin, "", $hEdit2), 10) <> GUICtrlRead($eRaw) Then
            GUICtrlSetData($eRaw, StringTrimLeft(ControlGetText($hWin, "", $hEdit2), 10))
        EndIf
    WEnd
    
    Func SetButton($iButton, $aBaseline = "")
        ControlFocus($Form1, "", $iName)
        Local $i, $timer = TimerInit()
        If $aBaseline = "" or Not IsArray($aBaseline) Then
    ;~         MsgBox(0, "Setup Wizzard", "Release all buttons / sticks and click ok to continue")
            $aBaseline = StringRegExp(StringTrimLeft(ControlGetText($hWin, "", $hEdit2), 10), " ([0-9a-fA-F]{2})(?= )", 3)
            If Not IsArray($aBaseline) Then
                SplashOff()
                MsgBox(0, "Error", "Error creating baseline! Make sure controller is on and plugged in")
                Return -1
            EndIf
        EndIf
        Local $aCurrentState
    ;~     _ArrayDisplay($aBaseline)
        SplashTextOn("", "Press "&$aButtName[$iButton]&" to set, SPACE to skip, or ESC to cancel", 200, 150)
    
        $WaitForButton = 1
        While $WaitForButton
    ;~         If TimerDiff($timer) > 5000 Then ExitLoop
            If StringTrimLeft(ControlGetText($hWin, "", $hEdit2), 10) <> GUICtrlRead($eRaw) Then
                GUICtrlSetData($eRaw, StringTrimLeft(ControlGetText($hWin, "", $hEdit2), 10))
            EndIf
            $aCurrentState = StringRegExp(StringTrimLeft(ControlGetText($hWin, "", $hEdit2), 10), " ([0-9a-fA-F]{2})(?= )", 3)
            If Not IsArray($aCurrentState) Then
                SplashOff()
                MsgBox(0, "Error", "Error creating baseline! Make sure controller is on and plugged in")
                Return -1
            EndIf
            For $i = 0 to UBound($aBaseline)-1
                ;$temp will store the difference of the two hex bytes being examined
                $temp = Dec($aCurrentState[$i])-Dec($aBaseline[$i])
                ;seperate handleing for sticks. Make sure the difference is more than an amount, to help prevent accidental buttons
                If StringInStr($aButtons[$iButton], "stick") Then
                    If Abs($temp) > 20 Then
                        ConsoleWrite("1> Change at index "&$i&" from "&$aBaseline[$i]&" to "&$aCurrentState[$i]&@CRLF)
                        ConsoleWrite($aButtons[$iButton]&"="&$i  &@CRLF)
                        $WaitForButton = 0
                        SplashOff()
    
                        GUICtrlSetData(Eval("b"&$aButtons[$iButton]), $i)
                        Assign("v"&$aButtons[$iButton], $i)
                        Return 1
                    EndIf
    
                Else ; handleing for button, just check difference
                    If $temp > 1 Then
                        ConsoleWrite("2> Change at index "&$i&" from "&$aBaseline[$i]&" to "&$aCurrentState[$i]&@CRLF)
                        ConsoleWrite($aButtons[$iButton]&"="&$i&","&  hex($temp, 2)  &@CRLF)
                        $WaitForButton = 0
                        SplashOff()
    
                        GUICtrlSetData(Eval("b"&$aButtons[$iButton]), $i&","&  hex($temp, 2))
                        Assign("v"&$aButtons[$iButton], $i&","&  hex($temp, 2) )
                        Return 1
                    ElseIf $temp < 0 Then ; Special handleing: IF the difference is negitive, then chances are you need the absolute
                        ConsoleWrite("3> Change at index "&$i&" from "&$aBaseline[$i]&" to "&$aCurrentState[$i]&@CRLF)
                        ConsoleWrite($aButtons[$iButton]&"="&$i&","&  $aCurrentState[$i]  &@CRLF)
                        $WaitForButton = 0
                        SplashOff()
    
                        GUICtrlSetData(Eval("b"&$aButtons[$iButton]), $i&","&  $aCurrentState[$i])
                        Assign("v"&$aButtons[$iButton], $i&","&  $aCurrentState[$i] )
                        Return 1
                    EndIf
                EndIf
            Next
        WEnd
        $WaitForButton = 0
        SplashOff()
        Return -1
    
    EndFunc
    
    Func WaitForRelease($aBaseline)
        Local $aCurrentState, $i, $timer = TimerInit()
        sleep(200)
        while sleep(100)
            $aCurrentState = StringRegExp(StringTrimLeft(ControlGetText($hWin, "", $hEdit2), 10), " ([0-9a-fA-F]{2})(?= )", 3)
            If Not IsArray($aCurrentState) Then
                SplashOff()
                MsgBox(0, "Error", "Error getting controller state! Make sure controller is on and plugged in")
                Return -1
            EndIf
            For $i = 0 to UBound($aBaseline)-1
                ;$temp will store the difference of the two hex bytes being examined
                If $aCurrentState[$i] <> $aBaseline[$i] Then ExitLoop
                If $i = UBound($aBaseline)-1 Then Return 1
            Next
            If TimerDiff($timer) > 5000 Then ExitLoop
        WEnd
        return 0
    EndFunc
    
    Func UpdateIni()
        Local $i, $s = "", $temp
        $s = "["&$JoyName&"]"&@CRLF&"VID="&$VID&@CRLF&"PID="&$PID&@CRLF
    
        For $i = 1 to $aButtons[0]
            $temp = Eval("v"&$aButtons[$i])
    ;~         ConsoleWrite("> "&$aButtons[$i]&" = "&$temp&"    "&($temp <> -1)&@CRLF)
            If $temp <> -1 Then $s &= $aButtons[$i]&"="&$temp&@CRLF
        Next
        GUICtrlSetData($eIni, $s)
    EndFunc
    
    Func SaveIni()
        Local $temp = $IniPath&"\"&$VID&"_"&$PID&".ini"
        If Not FileExists($temp) or MsgBox(4, "File exists!",$VID&"_"&$PID&".ini already exists in the folder"&@CRLF&$IniPath&@CRLF&"Do you want to overwrite it?") = 6 Then
            FileRecycle($temp)
            FileWrite($temp, GUICtrlRead($eIni))
        EndIf
        ; clear the gui messages in case the user hit gui buttons while the msgbox was up
        While GUIGetMsg() <> 0
        WEnd
    EndFunc
    
    Func LoadIni()
        Local $temp, $iButton, $path = $IniPath&"\"&$VID&"_"&$PID&".ini"
        ConsoleWrite("+  "&$IniPath&"\"&$VID&"_"&$PID&".ini"&@CRLF)
        If Not FileExists($path) Then return 0
    
        $temp = IniReadSectionNames($path)
        If not IsArray($temp) Then return -1
        $JoyName = $temp[1]
        ConsoleWrite("Loaded joystick named: "&$JoyName&@CRLF)
    
        For $iButton = 1 to $aButtons[0]
            $temp = IniRead($path, $JoyName, $aButtons[$iButton], -1)
            Assign("v"&$aButtons[$iButton], $temp)
            If $temp > -1 Then GUICtrlSetData(Eval("b"&$aButtons[$iButton]), $temp)
        Next
    
        ; clear the gui messages in case the user hit gui buttons while the msgbox was up
        While GUIGetMsg() <> 0
        WEnd
        UpdateIni()
    EndFunc
    
    Func dowizzard()
        MsgBox(0, "Setup Wizzard", "Release all buttons / sticks and click ok to continue")
        Local $i, $aBaseline = StringRegExp(StringTrimLeft(ControlGetText($hWin, "", $hEdit2), 10), " ([0-9a-fA-F]{2})(?= )", 3)
        For $iButton = 1 to $aButtons[0]
            If SetButton($iButton) = -1 Then ExitLoop
            If WaitForRelease($aBaseline) <> 1 Then
                SplashOff()
                $WaitForButton = 0
                MsgBox(0, "Error", "Button jammed / not released after setting "&$aButtName[$iButton]&"!"&@CRLF&"Check controller and try again.")
                Return -1
            EndIf
        Next
        $WaitForButton = 0
        UpdateIni()
    EndFunc
    
    Func ExitProgram()
        If $WaitForButton = 1 Then
            $WaitForButton = 0
        Else
            Exit
        EndIf
    EndFunc
    
    Func ReloadJoyList()
        Run("hidTrace.exe", "", @SW_HIDE)
        $hWin = WinWait("HID Trace - (c) Atomix Productions 2009", "", 2)
        $hCombo = ControlGetHandle($hWin, "", "[CLASS:ComboBox; INSTANCE:1]")
        $hEdit1 = ControlGetHandle($hWin, "", "[CLASS:Edit; INSTANCE:1]")
        $hEdit2 = ControlGetHandle($hWin, "", "[CLASS:Edit; INSTANCE:2]")
        WinActivate($Form1)
    
        if Not $hCombo Then Exit MsgBox(0, "Error", "Could not run HidTrace (no window found!)")
        $joyList = StringRegExpReplace(_GUICtrlComboBox_GetList($hCombo), "(\d{1,5}e? \/ \d{1,5}e?\|?)", "")
        ConsoleWrite('"'&$joyList&'"'&@CRLF)
        If $joyList = "" Then
    ;~         MsgBox(0, "Error", "No controllers found! Check controllers and re-run this program")
            $joyList = "None found - Hit Refresh"
        EndIf
        If StringInStr($joyList, GUICtrlRead($cJoy)) Then
            $temp = GUICtrlRead($cJoy)
            GUICtrlSetData($cJoy, "")
            GUICtrlSetData($cJoy, $joyList, $temp)
        Else
            GUICtrlSetData($cJoy, "")
            Local $temp = StringSplit($joyList, "|")
            GUICtrlSetData($cJoy, $joyList, $temp[1])
        EndIf
        LoadJoy(GUICtrlRead($cJoy))
        UpdateIni()
    EndFunc
    
    func LoadJoy($sName)
        ConsoleWrite("LoadJoy("&$sName&")"&@CRLF)
        ; assign default values
        $VID = 0
        $PID = 0
        For $i = 1 to $aButtons[0]
            Assign("v"&$aButtons[$i], -1)
        Next
        $JoyName = $sName
        ControlCommand($hWin, "", $hCombo, "SelectString", $sName)
        $a = StringRegExp(ControlGetText($hWin, "", $hEdit1), "VID=([0-9a-fA-F)]{4})\|PID=([0-9a-fA-F)]{4})", 3)
        If @error Then return -1
        $VID = $a[0]
        $PID = $a[1]
    
        LoadIni()
    
        ;attempt name lookup from ID's
        If $usbIDs <> "" Then
            Local $temp = StringRegExp($usbIDs, $VID&" [^\r\n]*[\r\n]*\s*"&$PID&"\s\s([^\r\n]*)", 3)
            If UBound($temp) = 1 Then
                $JoyName = $temp[0]
            EndIf
        EndIf
    
        GUICtrlSetData($iName, $JoyName)
    EndFunc
    
    
    Func onExit()
        ProcessClose("hidTrace.exe")
    EndFunc
    ToDo:
    • Polltype, DPAD, and a few other settings aren't handled.
    • Rumble. no idea HOW it works, need help with this
    • Suggest a feature!
    INI Key Documentation (so far)
    Warning: Spoilers inside!
     
    Last edited by Corgano, Nov 4, 2016
    Wolfy, Voxel, Kokonoe and 2 others like this.
  2. Corgano
    OP

    Corgano Newbie

    Newcomer
    9
    8
    Jul 15, 2015
    Canada
    First post reserved for FAQ / other useful crap.

    Until then, can someone suggest a name for this tool? Something better than "HID Config Wizard"
     
  3. Seredimas

    Seredimas Member

    Newcomer
    11
    6
    May 3, 2016
    United States
    Nintendont HID Config Magician ;)

    Just kidding. I think the name sounds fine and this program looks awesome.
     
  4. Wolfy

    Wolfy Person That Never Was

    Member
    560
    214
    Aug 18, 2015
    United States
    Somewhere In The Aether...
    Exactly what I needed for my new N64 USB controller, thanks :3
     
  5. TotalInsanity4

    TotalInsanity4 GBAtemp Supreme Overlord

    Member
    7,576
    7,659
    Dec 1, 2014
    United States
    Under a rock
    I am honestly surprised this didn't exist already but this is VERY helpful. Thanks :3
     
  6. Corgano
    OP

    Corgano Newbie

    Newcomer
    9
    8
    Jul 15, 2015
    Canada
    THINGS I NEED HELP WITH (PLEASE READ)
    The following ini keys are ones that I have no idea how to use them properly. I need someone who knows to tell me what they do!
    • Polltype=
    • DPAD=
    • DigitalLR=
    • Power=
    • Rumble=
    • RumbleType=
    • RumbleDataLen=
    • RumbleDataOn=
    • RumbleDataOff=
    • RumbleTransferLen=
    • RumbleTransfers=
    • MultiIn=
    • MultiInValue=
    • ZL=
     
  7. Irastris

    Irastris Just another fag with a suggestive avatar

    Member
    1,005
    570
    May 3, 2015
    United States
    Polltype should typically be set to 1. AFAIK, only the PS3 controllers require it to be set to 0.
    DigitalLR should be set to 0 if a controller has analog triggers, otherwise it should be set to 1.

    Those are the only two I recognize and understand. Sorry I couldn't be a bigger help. :(
     
    AzerothArg likes this.
  8. RodrigoHC13

    RodrigoHC13 Newbie

    Newcomer
    2
    0
    Jul 25, 2017
    Brazil
    Hey, Corgano! I'm interested in this HID Wizard project.

    I have some information about "MultiIn=" and "MultiInValue=".

    I have an PS2 USB adapter with one USB and 2 PS2 connectors. Then, the "MultiIn=" must be in "2" or "3" (when updating to Nintendont 2.225, Howard wrote that the value "3" is for adapters like this, that sends the two controllers information in only one signal: https://gbatemp.net/threads/nintendont.349258/page-945#post-5174606).

    When I connect the adapter and open the HIDtest v6 on vWii / WiiU (without any "controllers.ini", only the Nintendont), the HIDtest show me values like:

    01 80 80 80 80 0F 00 F0

    But the first value keep changing, in miliseconds, between 01 and 02. If I press a button on first DualShock2, another value starts to keep changing in miliseconds. And if I press the same button at the same time on the two connected DualShock's2, the value change correctly - as if I was managed to control the game pressing the two controllers at the same time.

    Then, I understood that my adapter sends the two informations on the same signal.

    What I've noticed is that some "controller.ini" files for PS2 controllers have the informations:

    MultiIn=1
    MultiInValue=01

    This makes only the first joystick works. If I enter the HIDtest, it will show the same hexadecimal code before, but the first is fixed on "01". If I use:

    MultiIn=1
    MultiInValue=02

    then only the second controller works, and the hexadecimal on HIDtest now starts showing "02".

    So, I concluded that "MultiIn" defines if you're using an adapter with two or more joysticks, and "MultiInValue" defines which controller you will use.

    I've tried using a code like:

    [PS2 Controller]
    VID=0810
    PID=0001
    Polltype=1
    DPAD=1
    DigitalLR=1
    MultiIn=2
    MultiInValue=01
    Power=6,10
    A=5,20
    B=5,40

    [...with the rest of the controller configuration here, then...]
    MultiInValue=02
    Power=6,10
    A=5,20
    B=5,40

    [...continues with the second controller configuration, repeating the first]

    This code resulted on the 2 controllers working close to the expected, but with some freezing: it's more like if the signal was jumping from one joystick to the other; the two works, but with this problem.

    A curious fact is that if I set "MultiInValue=0", without repeating the configuration for the 2 controllers, I'll have this same results: the two controllers working, but not perfectly...

    That's not only me that had this trouble, see another one here: https://github.com/FIX94/Nintendont/issues/213


    Well, I expect this should help someone.

    And I expect someone helps with the vibration, too!!!