VOGONS


First post, by MrKsoft

User metadata
Rank Member
Rank
Member

I recently released VGMSlap, a player for OPL1/2/3 VGM files under MS-DOS. It is certainly not the first and definitely will not be the last VGM player for DOS - but it's mine!

vgmslap.png
Filename
vgmslap.png
File size
16.34 KiB
Views
382 views
File license
Public domain

I wrote it as a learning experience for both MS-DOS programming and C in general, so it might still be rough around the edges as I'm still pretty inexperienced. There's definitely room for major performance improvements and more features. However, it does do what it says it does, and I think that warrants a public release!

Compared to some of the other players available on DOS, benefits of VGMSlap include a visual channel display in a colorful 80x50 screen mode, support for playlists, and the ability to play Dual-OPL2 VGMs with the correct Sound Blaster Pro 1.0 panning even on OPL3. It should run okay on a 386 or higher with VGA (as I said, definitely room for performance improvements!). Cards with OPL2, Dual-OPL2 and OPL3 are all supported.

VGMSlap is open source and distributed under the MIT License, targeting Open Watcom C 2.0. Code and releases can be found on GitHub: https://github.com/MrKsoft/vgmslap

I would be interested in hearing your experiences with VGMSlap and (constructive) criticism on fixing bugs and making improvements. Enjoy!

The OPL Archive - Preserving MS-DOS music in a unified format!

Reply 1 of 8, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

It seems like the player can crash sometimes if the VGM file does not end with a 0x66 command. (This includes all files generated with MIDI-to-VGM translator.) It didn't happen in dosbox, but happened on my 286. The problem went away when I added the 0x66 byte.

Attaching VGM test file...

Attachments

  • Filename
    MOUT.ZIP
    File size
    48.8 KiB
    Downloads
    7 downloads
    File license
    Fair use/fair dealing exception

again another retro game on itch: https://90soft90.itch.io/shmup-salad

Reply 2 of 8, by MrKsoft

User metadata
Rank Member
Rank
Member

Thanks for the test file. It makes sense, since 0x66 is the "end of sound data" command and any properly formed VGM should have it, but I don't want it unceremoniously crashing either. One mitigation I could do at least is better bounds checking to see if the player overruns the end of a file. However if the file has a GD3 tag but no 0x66 before that, it is going to try reading the GD3 tag as a command and either send garbage to the OPL3 or quit due to encountering an unknown VGM command.

The OPL Archive - Preserving MS-DOS music in a unified format!

Reply 4 of 8, by MrKsoft

User metadata
Rank Member
Rank
Member

SBVGM is still the gold standard, though! Time-tested and versatile. I just wanted something flashier and OPL centric 😀

@bakemono - I committed a fix for VGMs missing the 0x66 command, and it will be incorporated into the next release.

The OPL Archive - Preserving MS-DOS music in a unified format!

Reply 5 of 8, by OPLx

User metadata
Rank Member
Rank
Member
MrKsoft wrote on 2024-05-08, 21:20:

SBVGM is still the gold standard, though! Time-tested and versatile. I just wanted something flashier and OPL centric 😀

Thanks! 😀 I think the more new MS-DOS software the better. So jealous of how many new things are released for the other older platforms in comparison.

Reply 6 of 8, by OPLx

User metadata
Rank Member
Rank
Member

With a DIVIDER setting of 1, VGMs play very slowly on my Pentium III - 450 MHz machine. I guess something is skipping updates?
[Edit]
It might be because I was running within WinME ... will have to check when I have time later.

Reply 7 of 8, by MrKsoft

User metadata
Rank Member
Rank
Member

Yeah, I should have put that in the readme - it is probably not going to work in Windows because it sets up an ISR8 handler and changes the PIT frequency to 44100hz/DIVIDER. IIRC Windows in protected mode prevents this from working as expected. There are probably more friendly ways to do timing but this one made sense to me as a learner and was able to trivially get me the 44100hz precision VGMs ask for.

The OPL Archive - Preserving MS-DOS music in a unified format!

Reply 8 of 8, by OPLx

User metadata
Rank Member
Rank
Member
MrKsoft wrote on 2024-05-11, 16:00:

Yeah, I should have put that in the readme - it is probably not going to work in Windows because it sets up an ISR8 handler and changes the PIT frequency to 44100hz/DIVIDER. IIRC Windows in protected mode prevents this from working as expected. There are probably more friendly ways to do timing but this one made sense to me as a learner and was able to trivially get me the 44100hz precision VGMs ask for.

No problem! It works in a pure DOS environment. Thanks for the update.