How-to use a USB joypad?
Thierry Thomas
tthomas at mail.dotcom.fr
Fri Sep 26 12:40:54 PDT 2003
Hello,
I have got a USB joypad, and it is sensed by the system (either 4.9 or
5.1):
uhid0: Microsoft Microsoft SideWinder Plug & Play Game Pad, rev
1.00/1.01, addr 2, iclass 3/0
I have got a new device /dev/uhid0 and kldloaded joy.ko.
When I run
perl -e 'open(JOY,"/dev/uhid0")||die;while(1)
{sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j\n";sleep(1);}'
(adapted from `man 4 joy'), it returns a list of numbers for each action
on the pad, but nothing usable.
I've tried to link /dev/joy0 -> /dev/uhid0, but without success with
several games.
What am I missing?
--
Th. Thomas.
More information about the freebsd-questions
mailing list