Quantam wrote:
1. It looks like opcode 0 is considered 1-byte and unknown, while 1-0x2f are invalid. Is there any reason these weren't put in the spec as reserved ranges?
The original VGM v1.50 specification by Maxim defined all the reserved ranges that are in the current spec. and left 00..2F undefined.
Leaving 00 as "no-operation" opcode is mainly to make it not close immediately when you screw up the VGM while hex-editing.
Quantam wrote:
2. For Oki M6258 flags bit 2 (ADPCM bits) the spec says that 0 = 4-bit (as it says 0 is the default and it says 4-bit is the default) and 1 = 3-bit. But the code appears to be the opposite. Is the error in the spec or the code?
All code I wrote (VGM loggers + players) go by the
MAME constants, which are:
Code:
TYPE_3BITS = 0;
TYPE_4BITS = 1;
Thus I consider it a bug in the specification.
If I would define this today, I would explicitly make "4-bit = 0", as the current OKI6258 emulator supports only 4-bit ADPCM, so that should be the default.
Quantam wrote:
3. Can you explain the MultiPCM clock and why it's multiplied by 224/180?
When MultiPCM support was added about 10 years ago, we assumed a clock divider of 180.
Thanks to recent research we were able to figure out the correct clock divider: 224.
Now we have lots of VGMs that assume a clock divider of 180, but the sound emulation code wants 224. Thus we assume /180 for the VGM header and fix the clock to work properly with the new emulation.
The same applies to various other chips like C140 and K054539.
Quantam wrote:
4. Can you explain the 4 MHz vs 60 MHz clock for the QSound DSP16A? What systems run them at these rates?
Similarly to MultiPCM, we assumed that the QSound chip runs at 4 MHz.
At some point the DSP ROM was dumped and the correct DSP clock was found.
In order to keep compatibility with old VGM rips, we fix the clock if it is 4 MHz.