On Wed, Jan 22, 2020, at 12:29 AM, Raf Czlonka wrote:
> Hi all,
> 
> I'm in a search for a game controller / gamepad for OpenBSD and
> found an old article on OpenBSD Journal[0] regarding (support for)
> an Xbox 360 one.

SDL2 got some tweaks since [1] that allow using the Xbox 360 (wired) gamepad
for all SDL2 games/applications. This is probably the most popular and best
designed of all supported gamepads at this moment.

> Good ol' Logitech has two gamepads - one wired[1] and one wireless[2]

I have a Logitech F310 and it's probably the best option compatibility-wise
you can switch between traditional joystick/DInput (D) mode and
Xbox360 pad/XInput (X) mode with a switch on the back.

> Has anyone tried Xbox One controller or Valve's, recently discontinued,
> Steam Controller?

I have those and they don't work. Unfortunately these gamepad manufacturers have
abandoned any idea of portability and don't even provide USB HID descriptors.
Instead it seems that everything is run through a custom driver for each device.
The Linux kernel has special entries to detect the XBox One controller and send 
an
initialization sequence that seems to be required. It may be possible to come 
up with
an approach similar to our XBox360 implementation, but someone needs to come up
with this.

I also have a Steam controller. Interestingly, it attaches as mouse + keyboard 
by default
if I recall it correctly. However, getting it to fully work as a gamepad also 
seems to
require coming up with a way to provide a uhid descriptor.

> I'd prefer a wireless one but a wired one will be just fine if it
> "just works" and/or is superior to a wireless one. Yes, I'm well
> aware that there's no Bluetooth support on OpenBSD but am thinking
> of a wireless Logitech-style, i.e. with a wireless USB dongle.

I'm not aware of any Bluetooth-less wireless gamepad option, but would like
to hear of it if it exists.

[...]
> it here as, from what I understand, some emulators/games require
> analogue control.

SDL1 and those using joystick API otherwise would fall in this category.
Again, the F310 has a switch to serve both modes.

games/sdl-jstest has test binaries for D and X mode that can be used to
see what works and what doesn't.

[...]

[1] https://marc.info/?l=openbsd-ports-cvs&m=154653811709620&w=2

-- 
  
tfrohw...@fastmail.com

PGP Public Key: https://pgp.mit.edu/pks/lookup?op=get&search=0xE1A22D58D20C6D22

Reply via email to