noren@dinl.uucp (Charles Noren) (09/13/88)
Could anyone point me in the right direction on how to read joy stick values on a PC in C or assembly? Thanks, -- Chuck Noren (303) 971-7930
cdold@starfish.Convergent.COM (Clarence Dold) (09/14/88)
In article <637@dinl.mmc.UUCP>, noren@dinl.uucp (Charles Noren) writes: > direction on how to read joy stick values on a PC in C or assembly? INT 15H, AH=84H - Joystick Support Input AH =84H DX =0000H Read Switches =0001H Read Potentiometer Returns AX =Switch settings, if DX=0000H POT A(x), if DX=0001H BX =POT A(y), if DX=0001H CX =POT B(x), if DX=0001H DX =POT B(y), if DX=0001H CF =0 IF =1 The Joystick that I bought claims that the 'pot' values read will vary with the speed of the machine. You should assign a value for 0,0 to the pot reading at entry, or at a specific 'recalibration' time. -- Clarence A Dold - cdold@starfish.Convergent.COM (408) 435-5274 ...pyramid!ctnews!mitisft!professo!dold P.O.Box 6685, San Jose, CA 95150-6685
josef@ugun21 (09/16/88)
See the latest "Circuit Cellar Ink", it has an article on "Using the IBM PC Joystick". If You can't get one, let me know, I might type in the pascal/asm/c code to e-mail it. BTW: does anybody know the literal translation of "Joystick" into German? (I mean LITERAL, not "der Joystick") * ** Josef Moellers * * paper-mail: ***** * c/o Nixdorf Computer AG * * Abt. EG-3 * * Unterer Frankfurter Weg * * D-4790 Paderborn * * telephone: * * (+49) 5251 104691 ***** * e-mail: * * (USA) uunet!linus!nixbur!nixpbe!mollers.pad ** (!USA) mcvax!unido!nixpbe!mollers.pad * PS: Please use e-mail address, josef@ugun21 is of no use Standard disclaimer: Blablabla opinion blablabla employer blablabla!
haugj@pigs.UUCP (The Beach Bum) (09/16/88)
In article <712@starfish.Convergent.COM> cdold@starfish.Convergent.COM (Clarence Dold) writes: >In article <637@dinl.mmc.UUCP>, noren@dinl.uucp (Charles Noren) writes: >> direction on how to read joy stick values on a PC in C or assembly? > >INT 15H, AH=84H - Joystick Support i tried this on my Wyse 3216 running SCO Xenix and it didn't work. why? because that was a DOS call. now if someone would like to give the correct answer, i'd be most grateful. [ ps - i didn't really try it. ;-) ] -- =-=-=-=-=-=-=-The Beach Bum at The Big "D" Home for Wayward Hackers-=-=-=-=-=-= Very Long Address: John.F.Haugh@rpp386.dallas.tx.us Very Short Address: jfh@rpp386 "ANSI C: Just say no" -- Me
cdold@starfish.Convergent.COM (Clarence Dold) (09/18/88)
From article <421@pigs.UUCP>, by haugj@pigs.UUCP (The Beach Bum): > In article <712@starfish.Convergent.COM> cdold@starfish.Convergent.COM (Clarence Dold) writes: >>In article <637@dinl.mmc.UUCP>, noren@dinl.uucp (Charles Noren) writes: >> direction on how to read joy stick values on a PC in C or assembly? >>INT 15H, AH=84H - Joystick Support > i tried this on my Wyse 3216 running SCO Xenix and it didn't work. why? > because that was a DOS call. > now if someone would like to give the correct answer, i'd be most grateful. > [ ps - i didn't really try it. ;-) ] Oh, so quick to flame theory, so slow to try it... A DOS call??? Why is it that I found it in my Compaq 386 Hardware Tech Ref? I believe that it is a BIOS ROM call, since it appears in chapter 4, "SOFTWARE ASPECTS AND BIOS" Besides, you aren't the one that asked for it. I already got e-mail from Charles Noren telling me that it, and the c-source that I mailed to him, worked. Of course he might be running DOS. And just a parting shot....... Why don't you change your .signature so it fits on a line? -- Clarence A Dold - cdold@starfish.Convergent.COM (408) 435-5274 ...pyramid!ctnews!mitisft!professo!dold P.O.Box 6685, San Jose, CA 95150-6685
haugj@pigs.UUCP (John F. Haugh II) (09/20/88)
In article <720@starfish.Convergent.COM> cdold@starfish.Convergent.COM (Clarence Dold) writes: >Oh, so quick to flame theory, so slow to try it... >A DOS call??? Why is it that I found it in my Compaq 386 Hardware Tech Ref? >I believe that it is a BIOS ROM call, since it appears in chapter 4, >"SOFTWARE ASPECTS AND BIOS" didn't have to try it. xenix does not support `rom-bios calls'. to support a joystick a device driver would have to be written and ioctl() calls made to read the joystick pots and buttons. >Besides, you aren't the one that asked for it. does that actually matter? i've asked for it now ... -- =-=-=-=-=-=-=-The Beach Bum at The Big "D" Home for Wayward Hackers-=-=-=-=-=-= Very Long Address: John.F.Haugh@rpp386.dallas.tx.us Very Short Address: jfh@rpp386 "ANSI C: Just say no" -- Me