I have figured out how to play sampled sounds with the Apple Sound Chip. When I diassembled the Mac II's ROM sound driver, it helped me see how it controls the chip, but it didn't give me everything I needed. It appears that the Mac II's ROM sound driver is driven by a vertical blanking interrupt task that writes some samples into the ASC's FIFO every so often, so it doesn't use any of the FIFO status bits as far as I can tell. I could be wrong, though. I also tried disassembling an old system file, but I couldn't figure out how to find the Sound Manager in there, and I couldn't find anything writing directly into the ASC. Maybe it uses the sound driver to do its playback? No biggie though...
I started out by writing samples to the sound chip without worrying about the FIFO status bits. Instead I added some delay loops in my code to wait long enough to not fill the FIFO up completely, but not too long that the FIFO empties out completely. After a ton of trial and error compiling directly on the IIci to get the delays right, I finally found a decent combination and I was able to play the LC III & later/Performa/most Quadra series startup chime from a Mac program by writing directly to the chip. Unfortunately it would sometimes work and sometimes not -- sometimes the FIFO would end up draining, and I'd hear little crackles in the sound and stuff like that. I figured it was because of interrupts, but I wanted to get it working with the FIFO status bits rather than a cheesy time delay. The FIFO status bits are a more reliable way to tell when it's time to write more data to the chip--it'll signal when the FIFO is half empty, so you can fill it up again. Luckily the MAME/MESS project has some info on those bits.
At this point I was sick of waiting 2 minutes after every code change for the IIci to re-compile my app, so I set up my iMac G4 to do the compiling. The IIci could load the compiled program over AppleTalk quickly. Luckily my IIci has an Ethernet card
This made it WAY simpler to experiment with the FIFO status bits. I got something that would sometimes work, and sometimes would hang waiting for the FIFO half-empty bit to come on (it never would). Like I said earlier, I am pretty sure this is because an interrupt is stealing the status bit from me sometimes. To test that theory, I disabled interrupts during my program, and BOOM! It worked! A perfect playback! I even took the sampled startup chime and repeated it 9 times to get a longer sound file. It played completely perfectly every time.
I am 99% sure that there is enough unused space in the IIci ROM to hold the sampled LC III startup chime! I'll see if I can make it work as a startup sound soon!
P.S. I remember Darkwing Duck! I was more into Ninja Turtles and the Nickelodeon shows like Doug and Rugrats though