Date: Mon, 30 Oct 2000 11:27:50 +0930 (CST) From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Mike Holling <myke@fks.bt> Cc: freebsd-multimedia@freebsd.org Subject: RE: joystick on als120 Message-ID: <XFMail.001030112750.doconnor@gsoft.com.au> In-Reply-To: <Pine.BSF.4.21.0010291713040.24377-100000@hammerhead.fks.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29-Oct-00 Mike Holling wrote: > > I think it was broken around newbus and not fixed since (not exactly a core > > driver I guess ;) > Well, the joystick driver should be pretty simple to fix. Are the ALS120 > data sheets publically available? Has anyone else been working on this > recently, or just I just start hacking at it? You don't need the data sheets for a particular chip, just how the joystick port works. There is a bitmask for the buttons, and to read the potentiometers you write to the port and keep reading until the POTX/Y bits go low and the elapsed time tells you what the resitance is (and hence the position of the joystick). Some joysticks (eg MS Sidewinder) have a digital mode which is fairly evil, you put the joystick in this mode by writing to the port several times with several carefully crafted delays, then you read the joystick data by writing and polling the joystick button lines (uses 2, 1 clock and 1 data) to get a 64 bit value back which contains analogue positioning info and button/hat states. It is discussed in US patent #5628686 (which MS hold funnily enough..) Here are some interesting URLs you might find useful -> http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/ http://www.hut.fi/Misc/Electronics/docs/joystick/ http://www.delphion.com/details?pn=US05628686__ --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001030112750.doconnor>