Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!seas.gwu.edu!kilian From: kilian@seas.gwu.edu (Jens Kilian) Newsgroups: comp.sys.atari.st.tech Subject: Re: "Right way" to read the joystick ports ? Keywords: joyvec ikbws joysticks Message-ID: <2566@sparko.gwu.edu> Date: 18 Jan 91 14:50:47 GMT References: <4454@skye.cs.ed.ac.uk> <6811@uqcspe.cs.uq.oz.au> Sender: news@seas.gwu.edu Reply-To: kilian@seas.gwu.edu (Jens Kilian) Organization: The George Washington University, Washington, D.C. Lines: 26 In article <6811@uqcspe.cs.uq.oz.au> warwick@batserver.cs.uq.oz.au writes: [...] > > 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. > [...] The joystick routine called by the XBIOS gets a pointer to a status block (in A0, I think). The first byte identifies the joystick that caused the event, the second and third byte contain the current values of joysticks 0 and 1. You should be somewhat careful about saving registers in your joystick routine, and make it short. I usually copy the joystick values to some global variables which are polled by the program. Hope this helps. Jens Kilian -- \/// Internet: kilian@seas.gwu.edu |Snail: 4715 MacArthur Blvd. \\\/ /// UUCP: ...uunet!seas.gwu.edu!kilian| Washington, DC 20007 \\\ \\\ [These addresses will change (to kilian@cc.gatech.edu) soon] /// /\\\ "Wos deht ich-en so gern haage, awwer er spihrt doch nix ..." ///\