Skip to content

VGM Tool Collection

All you need to work with VGMs. Last update: 2022-12-30

Technical discussion about the VGM format, and all the software you need to handle VGM files.

Moderator: Staff

  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

(Quoted due to pagebreak.)
2ch-H wrote:I noticed recently.

Code: Select all

B4 11 00    NES APU:	DPCM: Sample Data: 0
Noise seems to occur when there is this command, I think it is good to be able to remove the command in vgm_cmp.
Sorry, forgot about your post.

It's true that this command often causes clicks.
I've seen games use it in various ways (writing 00, writing 7F, writing random values, sometimes initializing the sample), so I don't think always removing it is a good idea.

In most cases though, it's enough to just replace B4 11 00 with B4 11 40.
In the future, I will try to add a declick-feature either to VGMPlay or to one of the tools.
  • User avatar
  • neologix Offline
  • Posts: 211
  • Joined: 2012-04-22, 4:03:45
  • Location: New York, NY, USA

Post by neologix »

I've seen posts on this very same NES DPCM click issue on byuu's forums when he started developing his NES emulation. The vast majority of the educated answers seem to point to sound emulation being incomplete in NES emulation in general and blargg and other audio engineering-oriented devs theorize that it was handled with the natural low-pass filtering provided by the analog components.

So first recommendation is to make sure the NES DPCM emulation is accurate; in the VGM mods of the NES players since it's someone else's code that's considerably harder, but for VGMPlay we should strive to have the most accurate sound emulation possible (maybe even that of the recently resurrected Nestopia; check this TASVideos page for NES accuracy test results). The linked test results page says Nintendulator has the most accurate APU and it's open-source so maybe consider that? Second thing is that if the issue isn't in our choice of NES APU core, then we should probably add a toggle for some basic filtering or something for certain chips.

Last resort is to force changing of the command, since this one in particular is a destructive action that also has the potential to completely change the resulting output. Maybe have the console output a warning when someone runs this command telling them it's destructive, possibly allowing removal of the warning via config file editing?

Post by GTheGuardian »

Not sure if this already has been reported but vgm_sro seems to strip some used samples on Mystic Warriors (2xK054539). Example here
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Bugs with the K054539? No, this isn't known.
Feel always free to report bugs with the tools. If one is reported twice this isn't as bad as if nobody reports it.

EDIT: Okay, I fixed it: vgm_sro_K054539_fix.7z
I didn't handle reverse-playing samples correctly.

Post by GTheGuardian »

Ah thanks, now it does plays okay.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

Bugs opt_oki or player or my trimming mistake?

Sharp X68000 Ys III: Wanderers from Ys
"Track 08 Be Careful" and "Track 14 Steeling The Will to Fight" to play in a different sound is OKIM6258 when looping.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

It's my fault. opt_oki in its current version has sometimes problems to detect the correct sample when large parts are missing due to the end of the VGM.
I still need to add some code that verifies that the last played sample is correct.

I will fix it with the next pack update batch.


About the GB issues: I haven't had the time to look into it yet.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

vgm_cmp bug?
there is a channel that sound There is a delay when using the vgm_cmp.

This VGM sample, Mach Rider - Title:
https://www.dropbox.com/s/pv2xm0wbywspgfr/mrtitle.7z
Last edited by 2ch-H on 2014-01-24, 3:11:29, edited 1 time in total.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

Another vgm_cmp bug?
sound of the triangle is funny when Using the vgm_cmp.

This VGM sample, Donkey Kong - Hammer:
https://www.dropbox.com/s/hnw5bdl0mtjiuty/dkhammer.7z
Last edited by 2ch-H on 2014-01-24, 3:12:07, edited 1 time in total.

Post by GTheGuardian »

Output on Channels 4 and 6 in this log from Gratia: Second Earth seems to be slightly different (and erroneous sounding to me) after running vgm_cmp on the file.
Could this be a bug of vgm_cmp?
https://www.dropbox.com/s/fszqfkmwzjozq ... trimmed.7z
Last edited by GTheGuardian on 2014-02-20, 11:10:06, edited 1 time in total.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

vgm_trim bug?
ADPCM is silent when I use the vgm_trim.

This VGM sample, The Scheme - Title:
Edit: I delete file.

Code: Select all

vgm_trim -state Scheme_Title.vgm 1393490 0 3807339
Last edited by 2ch-H on 2014-05-03, 12:54:21, edited 1 time in total.
  • User avatar
  • MaliceX Offline
  • Posts: 226
  • Joined: 2012-09-29, 11:45:48
  • Location: Australia
  • Contact:

Post by MaliceX »

Two things I notice with the logs:

1. There's NOTHING stored in the ROM data segment for the DeltaT ADPCM to play from.
2. On your trimmed, it looks as if it's streaming DeltaT ADPCM commands to compensate the lack of data stored in ROM. (I wasn't even aware this was possible for the DeltaT as well! :O)

PS: what game is this track from?
Last edited by MaliceX on 2014-03-10, 7:26:52, edited 3 times in total.
-dj.tuBIG/MaliceX
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

MaliceX wrote:PS: what game is this track from?
The Scheme for PC-8801mkIISR Series, Music by Yuzo Koshiro.
http://www.youtube.com/watch?v=BoboFgtpDY0

Post by Sonic of 8! »

Not sure if is a vgm_cmp bug or a conflict with Donkey Kong Land sound driver, but when it drag-and-drop a DKL VGM file on vgm_cmp, the optmized file does not play nothing.

VGM file: https://www.dropbox.com/s/2zgb2ckrvc703 ... %29_03.vgm
オモいカルチャーをオモチャーと言う - 細野晴臣

Post by GTheGuardian »

Sonic of 8! wrote:Not sure if is a vgm_cmp bug or a conflict with Donkey Kong Land sound driver, but when it drag-and-drop a DKL VGM file on vgm_cmp, the optmized file does not play nothing.
I checked, it seems that vgm_cmp for removes the "Master Volume" command.

Code: Select all

B3 14 FF    GB DMG:		Master Volume L: 7 = 100%, Volume R: 7 = 100%
This explains why the VGM is mute.
Post Reply