From owner-freebsd-hackers Mon Aug 9 19:54:38 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bilby.prth.tensor.pgs.com (bilby.prth.tensor.pgs.com [157.147.232.237]) by hub.freebsd.org (Postfix) with ESMTP id 810F71532E for ; Mon, 9 Aug 1999 19:54:31 -0700 (PDT) (envelope-from shocking@ariadne.prth.tensor.pgs.com) Received: from bandicoot.prth.tensor.pgs.com (bandicoot.prth.tensor.pgs.com [157.147.224.1]) by bilby.prth.tensor.pgs.com (8.9.3/8.8.8) with ESMTP id KAA07363; Tue, 10 Aug 1999 10:48:12 +0800 (WST) Received: from ariadne.tensor.pgs.com (ariadne [157.147.227.36]) by bandicoot.prth.tensor.pgs.com (8.9.3/8.8.8) with ESMTP id KAA28106; Tue, 10 Aug 1999 10:49:36 +0800 (WST) Received: from ariadne by ariadne.tensor.pgs.com (8.9.1b+Sun/SMI-SVR4) id KAA09518; Tue, 10 Aug 1999 10:49:33 +0800 (WST) Message-Id: <199908100249.KAA09518@ariadne.tensor.pgs.com> X-Mailer: exmh version 2.0.2 2/24/98 To: hackers@freebsd.org Cc: shocking@ariadne.tensor.pgs.com, ognir@humboldt1.com Subject: Re: freebsd-hackers-digest V4 #576 In-reply-to: Your message of "Mon, 09 Aug 1999 13:34:57 MST." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Tue, 10 Aug 1999 10:49:33 +0800 From: Stephen Hocking-Senior Programmer PGS Tensor Perth Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > = > I believe the joystick driver in FreeBSD could probably be redone, to s= upport > all the non-standard joysticks that many people (like me :) have. Havin= g > just recently converted to FreeBSD from Linux, though, I don't know the= best > way to go about it. Here are some ideas (sorry if my terminology is wro= ng): > = > (1) Redefine the core joystick code as a controller, and then have all = the > different joystick types ride on top of it, like: > = > controller joy0 at isa? port IO_GAME # Serves joystick port 0x2= 01 > #device jan0 at joy0 # Analog joystick > device jgpp0 at joy0 # Gravis GamePad Pro > etc... > This would also allow for modules to be used for all the different = joystick > types, I think. > = > (2) Have a monolithic joystick driver, with options to pick the proper = type: > = > device joy0 at isa? port IO_GAME # Just like it is now > options JOY_ANALOG > options JOY_GRAVIS > etc... > = > I also believe it should use the Linux joystick's device interface, so = that > folks that have already written their games to use the Linux joysticks = can work > in FreeBSD with minor effort. > = > Any help or comments are appreciated. > = I'm partway through porting Vojtech's Linux joystick code to FreeBSD, as = a = series of loadable modules. There is the main module (which is mostly = converted, although some of the Linuxisms are a bit hard to come up with = an = equivalent to, even with the Linux device drivers book) and a seperate mo= dule = for each of the different hardware devices. You'll kldload the main modul= e = first, then the device specific module, which'll call a joystick registra= tion = routine to make itself known. You've just spurred me into action and I ho= pe to = get the main module finished this weekend. The recent chatter about allowing kldload to give modules arguments is ve= ry = interesting, as it would allow one to specify port addresses and the like= =2E Stephen -- = The views expressed above are not those of PGS Tensor. "We've heard that a million monkeys at a million keyboards could prod= uce the Complete Works of Shakespeare; now, thanks to the Internet, we k= now this is not true." Robert Wilensky, University of Califor= nia To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message