ValleyBell / libvgm

A more modular rewrite of most components from VGMPlay. will include sub-libraries for audio output, sound emulation and VGM playback
irc://irc.digibase.ca/#vgmrips
136 stars 33 forks source link

VGM v1.01 playback broken #88

Closed ValleyBell closed 2 years ago

ValleyBell commented 2 years ago

VGM v1.01 files may not play back correctly.

In VGM v1.00 and v1.01, there was only one "FM clock", which was used for YM2413, YM2612 and YM2151.
VGM v1.10 split this into 3 separate clock values, one for each chip.

libvgm currently assumes that the v1.0x "FM clock" is for the YM2413 only. Thus playing back v1.01 VGMs with YM2612/YM2151 will result in silence.

Note: A fix will require some scanning of the VGM commands in order to determine what FM chips are used.

kode54 commented 2 years ago

Do you have any example files for me to test my attempt at a scanner with? I based it off the scanner from Game_Music_Emu, with some changes. It gets called from the header parser, and only scans for mostly stuff expected to be in a 1.00/1.01 file, but uses _CMD_INFO for command lengths for unexpected commands. Like the GME parser, it does quickly step over data blocks.

ValleyBell commented 2 years ago

SN76489/YM2413: Sega Master System BIOS YM2612: Universal Soldier

kode54 commented 2 years ago

These are fixed by #89