home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!mumbo.apple.com!gallant.apple.com!wolverine.apple.com!user
- From: jpugh@apple.com (Jon Pugh)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Extended PRam
- Message-ID: <jpugh-140992143701@wolverine.apple.com>
- Date: 14 Sep 92 21:47:06 GMT
- References: <92253.101329JTC4@psuvm.psu.edu>
- Sender: news@gallant.apple.com
- Followup-To: comp.sys.mac.programmer
- Organization: Apple Computer, Inc.
- Lines: 35
-
- In article <92253.101329JTC4@psuvm.psu.edu>, JTC4@psuvm.psu.edu wrote:
- >
- > Does anyone know the format of PRam beond the 20 bytes documented in IM
- > or where it is documented? Information about how to access it (ReadXPRam
- > and WriteXPRam?) would also be appreciated. I am trying to set the alert
- > sound to some default for system 7 and it seems to be kept in XPRam
- > somewhere. I also need to know where system 6.0.7 kept the defalt.
-
- It would appear that no one has written down all the secret bytes of XPRAM,
- although someone must arbitrate conflicts when we define stuff. I've just
- never needed to know. I did disassemble the Sound cdev to figure out where
- and how the beep resource number was saved for my SwitchBeep cdev
- (available on ftp.apple.com in /pub/pugh/switchbeep.sit.hqx).
-
- The ReadXParam and WriteXParam traps are apparently discussed in the
- hardware manual (a WWDC trivia question was "What are the only traps not
- defined anywhere in Inside Macintosh?"). They are register based traps
- without glue, so they cannot be called directly from C or Pascal.
-
- However, I have created two cheap routines which do exactly what you want.
- Since I am a nice guy, at least at the moment, here they are. Send money.
- ;)
-
- FUNCTION GetBeep: Integer; INLINE $204F, $203C, $0002, $007C, $A051;
-
- PROCEDURE SetBeep (theBeep: Integer); INLINE $204F, $203C, $0002, $007C,
- $A052;
-
- These routines use the 'snd ' resource ID number. This is the same under
- system 6 and 7.
-
- As usual, these routines are unsafe and unsupported. I might even be
- hosing your stack since I hand assembled them but they seem to work for me.
-
- Jon
-