Re: CVSD

From: Zonn <zonn_at_zonn.com>
Date: Sat May 22 1999 - 05:33:19 EDT

On Fri, 21 May 1999 20:57:52 -0600, Jess Askey <jess@magenta.com> wrote:

>Zonn wrote:
>> Was MAME's sound emulated, or just sampled from a working Sinistar?
>
>MAME emulates the CVSD chip but not very well. I have attached the
>latest cvsd.c and header files if you want to browse it for any reason.
>It really sounds crappy and I was going to see if I could somehow
>improve it which is why I was asking aboug the CVSD datasheets.
>Im writing some MAME drivers for pinball hardware so that I can get the
>software written for my homebuilt pinball machine. :-)

Thanks Jess, for the code snippet, I think I know why the sound is "crappy".

I believe Retrocade uses samples based on my non-realtime emulation.

By emulating in non-realtime and then using the resulting .WAV files you can do
things like use double precision floating point in the emulation, and run a low
pass filter on the output, which I believe was done for Retrocade.

The original "sinistar.wav" file I posted was the raw output from the CVSD chip,
it still sounds pretty bad. The Sinistar hardware takes the output from the
CVSD chip and puts it through a sharp, low pass filter before sending it on to
the audio amplifier.

A more realistic sounding Sinistar sample is at:

  http://www.zonn.com/misc/

Look for the file "sinistarN.rar". This file is the "sinistar.wav" file with a
sharp 4khz low pass filter applied. The original data doesn't seem to have any
useful information much above 3500hz, much like the response of a telephone
(which the CVSD chip was originally designed for).

Unfortunately calculating the CVSD steps using double precision floating point,
and then running an 8192 point FFT, then subtracting any information above 4khz,
and then running an inverse FFT, all in real time is pretty taxing on any
processor. And then running a 6808 emulator, along with original game emulator
on top of that, might just be beyond any but the fastest of the current breed of
processors.

I believe this is why, in Retrocade, it was decided to run a CVSD emulator to
create a .WAV file, then run the .WAV file through low pass filters, and then
simply play the samples at runtime.

It looks like the reason the MAME driver sounds choppy is that all step
calculations have been rounded to one of 64 integer values. (This algorithm
looks much like the integer only ADPCM, developed by Intel as a standard way to
compress audio on small processors, without using multiplies and divides. It
sounds better when the original data is encoded using the same algorithm.)
And there is no low pass filtering, which is a very big part of what's needed to
truly emulate the Sinistar hardware.

-Zonn
Received on Sat May 22 04:29:18 1999

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:12 EDT