Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrongly played MSX2 track #106

Open
vitamin-caig opened this issue Jan 17, 2023 · 11 comments
Open

Wrongly played MSX2 track #106

vitamin-caig opened this issue Jan 17, 2023 · 11 comments

Comments

@vitamin-caig
Copy link
Contributor

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

@ValleyBell
Copy link
Owner

ValleyBell commented Jan 17, 2023

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)

@vitamin-caig
Copy link
Contributor Author

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

@ValleyBell
Copy link
Owner

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.

@grauw
Copy link

grauw commented Jan 27, 2023

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

@ValleyBell
Copy link
Owner

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)

@grauw
Copy link

grauw commented Jan 27, 2023

Ping @sdsnatcher73.

@sdsnatcher73
Copy link

sdsnatcher73 commented Jan 28, 2023

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
Copy link

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

@sdsnatcher73
Copy link

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

@sdsnatcher73
Copy link

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

@vitamin-caig
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants