From owner-freebsd-multimedia Sun Oct 29 16:58: 4 2000 Delivered-To: freebsd-multimedia@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id 70D7537B4C5 for ; Sun, 29 Oct 2000 16:58:00 -0800 (PST) Received: from cain.gsoft.com.au (doconnor@cain [203.38.152.97]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id LAA08254; Mon, 30 Oct 2000 11:27:50 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 30 Oct 2000 11:27:50 +0930 (CST) From: "Daniel O'Connor" To: Mike Holling Subject: RE: joystick on als120 Cc: freebsd-multimedia@freebsd.org Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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