VOGONS


First post, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

edit:
Convert MIDI files to VGM files from the command line! YM2151, YM2612, YM2608, YM2203, OPL2, OPL3, and ESFM are supported. Includes Win32, Linux, and 16-bit DOS builds.

see below for latest release and info, or check the blog: http://www.hyakushiki.net/anachro.htm

Last edited by bakemono on 2023-09-16, 16:12. Edited 1 time in total.

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

Reply 1 of 12, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

version alpha4 changelog:

Changed the default pitch mapping to one that should be more technically correct.
fixed a bug in SSG channel allocation
faster conversion (runs in reasonable time on 286)
added SSG attenuation switch
added checks for memory buffer (datablob and reproc) overflow
changed a few instruments

Attachments

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

Reply 2 of 12, by SuperDeadite

User metadata
Rank Member
Rank
Member

Nice, I will give this a try later. I have a decent setup for all of these chips including 2xOPM. 😀

Modules: CM-64, CM-500, SC-55MkII, SC-88 Pro, SY22, TG100, MU2000EX, PLG100-SG, PLG150-DR, PLG150-AN, SG01k, NS5R, GZ-50M, SN-U110-07, SN-U110-10, Pocket Studio 5, DreamBlaster S2, X2, McFly, E-Wave, QWave, CrystalBlaster C2, Yucatan FX, BeepBlaster

Reply 3 of 12, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

Release alpha5 adds support for OPL3 and dual OPL3... though I don't know if there is any software yet which can play dual OPL3 VGM on real hardware. SBVGM struggles to play single OPL3 on my 286, so I might have to add OPL support to my own VGM player (which has been only for my custom OPN card so far).

edit: fixed a minor bug that was causing 'pops' in the audio, and re-uploaded the program

Attachments

  • Filename
    mid2vgm-alpha5.7z
    File size
    52.59 KiB
    Downloads
    71 downloads
    File license
    CC-BY-4.0
  • Filename
    opl3-mm5.ogg
    File size
    1.62 MiB
    Downloads
    73 downloads
    File license
    Fair use/fair dealing exception

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

Reply 4 of 12, by SuperDeadite

User metadata
Rank Member
Rank
Member
bakemono wrote on 2023-08-01, 18:32:

Release alpha5 adds support for OPL3 and dual OPL3... though I don't know if there is any software yet which can play dual OPL3 VGM on real hardware. SBVGM struggles to play single OPL3 on my 286, so I might have to add OPL support to my own VGM player (which has been only for my custom OPN card so far).

edit: fixed a minor bug that was causing 'pops' in the audio, and re-uploaded the program

Excellent. MSX VGMPlay does support 2xOPL3/4. Will try this out in a few weeks (I'm on vacation and out of my country right now.) Thanks for the update.

Modules: CM-64, CM-500, SC-55MkII, SC-88 Pro, SY22, TG100, MU2000EX, PLG100-SG, PLG150-DR, PLG150-AN, SG01k, NS5R, GZ-50M, SN-U110-07, SN-U110-10, Pocket Studio 5, DreamBlaster S2, X2, McFly, E-Wave, QWave, CrystalBlaster C2, Yucatan FX, BeepBlaster

Reply 5 of 12, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

YM2612 with -s1 switch can now play a MIDI channel(s) on the SN76489 if the notes are all within its frequency range.

OPL3 can now play 9 channels. This is with 2x 2-op channels being paired together to create a 4-op channel. Added OPL2 (4 channels) and dual OPL2 (8 channels). Added preliminary ESFM support which can play 18 channels, though on my 286 there are still a lot pops and crackles, YMMV.

Also including a quick and dirty DOS VGM (and VGZ) player "OPNZ." It can play OPL2/OPL3 stuff at 0x388, and ESFM if you have ESFM. It can play other source material if you happen to have YM2203s at 0x310 and 0x312...

edit: updated archive

Attachments

Last edited by bakemono on 2023-08-17, 13:01. Edited 1 time in total.

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

Reply 6 of 12, by Scali

User metadata
Rank l33t
Rank
l33t
bakemono wrote on 2023-08-01, 18:32:

Release alpha5 adds support for OPL3 and dual OPL3... though I don't know if there is any software yet which can play dual OPL3 VGM on real hardware. SBVGM struggles to play single OPL3 on my 286, so I might have to add OPL support to my own VGM player (which has been only for my custom OPN card so far).

My VGM player is prepared for dual OPL3. Never tested it because I don't know of any VGM that has dual OPL3, and no emulator that would give me such a configuration.
But with your tool I can at least create dual OPL3 VGMs.
Modifying DOSBox to have a second OPL3 may not be that difficult.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 7 of 12, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie
Scali wrote on 2023-08-15, 12:17:

My VGM player is prepared for dual OPL3. Never tested it because I don't know of any VGM that has dual OPL3, and no emulator that would give me such a configuration.
But with your tool I can at least create dual OPL3 VGMs.
Modifying DOSBox to have a second OPL3 may not be that difficult.

Since you mentioned DOSBox, that gave me the idea of testing OPNZ in there. Which promptly failed. Some old redundant code was polling the busy bit on YM2203 and getting stuck in an infinite loop. These lines should have been commented/removed:

;        x=$30
; whileless x,$B3
; callex ,opn1set,opnbase1,x,0
; callex ,opn1set,opnbase2,x,0
; x=_+1
; wend

I'll have to re-upload later.

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

Reply 8 of 12, by OPLx

User metadata
Rank Member
Rank
Member
bakemono wrote on 2023-08-01, 18:32:

Release alpha5 adds support for OPL3 and dual OPL3... though I don't know if there is any software yet which can play dual OPL3 VGM on real hardware. SBVGM struggles to play single OPL3 on my 286, so I might have to add OPL support to my own VGM player (which has been only for my custom OPN card so far).

edit: fixed a minor bug that was causing 'pops' in the audio, and re-uploaded the program

Do you mind pointing me to an OPL3 VGM that the slowdown happens on? Back when SBVGM added OPL3 VGM support I didn’t have access to a slower PC. When I have a chance I can try to figure out why it’s slower.

It’s great to see other VGM players; more love for the PC! 😃

Reply 9 of 12, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie
OPLx wrote on 2023-08-21, 11:33:

Do you mind pointing me to an OPL3 VGM that the slowdown happens on? Back when SBVGM added OPL3 VGM support I didn’t have access to a slower PC. When I have a chance I can try to figure out why it’s slower.

It’s great to see other VGM players; more love for the PC! 😃

Sure, no problem.
original MIDI file can be found here (chargeman2): https://www.midishrine.com/index.php?id=53

As a point of reference, SBVGM 1.42 achieves around 50%~80% playback speed on my 8MHz 286.

Attachments

  • Filename
    OPL3-MM5.ZIP
    File size
    41.01 KiB
    Downloads
    49 downloads
    File license
    Fair use/fair dealing exception

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

Reply 10 of 12, by OPLx

User metadata
Rank Member
Rank
Member
bakemono wrote on 2023-08-21, 12:56:

Sure, no problem.
original MIDI file can be found here (chargeman2): https://www.midishrine.com/index.php?id=53

As a point of reference, SBVGM 1.42 achieves around 50%~80% playback speed on my 8MHz 286.

Thank you for the data! I'll use it to track down what's causing the slowdown.

Reply 11 of 12, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

Tested a couple of Sound Blaster 16 cards and found that one of them would only play OPL2 stuff, seemingly because of register initialization when switching to OPL3 mode. OPL3 tracks now clear register 8 and don't try to clear register 0xBD in part 2. (It's not clear from OPL3 Programmer's Guide whether that register exists or not.)

-fixed register initialization problem on real OPL3
-added ISC2DMP to convert ISC instruments to DMP for Deflemask/Furnace
-OPNZ now disables interrupts while accessing timer to prevent glitches
-made it a ZIP archive which can be extracted on 16-bit DOS while also preserving file case for Linux
-included a file (opmfreq2.bin) needed to build OPNZ source

Attachments

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

Reply 12 of 12, by OPLx

User metadata
Rank Member
Rank
Member
bakemono wrote on 2023-09-16, 16:08:

Tested a couple of Sound Blaster 16 cards and found that one of them would only play OPL2 stuff, seemingly because of register initialization when switching to OPL3 mode. OPL3 tracks now clear register 8 and don't try to clear register 0xBD in part 2. (It's not clear from OPL3 Programmer's Guide whether that register exists or not.)

Register 0xBD doesn't exist in part 2. I found out recently that if there are OPL3 specific settings still set even with NEW bit in register 0x105 set to off, those settings can still affect the OPL3's output. What I ended up doing is:

  • Set the NEW bit on register 0x105
  • Clear all the relevant OPL2 and OPL3 settings
  • Clear the new bit on register 0x105

I'm not sure if the Sound Blaster 16 cards that use a non-Yamaha chip behave when the NEW bit is set or not.