From: Christoph Kukulies Message-Id: <199703120931.KAA14805@gilberto.physik.rwth-aachen.de> Subject: Re: joystick reading (gameport) In-Reply-To: <3325CF30.60E9@blackmagic.tait.co.nz> from Bill Currie at "Mar 12, 97 09:31:28 am" To: billc AT blackmagic DOT tait DOT co DOT nz Date: Wed, 12 Mar 1997 10:31:32 +0100 (MET) Cc: kuku AT gilberto DOT physik DOT RWTH-Aachen DOT DE, djgpp AT delorie DOT com Reply-To: Christoph Kukulies MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Christoph Kukulies wrote: > > > > Hmm. bits 2 and 3 ? > > > > With the following test program > > > > #include > > main() > > { > > int i; > > while(1){ > > outportb(0x201,0xff); > > i=inportb(0x201); > > printf("%02x\r",i);fflush(stdout); > > } > > } > > > > I'm getting 0xff when no button is pressed or no stick action is made. > > When I press one fire button I'm getting 0xef, the other 0xdf. > > > > This joystick has two fire buttons (Saitek MEGASTICK III, MX-130) > > (e.g.: http://www.dbline.it/shtm/jmx-130.htm) > > > > Are the two fire buttons equivalent to the second joystick? > > Why do I see no data in the first nibble? > > Because you are resetting the bits every loop and so when you read them, > you will only ever get 1's in them. Aarrgh. Slap, slap. :-) > > Bill > -- > Leave others their otherness. > -- Chris Christoph P. U. Kukulies kuku AT gil DOT physik DOT rwth-aachen DOT de