VOGONS


First post, by theelf

User metadata
Rank Oldbie
Rank
Oldbie

Hi all! I've been building a VGM music player for DOS and wanted to share a beta here to get some feedback before a proper release.

vgmdos plays VGM files using pure software chip emulation through a sb card . Tested and working on a real 286 25MHz, in fact, the target is a 286 machine

Supported systems:

Sega Master System / Game Gear / SG-1000 / ColecoVision / Tandy (SN76489 PSG)
Neo Geo Pocket (T6W28 dual-chip stereo PSG)
MSX (AY8910), with or without Konami SCC wavetable chip (scc VGM really dont work well in a 286 need 386DX+)

Other PSG machines/arcade/systems?¿

The software have

Fullscreen text UI with a directory browser
Reads GD3 tags (song/game/author/system) when available
Autodetects the chip type: by folder name (drop your files in folders named MSX, NGP, etc) or by scanning the VGM commands themselves if theres no hint
A config file (VGMDOS.INI) to set a starting path, toggle VU meters and pick audio quality (8000 to 44100Hz, set 8,16,22,44 default is 16 for 286 is best)
Can also play a whole folder in one go, recursively , using space bar

Is a beta bugs are expected, specially on different hardware than what I tested. Any feedback is very welcome, Im spanish so sorry in advance for my English!

thanks

Last edited by theelf on 2026-08-08, 23:34. Edited 1 time in total.

Reply 1 of 13, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
The attachment 20260809_005716.jpg is no longer available

Hi, uploading a new version. Lots of interesting improvements (i think)

Support for more chips:

* NES and Famicom Disk System
* Game Boy
* PC Engine / TurboGrafx
* WonderSwan
* AY8910 (MSX, ZX Spectrum 128, Amstrad CPC, Atari ST)

Something i really need and use, added COVOX support! Yes, you dont even need a Sound Blaster !

OUTPUT=SB -> Sound Blaster
OUTPUT=L1, L2, L3, L4 -> COVOX on those parallel ports

I also added provisional PicoGUS support for the SN76489 chip, so it can play Game Gear, Master System, Tandy, and other VGM files that use this chipset.

Another new feature is a YM2413 to OPL3 translator for the FM sound used by the Master System FM Unit. To my ears it sounds quite decent.

The file browser can now read song names directly from the GD3 tags, so you dont have to rely only on filenames.

There is also support for a vgm.dir file to provide custom names for directories. I've included an example in the ZIP.

More optimization too. On my 286 25, at 11 kHz all cores run fine using COVOX, and FDS works at 8 kHz.

As always, feedback and testing on different hardware is welcome.

The attachment vgm.zip is no longer available

Reply 2 of 13, by wbahnassi

User metadata
Rank Oldbie
Rank
Oldbie

Nice, I tried a VGM for F1-Spirit from MSX, and that game uses both SCC and the AY8910 at the same time. Right now it is only playing the AY8910. The SCC sounds are completely dropped.

I see also that people use .VGZ files, which are .VGM compressed with gzip. Any chance these can be supported directly instead of requiring manual decompression ahead of time?

Thanks!

Turbo XT 12MHz, EGA, MFM HDD
Intel 386 DX-33, Speedstar 24X, SB 1.5, 1x CD
Intel 486 DX2-66, CL5428 VLB, SBPro 2, 2x CD
IBM BlueLightning 100MHz, CL5428, SB16, 4x CD
Intel Pentium 90, Matrox Millenium 2, SB16, 4x CD
HP Z400, Xeon 3.46GHz, YMF-744, RTX2060

Reply 3 of 13, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
wbahnassi wrote on 2026-08-09, 03:35:

Nice, I tried a VGM for F1-Spirit from MSX, and that game uses both SCC and the AY8910 at the same time. Right now it is only playing the AY8910. The SCC sounds are completely dropped.

I see also that people use .VGZ files, which are .VGM compressed with gzip. Any chance these can be supported directly instead of requiring manual decompression ahead of time?

Thanks!

Hi, thanks for testing, please try this build, OUTPUT=SB for sound blaster, LPT1-4 for covox. For AY8910+SCC in my 286 i need to drop to 8khz and 286=1 but work fine, anyways i recommend at least a 386DX-40 to 22khz

the bug with SCC is that scan the VGM header is SUPER SLOW in a 286, then i shorter the scan, but it seems whas too short. I stoped until 22 events, but F1 VGMS did not start SCC until 56+ events

**NOTE: what 286=1 do is only do SCC at half rate, if you use 8khz, SCC willl be 4khz** Quality can be 8,16,22,44

The attachment Image1.png is no longer available
The attachment vgmdos.zip is no longer available

About VGZ i dont have any remotly interest, i dont see the point in a 286/386 when in modern times we have plenty of HDD space, but CPU are the same little bastards. Anyways, is possible, but for long filenames, whe need to use a file with names, maybe i can implement when i finish the cores

thanks

Reply 4 of 13, by wbahnassi

User metadata
Rank Oldbie
Rank
Oldbie

This version recognizes both AY and SCC indeed, but it seems to also introduce a regression on AY-only compared to the first version.. the pitch is lower now (or is it missing one of the channels?)
I was testing with Yie Ar Kung Fu 2 sound track (also MSX) with the track called Battle 1.

Turbo XT 12MHz, EGA, MFM HDD
Intel 386 DX-33, Speedstar 24X, SB 1.5, 1x CD
Intel 486 DX2-66, CL5428 VLB, SBPro 2, 2x CD
IBM BlueLightning 100MHz, CL5428, SB16, 4x CD
Intel Pentium 90, Matrox Millenium 2, SB16, 4x CD
HP Z400, Xeon 3.46GHz, YMF-744, RTX2060

Reply 5 of 13, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
wbahnassi wrote on 2026-08-09, 10:00:

This version recognizes both AY and SCC indeed, but it seems to also introduce a regression on AY-only compared to the first version.. the pitch is lower now (or is it missing one of the channels?)
I was testing with Yie Ar Kung Fu 2 sound track (also MSX) with the track called Battle 1.

I tested much more console cores, i dont have much interest in MSX, then i tested very few vgm, good to me you do

Kung fu 2, only use SCC and not AY8910 at all

In my coode i always assume a MSX game have AY8910 minimum! interesting, thanks a lot. I dont not much about MSX, i had when child but not much time

test this build must sound now!!! work here https://vgmrips.net/packs/pack/yie-ar-kung-fu … akushuu-msx-scc

The attachment vgmdos.zip is no longer available

Please assume quality is NOT my goal, but SPEED, i made this for my 286, i use a lot of hacks and tricks, if sound similar to my ears, for me is fine, but not empty chhannels, etc of course!

Really wish more people test this, i will improve much faster!!

thanks!

Reply 6 of 13, by wbahnassi

User metadata
Rank Oldbie
Rank
Oldbie

Ah should have clarified.. Use the PSG version, not the SCC version. Konami remade several of its MSX games to use the SCC, but I always go to the original releases which are AY only. I tried another game (Goonies) and now it is clear to me that the pitch is an octave lower, not missing channels.

So yeah, go for the non-SCC versions. One title I know never had SCC treatment is Castle Excellent (not Konami even) if you want a safe bet.

I know that MSX is very little known in North America.. so no worries I understand the lack of interest. In reality the MSX was one of the most sophisticated 8-bit consoles when it comes to the sound department. It is almost in a similar situation to the IBM PC with all the possible sound cards you could add... Where the PC started with the speaker, MSX started with the AY-8910.. then extensions like Konami SCC, MSX-Audio, MSX-Music came in with OPLL and ADPCM ..etc.

It is a rabbit hole to support all MSX music devices. There is a VGM player for MSX-DOS and that one supports all the devices but it uses the real hardware, so it doesn't have to render samples like yours.. hence it has no trouble running on the Z80 at ~3MHz.

Turbo XT 12MHz, EGA, MFM HDD
Intel 386 DX-33, Speedstar 24X, SB 1.5, 1x CD
Intel 486 DX2-66, CL5428 VLB, SBPro 2, 2x CD
IBM BlueLightning 100MHz, CL5428, SB16, 4x CD
Intel Pentium 90, Matrox Millenium 2, SB16, 4x CD
HP Z400, Xeon 3.46GHz, YMF-744, RTX2060

Reply 7 of 13, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
wbahnassi wrote on 2026-08-09, 13:34:
Ah should have clarified.. Use the PSG version, not the SCC version. Konami remade several of its MSX games to use the SCC, but […]
Show full quote

Ah should have clarified.. Use the PSG version, not the SCC version. Konami remade several of its MSX games to use the SCC, but I always go to the original releases which are AY only. I tried another game (Goonies) and now it is clear to me that the pitch is an octave lower, not missing channels.

So yeah, go for the non-SCC versions. One title I know never had SCC treatment is Castle Excellent (not Konami even) if you want a safe bet.

I know that MSX is very little known in North America.. so no worries I understand the lack of interest. In reality the MSX was one of the most sophisticated 8-bit consoles when it comes to the sound department. It is almost in a similar situation to the IBM PC with all the possible sound cards you could add... Where the PC started with the speaker, MSX started with the AY-8910.. then extensions like Konami SCC, MSX-Audio, MSX-Music came in with OPLL and ADPCM ..etc.

It is a rabbit hole to support all MSX music devices. There is a VGM player for MSX-DOS and that one supports all the devices but it uses the real hardware, so it doesn't have to render samples like yours.. hence it has no trouble running on the Z80 at ~3MHz.

Hi im from Argentina, whe have MSX here, but was not so much popular like other machines, but still popular. When i live in japan i use much more the MSX. The problem is PAL/NTSC speed, i dont know if what you say about "is a the pitch is an octave lower" i dont know what a octave is, i google it, but i dont have any idea about music to understand and apply a fix

But i think is a code problem, i change a lot of unsigned longs in code, but i forget to change in MSX core some, and i was doing a wrong divisor L16 instead L8, please can you test the same kung fu? i tetsted this https://vgmrips.net/packs/pack/yie-ar-kung-fu … yie-gah-msx-psg i think is the one you talked about

The attachment vgmdos.zip is no longer available

Anyways, I add a MSX-MUSIC YM2413 suppoort in MSX, bcause a 286 is too slow to emulate this chipset, i add a option 2413OPL=1 and i use the OPL3 inside the sound blaster to "emulate" the 2413, please report if you have interest. Same core apply to master system FM games. Some VGM sound nice, others more or less... i tried my best to do a conversion

For example this game

https://vgmrips.net/packs/pack/illusion-city-msx-turbo-r

Reply 8 of 13, by wbahnassi

User metadata
Rank Oldbie
Rank
Oldbie

Great work fixing PSG. It now sounds correct. I played several tracks and all of them sound good, as well as tracks that include SCC music.

I tried the Illusion City track but as you said, the instruments aren't matched well.. but that's expected. I'm not very familiar with MSX-Music's instrument construction controls, so can't tell of it is just straight impossible to achieve with OPL3.

Great stuff though! I'll be trying music from other systems later today.

Turbo XT 12MHz, EGA, MFM HDD
Intel 386 DX-33, Speedstar 24X, SB 1.5, 1x CD
Intel 486 DX2-66, CL5428 VLB, SBPro 2, 2x CD
IBM BlueLightning 100MHz, CL5428, SB16, 4x CD
Intel Pentium 90, Matrox Millenium 2, SB16, 4x CD
HP Z400, Xeon 3.46GHz, YMF-744, RTX2060

Reply 9 of 13, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
wbahnassi wrote on 2026-08-09, 16:42:

Great work fixing PSG. It now sounds correct. I played several tracks and all of them sound good, as well as tracks that include SCC music.

I tried the Illusion City track but as you said, the instruments aren't matched well.. but that's expected. I'm not very familiar with MSX-Music's instrument construction controls, so can't tell of it is just straight impossible to achieve with OPL3.

Great stuff though! I'll be trying music from other systems later today.

Thanks nice work well now, pleease if you test, dont test YM2413 in sooftware mode, im rewriting the core, thanks, not to loose time

About the YM2413>OPL, yes, the translation is not best (i dont think can be much better??¿), but in my opinion good enough to enjoy the music thinking is running in a different hardware. After many attemps i realize a 286 cant emulate a YM2413 properly, then a OPL translation can be a nice addition, thats why i use my time on this, while left the software core to later, im working now

Thanks

Reply 10 of 13, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

AFAIK, OPLL can be emulated perfectly on OPL2. You can see the parameters needed to duplicate the 15 melodic presets in eg. 0CC-LLTracker

Wreckage reimagined on itch: https://90soft90.itch.io/wreckage-dash

Reply 11 of 13, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
bakemono wrote on 2026-08-09, 23:55:

AFAIK, OPLL can be emulated perfectly on OPL2. You can see the parameters needed to duplicate the 15 melodic presets in eg. 0CC-LLTracker

Hey, thanks for the info about 0CC-LLTracker!

I check the source code, but the array I find (vrc7_instruments) is actually the VRC7 tone table (for example instrument 1 is Buzzy Bell), not the real YM2413 one.

I need the real YM2413/OPLL table because im emulating MSX-MUSIC and Sega FM Sound Unit, both use real YM2413 chip, not VRC7.

Also I have some questions about what you say, OPLL can be emulated perfectly on OPL2, if you dont mind:

The conversion is just copy every field direct (AM/VIB/EG-type/KSR/Multi to $20-$35, KSL/TL to $40-$55, AR/DR to $60-$75, SL/RR to $80-$95)? Or there is some scaling needed too, maybe TL step size or something?
How you handle the modulator Total Level? In my code I do 0x3F - TL when writing to OPL2 TL register. Is this correct, or should be direct copy without invert?
The big one for me: what happen with the custom/user instrument when its ALL ZERO (0x00 in registers 0x00-0x07, this is how real YM2413 starts after power on, before game define it)?

On real chip this make a specific quiet sound, but when I use same zero values on OPL2 it sounds different, more thin and buzzy. Is there some known correct OPL2 patch for this exact case, or this is just hardware difference between OPLL and OPL2 and cant be fixed?

NOTE2 AFTER SOME TEST:

Hi again,I do more tests. I find why OPL2 and YM2413 sound different when the registers 00h to 07h are ALL ZERO (0x00) after power on.In real YM2413 chip, this all-zero makes a low sound, you can hear it. But when I put the same zeros in OPL2 registers, the sound is different. It sounds bad, very thin and buzzy.I don't know much about music, but why this happens?Is a chip hardware difference?Anybody knows a "trick patch" for OPL2 to make the same sound as YM2413 when is all zero? Or is impossible to fix with registers?

Sorry for my bad english

Thanks for any help!

Reply 12 of 13, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

One difference in the registers is that OPLL has a 9-bit frequency, while OPL2 has 10 bits. That value might need to be scaled, if it plays an octave too low. The OPLL 'volume' field from registers $30~$38 needs to be multiplied by 4 and added to the TL of the carrier. When the OPLL 'sustain pedal' is set, I think the equivalent for OPL2 is to set sustain to 5. OPL2 has 4 waveforms, but OPLL only has 2.

You can see the instruments in 0CC-LLTracker in the UI, so I think it must be in there somewhere.

Wreckage reimagined on itch: https://90soft90.itch.io/wreckage-dash

Reply 13 of 13, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
bakemono wrote on Today, 01:17:

One difference in the registers is that OPLL has a 9-bit frequency, while OPL2 has 10 bits. That value might need to be scaled, if it plays an octave too low. The OPLL 'volume' field from registers $30~$38 needs to be multiplied by 4 and added to the TL of the carrier. When the OPLL 'sustain pedal' is set, I think the equivalent for OPL2 is to set sustain to 5. OPL2 has 4 waveforms, but OPLL only has 2.

You can see the instruments in 0CC-LLTracker in the UI, so I think it must be in there somewhere.

Thanks! yes, i already takeare of frecuency

freq = (u16b)((((u16b)regs[0x10+F] & 0xFF) | (((u16b)regs[0x20+F] & 1) << 😎) << 1);

the << 1 at the end is what did the trick

About volume, i use this code table

static const u8b fm_vol[16] = {
0x00, 0x03, 0x06, 0x03, 0x09, 0x0c, 0x0f, 0x12,
0x15, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a
};

and this made a index for this

if (addr >= 0x30 && addr < 0x36) {
set_voice(addr & 0x0F, (data >> 4) & 0x0F, fm_vol[data & 0x0F]);
return;
}

About sustain, i dont understand very werll what you say, i will check, i have MS, CS, MSL, and CSL values, but all are dinamic, is not same for all isntruments. I check MEKA source for this values

thanks