xbox 360 controller I could use it with FreeBSD or not?

Yes, XBox 360 gamepads work on FreeBSD.

SDL provides their own HIDAPI gamepad drivers which work through the libusb(3) backend on FreeBSD. This requires correct user permissions on the corresponding device under /dev/usb/. Installing games/devd-controller-rules and adding your user to the games group automates this. So XBox 360 gamepads should just work™ with any program which uses SDL for gamepad support.

For programs without SDL support usage of the kernel driver xb360gp(4) is necessary. This presents the gamepad as an evdev device under /dev/input/. Correct user permissions are required there too, but AFAIK games/devd-controller-rules doesn't help here. Instead providing devfs.rules(5) manually is required. Additionally you need the following lines in /boot/loader.conf on FreeBSD versions below 15:
Code:
# enabled by default in FreeBSD 15.0
usbhid_load="YES"
hw.usb.usbhid.enable=1
And it could be necessary to explicitly load the xb360gp(4) driver, either via xb360gp_load="YES" in /boot/loader.conf, or # kldload xb360gp. At least with my 8BitDo SN30 Pro in its "XInput" mode I have to load the driver explicitly for it to be picked up as a XBox 360 gamepad. This might not be necessary for "true" XBox 360 gamepads (I don't have one, so can't test this myself).

This is all true for wired usage. I don't know if there are obstacles if you use the gamepad wireless over bluetooth. I personally use the 8BitDo USB Wireless Adapter 2 with my 8BitDo gamepad wireless. It works through SDL, but it doesn't work with xb360gp(4). Thankfully all programs I want to use with a gamepad have SDL support (though I could use the gamepad in other modes, e.g. "DInput", and then it works with the hgame(4) driver).
 
Back
Top