AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") (01/20/89)
>Date: Wed, 18 Jan 89 19:23:42 GMT >From: Scott Lindsey <pyramid!claris!scott@HPLABS.HP.COM> >Subject: Re: flashing bell >The actual patch is made by Tool.Setup in the */System/System.Setup >directory. It makes a RAM patch to the _SysBeep toolbox call. Not quite true--I don't want to be _too_ picky, but the difference is important. The patch is actually to the Bell vector (get/set with GetVector and SetVector), as I said in another message. The SysBeep toolbox call is at a higher level; it uses FWEntry to call the old Bell entry point at $FBDD, which eventually gets around to calling the bell vector and making the default "Bonk" if the routine returns with the carry flag set. (At power-on, the bell vector just points at SEC RTL.) By the way, if you use a utility that replaces the bell vector to play a digitized sound, you lose the flash-on-zero-volume patch, since the flash routine is installed first and then replaced by the other utility during boot. >Scott Lindsey, wombat | UUCP: {ames,apple,portal,sun,voder}!claris!scott >Product Development | Internet: scott@claris.com | AppleLink: LINDSEY1 >Claris Corp. | Disclaimer: These are not the opinions of Claris, >(415) 960-4070 | Apple, the author, or anyone else living or dead. --David A. Lyons bitnet: awcttypa@uiamvs DAL Systems CompuServe: 72177,3233 P.O. Box 287 GEnie mail: D.LYONS2 North Liberty, IA 52317 AppleLinkPE: Dave Lyons
scott@claris.com (Scott Lindsey) (01/21/89)
From article <8901191217.aa11784@SMOKE.BRL.MIL>, by AWCTTYPA@UIAMVS.BITNET ("David A. Lyons"): > Not quite true--I don't want to be _too_ picky, but the difference > is important. The patch is actually to the Bell vector (get/set > with GetVector and SetVector), as I said in another message. The > SysBeep toolbox call is at a higher level; it uses FWEntry to call > the old Bell entry point at $FBDD, which eventually gets around to > calling the bell vector and making the default "Bonk" if the routine > returns with the carry flag set. (At power-on, the bell vector just > points at SEC RTL.) OK, you're right about that... I responded without really thinking. Here's some information that might be useful to people writing their own bell routines: It is possible to have a digitized beep that uses the pitch and volume settings in the control panel. You should be able to call _GetBParam to get these two values, where 1E (User volume) is the bell volume and 1F (Bell volume) is the pitch. This is the officially sanctioned method of doing this. If your code is particularly time dependant and you can't face the overhead of the _GetBParam call (which is an expensive call), you might try these high memory locations which are used by the beep in ROM, so they should be _fairly_ safe. Note that they are not documented and are presumably subject to change. Pitch: $E102DF ($0..E) where 0 is low & $E is high Volume:$E102DE ($0..E) where 0 is off & $E is loud I have a beep routine (using speaker toggling) that uses these memory locations without any problem under all of the system software (including 4.0) If you want to retain the border flashing, you should be able to _GetVector to get the current beep (which is the flash or nothing) and call it yourself from your beep routine. -- Scott Lindsey, wombat | UUCP: {ames,apple,portal,sun,voder}!claris!scott Product Development | Internet: scott@claris.com | AppleLink: LINDSEY1 Claris Corp. | Disclaimer: These are not the opinions of Claris, (415) 960-4070 | Apple, the author, or anyone else living or dead.