Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!sdcsvax!sdcc6!sdcc3!ee173way From: ee173way@sdcc3.UUCP Newsgroups: comp.sys.amiga Subject: Re: gameport.device Message-ID: <3757@sdcc3.ucsd.EDU> Date: Thu, 19-Feb-87 20:23:31 EST Article-I.D.: sdcc3.3757 Posted: Thu Feb 19 20:23:31 1987 Date-Received: Sat, 21-Feb-87 03:43:18 EST References: <292@umbc3.UMD.EDU> Reply-To: ee173way@sdcc3.ucsd.edu.UUCP (John Schultz) Organization: University of California, San Diego Lines: 33 Keywords: gameport joystick cleanup arrrrgggg Don't even waste your time with the RKM version. I have written a video arcade-style game using *totally* my own routines. I even access port 0 with Intuition hooked up! What is the trick? It is so simple, you probably won't believe it. Just READ THE HARDWARE! Get out your Hardware Manual and turn to page Appendix_A Page 12. Bottom right of page lists: JOY0DAT 00A R JOY1DAT 00C R The 00A and the 00C are the offsets from $DFF000. So, the memory locations to access are $DFF00A and $DFF00C. The R's mean read locations. (I used absolute addressing BYTE vars). Now, look at page Appendix_A page 13, bottom left, above JOYTEST. The bits you need to check are shown. That's it! The necessary C code takes only *a line or two, maybe three*, not *three* PAGES. Plus, you can read port 0 with no problems (I haven't had any). I wrote my code in Modula-2 and it only took about half a page. This version is tons faster, much smaller, and less problematic. If you wish to do the same for a mouse version, you'll have to write the necessary code to support it (motion x,y,vel). Read Chapter 8 of the hardware manual first to get an idea of what we are doing. (You will also probably want to read the BUTTON addresses as well... Good Luck, John 7OHN