MD vs. SNES: FM vs. PCM

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

I wish I had an Everdrive so I could run my TFM songs on authentic hardware and answer that question. It might be an off-by-one in one tracker's playback code's pitch processing. I remember NerdTracker II's playback code (for NES) had the same problem.
User avatar
Jarhmander
Formerly ~J-@D!~
Posts: 569
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

Post by Jarhmander »

WTF? There's separate registers for the frequency and the multiplier, so basically if within a full scale it's in tune, then on every octave it should be tuned, 'cause the multiplier is basically what you'll use to change octave. Check this out, this is a rip of the spec sheet of the YM2413, a very closely related chip. Also, this document from Kevin Horton explain the same thing in "How do the frequency registers work?"
mic_
Posts: 922
Joined: Thu Oct 05, 2006 6:29 am

Post by mic_ »

I only found an old recording from my Megadrive, but no corresponding file from an emulator..

Anyway, I didn't think TFM Music Maker supported OPLL chips(?) OPLL and OPN plays in different leagues and shouldn't be equated just because they both use FM synthesis. The VRC7 is basically a crappier version of the YM2413, which itself is crap.
You'll probably have to ask Shiru or someone else with inside knowledge about TFM Music Maker why it sounds out of tune.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Post by psycopathicteen »

I'll upload a WAV file comparing TFM and VRC7 with supposedly the same parameters, when I get home.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Post by TmEE »

The multiplier is per operator basis... if you increase multiplier by one on all operators you get one octave higher note, but if you keep one mul lower then not.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Post by psycopathicteen »

I was just comparing VRC7 and TFM and from the instruments they sounded more or less the same, but when using a ADSR envelopes on the modulator, there is a huge difference. On TFM, a change in modulator amplitude makes a really harsh sound, while the VRC7 isn't as harsh, but more wobbly.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Post by TmEE »

The closer the TL is to zero on a modulator the harsher the sound is.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Post by psycopathicteen »

I always knew that. I meant the ADSR envelope sounds different on both chips. Okay, I don't know how to describe it.
smkd
Posts: 101
Joined: Sun Apr 22, 2007 6:07 am

Post by smkd »

TmEE wrote:The Z80 will give a tiny hit, its about 5% when Z80 does about 100KB/sec ROM access while 68K runs. There's first come, first serve principle, whoever makes the access first gets it and makes other wait. Luckily 68K does one memory access every 2nd cycle in tightest case, and Z80 can use that one unused cycle, and the performance hit gets negligable ^^
68K slowness has its good sides in some situations :P
Cool, 5% sounds alright for vastly improved audio.
TmEE wrote:Slap bass can be very nicely done on FM, just some dedication is needed when fine tuning your parameters. Listen Thunder Force IV on MD, there's some really awesome slap bass there :D
It sounds better than what I heard in MS, but I wonder if the params can be tweaked to sound less 'thin' like this. It's more convincing than what I heard in Metal Slug anyway =)
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Post by TmEE »

The Galaxy Force II tune sounds close to what my own slap bass sounds like, there's bass chords there... I think the MD version of that game sounds about same regarding that instrument, it's been a while since I last played :P

I always knew that. I meant the ADSR envelope sounds different on both chips. Okay, I don't know how to describe it.
ADSR is of course different between different family chips, OPN and OPM have rsame parameters, but OPL has different and lower accuracy parameters and OPZ(stuff Yamaha use in their synthesizers) have higher accurqacy ones.
6502freak
Posts: 92
Joined: Sun Dec 07, 2008 1:11 pm

Post by 6502freak »

psycopathicteen wrote:I'm wondering if I can find a comparison between a real YM2612 and emulation. Something that would make the difference obvious like using really high frequencies. Youtube is okay if that is all you can find.
The biggest difference between an original YM2612 and a very good emulator, like KEGA, is the aliasing distortion on the real chip. On my Rev. 1 Mega Drive (the one with the EXT connector on the back), when I listen to a tune via headphones, I can clearly make out a distortion effect when a waveform fades out.

This is probably because the on-chip DAC of the YM2612 has a very limited number of bits compared to the external Yamaha YM3012/3014 DAC's used with most of their FM chips. So far, no emulator gets this correctly. Most people using the Emulator would probably complain once this characteristic of the original chip is implemented. ;)

I have played a lot with FM, and it's really like tweaking a real music instrument. It's so easy to screw up, making it sound distorted and shrill, which is probably the reason why lots of MD/GEN tunes don't sound very good. But once, in the hands of a composer who knows this stuff, it can sound really awesome!
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

6502freak wrote:The biggest difference between an original YM2612 and a very good emulator, like KEGA, is the aliasing distortion on the real chip. [...] This is probably because the on-chip DAC of the YM2612 has a very limited number of bits compared to the external Yamaha YM3012/3014 DAC's used with most of their FM chips. So far, no emulator gets this correctly. Most people using the Emulator would probably complain once this characteristic of the original chip is implemented. ;)
Games like Blaster Master and Faxanadu look better on an NTSC TV than on a PlayChoice; this helped popularize NTSC TV emulation in emulators such as Nestopia. Tunes exploiting nontrivial quirks of the BRR decoder for noise generation did the same for SNES DSP emulation. So if we want to popularize accurate emulation of an FM chip's artifacts, perhaps someone needs to make a tune that sounds better on a Genesis than on the current emulators.

To what extent can this be worked around? If an instrument in the mix uses only two operators, perhaps it could be run in the 2x2 algorithm (algorithm 4 in TFMMaker), with quiet noise on one pair of operators with an amplitude of one LSB. Would that work as a dither noise source?
6502freak
Posts: 92
Joined: Sun Dec 07, 2008 1:11 pm

Post by 6502freak »

tepples wrote: Games like Blaster Master and Faxanadu look better on an NTSC TV than on a PlayChoice; this helped popularize NTSC TV emulation in emulators such as Nestopia. Tunes exploiting nontrivial quirks of the BRR decoder for noise generation did the same for SNES DSP emulation. So if we want to popularize accurate emulation of an FM chip's artifacts, perhaps someone needs to make a tune that sounds better on a Genesis than on the current emulators.
I think there is a very real chance that some Genesis/Mega Drive composers fine tuned their songs according to the audio output of the real chip. It's hard to describe how that difference changes the characteristics of the sound. It's quite subtle, but once you realize it, you always hear it.

To me, YM2612 emulation sounds more transparent, but also more... "glassy". The sound of the real chip is a bit more... "beefy".

It seems the lack of DAC resolution adds, in a noisy way, more amplitude to the lower volume spectrum.
To what extent can this be worked around? If an instrument in the mix uses only two operators, perhaps it could be run in the 2x2 algorithm (algorithm 4 in TFMMaker), with quiet noise on one pair of operators with an amplitude of one LSB. Would that work as a dither noise source?
I think it always acts as some kind of dither source, hence the subtle impression that the sound is less glassy, but also a bit less defined, on the real chip. I think it can be compared to the triangle wave of the NES. The first Nesticle versions emulated it straight, by using all the bits of the sound channel available. This resulted in a much more dull sound compared to the "beefiness" created by the aliasing of the actual triangle wave, which is only 4 bits in resolution.

We know that the YM2612 mixes sound by multiplexing the six channels through one single DAC. A naive viewpoint would assume that this DAC is 8 Bit, and that the software DAC register is simply being sent to it when the timeslot for channel 6 is reached (given that the FM portion of the channel is deactivated).

But that wouldn't explain the amount of distortion going on for the FM sound, because it sounds more like 6-7 Bit. We know that the other YM chips output their sound data in a floating point format to their external DACs, so maybe this distortion is a result of a simplified on-chip conversion. Like there is some kind of non-linear mapping going on which emphasizes the lower bits of the DAC.

This can only be resolved by decapping the YM2612 and tracing the MOL and MOR lines.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Post by TmEE »

The discrete YM2612 chip used in MD1 has a 9bit DAC. The one used inside MD2 ASIC seems to have more than 10bits, but not above 12bits. The quantization noise is much lower on MD2 than it is on MD1.

Then there's a load of other issues caused by external analog circuitry... most MDs got heavy filtering happen and when it comes to MD2s then low quality opamp chips with their bandwidths exceeded thus producing high amount of distortions. MD1s generally suffer from hiss and muffledness but those are all caused by headphone amp chip + the lowpass filters.
6502freak
Posts: 92
Joined: Sun Dec 07, 2008 1:11 pm

Post by 6502freak »

TmEE wrote:The discrete YM2612 chip used in MD1 has a 9bit DAC. The one used inside MD2 ASIC seems to have more than 10bits, but not above 12bits. The quantization noise is much lower on MD2 than it is on MD1.
I am somehow not convinced that the noise is generated by the 9 Bit DAC. I have the feeling that the internal data being fed to the YM2612 DAC is somehow altered to make it appear like listening to a 6 Bit sample. Even 8 Bit samples don't sound nearly as noisy as the real YM2612 when playing quiet sounds. And it's ONLY in quiet areas this strange distortion happens.
MD1s generally suffer from hiss and muffledness but those are all caused by headphone amp chip + the lowpass filters.
Yeah, but this is again no explanation for this strange anomaly in the sound output. I can also hear it on the AV connector on the back.

It's a shame I have currently no possibility to test any kind of code on my Mega Drive.
Post Reply