I added preliminary sound support to the CD32 version of Frog Feast. Sound support wasn't too difficult to add. The audio hardware supports sound at almost any playback rate, up to about 13,000 khz in 8 bit signed pcm/raw format. The most difficult part of playing back a sound is preventing it from repeating once the sound ends. This is solved by setting the sound channel to play an empty sound after the audio hardware has queued the information for the sound. The audio hardware has shadow versions of the sound registers. Once the information is stored in the shadow registers (8 scanline appears to be long enough), the registers can be changed. The trick now is to find a way to stop the current sound to start another one, without a delay. And I need to change the sound routine to use both channels, so that the sound doesn't just play from one speaker. The last thing is a small change.
I also changed the blitter to handle blitting a 24 pixel wide sprite. This was messed up before. Before the source stride was hard coded into the routine.
Setting the gcc optimzation to -O3 was causing a fairly random crash, using version 2.95.3. Using -02 removes the crash. That had me scared a little. I thought it was bliting fix causing the problem.
I am delaying the release of the FM Towns version to add in sprite support. Sprites are handled in hardware, which will speed up the game even more! The recent changes have made adding sprites worthwhile.