From owner-freebsd-chat@FreeBSD.ORG Tue Apr 1 21:58:41 2008 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B0B41065679 for ; Tue, 1 Apr 2008 21:58:41 +0000 (UTC) (envelope-from SRS0=3Ceq5D=US=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailout04.yourhostingaccount.com (mailout04.yourhostingaccount.com [65.254.254.66]) by mx1.freebsd.org (Postfix) with ESMTP id CC1318FC1C for ; Tue, 1 Apr 2008 21:58:40 +0000 (UTC) (envelope-from SRS0=3Ceq5D=US=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailscan19.yourhostingaccount.com ([10.1.15.19] helo=mailscan19.yourhostingaccount.com) by mailout04.yourhostingaccount.com with esmtp (Exim) id 1Jgo21-0004yI-5y for freebsd-chat@freebsd.org; Tue, 01 Apr 2008 17:28:37 -0400 Received: from impout02.yourhostingaccount.com ([10.1.55.2] helo=impout02.yourhostingaccount.com) by mailscan19.yourhostingaccount.com with esmtp (Exim) id 1Jgo20-00079x-Ql; Tue, 01 Apr 2008 17:28:36 -0400 Received: from authsmtp10.yourhostingaccount.com ([10.1.18.10]) by impout02.yourhostingaccount.com with NO UCE id 8MUc1Z0010D2B7u0000000; Tue, 01 Apr 2008 17:28:36 -0400 X-EN-OrigOutIP: 10.1.18.10 X-EN-IMPSID: 8MUc1Z0010D2B7u0000000 Received: from c-68-51-74-1.hsd1.il.comcast.net ([68.51.74.1] helo=vixen42) by authsmtp10.yourhostingaccount.com with esmtpa (Exim) id 1Jgo20-0000PY-1k; Tue, 01 Apr 2008 17:28:36 -0400 Date: Tue, 1 Apr 2008 16:30:12 -0500 From: "Zane C.B." To: Raven Message-ID: <20080401163012.488ac4b8@vixen42> In-Reply-To: <47F170FF.9060000@apriliaforum.net> References: <47F170FF.9060000@apriliaforum.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i386-portbld-freebsd6.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EN-UserInfo: 0d1ca1697cdb7a831d4877828571b7ab:1570f0de6936c69fef9e164fffc541bc X-EN-AuthUser: vvelox2 Sender: "Zane C.B." X-EN-OrigIP: 68.51.74.1 X-EN-OrigHost: c-68-51-74-1.hsd1.il.comcast.net Cc: freebsd-chat@freebsd.org Subject: Re: Gamepads X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2008 21:58:41 -0000 On Tue, 01 Apr 2008 01:17:19 +0200 Raven wrote: > This is old news, but I searched like mad, and couldn't find > anything on the web. > Maybe some of you once have the same problem. > I wanted to play a game under Wine, but it was nearly unplayable > with the keyb controls. > So I plugged in an USB gamepad . . . it didn't work. > Time to hit the wonderful world of Google . . . > As always, the combination of Wine + "Insert_topic_here" yielded > nothing but "Linux - mainly Ubuntu" stuff. > There are enough threads, but none that helps. > Seems like Linux has /dev/input/js, I wonder if this is > neccessary . . . The Wine wiki mentions a DirectInput registry > key . . . Linux only. > > We have USB keyboards and mice, we should have a gamepad, me > thinks . . . > > Lemme see, > $ cat /dev/uhid1 . . nothing > $ cat /dev/uhid2 . . there it is ! > Me presses buttons, jerks sticks - terminal responds with weird > output. Good ! > Uh-huh, what about the joystick driver in ../xorg/modules/input ? > > $ man joystick > There - everything is documented in all it's glory. > > $ sudo vi /etc/X11/xorg.conf > > :snip > > Section "ServerLayout" > .. > InputDevice "Gamepad" > .. > .. > Section "InputDevice" > Identifier "Gamepad" > Driver "joystick" > Option "Device" "/dev/uhid2" > Option "Buttons" "16" > Option "many_more" > EndSection > > :snap > > Guess what - it worked. > > Tons of useless threads in hundreds of Linux forums, and all you > need is a single manpage. > Go figure . . Sweet. Did not know this was usable for UHIDs. Now the big question is how to wrap the events around to stuff usable by ZSNES.