From owner-freebsd-chat@FreeBSD.ORG Tue Apr 1 22:27:52 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 4ED301065675 for ; Tue, 1 Apr 2008 22:27:52 +0000 (UTC) (envelope-from SRS0=3Ceq5D=US=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailout08.yourhostingaccount.com (mail18.yourhostingaccount.com [65.254.253.234]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0858FC37 for ; Tue, 1 Apr 2008 22:27:51 +0000 (UTC) (envelope-from SRS0=3Ceq5D=US=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailscan03.yourhostingaccount.com ([10.1.15.3] helo=mailscan03.yourhostingaccount.com) by mailout08.yourhostingaccount.com with esmtp (Exim) id 1JgoxL-0007t1-1i for freebsd-chat@freebsd.org; Tue, 01 Apr 2008 18:27:51 -0400 Received: from impout02.yourhostingaccount.com ([10.1.55.2] helo=impout02.yourhostingaccount.com) by mailscan03.yourhostingaccount.com with esmtp (Exim) id 1JgoxK-0004Cr-Pb; Tue, 01 Apr 2008 18:27:50 -0400 Received: from authsmtp08.yourhostingaccount.com ([10.1.18.8]) by impout02.yourhostingaccount.com with NO UCE id 8NTq1Z0070ASqTN0000000; Tue, 01 Apr 2008 18:27:50 -0400 X-EN-OrigOutIP: 10.1.18.8 X-EN-IMPSID: 8NTq1Z0070ASqTN0000000 Received: from c-68-51-74-1.hsd1.il.comcast.net ([68.51.74.1] helo=vixen42) by authsmtp08.yourhostingaccount.com with esmtpa (Exim) id 1JgoxK-0007fN-BK; Tue, 01 Apr 2008 18:27:50 -0400 Date: Tue, 1 Apr 2008 17:29:27 -0500 From: "Zane C.B." Message-ID: <20080401172927.245a9cd9@vixen42> In-Reply-To: <20080401163012.488ac4b8@vixen42> References: <47F170FF.9060000@apriliaforum.net> <20080401163012.488ac4b8@vixen42> 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: Raven , 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 22:27:52 -0000 On Tue, 1 Apr 2008 16:30:12 -0500 "Zane C.B." wrote: > 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. After a little bit of investigation, I found it is possible of remapping the buttons and axis to various arbitrary keycodes, but this seems to crash X as of currently.