SBVGM (DOS) VGM Player

Schedules and announcements about program releases.

Re: SBVGM (DOS) VGM Player

Postby ElBrunzy » 2018-11-29 @ 01:06

Hi OPLx, I realized past weekend there was a problem with a soundtrack, so I wanted to investigate a bit more and post as much info about it. But as I made the package and noted the anomaly I realized that we already had a problem with this soundtrack and you fixed it in 1.14 where a vgm have ym3812 and saa1099 data. So that might explain this strange behavior (I should had started by that): on the miracle warrior soundtrack if you use the -sb options only the version with ym3812 play and that's ok. But if you use the -C (or the -c but that would be ok) then both versions play. I guess, as you noted in v1.14, it's that they have saa and opl data so the player think they can both be played. So at this point I would think that it's the soundtrack or the rip which is the problem. Still if my SWAG theory is good, I'm surprised opl version of the music play with the -C switch. So I reported that and packaged you 2 files (opl and saa version of the same music) if you ever feel to peek at issue. But I think your opl3 support is far more interesting as it would be fun to experience the difference in those two chips. That soundtrack anyway only consist of only 24 files total with the opl and saa version so it's not really a problem. But maybe it has other incidences? I guess you would prefer to know.

I noticed your web site is still down, I have a personal server and with my reverse proxy I could host http://www.oplx.com in the meantime you resolve your issue ? Just PM if I could be of assistance, I would be glad to help.
Attachments
MWTEST.ZIP
mwsaa.vgm = saa1099, mwopl.vgm = ym3812 version
(7.54 KiB) Downloaded 14 times
User avatar
ElBrunzy
Member
 
Posts: 451
Joined: 2014-1-26 @ 03:50
Location: Quebec / Canada

Re: SBVGM (DOS) VGM Player

Postby OPLx » 2018-11-29 @ 14:22

ElBrunzy wrote:Hi OPLx, I realized past weekend there was a problem with a soundtrack, so I wanted to investigate a bit more and post as much info about it. But as I made the package and noted the anomaly I realized that we already had a problem with this soundtrack and you fixed it in 1.14 where a vgm have ym3812 and saa1099 data. So that might explain this strange behavior (I should had started by that): on the miracle warrior soundtrack if you use the -sb options only the version with ym3812 play and that's ok. But if you use the -C (or the -c but that would be ok) then both versions play. I guess, as you noted in v1.14, it's that they have saa and opl data so the player think they can both be played. So at this point I would think that it's the soundtrack or the rip which is the problem. Still if my SWAG theory is good, I'm surprised opl version of the music play with the -C switch. So I reported that and packaged you 2 files (opl and saa version of the same music) if you ever feel to peek at issue.

Thank you for the files! I will take a look at them as soon as I can; it's likely that I overlooked something somewhere. :-)
ElBrunzy wrote:But I think your opl3 support is far more interesting as it would be fun to experience the difference in those two chips. That soundtrack anyway only consist of only 24 files total with the opl and saa version so it's not really a problem. But maybe it has other incidences? I guess you would prefer to know.

Adding OPL3 support for SN76489 data isn't impossible, but the noise channels won't sound correct on the OPL3. I will give some more thought to it though.

ElBrunzy wrote:I noticed your web site is still down, I have a personal server and with my reverse proxy I could host http://www.oplx.com in the meantime you resolve your issue ? Just PM if I could be of assistance, I would be glad to help.

Thank you for the kind offer. I've contacted my ISP and they are looking at it; it was down for a few days before I was informed. The problem lies with the domain name itself; hopefully it will be resolved soon. I didn't think that too many people visit the site; I don't check it often myself.

I'll let you know once I get a chance to find out what the problem is. Thank you again!

(Edit)
I took a very quick look and found out that MWOPL.VGM has information that says that SN76489 data is present. I think what I need to change is to only enable chips that were detected or forced; so in this case SBVGM will still "play" MWOPL.VGM but there will not be any audio when the -C option is present because of the incorrect tagging of the SN76489 information.
OPLx
Member
 
Posts: 133
Joined: 2014-2-15 @ 17:02

Re: SBVGM (DOS) VGM Player

Postby ElBrunzy » 2018-11-29 @ 19:53

OPLx wrote:I took a very quick look and found out that MWOPL.VGM has information that says that SN76489 data is present. I think what I need to change is to only enable chips that were detected or forced; so in this case SBVGM will still "play" MWOPL.VGM but there will not be any audio when the -C option is present because of the incorrect tagging of the SN76489 information.

I read that the vgm format support many hardware into one music : it can record a practically unlimited number of sound hardware changes per sample. so it's only mwopl.vgm music that make useless call to sn76489 hardware, I understand we are not facing a bug but an unexpected operation.

Obviously your player should be the most flexible around the norm and not about workaround for "broken" music. So let's pretend we have a music that take advantage of two hardware supported by the SAA1099 [edit: not SAA76489] and OPLx (in reference of the opl2 and opl3 support, not the sbvgm author :lol:) it could be expected usage to use the automatic or -c switch to fully listen to it. But then it can get interesting to listen to only the parts of the music that use the saa or opl instruction with some forced hardware switch. But with the silent behavior you suggest I'm afraid some playlist might result in having alot of long silence one have to skip regularly. Maybe you could enforce a strict compliance switch that every hardware should be present to play a file otherwise it's auto-skipped ? Or the other way around with a relaxed switch that allow to play music even if not all hardware is present. Also, as you mentioned earlier we have to take in consideration the actual way the player work for the other users before adding anything. I really dont know anymore, maybe we could start with what you suggest and see what it gives.
Last edited by ElBrunzy on 2018-11-30 @ 23:47, edited 1 time in total.
User avatar
ElBrunzy
Member
 
Posts: 451
Joined: 2014-1-26 @ 03:50
Location: Quebec / Canada

Re: SBVGM (DOS) VGM Player

Postby OPLx » 2018-11-30 @ 02:20

ElBrunzy wrote:I read that the vgm format support many hardware into one music : it can record a practically unlimited number of sound hardware changes per sample. so it's only mwopl.vgm music that make useless call to sn76489 hardware, I understand we are not facing a bug but an unexpected operation.

Obviously your player should be the most flexible around the norm and not about workaround for "broken" music. So let's pretend we have a music that take advantage of two hardware supported by the SAA76489 and OPLx (in reference of the opl2 and opl3 support, not the sbvgm author :lol:) it could be expected usage to use the automatic or -c switch to fully listen to it. But then it can get interesting to listen to only the parts of the music that use the saa or opl instruction with some forced hardware switch. But with the silent behavior you suggest I'm afraid some playlist might result in having alot of long silence one have to skip regularly. Maybe you could enforce a strict compliance switch that every hardware should be present to play a file otherwise it's auto-skipped ? Or the other way around with a relaxed switch that allow to play music even if not all hardware is present. Also, as you mentioned earlier we have to take in consideration the actual way the player work for the other users before adding anything. I really dont know anymore, maybe we could start with what you suggest and see what it gives.

Thanks to your requests, you managed to expose a bug in the program! :-) If someone tried to play MWOPL.VGM on a Tandy 1000, the current version of SBVGM will still attempt to write to the OPL2 which is incorrect as data should only be sent for hardware that is actually present. So when MWOPL.VGM reports the presence of YM2413 and SN76489 and we tell SBVGM we want to hear only the SN76489 data (but there is actually none), then silence is the correct (though not desirable) result. A good example is the Sonic the Hedgehog VGM data. PCs (at least outside of Japan) didn't have the YM2612 chip and when playing these VGMs you'll only hear the SN76489 portion, but depending on where the SN76489 data is played in those files, there will only be silence until the SN76489 data is played.

In regards to your suggestion. In the present VGM format, to my knowledge, the only way to know if there is actually SN76489 data is to examine all the commands in the VGM before attempting to play. This could introduce longer delays before playback and trying to resolve the problem by having SBVGM attempt to workaround bad data of this nature is not the proper way; the right solution is to fix the bad VGM data. I think there might be tools to do this, but I am not 100% sure.
OPLx
Member
 
Posts: 133
Joined: 2014-2-15 @ 17:02

Re: SBVGM (DOS) VGM Player

Postby ElBrunzy » 2018-11-30 @ 04:39

Yes I can do that with vgmtool 2. I'll fix my miracle warrior soundtrack. But I encourage you go on with your idea and make that sbvgm wont use another hardware if forced. I'll keep a bogus version of that soundtrack to test it if you ever do it.

I couldn't help myself but to upload a screenshot of vgmtool 2 because I find the little Alex Kidd head on the [Header] tab just too cute *^_^*
vgmtool.png
I remember I used that tool to make a .vgm rip version of the ninja gaiden trilogy .nsf for your player.
User avatar
ElBrunzy
Member
 
Posts: 451
Joined: 2014-1-26 @ 03:50
Location: Quebec / Canada

Re: SBVGM (DOS) VGM Player

Postby Fox Mulder » 2018-11-30 @ 08:53

OPLx wrote:
Fox Mulder wrote:Hello. Would somebody be so kind as to provide me with an alternate download link? The website has been dead for some days now, it seems. Thank you.

Hello, sorry about the inconvenience. I'm currently getting some DNS issues worked out with my ISP. You can download the most recent version here for the time being: SBVGM125.ZIP


Thank you! :blush:
User avatar
Fox Mulder
Newbie
 
Posts: 2
Joined: 2018-11-23 @ 06:54
Location: Argentina

Re: SBVGM (DOS) VGM Player

Postby OPLx » 2018-12-13 @ 02:40

ElBrunzy wrote:Yes I can do that with vgmtool 2. I'll fix my miracle warrior soundtrack. But I encourage you go on with your idea and make that sbvgm wont use another hardware if forced. I'll keep a bogus version of that soundtrack to test it if you ever do it.

I couldn't help myself but to upload a screenshot of vgmtool 2 because I find the little Alex Kidd head on the [Header] tab just too cute *^_^*
vgmtool.png
I remember I used that tool to make a .vgm rip version of the ninja gaiden trilogy .nsf for your player.

Glad you could fix it! Whoever made that tool was really having fun making it. :-D
OPLx
Member
 
Posts: 133
Joined: 2014-2-15 @ 17:02

Re: SBVGM (DOS) VGM Player

Postby OPLx » 2018-12-13 @ 02:41

Fox Mulder wrote:
OPLx wrote:
Fox Mulder wrote:Hello. Would somebody be so kind as to provide me with an alternate download link? The website has been dead for some days now, it seems. Thank you.

Hello, sorry about the inconvenience. I'm currently getting some DNS issues worked out with my ISP. You can download the most recent version here for the time being: SBVGM125.ZIP


Thank you! :blush:

You're welcome!
OPLx
Member
 
Posts: 133
Joined: 2014-2-15 @ 17:02

Re: SBVGM (DOS) VGM Player

Postby p166s » 2019-2-14 @ 06:16

I'm experiencing a bug where the latest version (1.26) doesn't detect my PnP Sound Blaster 16 no matter what I do.
It just says:
Code: Select all
SBVGM v1.26 by OPLx

Searching for sound hardware ...
* None!

My BLASTER variable is the usual A220 I5 D1 H5 P330 T6
I tried both the 16 and 32 bit versions, in DOS (no memory manager) and in windows 98, specifying -a388 and/or -sb220 does not help.
Versions 1.25 and below work just fine.
User avatar
p166s
Newbie
 
Posts: 5
Joined: 2019-2-12 @ 16:45

Re: SBVGM (DOS) VGM Player

Postby OPLx » 2019-2-14 @ 22:36

p166s wrote:I'm experiencing a bug where the latest version (1.26) doesn't detect my PnP Sound Blaster 16 no matter what I do.
It just says:
Code: Select all
SBVGM v1.26 by OPLx

Searching for sound hardware ...
* None!

My BLASTER variable is the usual A220 I5 D1 H5 P330 T6
I tried both the 16 and 32 bit versions, in DOS (no memory manager) and in windows 98, specifying -a388 and/or -sb220 does not help.
Versions 1.25 and below work just fine.

Thank you for letting me know about this bug. It looks like fixing one bug introduced another. :-( I will take a look soon and let you know.
OPLx
Member
 
Posts: 133
Joined: 2014-2-15 @ 17:02

Re: SBVGM (DOS) VGM Player

Postby OPLx » 2019-2-16 @ 00:32

@p166s The bug turned out to be in the auto-detection of the OPL3 chip (I'm usually testing with hardware that has an OPL2 chip). I've fixed it and you can download v1.27 from here
Thank you again for letting me know about it.
OPLx
Member
 
Posts: 133
Joined: 2014-2-15 @ 17:02

Re: SBVGM (DOS) VGM Player

Postby digress » 2019-6-11 @ 16:49

I would love to add vgm playback to a tandy 1000 game I am making. Is there a c++ library by chance? It sounds great on the tandy vgm 's I played with it.

OPLx wrote:In case anyone is interested, I recently released a VGM player for DOS that can be downloaded here.

Supported Sound Hardware
  • IBM PCJr
  • Tandy 1000
  • Tandy Sound (SN76489) Adapter
digress
Newbie
 
Posts: 3
Joined: 2019-6-11 @ 16:04

Re: SBVGM (DOS) VGM Player

Postby OPLx » 2019-6-12 @ 01:29

digress wrote:I would love to add vgm playback to a tandy 1000 game I am making. Is there a c++ library by chance? It sounds great on the tandy vgm 's I played with it.


Unfortunately there currently isn't a library available. I haven't done any timings per se, but I would reckon that the amount of CPU time used for playback wouldn't make it suitable for games on top of the additional overhead incurred with the decoding VGM format which I don't get the impression that it was made for in-game use. @scali made a VGM player that pre-processes the VGM format to something more efficient for playback on older hardware (SBVGM supports exporting to this format), but I'm not sure how well it would be suited for games (though he did use it in a intro he released a while back).

It would take a little bit more work, but SnevenTracker might be a more viable option in terms of using the "Export text" option and writing a converter to transform the data into a useful format for playback on actual hardware. The only caveat with SnevenTracker is that you may have to replace the SN76489 emulator with an emulator that supports the Tandy 1000 variant of the chip.

There is also SnoozeTracker ... but I think SnevenTracker would be the better choice in this situation.
OPLx
Member
 
Posts: 133
Joined: 2014-2-15 @ 17:02

Re: SBVGM (DOS) VGM Player

Postby Scali » 2019-6-12 @ 07:23

OPLx wrote:@scali made a VGM player that pre-processes the VGM format to something more efficient for playback on older hardware (SBVGM supports exporting to this format), but I'm not sure how well it would be suited for games (though he did use it in a intro he released a while back).


If you would use my routine as-is, then it depends on 2 things:
1) What kind of timing does your game require?
2) What kind of music do you intend to play?

For 1), the 'issue' is that my routine uses the system timer to be able to play back any kind of VGM data, including samples, up to 44.1 kHz. If your game requires the system timer as well, this would be a problem (unless you target AT systems and can get away with using the secondary timer of the AT chipset). If your game does not require any specific timing, or you can get away with synchronizing the game on polling the vsync status, then you could use it as-is.

This brings us to 2). Most games use music that is synchronized to the display refresh. This means that you wouldn't necessarily require a system timer dedicated to the music. You could just make sure that the audio routine is called once per frame (eg during the vsync interval). With some simple modifications, my routine can be used in this way.
A big problem specific to the PC platform however, is that the refresh rate of Hercules is 50 Hz, CGA/EGA is 60 Hz and VGA is 70 Hz (although you can program custom 50 Hz and 60 Hz modes on VGA). So you can't make a single piece of music that is synced to the display refresh for all possible adapters.

Another possible issue is sound effects. VGM is very raw low-level data. If you stick to music that only uses 3 of the 4 channels, then you'd have one channel free for sound effects. Otherwise, you'd need to add logic that allows you to 'mute' one or more of the channels while your sound effect plays.

VGM is also not the most size-efficient format, so if you want to target machines with just 128k or such, you would only be able to play relatively short pieces of music before you run out of memory (I added disk streaming to my player for that reason, but that might not be too practical for a game. It also doesn't work on a real PCjr because it doesn't have a DMA controller. I think the same goes for the original Tandy 1000). Adding LZ4 compression could help there though. The data tends to compress really well. But currently there is no support for this in my player.
Scali
l33t
 
Posts: 4109
Joined: 2014-12-13 @ 14:24

Re: SBVGM (DOS) VGM Player

Postby digress » 2019-6-13 @ 00:23

ok.

Their is a c library that does vgm playback for colecovision that I've been using
it supports muiltiple music songs in 1 compressed file
colecovision has Texas Instruments SN76489A PSG which is similar to the tandy and the sega master system

it updates during the video blank 60 times per second and it works well during game play.

colecovision has 1kb of ram and the z80 is 3.58mhz
digress
Newbie
 
Posts: 3
Joined: 2019-6-11 @ 16:04

Re: SBVGM (DOS) VGM Player

Postby OPLx » 2019-6-13 @ 06:39

digress wrote:ok.

Their is a c library that does vgm playback for colecovision that I've been using
it supports muiltiple music songs in 1 compressed file
colecovision has Texas Instruments SN76489A PSG which is similar to the tandy and the sega master system

it updates during the video blank 60 times per second and it works well during game play.

colecovision has 1kb of ram and the z80 is 3.58mhz

Which library is this? The only one I know of is mentioned here VGM Compression Tool. That library doesn't use the VGM format as-is, but does some pre-processing and then compression on the data to make it more compact; this is similar to @scali's PRE format (but no data compression). SBVGM just uses the VGM data as-is (with no pre-processing) hence the greater overhead. Using a library (such as the one in the link) which re-arranges the data to remove the processing overhead would definitely work for your needs.
OPLx
Member
 
Posts: 133
Joined: 2014-2-15 @ 17:02

Re: SBVGM (DOS) VGM Player

Postby digress » 2019-6-13 @ 20:34

that's the same one i use. it works well. you're correct it's pre processing the vgm files in another form.

i used it to play the same songs files on the coleco as your tandy vgm player and it sounded identical.

I might have to bug tursi to get it converted to work on the tandy . Ideally under turbo c++ which is what i'm using.

Basically I am converting a colecovision game already written in c over to the tandy 1000. I got the graphics part coming along well enough.
digress
Newbie
 
Posts: 3
Joined: 2019-6-11 @ 16:04

Re: SBVGM (DOS) VGM Player

Postby Scali » 2019-6-13 @ 21:08

digress wrote:I might have to bug tursi to get it converted to work on the tandy . Ideally under turbo c++ which is what i'm using.


It shouldn't be very difficult. The SN76489 only has a single register, which is mapped to port C0h on PCjr/Tandy machines.
So you'd just have to replace the code that writes to the Coleco's SN76489 register with code that writes the same data to port C0h. Probably just means changing 1 or 2 lines.

And there's already a feature to mute channels to play sound effects, so you have that part solved as well.

Oh, there's one more thing you need to do, and that is program the 'multiplexer', which controls which audio is routed to the output.
This can be done with a simple BIOS call, int 1Ah, ah=80h, where you pass the audio source in register al, where '3' is the value for the SN76489.
Code: Select all
   // Audio Multiplexer is Int1A AH=80 AL=Audio source (0=PC speaker, 1=Cassette, 2=I/O channel "Audio In", 3=SN76496).
   union REGS in, out;

   in.h.ah = 0x80;
   in.h.al = 3;
   int86(0x1A, &in, &out);
Scali
l33t
 
Posts: 4109
Joined: 2014-12-13 @ 14:24

Previous

Return to Release Announcements

Who is online

Users browsing this forum: knowledge [bot] and 2 guests