OPLx wrote:
I had some time to take a quick look and here's what I found out:
I'm successfully able to reproduce it under DOSBox it is easier to debug. Castle.vgm is actually a compressed (VGZ) file, which explains the issue I mentioned about ZLib. The file size is actually 18,874 bytes in size! The other interesting thing about this file is that it's VGM data is tagged to use both the YM2413 and the SN76489 (though there doesn't seem to be any commands for the SN76489). Without scanning through the whole VGM to detect commands, SBVGM takes the information given and (depending on the chips used) may actually allocate additional memory to create tables to help in converting the frequencies from the clock rate specified by the VGM to what the hardware under DOS can use. In this case, 2K is being allocated for SN76489 -> SAA1099 and 2K is being allocated for the YM2413 -> YM3812 ... the interesting thing is that the VGM specifies a clock rate of 3.579540 MHz for the YM2413 and of course a clock rate of 3.579545 MHz. That 0.000005 MHz difference is causing the allocation and the difference is small enough to probably not matter anyway! 🤣
The Insufficient memory to playback VGM! message occurs when SBVGM attempts to allocate memory for the SN76489 -> SAA1099 frequency table ... Either way, I need to rework the memory allocation algorithm since it shouldn't fail when specifying the option to use XMS memory ... there's also a volume bug in the YM2413 simulator that castle.vgm exposed ... I'll have to take a look at that as well ... 😵
Hello, I myself have informations to update the issue. After many problems encountered (I had to change the mobo from a VIA to an iNTEL chipset one, can you imagine?), I have finally been able to dualboot this machine for freedos and win98 and tonight I'm listening to the winamp in_vgm.dll plugin. I havent took time to set it to use the adlib opl chip yet and I'm listening to some .vgm in software with the guspnp being used for PCM. All those music from the soundtrack Miracle Warriors sound awfull, with the exception of "castle.vgm", maybe it was spared as it's kind of a simple music? There seem to be having timing problems with every single notes, might be something related to what you investigate. But then again, most of my vgm files have badly timed notes now and then, might be a timing issue with in_vgm.dll. The issue is lot worse with the Miracle Warrior recording. I have read that I could tell in_vgm.dll to use the adlib opl with compatible .vgm, but I'm not sure it will be easy to do, I'll give you some info about that later when it will be done.
By the way, I wanted to showcase your software to a friend this week as I was working on that open computer and explained him how VGM and players where working. But having to call a dos batch file to load your player to load every file in a directory was too much to ask, so I gave up (I wasnt on my first beer). If you want an advice, add wildcard for your player, so you can do "vgmplay C:\music\vgm\gameX\*.vgm" maybe no fancy shuffle or playlist support, but that would be a great feature. Maybe I'll install norton commander and create a shortcut for players like sbvgm. What do you think?
also, while I'm at it, I did try your player under win98 as the test.exe and jukebox.exe from the adlib disk worked from the command.com. I can tell you that SBVGM v1.06 by OPLx work very well ... as long as the sbvgm.exe window have the main focus 🤣 This seem to be true for everything using the adlib under win98 tho
I'm sorry about the zlib issue, I wasnt aware of that. Fortunately it seem that it was not a waste of time, right ?