Skip to content

Most accurate way to play VGM files on Windows 10?

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

Moderator: Staff

  • sofakng Offline
  • Posts: 6
  • Joined: 2019-12-18, 22:34:18

Most accurate way to play VGM files on Windows 10?

Post by sofakng »

How accurate is using VGMPlay (or other players) on modern computers? (i.e. Windows 10, etc)

Over the past year I've purchased a Roland MT32 and SC-55 MK2 and it allows me to connect directly to a modern PC using a USB adapter (UM-ONE). I can then use DosBox or other emulators but use authentic hardware to produce sounds and music.

Is there anything similar for AdLib/SoundBlaster (OPL?) or NES/SNES/Genesis sounds?

I've just found out about VGM files and VGMPlayer (thanks 8-bit guy!) but I'm not completely sure how authentic playback is on a modern PC. If I understand correctly, the VGM files have the exact commands sent to the original hardware, but I'm guessing it's emulated when playing back on a modern PC?

I did see that VGMPlayer supports DOS and if you have an old machine with an old soundcard it will use that to playback sounds on the original chips (if your soundcard has them) but that requires a separate/dedicated PC?
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

VGMPlay is probably the most accurate way of playing VGMs if you can't play them on actual OPx chips.

MegaDrive emulation is as accurate as it can get if you enable the NukedOPN2 core. (I personally consider the MAME/Genesis Plus GX core sufficient most of the time though.)
OPL emulation is "decent" currently. (NukedOPL3 will be included with the next major update.)
The quality of the emulation generally varies between "okay" and "very good".
For some PCM chips you also get the option of oversampling them, so VGMPlay's output sounds better than the actual chip.

As for playing on real hardware, you can use SBVGM if you want to play back VGMs in real DOS.
VGMPlay itself can also play back data on real a OPL3 card. On Windows NT/2000/XP/... it does that through the PortTalk driver. On Windows 9x and Linux-based OS it works without any special driver.
I've been using VGMPlay to listen to OPL2/3 VGMs on an old PC (Pentium II with SoundBlaster 16, Windows 2000), as well as a modern PC (Intel i7 with YMF744 PCI sound card, Gentoo Linux).
Note that VGMPlay is not a DOS program. It just runs in a console window.
  • sofakng Offline
  • Posts: 6
  • Joined: 2019-12-18, 22:34:18

Post by sofakng »

Thanks very much for the reply and information!

Do you know if anybody has thought about (and has enough experience/knowledge!) to use an FPGA to recreate these sound chips and play VGM files?

It would be absolutely incredible if a device like the MiSTer (FPGA) had a core(s) written to playback VGM files and cycle-accurate (or nearly) sound chip recreation.
  • ctr Offline
  • Posts: 492
  • Joined: 2013-07-17, 23:32:39

Post by ctr »

I know about the jt12 and jt51 cores (they are supposedly very accurate) but I don't know if anyone wrote a VGM player that uses those that can run on a MiSTer (DE10 Nano) or other kind of FPGA board. Btw cycle accurate doesn't necessarily mean sample accurate :)
  • sofakng Offline
  • Posts: 6
  • Joined: 2019-12-18, 22:34:18

Post by sofakng »

I've written briefly to Jose and he's actually created a bunch of cores:
  • YM2203 (JT03)
  • YM2612 (JT12)
  • YM2610 (JT10)
  • YM2151 (JT51)
He mentioned working on an enhanced Atari ST core as a VGM player but he hasn't worked on it in a while.

I'm not sure what you mean by 'cycle accurate isn't sample accurate' but most of this goes above my head. I just want to hear accurate playback of video game music :)
  • lo zaffo Offline
  • Posts: 39
  • Joined: 2016-08-03, 22:36:09
  • Location: Italy

Post by lo zaffo »

@ValleyBell : can You please elaborate how do You manage to use pci Opl3 on GNU/Linux? I have the hardware and I would try it.
Thank You.
Happy Holidays!
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

For me the most difficult part with OPL3 on modern hardware was actually getting the FM port to work at all.
The legacy port (0x388) doesn't work on modern main boards, so you need to specify a port that is within the sound card's PCI address range. (see this comment by Nuke.YKT)

For YMF744/YMF754 cards, you have to remap the OPL port using kernel driver options.
I set those in /etc/modprobe.d/alsa.conf (file name may vary, my card uses PCI ports 0xD000..0xDFFF)

Code: Select all

# make YMF744 MIDI Out and OPL3 ports work
options snd-ymfpci mpu_port=0xDF30 fm_port=0xDF88
After that, you can just specify that port in VGMPlay.ini

Code: Select all

FMPort = DF88
Finally, run vgmplay as root in order to be able to access the FM ports.
  • sofakng Offline
  • Posts: 6
  • Joined: 2019-12-18, 22:34:18

Post by sofakng »

That's really interesting...

It sounds like you can find a modern PCI-Express sound card with an OPL3 (YMF744/YMF754) card and play VGM files through the authentic OPL3 chip?

I wonder if these also work in Windows 10 or only Linux?

Also, do you pass the audio output to another sound card (i.e. onboard/motherboard sound card) or output directly to speakers?
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

The YMF744 is a (non-Express) PCI card from about 2000, so it's a pretty old card.
You need to find a mainboard that has a non-Express PCI slot in order to use it.

Under Linux it works just fine. (except that you won't get an XG MIDI synthesizer - that's part of the Windows driver)
There are 32-bit drivers for Windows 98/ME/2000/XP. I'm not sure if they work on modern machines though, as they probably just use the Legacy ports for FM and MIDI out.
There are no 64-bit drivers, so I haven't been able to get it to work under Windows 10 (64-bit) at all.

When it works, then all sound (OPL + wave) is output through the speakers, just like it is on old cards like the SoundBlaster 16.
  • Shywolf Offline
  • Posts: 41
  • Joined: 2015-11-01, 22:18:27

Post by Shywolf »

sofakng wrote:... It sounds like you can find a modern PCI-Express sound card with an OPL3 (YMF744/YMF754) ...
Does not exist! OPL3 (and other forms of synth-as-part-of-soundcard) were long dead+buried by the time PCIe became a thing around ~2005.
Post Reply