Dolby Surround Pro Logic ... -not-
Since I finally managed to get rid of the off-putting bug in the PSG code, the sound now seems to work quite accurately in the emulator. If there are any residual bugs they're not that obvious to spot (at least, nothing that can be heard easily).
Sound routines debugging proves to be especially tedious (IMO), and as I rapidly got tired of crawling through huge arrays of numbers -- Sampling 3 channels at 44kHz brings quite a lot ;) -- I had to implement some kind of visual tool to try and comprehend them in a more intuitive way.
Once coded, the new "samples monitor" immediately pointed out the problem, as you can see in this screenshot :
- The yellow/white lines reflect the samples average, while the blue ones are the current maximum. The top channel (yellow) is the overall mixing of the 3 PSG channels (white)
Which clearly makes me happy ... oh well ... call me geek if you want ;)
Right, there's still some work to do on the audio : adding user options (enable switch, sampling rate, overall volume, ...) ; fixing the timing problems (the sound plays at the game's speed, which is too fast - see the previous post) ; the speech in Spike is not implemented (not planed yet) ; etc...
But all in all, with this part working, I feel that the next significant milestone has been reached. And as I'm quite satisfied with the current emulator status, a release should not be too far now...