ParaJVE : Parabellum's Java Vectrex Emulator   

Official Home of ParaJVE ... A travel through the programming of a freeware Vectrex emulator in java!

Wednesday, October 11, 2006  

Dolby Surround Pro Logic ... -not-

Better late than never, ParaJVE now comes with a proper sound emulation!

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)
Quite obviously, the problem came from some kind of saturation in the channel's output at some point... After looking for the probable root causes in the code, it turned out to be a pathetic sign mistake, buried somewhere in the periods computing... With this single line fixed, the sound output for the same "soundtrack" magically became :

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...

Labels: ,


Post a Comment

<< Home