Skip to content

VGM PCM issues

Technical discussion about the VGM format, and all the software you need to handle VGM files.

Moderator: Staff

VGM PCM issues

Post by Oerg866 »

Does VGM still allow for exorbitant sample rates on PCM capable chips?

I heard a few "homebrewn" 96KHz sample rate VGMs for the MD before, and I wonder, why is this even possible?

I think VGM should focus a bit more on the hardware limitations of the chips it is supporting ;)

Cheers
Oerg866
former VGMRips server hoster :)

Server uptime: http://www.mdscene.net/index2.php
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Re: VGM PCM issues

Post by ValleyBell »

Oerg866 wrote:I heard a few "homebrewn" 96KHz sample rate VGMs for the MD before, and I wonder, why is this even possible?
There are any? I never heard that someone actually used such high sample rates.


VGM itself has a native sample rate of 44.1 KHz.
The only way to get higher sample rates is to use the DAC Stream Control feature I introduced with v1.60. This way the sample rate is only limited by the emulated sample rate of the chip (which is ~100 KHz for the YM2612).

The highest sample rate I ever used was 44.1 KHz. (I didn't have samples with a higher rate, else I would've used 48 KHz.)
  • User avatar
  • Sik Offline
  • Not a musician
    Not a musician
  • Posts: 75
  • Joined: 2011-12-12, 12:43:15

Re: VGM PCM issues

Post by Sik »

Oerg866 wrote:I heard a few "homebrewn" 96KHz sample rate VGMs for the MD before, and I wonder, why is this even possible?
The only time I've seen such a high sample rate was with Tiido's experiments, which reached up to 120 KHz. But of course, the YM2612 caps at around 26 KHz, go higher than that and the chip crashes and needs a hard reset (i.e. power off and on).
ValleyBell wrote:This way the sample rate is only limited by the emulated sample rate of the chip (which is ~100 KHz for the YM2612).
YM2612's sample rate is around 53 KHz if I recall correctly.

Post by Oerg866 »

DAC starts missing writes at ~26KHz, which is why i wondered why VGMs are allowed to use freqs higher than that (The emulator doesnt care, obviously)
former VGMRips server hoster :)

Server uptime: http://www.mdscene.net/index2.php
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Please correct me if I'm wrong, but according to MAME the MegaDrive master clock is 53 693 175 Hz. (NTSC)
For the YM2612 the clock gets divided by 7, making a clock of 7 670 453.57 Hz for it.
The YM2612 itself has a clock divider of 72, so I get a sample rate of 106 534.08 Hz.
  • User avatar
  • Sik Offline
  • Not a musician
    Not a musician
  • Posts: 75
  • Joined: 2011-12-12, 12:43:15

Post by Sik »

ValleyBell wrote:The YM2612 itself has a clock divider of 72, so I get a sample rate of 106 534.08 Hz.
The output waveform is updated at half that rate though (~53KHz), so that'd be the real sample rate.

Writes to the DAC register can happen at half the output sample rate (so ~26KHz). Writes to other registers usually take longer, and trying to write faster results in first the YM2612 making funny sounds, and if you go very fast you outright make the chip crash and you need to do a hard reset to make it work again.
Post Reply