libvgm icon indicating copy to clipboard operation
libvgm copied to clipboard

Wrongly played MSX2 track

Open vitamin-caig opened this issue 2 years ago • 11 comments

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

vitamin-caig avatar Jan 17 '23 15:01 vitamin-caig

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)

ValleyBell avatar Jan 17 '23 19:01 ValleyBell

I.e. this is invalid rip? I suppose youtube version is from real console (or emulator at least) due to quite low quality.

vitamin-caig avatar Jan 17 '23 20:01 vitamin-caig

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.

ValleyBell avatar Jan 17 '23 21:01 ValleyBell

Snatcher is an SCC+ game, so the flag is correctly set, but it sounds like the commands used are wrong.

grauw avatar Jan 27 '23 19:01 grauw

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)

ValleyBell avatar Jan 27 '23 19:01 ValleyBell

Ping @sdsnatcher73.

grauw avatar Jan 27 '23 19:01 grauw

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.

sdsnatcher73 avatar Jan 28 '23 10:01 sdsnatcher73

01.vgz.zip Here is the unmodified vgz as ripped with NEZplug, for analysis.

sdsnatcher73 avatar Jan 28 '23 13:01 sdsnatcher73

I guess kss2vgm (used for SD Snatcher) does log correctly, but officially we're not supposed to use that, right?

sdsnatcher73 avatar Jan 28 '23 13:01 sdsnatcher73

New version logged with kss2vgm. Please let me know if this works better... Snatcher (MSX2, PSG+SCC-I).zip

sdsnatcher73 avatar Jan 31 '23 06:01 sdsnatcher73

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

vitamin-caig avatar Jul 12 '23 12:07 vitamin-caig