M68000 sound cpu. Can it be used for compressing/decompressing sound on the fly?

Can the sound cpu on the Saturn (specifically the 68000 or maybe another cpu) decompress sound on the fly through software? Couldn't sound be compressed to a proprietary format optimized for whatever software/code algorithm the cpu is gonna be used for decompressing it on the fly?

I know the playstation could do this in hardware which saved precious ram (and hassle lol) to be used for more important matters.

A game worth mentioning is Street Fighter Alpha 2. The sound is much better on the playstation version (why do people not notice this as it's so obvious) vs the saturn version which is downsampled but does have better graphics of course (the water effects on gens stage come to mind and no slowdown due to superior hardware). I don't know if capcom copped out on the saturn version or what but it's obvious when you pick practice mode and select the same character for human and cpu, the sound is much higher quality vs picking 2 different characters for practice mode (or any other mode for that matter). Obviously this is due to the same character sprite/animations being mirrored in memory thus having more ram available for higher sample rate sound.

I know the sound cpu can be used for special reverb and other sorts of sound effects but aren't those effects done through software? Doesn't that mean it can be used to do anything through software? Like decompressing compressed sound on the fly and/or compressing/decompressing on the fly (compressing and decompressing on the fly is probly crazy but that would be crazy cool if it could do both).

I mean basically that would mean the sound cpu would be able to run any kind of code right? So can it?

Sega's third party support was epically terrible for the saturn and it certainly shows with pretty much any port on both the saturn and playstation. Hell even Sega's job of Daytona sounded like utter crap (the announcer was completely fagged in terms of sound sample rate) until daytone CCE came out and it was all upsampled and normal.

If there are any titles or examples that use the the sound cpu for decompressing sound on the fly, or running any kind of code used for anything other than sound I'd like to know and check it out.
 
Are you talking about the M68000 or the DSP? The topic says M68000, but you also mentioned reverb which is handled by the DSP. I don't know whether the DSP can be programmed or if it's fixed-function.

Anyway, you could compress your samples with some lightweight algorithm (like an LZ variant) and try decompressing them on-the-fly on the M68000. I.e. have your compressed sample at address A, tell the YMF292 to play a sample from address B, then enter a loop on M68000 that decompresses from A to B. You would have to be able to decompress faster than the playback sample rate, so you'd probably be limited in number of concurrent samples. I don't even know if you're allowed to write to a chunk of memory while the YMF292 is playing from it.

As for SFA2, I don't know why they used the samples that they did, but the SCSP has it's own RAM which shouldn't have anything to do with sprite animations.

Holering said:
Can the sound cpu on the Saturn (specifically the 68000 or maybe another cpu) decompress sound on the fly through software? Couldn't sound be compressed to a proprietary format optimized for whatever software/code algorithm the cpu is gonna be used for decompressing it on the fly?

I know the playstation could do this in hardware which saved precious ram (and hassle lol) to be used for more important matters.

A game worth mentioning is Street Fighter Alpha 2. The sound is much better on the playstation version (why do people not notice this as it's so obvious) vs the saturn version which is downsampled but does have better graphics of course (the water effects on gens stage come to mind and no slowdown due to superior hardware). I don't know if capcom copped out on the saturn version or what but it's obvious when you pick practice mode and select the same character for human and cpu, the sound is much higher quality vs picking 2 different characters for practice mode (or any other mode for that matter). Obviously this is due to the same character sprite/animations being mirrored in memory thus having more ram available for higher sample rate sound.

I know the sound cpu can be used for special reverb and other sorts of sound effects but aren't those effects done through software? Doesn't that mean it can be used to do anything through software? Like decompressing compressed sound on the fly and/or compressing/decompressing on the fly (compressing and decompressing on the fly is probly crazy but that would be crazy cool if it could do both).

I mean basically that would mean the sound cpu would be able to run any kind of code right? So can it?

Sega's third party support was epically terrible for the saturn and it certainly shows with pretty much any port on both the saturn and playstation. Hell even Sega's job of Daytona sounded like utter crap (the announcer was completely fagged in terms of sound sample rate) until daytone CCE came out and it was all upsampled and normal.

If there are any titles or examples that use the the sound cpu for decompressing sound on the fly, or running any kind of code used for anything other than sound I'd like to know and check it out.
 
The M68k can certainly be used to decompress audio in realtime using some light-weight algorithm, e.g. ADPCM (which is what the Playstation uses). You will however be severely limited in the number of voices and/or sample rate. For instance, 32 channels playing at 44.1 kHz equals 1411200 samples per second. The M68k runs at a frequency of 11.2896 MHz, which equals exactly 8 clock cycles per sample or not nearly enough time to do anything.

Two channels playing at 22.05 kHz gives 256 cycles/sample which should be enough for a simple algorithm, but does not leave a whole lot of time for other processing (the M68k is a horribly inefficient CPU by modern standards.)

The SCSP DSP is designed for effects processing and is not suitable for decompression. It executes a program consisting of 128 (LIW/horizontal microcode-type) instructions every 44.1 kHz audio frame, but the instruction set does not include looping or branching. The sound chip also converts all input to the DSP to a 44.1 kHz rate via interpolation.
 
Great replies thanks!

I didn't know the dsp resampled everything to 44.1khz (that means i gotta use a multiple of 44.1 or else I'll get ugly sound). I haven't worked with the saturn yet so I'm still learning. So if the dsp does all the effects processing that means the 68000 just sits there doing hardly anything? I mean I thought for sure the 68000 did all the reverb effects and what not... If that's really the case then there's certainly more room for processing than I imagined...

I would like some source code to look at if that's available anywhere. It would have to have code using the 68000 to run whatever kind of algorithm is gonna be applied to sound in real time. Even better if it's using the 68000 for doing other things that's got nothing to do with the sound! Correct me if I'm wrong but I hear there's a way to do that but it's very tricky as you gotta put it in a loop to keep it active.

Also I'm pretty sure you can store sound in the main ram and have it swap to the sound ram whenever you want (or any other piece of ram right?). I mean how else would you be able to do xmen vs. street fighter with those higher sample rate sounds. There's hardly any sound ram to begin with (512kb) so certainly swapping would have to occur (or whichever way you wanna put it). 512kb is hardly enough sound ram for anything... I shoulda edited my post by saying that the sound is mirrored instead of the sprite animation (either way is true though).
 
Holering said:
I didn't know the dsp resampled everything to 44.1khz (that means i gotta use a multiple of 44.1 or else I'll get ugly sound).

The interpolation (even if it's only linear) means it shouldn't sound completely horrible, but that's something you need to test with your material.

So if the dsp does all the effects processing that means the 68000 just sits there doing hardly anything?

The M68k's intended purpose is to act as a controller for the sound chip, i.e. launching samples, playing sequenced music etc. It is very poorly suited to DSP-type applications, as e.g. just a single multiply instruction can consume up to 70 clock cycles.

Also I'm pretty sure you can store sound in the main ram and have it swap to the sound ram whenever you want (or any other piece of ram right?).

Sure, and if you want to use compressed samples it is also far more efficient to decompress them using one of the SH2s and transfer them over. Some of Sega's sound libraries work this way. Memory used for storing samples is of course memory not available for storing graphics or other data.

512kb is hardly enough sound ram for anything...

More is always better, but for example there's tons of awesome-sounding tracker music that's under 512KB.
 
Back
Top