I am using NetBSD/i386 1.6.1 with SDL-1.2.5 as installed via NetBSD
pkgsrc. My /dev/joy0 is not USB related. (It is at isapnp0.)
I tried defendguin (which I packaged) which uses SDL:
Warning: Could not open joystick 1.
The Simple DirectMedia error that occured was:
/dev/joy0: USB_GET_REPORT_DESC: Device not configured
SDL needs to support /dev/joy? style gameport joysticks in addition
to USB ones.
I found a patch for FreeBSD in their ports collection at
For pkgsrc, I made a new patch based on that FreeBSD patch and on the
latest src/joystick/bsd/SDL_sysjoystick.c from libsdl CVS.
(This is recorded in NetBSD GNATS as NetBSD PR #22462.)
This patch is at
http://www.reedmedia.net/misc/tmp/SDL_sysjoystick.c-patch (9083 bytes)
Notice that the patch’s final “ifdef USBHID_NEW” section is reordered
based on OpenBSD ports and NetBSD’s pkgsrc (original patch-aa) patches.
This patch makes it so I can use my joystick. With another program
(rocksndiamonds), it seems like the joystick is calibrated fine. But with
SDL-based defendguin, I can’t get to all the menu choices and when playing
it moves to top and to the right. I can move around though and the buttons
Can someone look at this patch as linked above and test and improve it?
I’ll be glad to provide further testing.
Jeremy C. Reed
p.s. My son is going to be glad that he can play games with his joystick