Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2000 13:26:18 -0800 (PST)
From:      Mike Holling <myke@ees.com>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        freebsd-multimedia@freebsd.org
Subject:   RE: joystick on als120
Message-ID:  <Pine.BSF.3.96.1001030130644.2893A-100000@sack.ees.com>

next in thread | raw e-mail | index | archive | help
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: <PnP Sound Chip> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.1001030130644.2893A-100000>