VGM Basics

VGM is not rendered audio like WAV. It is closer to a log of chip commands plus timing.

Mental Model

  1. A tool creates chip music data.
  2. A VGM file stores chip writes and wait commands.
  3. A player reads the VGM commands in order.
  4. The player writes registers to a YM2612 emulator.
  5. The emulator generates audio samples.

Why This Matters for YM2612

YM2612 is controlled by register writes, so VGM fits it naturally. A YM2612 VGM player is basically automating the same kind of writes as a beep example, but with stored timing and metadata.

First Header Fields to Care About

Most Important YM2612 Commands

0x52 aa dd  write dd to YM2612 port 0 register aa
0x53 aa dd  write dd to YM2612 port 1 register aa
0x61 nn nn  wait n samples
0x62        wait 735 samples
0x63        wait 882 samples
0x66        end of sound data

DAC / PCM Related Commands

Good Next Reads

Back