Date: Wed, 12 Mar 1997 09:31:28 +1200 From: Bill Currie Subject: Re: joystick reading (gameport) To: Christoph Kukulies Cc: djgpp AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <3325CF30.60E9@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <199703110907 DOT KAA06763 AT gilberto DOT physik DOT rwth-aachen DOT de> 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. Bill -- Leave others their otherness.