From owner-freebsd-hackers Mon Aug 9 22: 3:23 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from home.humboldt1.com (home.humboldt1.com [206.13.45.1]) by hub.freebsd.org (Postfix) with ESMTP id CB5E315371 for ; Mon, 9 Aug 1999 22:03:19 -0700 (PDT) (envelope-from ognir@humboldt1.com) Received: from shovel.groff (ppp144-pm5.humboldt1.com [207.104.21.137]) by home.humboldt1.com (Pro-8.9.2/Pro-8.9.2) with SMTP id WAA08394; Mon, 9 Aug 1999 22:00:53 -0700 (PDT) Date: Mon, 9 Aug 1999 22:14:26 -0700 (PDT) From: Joe Groff X-Sender: joe@shovel.groff To: Stephen Hocking-Senior Programmer PGS Tensor Perth Cc: hackers@FreeBSD.ORG, shocking@ariadne.tensor.pgs.com, ognir@humboldt1.com Subject: Re: freebsd-hackers-digest V4 #576 In-Reply-To: <199908100249.KAA09518@ariadne.tensor.pgs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 10 Aug 1999, Stephen Hocking-Senior Programmer PGS Tensor Perth wrote: > > > > > I believe the joystick driver in FreeBSD could probably be redone, to support > > all the non-standard joysticks that many people (like me :) have. Having > > 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 wrong): > > > > (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 0x201 > > #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 module > for each of the different hardware devices. You'll kldload the main module > first, then the device specific module, which'll call a joystick registration > routine to make itself known. You've just spurred me into action and I hope to > get the main module finished this weekend. > > The recent chatter about allowing kldload to give modules arguments is very > interesting, as it would allow one to specify port addresses and the like. > > Stephen Well, I was going to try to roll my own for this, but it's always nice to know someone's already done it for me. :) I'm gone though for the next couple weeks though, so that'll be a nice thing to get back home to. Many thanks! Where will I be able to get it? -Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message