Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!jade!ucbvax!hplabs!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: Grabbing the mouse port. Message-ID: <4436@well.UUCP> Date: Fri, 13-Nov-87 03:32:32 EST Article-I.D.: well.4436 Posted: Fri Nov 13 03:32:32 1987 Date-Received: Sun, 15-Nov-87 08:20:19 EST References: <1041@sugar.UUCP> <802@sdcc18.ucsd.EDU> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: One-Quarter-Mercury Botanical Dichotomy Lines: 45 In article <802@sdcc18.ucsd.EDU> cs162ffl@sdcc18.ucsd.edu.UUCP (John Schultz) writes: > > I've written a very fast a simple routine that reads >$DFF00A (port 0), $DFF00C (port 1), $BFE001 (read bit 6 for port 0 >and bit 7 for port 1) for the button presses. > All you have to do is read the appropriate bits (and xor a few). >Just read the Hardware manual Appendix_A Page 13. [ ... ] > Of course, if one is just hacking around, then there is no >problem. > [ If you'll permit me to start my sentence with a Joanne Dow-ism: ] Er... I hack around, and I have a problem. There are official ways to get to things, and they should be observed in all circumstances. You are not officially entitled to look at anything you haven't asked permission for. Consider the future: The hardware *may* remain identical; we have no way of knowing. If it changes, you're screwed (as all are the people who use your software). But you've already made that point. Now let's try the same point on a slightly different tack: Suppose the hardware layout is identical, with one minor exception; an MMU. The MMU will stop you dead in your tracks if you try accessing the hardware directly. However, the OS may condescend to allow you access to the hardware if you ask it nicely. This facility is already installed in the Amiga OS (OpenResource()). It really ought to be used if you're going to look at sensitive hardware addresses. Issue: I *STILL* don't know the official way to close a resource (there's no CloseResource() call). Someone suggested CloseLibrary(), but that took the machine out real fast. Stupid Idea: Way back when, when the Amiga first came out, I didn't like the name "AmigaDOS" at all. It wasn't imaginative enough. So I started calling it AMTOS for a while (Amiga Multi-Tasking Operating System). What say ye? _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Recumbent Bikes: dual ---> !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor