Reply 160 of 548, by Scali
wrote:How would you do volume changes as register writes if the PCM data itself is written as a volume change on channel 0?
Ah yes, you're right... I forgot that in the case of the SN76489, the samples ARE the volume.
Yes, you'd need a translation table in between, which is not there.
wrote:One way to support streams on 8088 would be to pre-process by expanding the VGM file with stream commands into the original simple register log upon loading. But then we're back to the huge memory requirements. It could be done piece-by-piece though --- expanding 10 seconds ahead at a time, or so.
The problem is that the 8088 can only handle interrupts at about ~8-10 kHz speeds at best (depending on how complicated you make the actual handler).
This would leave little or no CPU left to expand data ahead of time. Which brings us back to the original problem that the VGM preprocessing tried to solve: A VGM capture of a game on 8088 at 4.77 MHz requires a faster CPU to replay.
I think it's a lose-lose situation: Either you have a routine that is generic, but requires a faster CPU, or you have a routine that is custom-made to only play the Hubbard songs. It wouldn't be 'true' VGM, because you'd make various assumptions, such as only one sample channel, and samples always smaller than 64k etc.
You'd basically just reimplement Hubbard's routine. In which case you might as well rip out the actual code from the games, since it would be the most compact and efficient solution.
wrote:I didn't know that you took over SBVGM from OPLx.
I haven't taken over. I had made my own VGM replayer, which in my case was more of a proof-of-concept to get sample playback working in realtime on an 8088 at 4.77 MHz, because I want to build my own toolset for a music system similar to Rob Hubbard's (except I don't want to be limited by a VBL-loop, so mine can run entirely on the timer interrupt, while graphics effects can be shown in the foreground).
OPLx and I decided to 'compare notes', since his player had problems with sample replay on real hardware, and my player didn't implement VGM very thoroughly.
So I shared my preprocessor with him. He could marry that to his more accurate VGM interpreter, and we'd do the actual playback with the stream processor that I had made (it can also support OPL2, OPL3, SAA1099 and even MPU401 and IMFC, all at the same time in theory... we had a thought of also introducing a VGM format for PC speaker, since that is still missing from VGM).