HID compliant USB driver

[QUOTE=consolero;36180]So with the latest 1.3.2. I realized HID is finally working on Wii. Thank you very much for that!

There is only one downside to this: I only managed to get the PS3 controller working. I tried several different USB controllers and created individual autoconf files for them but none of them has even been recognized by RA. This was the tutorial I’ve been using: http://www.libretro.com/forums/showthread.php?t=3550 Am I correct in assuming that other controllers aren’t working due to a lackluster driver? When I set “hid” in “joypad driver” on RA Windows no device is being found as well. xinput, dinput work on the other hand. Even editing the xinput output files to use the “hid” driver doesn’t work.

I know, more work might have to be done on HID but it’s particularly surprising to me that this seems to be such a big problem with RA. As previously already mentioned, other homebrews like Nintendont managed to get a much higher compatibility or at least left it to the user to simply create their own autoconfig files without the need of adapting the driver any further. Take a look at the associated test suite by crediar for example. It detected every single one of my devices: http://t.co/x6fA5wDyWU

I might be asking too much but to help other people contribute to the project it would really help explaining the hurdles of the driver process in this project in comparison to others and provide a tutorial on how tu create/update drivers/autoconfs to give people a starting point for help they’re willing to give. Thank you and keep up the good work![/QUOTE]

Yes a driver is required for each type of controller, this is because of the nature of Wii HID support and the way the HID was implemented in RA. In fact it is very similar to Nintendont, with the difference that instead of adding a text file to configure the controller here we need a little piece of code which is basically the same info but need to be compiled in order to work… If you are interested you may be able to create one for the controller you want and then push the changes. You can check this already existing ones: https://github.com/libretro/RetroArch/tree/master/input/connect

And the app you posted in the link is pretty useful to get the button mapping. You can use it to get the details.

@Spielvan: Unfortunately I don’t own 2 ps3 controllers to test this and fix the issue in case I can replicate it. What I tried was to connect different types at the same time and they were working correctly so I was hoping that connecting 2 of the same kind would work.

Thanks for answering! Unfortunately Nintendont only needs the text files and RA unfortunately needs both autoconf AND driver files. I wasn’t aware of the fact that the test suite by crediar could be of any use for creating a driver in RA for the end user. Actually I’m even a little surprised you suggest using it since I figured the PIDs, VIDs and values for button inputs totally differ from what those in RA’s autoconf file. I’ve been aware of the repository and it’s files but I have no idea which lines in the code are the crucial ones that need to be changed in order to get this to work. It would be nice to have a little “how-to” for explaining where to insert the PIDs, VIDs, button inputs and whatever else that needs to be changed in the driver code. As soon as we know how to integrate that, implementation shouldn’t be such a big problem. Thanks!

[QUOTE=netux79;36235]Yes a driver is required for each type of controller, this is because of the nature of Wii HID support and the way the HID was implemented in RA. In fact it is very similar to Nintendont, with the difference that instead of adding a text file to configure the controller here we need a little piece of code which is basically the same info but need to be compiled in order to work… If you are interested you may be able to create one for the controller you want and then push the changes. You can check this already existing ones: https://github.com/libretro/RetroArch/tree/master/input/connect

And the app you posted in the link is pretty useful to get the button mapping. You can use it to get the details.

@Spielvan: Unfortunately I don’t own 2 ps3 controllers to test this and fix the issue in case I can replicate it. What I tried was to connect different types at the same time and they were working correctly so I was hoping that connecting 2 of the same kind would work.[/QUOTE]

Tentei um controle de xbox360 com fio e um controle ps3 com fio na outra porta usb do wii e somente o controle de ps3 funcionou, tentei um controle ps2 genérico e também não funcionou, gostaria de pedir se alguém tem o config do hid para o controle xbox360 com fio que compartilhe por gentileza, eu não sei se não precisaria ter vários cfg na pasta hid um para cada controle ps3, uma coisa que notei se eu desligar o auto config o primeiro controle ps3 liga a luz mas não movimenta nenhum botão. seria legal um drive hid para estes multi controles ps2.

I tried a xbox 360 wired controller and PS3 wired controller in another usb wii port and only the ps3 control worked, tried a ps2 generic control and did not work, I would ask if anyone has the config hid for control xbox360 wired to share please, I do not know if I would not have multiple cfg in hid one folder for each control pS3, one thing I noticed if I turn off the auto config the first control ps3 connects the light but does not move any button. It would be cool one hid drive for these multi controls ps2.


[QUOTE=Spielvan;36266]Tentei um controle de xbox360 com fio e um controle ps3 com fio na outra porta usb do wii e somente o controle de ps3 funcionou, tentei um controle ps2 genérico e também não funcionou, gostaria de pedir se alguém tem o config do hid para o controle xbox360 com fio que compartilhe por gentileza, eu não sei se não precisaria ter vários cfg na pasta hid um para cada controle ps3, uma coisa que notei se eu desligar o auto config o primeiro controle ps3 liga a luz mas não movimenta nenhum botão. seria legal um drive hid para estes multi controles ps2.

I tried a xbox 360 wired controller and PS3 wired controller in another usb wii port and only the ps3 control worked, tried a ps2 generic control and did not work, I would ask if anyone has the config hid for control xbox360 wired to share please, I do not know if I would not have multiple cfg in hid one folder for each control pS3, one thing I noticed if I turn off the auto config the first control ps3 connects the light but does not move any button. It would be cool one hid drive for these multi controls ps2.


[/QUOTE]

the xbox360 is not a HID controller, it needs a special driver for it and it won’t be supported in RA as is. the ps2 controller with an adapter will work but it will need to create its driver. Finally, as you are turning off the autoconf, the controller is detected but the buttons are not being configured…

Qual o programa necessário para criar um drive hid para o retroarch? confesso que fico um pouco perdido, creio que não seja o mesmo que no nintendont pois mada os valores PIDs e VIDs.

What is necessary to create a program hid drive for retroarch? I confess that I’m a little lost, I think is not the same as nintendont as mada PIDs and VIDs values.

[QUOTE=Spielvan;36276]Qual o programa necessário para criar um drive hid para o retroarch? confesso que fico um pouco perdido, creio que não seja o mesmo que no nintendont pois mada os valores PIDs e VIDs.

What is necessary to create a program hid drive for retroarch? I confess that I’m a little lost, I think is not the same as nintendont as mada PIDs and VIDs values.[/QUOTE]

You need one of this: https://github.com/libretro/RetroArch/tree/master/input/connect

It is the same as nintendont, however RA uses decimal values and nintendont hexadecimal for defining the PID / VID values.

You also need the autoconfig definition to map each button to RA,

To get the mapping you can use Nintendont hidtest program.

[QUOTE=netux79;36277]You need one of this: https://github.com/libretro/RetroArch/tree/master/input/connect

It is the same as nintendont, however RA uses decimal values and nintendont hexadecimal for defining the PID / VID values.

You also need the autoconfig definition to map each button to RA,

To get the mapping you can use Nintendont hidtest program.[/QUOTE]

Não consegui baixar o programa, so mostra as paginas de código.

I could not download the program, only shows the code pages.

[QUOTE=Spielvan;36282]Não consegui baixar o programa, so mostra as paginas de código.

I could not download the program, only shows the code pages.[/QUOTE]

Yes, I meant to show you the code as an example of what is needed to create a driver for a specific controller. In the folder there is a list of drivers that have been written for some controllers. We need one of this and also an autoconfig file as those you downloaded and put in the autoconf/hid folder.

Ok I found the HIDs and VIDs here: https://github.com/libretro/RetroArch/blob/master/input/connect/joypad_connection.c This file supposedly must be edited too right? And for the button mappings: I saw them in the connect_wii.c file but there are none in the ps3_connect, connect_nesusb, connect_snesusb. Can you further explain were to enter the mappings?

[QUOTE=netux79;36277]You need one of this: https://github.com/libretro/RetroArch/tree/master/input/connect

It is the same as nintendont, however RA uses decimal values and nintendont hexadecimal for defining the PID / VID values.

You also need the autoconfig definition to map each button to RA,

To get the mapping you can use Nintendont hidtest program.[/QUOTE]

Where about do I put these in the SD card Retroarch folder?

Can someone give me a quick step by step to set up the connect_ps3.c file. Thanks.

[QUOTE=consolero;36302]Ok I found the HIDs and VIDs here: https://github.com/libretro/RetroArch/blob/master/input/connect/joypad_connection.c This file supposedly must be edited too right? And for the button mappings: I saw them in the connect_wii.c file but there are none in the ps3_connect, connect_nesusb, connect_snesusb. Can you further explain were to enter the mappings?[/QUOTE]

Yes you need to edit that one too in order to add the driver and RA be aware of it too. regarding the mappings, it is done using the autoconfig files assets, and those are created using the autoconfig tutorial already posted here before.

What controller are you willing to add?

@barnand: I already explained it before but I’m pasting the steps here too. The Ps3 controller is already supported so you just need to configure it:

  1. download the autonconfig files for HID controllers from the assets download section.
  2. Put them in a autoconfig/hid within the retroarch app folder (the one that contains all the cores)
  3. start retroarch normally and get into the drivers menu and change joystick driver to “hid”
  4. restart retroarch and connect the controller in any usb port.
  5. it should detect it, configure it and allow to use it.

[QUOTE=netux79;36316]Yes you need to edit that one too in order to add the driver and RA be aware of it too. regarding the mappings, it is done using the autoconfig files assets, and those are created using the autoconfig tutorial already posted here before.

What controller are you willing to add?

@barnand: I already explained it before but I’m pasting the steps here too. The Ps3 controller is already supported so you just need to configure it:

  1. download the autonconfig files for HID controllers from the assets download section.
  2. Put them in a autoconfig/hid within the retroarch app folder (the one that contains all the cores)
  3. start retroarch normally and get into the drivers menu and change joystick driver to “hid”
  4. restart retroarch and connect the controller in any usb port.
  5. it should detect it, configure it and allow to use it.[/QUOTE]

@netux79 muito obrigado pela atenção mas não entendo de programação de codigo, pra mim será um pouco dificil vou esperar criarem algum drive para dois controles e ai testar, seria legal se na propria interface do retroarch pode-se já vir os controles e tu só precisar ir mudando do controle 1 ao 5 qual tu quer usar, o maior problema que tenho notado é que o controlador que seleciona como primeiro será o que vai comandar todos os outros, tipo se selecionar o primeiro como play3 não poderá usar o segundo como classic controler, eu ainda aposto que os controles ainda são o calcanhar de aquiles do retroarch.

Outra coisa que eu queria informar é o jogo Forgotten Worlds CPS1 que não funciona o botão start, e no core FBA os fabricantes Sega e Data East que rodam muito lentamente, fora estes fatores o retroarch está perfeito.

Eu criei uns filtros overlays para usar com o retroarch do wii e gostaria de saber como compartilhar com o grupo.

@ Netux79 thank you for your attention but do not understand the code programming, to me is a little hard’ll wait to create a drive for two controls and there to test, it would be nice if in the very retroarch interface can already see the controls and you are need to go changing control 1-5 which you want to use, the biggest problem I have noticed is that the controller selects as the first is what will lead all others type to select the first as play3 can not use the second as classic controler, I still bet that the controls are still the Achilles heel retroarch.

Another thing I wanted to inform is the Forgotten Worlds CPS1 game that does not work the start button, and the core FBA Sega and Data East manufacturers that run very slowly out these factors the retroarch is perfect,

I created a filter overlays for use with the Wii retroarch and would like to know how to share with the group.

[QUOTE=Spielvan;36321]@netux79thank you for your attention but do not understand the code programming, to me is a little hard’ll wait to create a drive for two controls and there to test, it would be nice if in the very retroarch interface can already see the controls and you are need to go changing control 1-5 which you want to use, the biggest problem I have noticed is that the controller selects as the first is what will lead all others type to select the first as play3 can not use the second as classic controler, I still bet that the controls are still the Achilles heel retroarch.

Another thing I wanted to inform is the Forgotten Worlds CPS1 game that does not work the start button, and the core FBA Sega and Data East manufacturers that run very slowly out these factors the retroarch is perfect,

I created a filter overlays for use with the Wii retroarch and would like to know how to share with the group.[/QUOTE] The second controller should work when connecting, there should be a bug there. I will try to give it a try and solve it. I will also try to add a driver for a Ps2 controller adapter. The process of usign the usb is to assign a port, so the first you connect takes the port 1 (user 1) and so on. There will be no way to select which one you want to use for each player other than connecting them in order.

Also, you can combine controllers, however ALL must be USB controllers (you can use USB adapters of course), for example I can have a Ps3 controller and in the second port have a Wii U Gamecube adapter or any other HID USB controller. But you cannot combine different joystick drivers at once the same way you cannot combine DirectX with OpenGL and SDL for video output. So you can use the Wiimotes (or Classic Controllers) but not USB HID controllers at the same time, or viceversa. Technically is possible but it will add much complexity and work to the Wii so better keep it simple.

[QUOTE=netux79;36316]Yes you need to edit that one too in order to add the driver and RA be aware of it too. regarding the mappings, it is done using the autoconfig files assets, and those are created using the autoconfig tutorial already posted here before.

What controller are you willing to add? [/QUOTE] So if I get you correctly it’s only necessary to edit the joypad_connection.c with the new VIDs and PIDs and add a new autoconf file to the /autoconf/hid folder, without the need of creating a new driver at all? There are several pads I’d like to add, several useful ones for other people as well, probably. I don’t know if it helps posting more info on VIDs or PIDs and providing autoconfs here in the thread, but if it helps I can do that.

[QUOTE=consolero;36340]So if I get you correctly it’s only necessary to edit the joypad_connection.c with the new VIDs and PIDs and add a new autoconf file to the /autoconf/hid folder, without the need of creating a new driver at all? There are several pads I’d like to add, several useful ones for other people as well, probably. I don’t know if it helps posting more info on VIDs or PIDs and providing autoconfs here in the thread, but if it helps I can do that.[/QUOTE]

If the pad can use a existing driver then yes, you are right. However if if the controller you want to add is different you may need to add the driver too apart from the changes you mentioned above. You also need to include the files in the griffin.c file so it can be compiled.

I was trying to get the name of one of those you want to add. I think that once you are able to add it it would be better to make a pull request so it gets added permanently into RA.

NOTE: The autoconfig files are not the only needed thing here, these are just the mapping setup so RA can know that button 1 is actually button B in RA and so on…

I see, so I assume the griffin.c is only to auto-add the content into the latest compilation/nightly? So unless I create a new file it doesn’t need to be edited right?

Sure, let’s start with the Hori Fighting Stick V3: http://www.hori.jp/us/Products/PS3/ps3_fsv3/index.htm It’s a very common device, working fine on PS3 and PC and has a great value for the price so I think I won’t be the only one using it. I don’t know what you need the name for but I can also provide HIDs, VIDs or autoconfs if needed.

I know, as previously mentioned, I was just surprised Nintendont needs only the autoconf files and RA so much many more.

[QUOTE=consolero;36400]I see, so I assume the griffin.c is only to auto-add the content into the latest compilation/nightly? So unless I create a new file it doesn’t need to be edited right?

Sure, let’s start with the Hori Fighting Stick V3: http://www.hori.jp/us/Products/PS3/ps3_fsv3/index.htm It’s a very common device, working fine on PS3 and PC and has a great value for the price so I think I won’t be the only one using it. I don’t know what you need the name for but I can also provide HIDs, VIDs or autoconfs if needed.

I know, as previously mentioned, I was just surprised Nintendont needs only the autoconf files and RA so much many more.[/QUOTE]

That may be an easy one, just please confirm the VID / PID values used and with the Nintendont utility, check the values on the buttons when pressed, confirm these matches the values of a Ps3 controller. If we are lukc it may just work like a ps3 controller.

I’ve just checked it and as expected the values are vastly different.

  1. PIDs and VIDs are completely different.
  2. Offsets are different, apart from the D-pad.
  3. Values for individual buttons are different, although the same values do occur
  4. Other pads are even more different.

As previously mentioned: It really would be easier if I knew WHERE in the code I can edit the corresponding values for:

[ul] [li]VID/PID[/li][li]Offset[/li][li]Value[/li][li]Button Mapping[/li][/ul] It should really come down to this since there isn’t much more information provided by the hardware and I’m not intending to include analog axes, tilt sensors, rumble or whatever sophisticated kind of stuff… Help is much appreciated and I’m definitely going to share the results.

[QUOTE=consolero;36597]I’ve just checked it and as expected the values are vastly different.

  1. PIDs and VIDs are completely different.
  2. Offsets are different, apart from the D-pad.
  3. Values for individual buttons are different, although the same values do occur
  4. Other pads are even more different.

As previously mentioned: It really would be easier if I knew WHERE in the code I can edit the corresponding values for:

[ul] [li]VID/PID[/li][li]Offset[/li][li]Value[/li][li]Button Mapping[/li][/ul] It should really come down to this since there isn’t much more information provided by the hardware and I’m not intending to include analog axes, tilt sensors, rumble or whatever sophisticated kind of stuff… Help is much appreciated and I’m definitely going to share the results.[/QUOTE]

Too bad it is very different. I was hoping that as this was for the PS3 console it will be very similar to the ps3 controller.

Now, I think I already tried to explain in this thread what is needed to add a new one. the hardest part will be the exclusive driver code… it’s not a big deal but it may be confusing. Now, I said to another guy in this thread I will write a ps2 to USB adapter, so I think you will be able to see all changes needed to add a new one and base yours. I will let you know once I get done with it… I need to look for some time to seat down and do it.

I think I’m in the same boat as consolero. I get the general idea but seem to be able to follow the .c and .h files and work out what I’m supposed to change.

I found out the PID and VISD, converted them to decimal but then got lost trying to link them up with a ’ connect_ps3.c ’ type file.

A properly labeled code page with labels would be a god send.

‘’{ “Nintendo RVL-CNT-01”, 1406, 816, &pad_connection_wii }, { “Nintendo RVL-CNT-01-UC”, 1406, 816, &pad_connection_wiiupro }, { “Wireless Controller”, 1356, 1476, &pad_connection_ps4 }, { “Cthulhu PC/PS3 Controller”, 5336, 55560, &pad_connection_ps3 }, { “PLAYSTATION®3 Controller”, 787, 8406, &pad_connection_ps3 }, { “Generic SNES USB Controller”, 2079, 58369, &pad_connection_snesusb },’’’’

Was about as far as i could get, from what i could read the ‘&pad_connection_ps3’ was supposed to link to a one of the ’ connect_ps3.c ’ profiles via the the HID pads name, PID and VID.

I’ve attached a screen shot from the Wii HID diagnostic program. VID:14D8 PID:D908

Did I at least get the hex to decimal conversion right? :stuck_out_tongue_winking_eye:

Thanks again guys!

my pad is the cthululu