[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How is the IIgs beep generated?



Michael J. Mahon wrote:
mdj wrote:

On Dec 3, 11:07 am, "Michael J. Mahon" <mjma...@aol.com> wrote:

Michael J. Mahon wrote:

Mitchell Spector wrote:


Here's a question, one I've been curious about the past twenty years:
Can you reproduce the IIgs "beep" on a stock Apple IIe?


It can be played using DAC522, but with 5-bit rather than 8-bit
precision, so it will be a little "rougher".  Still, it would be
a nice hack.  ;-)


Can someone point me to the "bong" sound in the IIgs ROM?

I'll extract it and try it out on SOUND.EDITOR.



Isn't the pitch and duration set by control panel parameters? It'd be
easy enough to hack the gs routine into a IIe ROM (if you don't
already use the self-test for other interesting things), but setting
the parameters is much harder.


That shows you how little I use the IIgs!  ;-)

But since it's done by toggling the speaker, with a processor speed
of 1MHz, it can certainly be generated on any Apple II.

I don't have a IIgs at hand to check the pitch of the "bonk", but
I've written a short routine that I think will produce the sound
on any Apple II.

The Merlin source, object, and an Applesoft test program are in
the archive:

http://home.comcast.net/~mjmahon/BONK.SHK

The test program loads the binary file, so you'll need to customize
the path to your own setup.

For some appropriate setting of the parameters, this should replicate
the IIgs "bonk".  ;-)

This is still a test version, so the parameters are POKEd into the
routine, and a derivative parameter should be computed by the routine
instead of in the BASIC program, but it's a good sound test.

BTW, some emulators have a lot of trouble with high frequency PWM
and some handle it pretty well.  A real Apple II should work best.  ;-)

-michael

NadaNet and AppleCrate II: parallel computing for Apple II computers!
Home page: http://home.comcast.net/~mjmahon

"The wastebasket is our most important design
tool--and it's seriously underused."