Genesis - SNES audio comparison

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat Dec 27, 2008 3:46 am

Only long DMAs (several hundred tiles) have noticable effect on Z80 (sample quality, though shitty code is another matter...)... a Z80 that is running and accesses ROM a lot (like in my sound engine), you will get around 5% performance hit on 68K on real hardware. I've not done any exact calculations, all I can say is that CPU "speed index" drops a little when my sound engine is in use.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Sat Dec 27, 2008 4:12 am

TmEE co.(TM) wrote:Only long DMAs (several hundred tiles) have noticable effect on Z80 (sample quality, though shitty code is another matter...)... a Z80 that is running and accesses ROM a lot (like in my sound engine), you will get around 5% performance hit on 68K on real hardware. I've not done any exact calculations, all I can say is that CPU "speed index" drops a little when my sound engine is in use.
Are you doing read ahead buffering on sample stream from rom to ram, to keep rom access down? AFAIK, VDMA completely stalls the z80 when it touches the 68k bus.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat Dec 27, 2008 4:22 am

I play from 256byte buffer and ROM at once. Buffer 256 bytes from ROM, and mix another 256 bytes from ROM with 256bytes from RAM while playing them. Its nearly constant ROM access. DMA does halt Z80 when it accesses ROM, but the effect is not noticable unless you transfer a lot of data. In my case, doing less than 100 tiles a frame yelds no audible difference in sound quality.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat Dec 27, 2008 9:35 am

tomaitheous wrote: I'm not sure what the talk about the Amiga pass filter has to do with the SPC DSPs sample point to point interpolation per channel/waveform. Unless I'm missing something here?
Someone mentioned how they thought good FM sounded better than the old 8 kHz MODs on the Amiga. That led to discussion on how you could use a much higher sample rate than 8 kHz, but then you needed to turn off the filter to hear the higher sample rate properly.

While the samples could only be 8 bit, there was a way to chain two channels together so that one did the samples, and the other did the volume. The volume was a 6 bit log envelop, so you couldn't get exactly 14 bits out of it (8+6). After correcting for the log function, it was closer to 12 bits. However, it sounded great and was pretty easy to generate. So in the end you saw ~12 bit, 48 kHz sound and music for the built in audio.
Wait! You're talking about the mode where you can turn one channel into amplitude modulation mode and the data in that channel modulation the volume of it's target channel. So that's how it's done for the 14bit mode? That's cool :D
Yes. The Amiga had four digital DMA audio channels - two to each side (left/right). You could do four channels of audio, or you could chain one channel to the matching other on each side for special effects. The chained channel would at each sample period either modify the pitch or the volume. "14 bit" audio was done by changing the volume. I'm not aware of anyone changing the pitch outside of oddball music apps.

Huge
Very interested
Posts: 197
Joined: Sat Dec 13, 2008 11:50 pm

Post by Huge » Sat Dec 27, 2008 12:46 pm

tomaitheous wrote:Sounds like 8khz fixed output? You're either exaggerating ( :D ) or that was just a good example of a really poor conversion.
It's the interpolation that kills it. With that disabled, the spc sounds nearly as good as the mod tune. Of course, the amiga original is 260k, so its natural that the samples had to be downgraded.

The other title song, Adrenaline, is 56k in its module format and does not have such dramatic differences between amiga and snes versions.

Snake
Very interested
Posts: 206
Joined: Sat Sep 13, 2008 1:01 am

Post by Snake » Sat Dec 27, 2008 5:40 pm

tomaitheous wrote:The SPC method looks to be less restrictive/complicated than the z80 driver. I mean, you don't have to worry about stalling the z80 with VDMA or such.
The CPU will still have to sit there reading the ports and writing the data to RAM, though. And in the case of HDMA there will be no handshaking, so you'd better make sure you time it well, and you'd need to waste bandwidth sending some sort of flag, so you'd know the data has changed, probably.

Nowhere near as useful as just being able to read the entire ROM ;)
tomaitheous wrote:let alone the faster HDMA method byuu mentioned (I wasn't aware that HDMA could transfer to the SPC ports).
But then you're wasting lovely lovely HDMA channels that could be used for something else.

Near
Very interested
Posts: 109
Joined: Thu Feb 28, 2008 4:45 pm

Post by Near » Sun Dec 28, 2008 4:34 am

And in the case of HDMA there will be no handshaking, so you'd better make sure you time it well, and you'd need to waste bandwidth sending some sort of flag, so you'd know the data has changed, probably.
HDMA data transfers use tight timing with no handshaking / flag checks. Technically, they align themselves during vblank. It is tricky, and it will break sound effects in most emulators, but many games pull it off anyway. I think the latest was N-warp Daisakusen -- http://gra.dforce3000.de/
But then you're wasting lovely lovely HDMA channels that could be used for something else.
You've got eight of them, and you can realistically only use one for this. So unless you're writing an Anthrox demo, you should have a channel to spare ;)

Just one will net you 4* bytes/scanline, 225 scanlines/frame, 900 bytes/frame or 54000 bytes/second. With BRR, 54000/9=6000, 6000*16 samples/block=96000 samples/second.

(* I'm not sure if its safe to write $2142+$2143 so close together ...)

The transfer itself will eat an additional ~40-64 of 1324 clock cycles available per scanline form the CPU, depending on transfer mode.

I'm not sure if the SMP can keep up at that rate, and I'm quite sure your ROM space cannot (without a custom bank mapper and amounts of ROM that were not practical in the SNES era). But it's easy to scale back and/or cut the playback rate to 16/12/8KHz or whatever.

Also not saying the SNES is superior, just stating what it can do.

sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Tue Jan 06, 2009 2:43 am

Okay, I want to submit a brief summary of what this discussion yielded for the group's criticism.

The consensus seems to be that Genesis and SNES sound is technically incomparable. Any comparison of the sound quality on either system is thus going to be subjective, and the only evidence that can be used to support the absolute superiority of one system's sound over the other is anecdotal at best.

The Frequency Modulation of the YM2612 is superior to what the SNES can emulate using samples. The Genesis' DAC capabilities were only technically limited to the quality of the code and the amount of ROM space in the cartridge. Individual digital audio samples on the Genesis could be played at a frequency comparable or superior to SNES titles. Yuzo Koshiro and members of the homebrew community have also stated that the Z80 is more customizable and flexible than the SNES's SPC.

The SNES sound system was, however, designed around PCM and supports digital audio compression that the Genesis did not. Thus the SNES can be said to be superior in quality in regard to PCM sound, just as the Genesis is capable of FM sound that the SNES is not. This comparison does not merit a digression to a qualitative finale. A system that had industry standard FM and PCM sound capabilities was preferred in arcade architecture from the time. Individual preference of Genesis or SNES sound will be based on the subjective opinion that either FM sound or PCM sound was superior.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Tue Jan 06, 2009 6:04 am

I'm not sure what you're looking for. Are you looking for validation that one is better than the other? If so, why is it so important?

Yuzo Koshiro and members of the homebrew community have also stated that the Z80 is more customizable and flexible than the SNES's SPC.
From the interview I read, he's never even coded a music driver for the SPC700. Of the projects he did on the SFC, he just wrote the music in comparison to his other more involved work.

I'm not sure what needs to be flexible on the SNES end. You have a sound processor (65x variant) giving commands to the DSP from a compiled music data/source. Same on the z80, except dealing with PCM leads to a more complicated setup.

The Frequency Modulation of the YM2612 is superior to what the SNES can emulate using samples.
The SNES sound system was, however, designed around PCM and supports digital audio compression that the Genesis did not.
Thus the SNES can be said to be superior in quality in regard to PCM sound, just as the Genesis is capable of FM sound that the SNES is not.
<sigh>... I think fail to understand what wavetable and FM synth actually is.

Just think of it as a means to an end ;)

In FM you build a complex waveform from a single or series of simple waveforms and modifiers. You're limited in the type of sounds you can model, depending on the capabilities of the FM chip. Basically there are only so many types of sounds you can model and you have the side of effect of having recognizable/distinct FM sound to it. PSG unit in the Genesis helps break that up - PSG is a nice compliment to the FM in the Genesis. Arcades used FM chips because they were relatively inexpensive in hardware and in memory as opposed to wavetable synth which was extremely new at the time.

With wavetable synth, you don't need to create complex waveforms because the waveform has been preprocessed. You already have a complex waveform to work with. And since it's a preprocessed waveform, you're not as limited to the type of sound you can generate for an instrument. You have a huge range of different sounding instruments at your disposal. The down side is that it requires memory to store the instruments. Wavetable synth is more complex then just playing back a PCM sample. You still have volume/pitch/pan envelopes, loop points of keyhold, etc.

Saying SPC700 handle PCM better than the z80+DAC says nothing about the SNES audio capability. Audio isn't streamed from the SNES as some wave file. You need to separate the idea of PCM samples for sounds fx/voices/drumkits from instruments created from PCM waveforms.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Tue Jan 06, 2009 6:41 am

Note to FM vs. PCM. With FM you can easily create very long sounds which changes timbre dynamically. To make same with PCM and keep sound clean you'll need very much of memory. With 64K and ADPCM you can digitize only 4 seconds of the sound and also got distortions (from ADPCM compression and from pitch change).

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Tue Jan 06, 2009 9:25 am

What Shiru pointed out is very true... you can have very long changing instruments in FM with only the cost of around 30 bytes of memory... any simple instrument will take only around 30 bytes of memory... things can get highly interesting when some macro stuff is added or any other real time parameter changes :)
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

TMorita
Interested
Posts: 17
Joined: Thu May 29, 2008 8:07 am

Post by TMorita » Sun Jan 11, 2009 12:29 am

I've worked on a SNES game which was ported to Genesis, so I have a bit of experience with both systems.

The SNES audio was generally considered easier to work with than the Genesis. You could use sampled audio and get exactly the sound you wanted, whereas with the Genesis you had to figure out the FM parameters to get something that sounded similar to what you wanted. The audio output of the Genesis also seemed to be much noisier than the SNES. Maybe someone should do a hardware hack that improves the audio output of the Genesis by tapping the output of the YM2612 and sending it through better audio hardware.

The worst weakness about the YM2612 IMHO is the DAC output. If I remember correctly, it was very hard to play decent sampled audio because of two reasons: 1) there's no FIFO on the DAC, and 2) it doesn't generate an interrupt when the DAC needs to be filled. So you get lots of jitter in the timing of the sample output, which is audible as scratching/popping. If it had been properly implemented, it would have been much more useful.

There were some cool things about the Genesis audio, though. If I remember correctly, there was a Sega tool which allowed you to use the Genesis as a MIDI instrument, which made composition easier. I think maybe it was a special cartridge with a built-in MIDI port, or maybe it was some kinda circuit board which plugged into the joystick port?

Toshi

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Jan 11, 2009 9:08 am

This is one recording from my audio modded MD2 :
http://www.fileden.com/files/2008/4/21/1876835/MD2.ogg

Comparsion shot from Fusion :
http://www.fileden.com/files/2008/4/...835/FUSION.ogg

A recording from unmodified MD1 :
http://www.megaupload.com/?d=CXF46DK6

The YM2612 implementation in MD2 ASIC is more accurate than real YM2612... real YM2612 has much more aliasing noise that ASIC YM2612.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Christuserloeser
Very interested
Posts: 145
Joined: Sun Jan 28, 2007 2:01 am
Location: DCEvolution.net
Contact:

Post by Christuserloeser » Sun Jan 11, 2009 11:03 am

TMorita wrote:I've worked on a SNES game which was ported to Genesis, so I have a bit of experience with both systems.
According to the Sega-16.com interview it's been Zombies Ate My Neighbors. - Gonna give it a try some day.
TMorita wrote:The SNES audio was generally considered easier to work with than the Genesis. You could use sampled audio and get exactly the sound you wanted, whereas with the Genesis you had to figure out the FM parameters to get something that sounded similar to what you wanted. The audio output of the Genesis also seemed to be much noisier than the SNES. Maybe someone should do a hardware hack that improves the audio output of the Genesis by tapping the output of the YM2612 and sending it through better audio hardware.
We nailed the problem down to the model #2 Mega Drive / Genesis hardware. The very first Mega Drives have an excellent mixing circuit, while the second one sounds really awful...

Here's a recording from a[n unmodified] model #2:
http://www.gamercite.com/stuff/comix_zone_md2.mp3

and here's the same track recorded from a model #1:
http://www.megaupload.com/?d=M04J0TP5


The audio hack you proposed is a great idea. TmEE engineered it already and calls it CCAM, Crystal Clear Audio Mod, which allows even brighter and cleaner sound as the model #1.


EDIT: Seems TmEE beat me to it. ^ ^ - Although, he posted different tracks, so these links should still be interesting.

TMorita wrote:There were some cool things about the Genesis audio, though. If I remember correctly, there was a Sega tool which allowed you to use the Genesis as a MIDI instrument, which made composition easier. I think maybe it was a special cartridge with a built-in MIDI port, or maybe it was some kinda circuit board which plugged into the joystick port?
That'd be part of the GEMS audio tool set, I assume. Tommy Tallarico mentioned it in his recent Sega-16 interview.
http://www.DCEvolution.net - Gigabytes of free Dreamcast software for you

Image

sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Sun Jan 11, 2009 1:06 pm

Wow, great discussion folks! Sorry for my delay, I was temporarily busy losing my job. Now I have plenty of time to discuss things!

tomaitheous,

Yuzo Koshiro does indicate in his interview that he had somebody else write the code for the SNES, that is a valid point. Koshiro described coding for the MD as a flexible process. His impression of the SNES was that it was more rigid and proprietary, others nonetheless found software workarounds to this and the limited audio RAM. Koshiro's view of flexibility is referring to being able to write his own engine to make whatever sounds the MD could generate. The Z80, PSG YM2612 and DAC allowed composers of Genesis music to invent musical instruments. The Genesis was also capable of more simultaneous instruments than the SNES was capable of.

The SNES' sample based audio chip is an entirely different concept. Sample based audio allowed composers to get closer to the sound of real instruments than Genesis sound could. Theoretically, the SNES could use any real sound as an instrument. The precision of SNES sampled sound in comparison to real instruments was limited, though, both by the 64KB of RAM and the limited ROM sizes of the time.

Had every game from 1988-1997 been in the 32 Megabit range, this would be an entirely different discussion. The fact that ROM was typically limited to 8-16 Megabits actually limited what both the Genesis and SNES could theoretically produce. The Genesis earned its reputation when the average ROM size was still 4Mb (512KB). Since the Genesis had no native digital audio compression system, and due to other more technical issues, most games demonstrate inferior digital audio to that of the SNES.

Very few Genesis titles attempt to use simultaneous samples for musical instruments, sound effects and voice as the SNES did in every game. What Genesis games do attempt simultaneous digital audio samples tended to produce audible distortion in the voice samples. The fact that this was a product of the quality of the code coupled with ROM limitations is overlooked by critics of Genesis sound.

These critics also assume that sampled audio was intrinsically superior to FM sound for all purposes. Both Genesis and Arcade titles prove this assumption false. What is observable about both systems is that SNES sound allowed developers to sample real instruments, and generally produced clearer digital audio than the Genesis. Conversely, no single SNES game demonstrates the diversity of Genesis sound through the combination of digital audio, PSG and FM. So, as I mentioned before, no objective comparison can be made between the two system's audio overall. Preference for one system's sound system over the other is more likely due to preference of one system's games over the other, rather than any technical comparison of the actual sound quality.

Post Reply