From owner-freebsd-multimedia Mon Oct 30 13:29:36 2000 Delivered-To: freebsd-multimedia@freebsd.org Received: from sack.ees.com (sack.ees.com [199.2.205.244]) by hub.freebsd.org (Postfix) with ESMTP id 5781637B4C5 for ; Mon, 30 Oct 2000 13:29:28 -0800 (PST) Received: from localhost (myke@localhost) by sack.ees.com (8.8.7/8.8.7) with SMTP id NAA02958; Mon, 30 Oct 2000 13:26:22 -0800 (PST) (envelope-from myke@ees.com) Date: Mon, 30 Oct 2000 13:26:18 -0800 (PST) From: Mike Holling To: "Daniel O'Connor" Cc: freebsd-multimedia@freebsd.org Subject: RE: joystick on als120 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ok, I've got the old joystick driver code working again with newbus, but I don't quite understand the probing process. I'm using joy as an LKM, and whenever I load the module the "probe" method seems to be called three times. Below is some output from the driver, now heavily littered with debugging info. The "probing joystick" message is printed each time joy_probe is invoked. It works the second time, I don't understand what device I got the first time (which can't be assigned an IO port resource at 0x201). I could also use some more clues on how to setup the PNP table; I suspect the multiple probes may be due to PNP but I'm not sure. The number for ALS120 in the old driver didn't match anything I saw in pnpinfo, and I wasn't able to tell what (if anything) in pnpinfo corresponded to the game port. The ISA driver tutorial is excellent, but only covers statically compiled drivers, do I need to do something slightly different for an lkm? Oct 30 14:08:01 av /kernel: DEBUG: Probing joystick Oct 30 14:08:01 av /kernel: DEBUG: got ENXIO from pnp_probe, ignoring for now Oct 30 14:08:01 av /kernel: DEBUG: got '6' from pnp probe Oct 30 14:08:01 av /kernel: DEBUG: attempting to allocate resource... Oct 30 14:08:01 av /kernel: DEBUG: problem with bus_alloc_resource, returning Oct 30 14:08:01 av /kernel: DEBUG: Probing joystick Oct 30 14:08:01 av /kernel: DEBUG: got ENXIO from pnp_probe, ignoring for now Oct 30 14:08:01 av /kernel: DEBUG: got '6' from pnp probe Oct 30 14:08:01 av /kernel: DEBUG: attempting to allocate resource... Oct 30 14:08:01 av /kernel: DEBUG: Joystick probe OK, returning 0 Oct 30 14:08:01 av /kernel: joy0: at port 0x201 on isa0 Oct 30 14:08:01 av /kernel: DEBUG: attaching joystick Oct 30 14:08:01 av /kernel: DEBUG: device state is 'alive' Oct 30 14:08:01 av /kernel: DEBUG: dev->parent is '-1064669696' Oct 30 14:08:01 av /kernel: DEBUG: joystick attached successfully, returning 0 Oct 30 14:08:01 av /kernel: DEBUG: Probing joystick Oct 30 14:08:01 av /kernel: DEBUG: got ENXIO from pnp_probe, ignoring for now Oct 30 14:08:01 av /kernel: DEBUG: got '6' from pnp probe Oct 30 14:08:01 av /kernel: DEBUG: got unit number of 1, expecting 0, returning The driver seems to work OK otherwise, and the test program in the joy man page returns reasonable looking values. Actually getting any application programs to use the joystick device correctly is another matter. Has anyone used the "Joystick" subsection for "XInput"? The man pages say it should be supported but XFree complains that "Joystick" is not a valid subsection entry. xmame does work with the joystick in i386 driver mode, but only after adding some defines to a sub-Makefile. - Mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message