Subject: Re: mac68k with netbsd - mp3, realplayer, browser?
To: Michael G. Schabert <mikeride@prez.org>
From: Michael R. Zucca <mrz5149@acm.org>
List: port-mac68k
Date: 09/03/2001 12:46:39
At 11:51 PM -0400 8/29/01, Michael G. Schabert wrote:

> So, the confusing part to me is, if it is so
>undocumented & must be reverse-engineered, then what did all the game
>developers in the '80's do to be able to get it to work?

It is important to understand where those speed ups come from. Most of the
time I would imagine that the code wasn't directly driving the sound chip.
They probably let MacOS do much of the dirty work of programming the chip
itself. The speedups probably came in the form of writing to the sound
buffer directly. You can find the base of the sound buffer, tell MacOS to
put the soundchip in continuous play mode, and then keep putting samples
into the buffer just ahead of sound chip's read-pointer. This gives you
speed up in the same way writing directly to video ram does. That is, you
make some assumptions about how the hardware does things and you take
advantage of that fact. For instance, you might know that the ASC chip
wants its data in an 8 bit unsigned format. Unfortunately, when the
hardware changes, it might be expecting 16 bit signed data or somesuch and
your code breaks.

That's the point of the MacOS API's. They do all the conversion, and
checking, and hand holding for you but they cost you in overhead. That is,
until engineers at Apple got smarter and added API's for
performance/deadline oriented applications like sound.

Of course, there may have been some custom code that really did program the
ASC directly for a little extra speed. If anybody has some source to such
code, and they are not contractually bound to keep it under wraps, feel
free to share it! :-)

Finally, some of those guys were probably paid to work on the problem for 5
days a week for 8 (or more) hours a day. Yeesh! If we had just *one* person
like that working on NetBSD with a few different types of Macs, I can
assure you, NetBSD would probably support most everything. :-)

____________________________________________________________________
 Michael Zucca - mrz5149@acm.org - http://www.mdc.net/~mrz5149/
 "I will choose a path that's clear. I will choose Freewill. "
  --Rush, Freewill
____________________________________________________________________