libvgm
libvgm copied to clipboard
Wrongly played MSX2 track
Here the full pack: https://vgmrips.net/packs/pack/snatcher-msx2
Twilight of Neo Kobe City track sounds different via libvgm and site player.
Here the reference: https://www.youtube.com/watch?v=KbbF9odLDxI
Hmm...this is actually a bug in the VGM.
The VGM sets the "SCC+" (K052539) mode flag, but it assumes that channels 4+5 share their wave RAM. (SCC non-plus/K051649 mode)
It never writes the 5th channel's wave RAM, so that channel goes silent.
This used to work fine in the old VGMPlay due to an implementation oddity.
The actual solution should be to fix the VGM. (changing byte 0x9F in the VGM from 80
to 00
)
I.e. this is invalid rip? I suppose youtube version is from real console (or emulator at least) due to quite low quality.
The rip itself should be mostly okay. There is just a wrong flag set in the VGM header, but this can be easily patched afterwards.
I'll probably go further and just check+update all the SCC packs though.
Snatcher is an SCC+ game, so the flag is correctly set, but it sounds like the commands used are wrong.
Okay, so then the pack is bad. I checked a few tracks and they all write only to the wave RAM of the first 4 channels. (using the SCC non-plus commands)
This issue has one good side though: This confirms that libvgm now behaves like VGMPlay MSX with incorrect SCC/SCC+ flags. (which is a good thing, as it makes incorrect VGM rips more obvious)
Ping @sdsnatcher73.
Most likely the issue is then originated in NEZplug v0.9.4.8 + 2 + 19.20 which was used to create the VGM's. It probably does not log the wave data correctly.
01.vgz.zip Here is the unmodified vgz as ripped with NEZplug, for analysis.
I guess kss2vgm (used for SD Snatcher) does log correctly, but officially we're not supposed to use that, right?
New version logged with kss2vgm. Please let me know if this works better... Snatcher (MSX2, PSG+SCC-I).zip
New version logged with kss2vgm. Please let me know if this works better... Snatcher (MSX2, PSG+SCC-I).zip
Yes, looks like problem is solved. At least, I can't hear any significant difference between reference and updated version