Is there a driver and utelizer for usb Joysticks like the competition pro?
Yes, USB joysticks use the HID standard for which we have a driver. They work out of the box with SDL games and anything using the BJoystick API. and you can use JoystickUtilizer to convert joystick to keyboard input, for application which don’t natively support a joystick.
i have a genius usb maxfire, in haiku x64 and want it working with bit tje joystick utilizer dont seem even recognize it, ok and only start from terminal cause in menu it say error resolvin link , how can i know if haiku are detecting it? and can it work ? thanks PulkoMandy
You can check if the device shows in /dev/ (in “joysticks” or “input”, I don’t remember) when you plug it. If it is there, then it most likely will work.
If you don’t see it there, provide us with:
- output of “listusb -v” with the joystick plugged
- HID reports, which you can find in /tmp (identify the one for the joystick if you can - you will also get reports for keyboards and mouses)
It is planned to have a preferences panel for managing joysticks, mouses and keyboards in a single place.
Never heard of the BJoystick API. Is it comparable to the Linux Joystick API or more to the libevdev API? Just asking since you talk about /dev/joysticks and /dev/input .
The devices are not the API
The API is described in the Be Book: https://www.haiku-os.org/legacy-docs/bebook/BJoystick.html
There are of course ioctls on the devices to access them directly, but this is private to the OS and not supposed to be used by apps directly. For completeness purpose, you read() the device and get an _extended_joystick worth of data from it. There is information on the joystick number of axes and buttons in the module info.
Interesting. Need to test this when I get home.
seems like my two usb controller can be detected. the play3 are a conversor usb port from playstation 2 plug, but now how can i use this two gameplds cause seems la mgba cant configure the buttons, it dont want to accept the commands… and joystickutilizer is very annoying to know if it is working. what can i do, thanks for the ansewrs!
054c:0268 /dev/bus/usb/0/0 “Sony Corp.” “Batoh Device / PlayStation 3 Controller” ver. 0100
0583:a009 /dev/bus/usb/0/1 “Padix Co., Ltd (Rockfire)” “4-Axis,12-Button with POV” ver. 0100
Ok, as I’m home today and had some time to locate my gamepad:
- Connect the gamepad
- A /dev/joystick/usb/0 should appear
- use “cat /dev/joystick/usb/0” in a terminal, a lot of chars should be printed
- Press buttons and make sure the output from cat changes
If all these steps are passing, it is likely that your joystick will be working fine. We have sources for an old “joystick” preferences in Haiku, but it does not seem to be designed for USB joysticks - it is about old style game ports.
IIRC, my old Saitek X52 Pro HOTAS joystick was recognized fine under Haiku.
ok in someway it seems to be detected cause all the character pop on terminal but then the changes are so random… that happen even without i need to press any button, it just show random characters all the time. with genius pad, and with what seems to be the playstation port it only show xxxxxxxx
So, it seems things are working ok at this level. If you have problems getting it to work in applications, it is time to report the problem to application developers.
can you recommend me a path to test all the things on the x64? cause i dont know what can support joysticks at this point… i really want to test, and the “utilizer” dont give any signal of life(maybe i just dont understand it.).
I wanted to test this a bit with my gamepad but I can’t link. Tells me BJoystick.GetDeviceName is missing symbol. It’s compiling so I’m astonished linking with ‘be’ and ‘game’ is not enough. What other library do I need?
EDIT: Ah… forget it. Played around with some names and ‘device’ seems to be the required library. Let’s see where this is going.
please share it!
Tried to get it working but there’s a bug in the BJoystick API. The call GetControllerName() returns B_OK but the name BString is set to an empty string. This cause me quite some head-ache since an empty name gamepad did not show up.
EDIT: If I work around this name bug it’s doing actually quite well. Simple API to use. Not bad.
Wow very cool it cool be very useful, it will be a good thing.
So great, i can play hermes with my usb competition pro joystick now.