From owner-freebsd-multimedia@FreeBSD.ORG Thu Mar 17 17:22:41 2005 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C473B16A4CF for ; Thu, 17 Mar 2005 17:22:41 +0000 (GMT) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id B60B543D5C for ; Thu, 17 Mar 2005 17:22:38 +0000 (GMT) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.4) with SMTP id EAA10378; Fri, 18 Mar 2005 04:22:13 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Fri, 18 Mar 2005 04:22:13 +1100 (EST) From: Ian Smith To: Kevin Downey In-Reply-To: <1d3ed48c050317073844cffd00@mail.gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-multimedia@freebsd.org cc: Mathew Kanner Subject: Re: Joy X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2005 17:22:41 -0000 On Thu, 17 Mar 2005, Kevin Downey wrote: > On Wed, 16 Mar 2005 16:57:32 -0500, Mathew Kanner wrote: > > On Mar 16, Kevin Downey wrote: > > > So, I got this cheap old used microsoft gamepad of some > > > kind(sidewinder?). It plugs into the "game port" on the sound card. I > > > figure all I will have to do is kldload a module or few to get it > > > running. So kldload joy and nada. Does device joy need to be in the > > > kernel? is joy.ko just a siren's song of impossibilities to lure the > > > ignorant? kldload joy hasn't worked for me since 3.3-RELEASE. It worked (as I recall) in 2.2.6-RELEASE though I added it to the kernel then anyway, for an experimental UPS interface - yet another unfinished project :) I've tried kldload joy on 3.3, 4.5, 4.8 and 4.10 systems. Yes it loads, no it doesn't work, but works fine in kernel here on 3.3 and 4.5 boxes. > > Been a long time since I've though about joy. Anyway, I seem > > to recall that you need a hint to enable joy since it's ISA and not > > PNP. Is it there? Is it commented out? (Away from my freebsd > > machine) > > > > --Mat joy.c (at 4.x) has a bunch of isa_pnp_id definitions, with pnp probe - maybe kldload might work with PnP, dunno, mine were ISA gameport cards. > I see. > I have not found a device.hints line for joy. Well, I have found > several "suggested" joy device.hints lines such as: > hints.joy.0.at="pci0" > hints.joy.0.at="isa" > I found these while mucking around with google. Now I am pretty sure > the ISA deal is not the way to go because, well, its a pci sound card. Don't know about 5.x or -current, but it's likely still accessed via the ISA bus. In 2.x, 3.x and 4.x kernels it's: device joy0 at isa? port IO_GAME smithi on paqi% grep joy /var/run/dmesg.boot joy0 at port 0x201 on isa0 smithi on paqi% kldstat -v | grep joy 35 isa/joy 56 pci/emujoy No idea what emujoy does. This Compaq Armada 1500c laptop's joystick connector appears only on its docking station, presumably via the sound card, which also appears here as ISA; no, I haven't tried MIDI with it. sbc0: at port 0x220-0x22f,0x388-0x38b,0x330-0x331 irq 5 drq 1,5 on isa0 pcm0: on sbc0 > But I have tried both of them anyway. Next I will try put device joy > in the kernel(instead of kldload joy). Now looking around in the BIOS > has lead me to associate the string "200-207H" with the gameport, and > it seems like this might be something useful, but gosh, I dunno. Given I don't know about 5.x & 6.x, I suspect that it should still work. 0x201 = joystick port. /sys/isa/joy.c is a quick read. From man 4 joy: smithi on paqi% perl -e 'open(JOY,"/dev/joy0")||die;while(1) \ {sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j\n";sleep(1);}' -2147483648 -2147483648 0 0 -2147483648 -2147483648 0 0 -2147483648 -2147483648 0 0 ^C (correct results for an unconnected game port :) Cheers, Ian