Skip to content

VGMPlay / in_vgm

Last update: 2023-12-31 (v0.51.1)

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

Moderator: Staff

Post by Sonic of 8! »

Some Easter Eggs that I found on in_vgm:

* Auto-detect SN76489-type (NCR7496 (Tandy PCs), SN94624 (a TI PC), SN76494 and SEGA PSG (SMS/MD/Pico). But, the Game Gear PSG-type is threat as SEGA PSG);
* Some keywords means future support for the FDS PWM channel, VRC7 and WonderSwan Custom soundchip. However, I belive that emulation of WS Custom is pretty bad on MESS, the only hope to ValleyBell is making a build of in_wsr with VGM logging, because most of WS/WSC games didn't have a Sound Test. The core of in_wsr is much old (2006), compared with OswanJ/Cygne, but is better than MESS one.
オモいカルチャーをオモチャーと言う - 細野晴臣
  • User avatar
  • RichterEX2 Offline
  • Posts: 192
  • Joined: 2012-03-30, 9:28:37
  • Location: Georgia, USA

Post by RichterEX2 »

The X68K Castlevania test rip plays perfectly now. But has anyone come up with a good method to log X68K vgms with the PCM data intact?

Post by GTheGuardian »

The only way (for now) to get the X68000 rips with OKIM6258 is to use MESS. But given how slow X68K emulation in MESS is, it would need lots of patience.

On a side note: It seems K054539 channel muting now doesn't works on in_vgm.
Last edited by GTheGuardian on 2013-11-05, 9:30:32, edited 1 time in total.
  • User avatar
  • ValleyBell Offline
  • Posts: 4937
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Sonic of 8! wrote:1- [in_vgm] In the channel muting, the window of SCSP channel muting only shows 24 channels, but the SCSP has 32 channels. So, you need to resize the window
I know that already - I just can't be bothered to redesign everything. This is not a new issue anyway. MultiPCM has 28 channels. (though the games seem to reserve the last 4 ones for SFX)
btw: Muting is barely useful for MultiPCM and SCSP, because the games like to use dynamic channel allocation.
2ch-H wrote:Using the NSFPlay core pitch of "Balloon Fight/Vs. Balloon Fight - Track 02 Main BGM" is high.
It is normal in Mess core.
According to this video, the NSFPlay is right and MESS is wrong.
It sounds like the sweep effect goes wrong in MESS, but I need to investigate that.
GTheGuardian wrote:The only way (for now) to get the X68000 rips with OKIM6258 is to use MESS. But given how slow X68K emulation in MESS is, it would need lots of patience.
I hope 2ch-H doesn't mind for posting one of his rips, but I worked on an alternative way to make X68k rips. (It's been almost a year since I worked on it the last time, but I plan to work on it again soon.)
GTheGuardian wrote:On a side note: It seems K054539 channel muting now doesn't works on in_vgm.
Fixed with next update. (I promise that this will come sooner.)
The code for muting channels was lost when I updated the sound generation code. (I did a huge copy-paste from the new MAME source.)
I also fixed muting with the K053260 chip. (It never worked, but nobody noticed/reported it.)

P.S.: link (worked in the previous release already, btw)
I need to say that if you let it play simultaneously with a hardware recording (from YouTube), there's a noticeable desync after only a few seconds. And the tempo is different in every emulator I know.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

ValleyBell wrote:According to this video, the NSFPlay is right and MESS is wrong.
I'm sorry, you were right.
ValleyBell wrote:I hope 2ch-H doesn't mind
No problem, I don't mind.
  • User avatar
  • getter3 Offline
  • Posts: 5
  • Joined: 2013-11-11, 16:39:41
  • Location: Japan
  • Contact:

Post by getter3 »

in playing bio-hazard battle(crying) title theme,glitch in channel 3.
os:windows8.1
player:winamp 5.7(in_vgm 40.4)

this glitch was seem in older in_vgm version.
  • User avatar
  • ValleyBell Offline
  • Posts: 4937
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

If you could post a VGM, that would be nice. (Or a link to the pack, but since this is a MegaDrive game and I haven't found it on Project2612, I doubt that a pack exists.)

Anyway, YM2612 channel 3 sounds like that could be the bug with the CSM mode and Timer A I forgot to fix. (The internal timer system of MAME's YM2612 core is broken, since it uses external timers in MAME.)
  • User avatar
  • getter3 Offline
  • Posts: 5
  • Joined: 2013-11-11, 16:39:41
  • Location: Japan
  • Contact:

Post by getter3 »

in project2612, this.

example(youtube)

love vgm!
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

I looked, it seems to be a mistake of trimming. (or issues of VGMTool 2 Release 5 ?)

Here is the fix vgm.
https://www.dropbox.com/s/ad6guh5rdfcje ... 0Theme.zip
Last edited by 2ch-H on 2014-01-24, 3:13:44, edited 1 time in total.
  • User avatar
  • ValleyBell Offline
  • Posts: 4937
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

It seems I overlooked the game twice when searching for it on P2612. :/

Anyway, I had a closer look at vgm2txts from the original and 2ch-H's fixed VGM.
(Warning: Technical details about the YM2612 following.)

Original: [channel numbers are 0-based]

Code: Select all

0x00000272: 52 A4 02    YM2612:		Ch 0 F-Num (prepare) MSB = 2, Octave 0
0x0000027E: 52 A6 13    YM2612:		Ch 2 F-Num (prepare) MSB = 3, Octave 2
0x00000281: 53 A6 34    YM2612:		Ch 5 F-Num (prepare) MSB = 4, Octave 6
0x00000284: 52 A0 E9    YM2612:		Ch 0 F-Num (set) LSB = E9
...
0x00000290: 52 A2 5C    YM2612:		Ch 2 F-Num (set) LSB = 5C
0x00000293: 53 A2 81    YM2612:		Ch 5 F-Num (set) LSB = 81
fixed:

Code: Select all

0x00000162: 52 A4 0C    YM2612:		Ch 0 F-Num (prepare) MSB = 4, Octave 1
0x00000165: 52 A0 6C    YM2612:		Ch 0 F-Num (set) LSB = 6C
0x00000168: 52 A6 13    YM2612:		Ch 2 F-Num (prepare) MSB = 3, Octave 2
0x0000016B: 52 A2 5C    YM2612:		Ch 2 F-Num (set) LSB = 5C
...
0x00000264: 53 A6 34    YM2612:		Ch 5 F-Num (prepare) MSB = 4, Octave 6
0x00000267: 53 A2 81    YM2612:		Ch 5 F-Num (set) LSB = 81
It's actually not a mistake of trimming or VGMTool, but from the emulator itself, because of the way it wrote the save state of the YM2612 to the VGM. (VGMTool luckily never got far enough to sort YM2612 commands.)

If you look at the order of the frequency commands, both VGM have them sorted in different ways. The original one has all "prepare" commands first, then all "set" commands. The fixed one sorts them in groups of frequency commands per channel.

Because the YM2612 has only 1 internal slot for the "prepare/MSB" data of all channels, the "Ch 5 F-Num (prepare)" command overwrites the data for channel 2.
This results in these frequencies:

Code: Select all

        Ch 0    Ch 2    Ch 5
orig.   34 E9   34 5C   34 81 (as it is)
orig.   02 E9   13 5C   34 81 (as it should be)
fixed   0C 6C   13 5C   34 81
However this behaviour is unique to the OPN chip family (with most other chips like OPL you can set the 2 bytes of a frequency independently) and isn't emulated in most older YM2612 emulators. (The old VGM sounds fine with the Gens emulator.)
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

I was examined, VGMTool was working properly.
It seems to change in the output state of the emulator of Kega Fusion.

Sample:
https://www.dropbox.com/s/vq04kyc51mv0abz/bhb.7z
Title a.vgm - Play Title by playing another track
Title b.vgm - Play as it is
Last edited by 2ch-H on 2014-01-24, 3:14:39, edited 1 time in total.
  • User avatar
  • RichterEX2 Offline
  • Posts: 192
  • Joined: 2012-03-30, 9:28:37
  • Location: Georgia, USA

Post by RichterEX2 »

Kinda related to in_vgm, but Winamp will be discontinued on December 20th according to Slashdot. The site, and the download links to it will be gone.

http://tech.slashdot.org/story/13/11/20 ... ecember-20

So what happens now?
  • User avatar
  • dissident93 Offline
  • Posts: 204
  • Joined: 2012-02-17, 5:54:01
  • Location: USA

Post by dissident93 »

while that sucks (i've been a user of Winamp for years, as many other people have been) I don't think it will affect in_vgm's development and other 3rd party plugins as long as people have the will to continue them.
  • User avatar
  • neologix Offline
  • Posts: 211
  • Joined: 2012-04-22, 4:03:45
  • Location: New York, NY, USA

Post by neologix »

I'd wager that if supporting Winamp versions of VGM playback becomes non-viable we'd favor Foobar2000 and/or one of the Linux players like Audacious or DeaDBeeF.
  • User avatar
  • RichterEX2 Offline
  • Posts: 192
  • Joined: 2012-03-30, 9:28:37
  • Location: Georgia, USA

Post by RichterEX2 »

I still would love to see a proper VGMPlay plugin for Foobar. That and NotSo Fatso.
Post Reply