Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!brolga!uqcspe!batserver.cs.uq.oz.au!warwick From: warwick@batserver.cs.uq.oz.au (Warwick Allison) Newsgroups: comp.sys.atari.st.tech Subject: Re: "Right way" to read the joystick ports ? Keywords: joyvec ikbws joysticks Message-ID: <6811@uqcspe.cs.uq.oz.au> Date: 17 Jan 91 22:59:19 GMT References: <4454@skye.cs.ed.ac.uk> Sender: news@uqcspe.cs.uq.oz.au Reply-To: warwick@batserver.cs.uq.oz.au Lines: 22 In <4454@skye.cs.ed.ac.uk> tkld@cs.ed.ac.uk (Kevin Davidson) writes: >What is the "right way" to read the state of the joysticks, and return >everything to normal after I've finished ? I've done it, but the method has been tucked away in a code module for quite a while now... Basically, 1. Adjust the joyvec to point to your routine (I think you use an XBIOS call to do this) 2. Tell the IKBD to send joystick packets for each joystick position change. (an XBIOS call again) 3. Before you quit, re-enable the mouse. Your routine is a parameterless procedure, and the joystick values are contained in some registers. I'm a bit vague on this part, so if nobody has any accurate data, I'll post my code. I'd say it is right, I works on a 520 and a Mega 4, so that's enough for me.