Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement HID driver - Get USB Controllers to work #231

Open
DacoTaco opened this issue Jan 12, 2020 · 8 comments
Open

Implement HID driver - Get USB Controllers to work #231

DacoTaco opened this issue Jan 12, 2020 · 8 comments

Comments

@DacoTaco
Copy link
Owner

after the small discussion in #214 , it would be cool to have a HID driver in libogc/priiloader that allows for any USB controller that supports HID to work in priiloader.

@DacoTaco
Copy link
Owner Author

DacoTaco commented Jun 26, 2020

testing dol : https://upload.dacotaco.com/HIDControllers.dol
source : HIDControllers.zip

expected result : show message about having been able to open the device, pressing a button or moving the directional should show up on screen as events. directional should be either neutral ( 8 ) or values 0,2,4 or 6

analogue sticks & throttles (AXIS) are not implemented yet and are ignored.

@niuus
Copy link

niuus commented Jun 27, 2020

'sup @DacoTaco. I will test your dol in a couple of hours, gonna sleep right now.

@niuus
Copy link

niuus commented Jun 27, 2020

Ended up testing it before sleeping... oops!

Okey, so, here's what happened: a lot of lines started showing up, when i plugged the DualShock3, this happened:
https://imgur.com/lw50zyn

After that, i tried with a generic PSX2USB adapter (2 ports):
https://imgur.com/LHKjRKz

The Xbox 360 Controller did nothing (xinput, i know). I currently have a loaned DS4, that one showed something but it was illegible, and the lines did not stopped. Pressing buttons or dpad did not made any difference with any of the controllers.

Excuse the quality from the CRT pics, i'll try with a progressive monitor later. I could suggest you to implement maybe some kind of print to text file, if it is useful to you. I will check here again in some hours. Off to sleep now!

@DacoTaco
Copy link
Owner Author

thanks for that.
im kinda curious as to how those controllers work and how different it is from my basic HID controllers.
there is not much you can do (sadly) then.

from what i saw online i expected the DS4 controller to work but something must be acting differently from what i interpreted from the HID specs.

are you using linux by any chance?

@niuus
Copy link

niuus commented Jun 28, 2020

TBH the one i was kinda expecting some response was the PSX2USB adapter, which i already got 'working and responding to all inputs' in Snes9x RX code (and previously worked without issues at all in the Retroarch HID code for Wii or Wii U), but it is giving me some weird frame skipping error for the moment i have not been able to fix. The second controller i was expecting some response was the DS4, but nope, no dice.

Nope, no Linux here, sadly. Windows or Mac OS. I also have a Wii U Pro Controller which i could connect to the USB. If you need some more testing, just lemme know.

@DacoTaco
Copy link
Owner Author

DacoTaco commented Jun 28, 2020

'working and responding to all inputs' ?
it works without having to install a special driver in windows?
if so, then yes, it should've worked in the program :/
what response did you get?
and what do you mean with a weird frame skipping error?

also, on a controller that doesn't work, please plug in the controller first and then run this : https://upload.dacotaco.com/http://upload.dacotaco.com/HIDControllersDebugNoThread.dol

@niuus
Copy link

niuus commented Jun 29, 2020

'working and responding to all inputs' ?
it works without having to install a special driver in windows?
if so, then yes, it should've worked in the program :/

Yes, it works without rumble, which is what the full driver install covers.

what response did you get?
and what do you mean with a weird frame skipping error?

If you're on GBATemp, we could exchange messages there if you want, or email. I can send you the code.

also, on a controller that doesn't work, please plug in the controller first and then run this : https://upload.dacotaco.com/http://upload.dacotaco.com/HIDControllersDebugNoThread.dol

Cool, i'll test all the controllers again. I have even found my old Xbox OG to USB adapter, i'll add it to the tests.

@niuus
Copy link

niuus commented Jun 30, 2020

The results are in:

https://imgur.com/a/jsBkA41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants