From owner-freebsd-questions@FreeBSD.ORG Fri Dec 8 19:30:20 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E0A516A40F for ; Fri, 8 Dec 2006 19:30:20 +0000 (UTC) (envelope-from tshadwick@oss-solutions.com) Received: from moogle.hksilver.net (mail.hksilver.net [208.231.66.99]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D67B43C9D for ; Fri, 8 Dec 2006 19:29:19 +0000 (GMT) (envelope-from tshadwick@oss-solutions.com) Received: from [172.16.30.8] (chibi.shadwick.home [172.16.30.8]) (authenticated bits=0) by moogle.shadwick.home (8.13.8/8.13.4) with ESMTP id kB8JPDth066486 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NOT) for ; Fri, 8 Dec 2006 13:25:16 -0600 (CST) (envelope-from tshadwick@oss-solutions.com) Message-ID: <4579BC1A.2020708@oss-solutions.com> Date: Fri, 08 Dec 2006 13:25:14 -0600 From: Tony Shadwick User-Agent: Mail/News 1.5.0.2 (Macintosh/20060310) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: message/rfc822; name*0="Attempting to write a mouse driver for the GunCon2...help?" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="Attempting to write a mouse driver for the GunCon2...help?" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Attempting to write a mouse driver for the GunCon2...help? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2006 19:30:20 -0000 Message-ID: <4578E23C.8040303@oss-solutions.com> Date: Thu, 07 Dec 2006 21:55:40 -0600 From: Tony Shadwick User-Agent: Mail/News 1.5.0.2 (Macintosh/20060310) MIME-Version: 1.0 To: questions@freebsd.org Subject: Attempting to write a mouse driver for the GunCon2...help? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I'm trying to figure this out, and I'm not sure what to do. The GunCon2 is a usb device intended for the PS/2. I have it's communications protocol worked out, FreeBSD picks the gun up and gives it two devices, /dev/ugen0 and /dev/ugen0.1. ugen0.1 is a character device that I can easily read everything I need from the gun. I even have a perl "reference driver" written that uses perl and the X11::GuiTest module to move the pointer and click, but it's too laggy to be of real use. The gun has 10 (!!!) buttons. The trigger, A, B, C, Select, Start, and the control pad (4 independent buttons). I'm not sure whether or not the OS can support a 10 button HID mouse or not. I've tried just getting the gun detected and so it creates /dev/guncon instead of ugen (even if it really is still using the general purpose driver) with no luck. I have the product ID and vendor ID...I'm just not "getting" it. Ideally I'd like to be able to use the gun for MAME. It should function just like any other mouse though. Aside from lag issues, I have it doing that already. Here's a link to what I have so far: http://forum.arcadecontrols.com/index.php?topic=60813.0 As per that link, someone wrote a driver for Linux, and also for the "TopGun" (a third party GunCon2 clone), but I'm not sure whether or not that code is portable. Could anyone give me a hand with this? Tony