home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / atari / st / tech / 4078 < prev    next >
Encoding:
Internet Message Format  |  1992-07-20  |  1.9 KB

  1. Path: sparky!uunet!mcsun!uknet!edcastle!hwcs!neil
  2. From: neil@cs.hw.ac.uk (Neil Forsyth)
  3. Newsgroups: comp.sys.atari.st.tech
  4. Subject: Re: Joystick programming help needed
  5. Message-ID: <1992Jul21.090623.2263@cs.hw.ac.uk>
  6. Date: 21 Jul 92 09:06:23 GMT
  7. References: <199207170837.AA21009@opus.calstatela.edu>
  8. Sender: news@cs.hw.ac.uk (News Administrator)
  9. Organization: Dept of Computer Science, Heriot-Watt University, Scotland
  10. Lines: 32
  11.  
  12. In article <199207170837.AA21009@opus.calstatela.edu> rkim@CALSTATELA.EDU
  13. ("Richard H.S. Kim") writes:
  14. >Extracted from the March issue of the High Sierra Atari User Group JOURNAL.
  15. >...
  16. >    The address that the joystick report is stored is 3592 (decimal)
  17. >or 0xE08 (hex).
  18. >
  19.  
  20. NO!!!!!!
  21.  
  22. Do not do this! PLEASE! That is not a documented TOS variable. The only true
  23. way to read the joysticks is to intercept the IKBD vector specifically for
  24. them. Kbdvbase (XBIOS #34) returns a pointer to a table of addresses for each
  25. handler. Vector number 6 (counting from 0) is called by the IKBD handler
  26. whenever there is a joystick event. The handler is called with A0 and the
  27. longword on the stack pointing to the joystick packet in the form:-
  28.  
  29.     HEADER($FE,$FF),JOY1,JOY2
  30.  
  31. While I'm at it, vector #4 is the mouse handler and a relative mouse packet
  32. looks like this:-
  33.  
  34.     HEADER($F8-$FB - button status in bit 0 an 1), DX, DY
  35.  
  36. +----------------------------------------------------------------------------+
  37. ! DISCLAIMER:Unless otherwise stated, the above comments are entirely my own !
  38. !                                                                            !
  39. ! Neil Forsyth                      JANET:  neil@uk.ac.hw.cs                 !
  40. ! Dept. of Computer Science         ARPA:   neil@cs.hw.ac.uk                 !
  41. ! Heriot-Watt University            UUCP:   ..!ukc!cs.hw.ac.uk!neil          !
  42. ! Edinburgh, Scotland, UK  "That was never 5 minutes!" - "I'm afraid it was" !
  43. +----------------------------------------------------------------------------+
  44.