ElBrunzy wrote:I had a tought that I would like to share. It might came from the root of your player, it call for experimentation. Sometime your player refuse to play a file recorded for a supported player and dont give much information about why. Othertimes it say that the vgm is not supported by player! But my "research" lead me to beleive that most chips must be built around the same framework at some point compatible. I am also not sure composers always take advantage of every specific aspect of each chips.
I see you have been digging around a little; wonderful! 😀
ElBrunzy wrote:I have found that a same music file could be played differently depending if I use the adlib or the cms sbvgm.exe command switch. I enjoy the fact that I can do that, it often give interesting variants of a favorite.
Do you mind telling me which music file this would be? I tried to test the player on as many VGMs as possible, but there are far too many as you know.
ElBrunzy wrote:Now I dont know how you link the sound hardware to the vgm source, furthermore how you priorise a sound hardware when a vgm source is supported by both. I would like to suggest you add the ability to override the vgm source. I have took a peek at the vgm header to have an idea about the format and what your player have to deal with. At least it make sence now how sega master's space harrier bios music can support the two chip present on the japanese sms. I did try your cmsview tool on it but a clue has to give. Maybe the user would provide the speed of the chip, or use the clock for wich the vgm was originaly recorded for ?
Some of the Master System VGMs only have audio commands for either just the YM2413 or the SN76489. The player will generally try to play VGM files that support two chips like on the Master System. In this case, it would be the YM3812 interpreting the YM2413 data and the C/MS chips interpreting the SN76489 data. With this configuration, the player should work ... unless there is a bug. If you could tell me which VGM data might be causing trouble, I should be able to track down the source of the problem. The C/MS View tool is only really useful for manipulating a portion of the registers on the SAA1099 chip and probably won't give much insight to what the VGM data represents. I made it back when I was doing research into how to interpret the NES/Famicom's VGM data on the SAA1099.
ElBrunzy wrote:I would show transparency and say that my goal behind that request is to make sure there is no way to listen some YM2203 music however mangled they are on sbvgm.exe. Maybe you see an easier way to achieve my goal ? Maybe I could just edit the vgm header too... 🙄
Aaaaah! I see what you are trying to do. I think this part is very tricky. Just changing the header information in the VGM file will not be enough as the VGM data targets a particular audio chip; you would have to essentially re-generate the data for whichever chips you wanted to target. The YM2203 has a YM2419 core and an FM core. Unfortunately, the YM2203 FM core will not work or sound correct on a YM3812 since the algorithms that combine the FM signals are different. The better candidate would be the YMF262 (OPL3) chip since it has four operators (like the YM2203). Unfortunately though, the OPL3 chip's FM core only supports two out of the eight possible four-operator configurations available on the YM2203. I had considered attempting interpret the YM2203 and YM2612 commands on the OPL3, but after examining the differences I realized that the amount of work required to do this was outside the scope of the amount of time I have available.
I am generally never one to say "it is impossible", but it would require finding a means to get the OPL3 to behave (as much as possible) like the YM2203. If could be done, here is one possible approach:
The OPL3 can be configured in a flexible way where it is possible to have a combination of one, two, and four operator settings active at once. With this in mind, for for the YM2419 core in the YM2203:
- Configure three channels (that are not used for four operator configuration) to act as the three square wave channels.
- Configure one channel (from one of the channels used for rhythm mode) to act as the YM2419 core noise channel (I haven't had a chance to directly manipulate the noise generator on the OPL2 or OPL3).
What is left then is the YM2203's FM channels. Apparently there is a two-operator mode and a four-operator mode. The real work would be figuring out how to use the remaining channels on the OPL3 to simulate the YM2203's four-operator algorithms; this is the part that would take a lot of time and experimentation.
Having written all of that, the "easiest" way would be to:
- Configure a portion of the OPL2 or OPL3 to handle the YM2419 commands
- On the OPL2, ignore the four-operator settings and just play some default instrument (or no sound at all).
- On the OPL3, ignore the four-operator settings for the algorithms it does not support, and play a default instrument (or no sound at all).
This will obviously work, but given that there is no way to know what the VGM data will be like, I don't think it would sound good at all.
Perhaps you might be interested in writing new music with the OPL2 or OPL3 that would create wonderful memories for yourself and possibly others? 😀