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 »

2ch-H wrote:vgm_sro Bug?
Loop offset is E4 FF FF FF.
Good spotting! Here is a fixed version.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

Thank you for the update.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

No problem. Fixing bugs is my job. :P
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

vgm_sro Bug?
Reverse Cymbal is strange.

This VGM sample, Rohga - Demo:
Edit : I deleted the file
Last edited by 2ch-H on 2013-01-27, 3:32:02, edited 1 time in total.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Now this is a weird VGM.
OKI's sample bank is changed twice while the reverse cymbal plays (1 -> 0 -> 1) and vgm_sro didn't expect that of course.

Anyway, here is a fixed vgm_sro.
I recommend to fix the file too though, because I don't think that the bank change is supposed to happen. (simply replace all B8 0F 00 commands with B8 0F 01, this makes it also work with the unfixed vgm_sro)

btw: As a small bonus I included a slightly updated vgm_cmp that removes unnecessary bank/clock changes for the OKIM6295 chip, but it can't filter its sound commands yet.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

Thank you for the update.

The original vgm is bank change seems to be output,
This is the unedited vgm. (only changed the OKIM6295 clock)
Edit : I deleted the file
The first chip (Clock 1.006875MHz) is sound effects, and the second chip (Clock 2.01375MHz) is BGM.

When I posted to the Submission, will submit the fix file.
Last edited by 2ch-H on 2013-01-27, 3:31:21, edited 2 times in total.
  • User avatar
  • Knurek Offline
  • Posts: 84
  • Joined: 2011-12-30, 1:01:56

Post by Knurek »

ValleyBell, something I noticed while doing the F1 World Championship rip - vgm_cmp does not optimize Mega Drive logs that use samples, so if you're logging a game like that and you want smallest VGM size, you need to run optvgm and then vgm_cmp.

Is this intended or have I missed an option somewhere?
Last edited by Knurek on 2013-01-22, 16:28:04, edited 1 time in total.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Every one of my tools as a specific purpose. vgm_cmp, vgm_sro and optvgmrf - they all optimize files, but they all do different things.

optvgm only cares about YM2612 DAC writes and presses them into data blocks. vgm_cmp only removes commands (and doesn't care about DAC writes at all).
So yes, this is the intended behaviour.
And btw: optvgm first and vgm_cmp then works usually better than the other way round, because vgm_cmp can optimize some of the delays a bit more than optvgm does.
  • zzo38 Offline
  • Posts: 51
  • Joined: 2013-02-18, 3:17:44
  • Contact:

Post by zzo38 »

Why does vgm2txt not allow output to stdout rather than to a file? These tools (even VGMPlay itself) are not implemented very well; almost no command-line options are accepted and there are other problems too
Last edited by zzo38 on 2013-02-20, 11:05:45, edited 1 time in total.
  • User avatar
  • neologix Offline
  • Posts: 211
  • Joined: 2012-04-22, 4:03:45
  • Location: New York, NY, USA

Post by neologix »

The output of vgm2txt is normally huge and it's emulating VGMTool's VGM-to-text functionality (which output directly to a file as well).
  • User avatar
  • MaliceX Offline
  • Posts: 226
  • Joined: 2012-09-29, 11:45:48
  • Location: Australia
  • Contact:

Post by MaliceX »

zzo38 wrote:Why does vgm2txt not allow output to stdout rather than to a file? These tools (even VGMPlay itself) are not implemented very well; almost no command-line options are accepted and there are other problems too
Command line options correspond to user input prompts. In the case for vgm2txt, start sample and end samples for extraction.

Also I would imagine making it output to stdout would be a matter of adding a printf() / fprintf() bound to stdout, to the output strings. Source code is available if that is a pressing issue. Alternatively, you can wrap a script that will read in the output files and print to stdout (see this topic).

For any problems, it would be wise to elaborate further on what they may be so ValleyBell or anyone else can discuss.
Last edited by MaliceX on 2013-02-21, 7:01:34, edited 3 times in total.
-dj.tuBIG/MaliceX
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I felt like doing something easy, so I took the dro2vgm source, cut some things and made:
IMF2VGM

You can override the autodetected tempo and format, so I recommend to use "imf2vgm -help" first.

Enjoy!
P.S.: imf2vgm will be included in the VGM Tool Collection with the next update.

Quick edit (15:42 forum time): I updated the tool to add a -loop parameter.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

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

This VGM sample, Journey to Silius - Stage 1:
Edit : I deleted the file

Code: Select all

vgm_trim nes_01.vgm 421282 436679 2902251
Last edited by 2ch-H on 2013-06-14, 10:53:38, edited 2 times in total.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Yes, it's a bug. I forgot to rewrite the NES RAM data block.
I put it on my TODO list.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

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.
Post Reply