madaxe wrote on 2020-02-22, 18:33:Hi everyone! […]
Show full quote
Hi everyone!
I'm coding a MS-Dos game that will support AdLib, Sound Blaster and CMS/Game Blaster (Philips SAA1099).
I'm making some tests with the SAA1099 and I can produce lots of great sounds but I can't set the envelope duration properly. I have tried different values for frequency and octave of the channel 1 (I assume a 0-5 channel number) and in fact the length of the envelope varies but it's always very short. There is any way to produce long length envelopes like we do in AY-3-8912?
By the way, what is the meaning of the bit 5 (external/internal clock) and bit 4 (16/8 bit resolution) on the envelope registers?
Note: I am using DOSBox with the Game Blaster option.
Thanks in advance,
José Mário aka Madaxe.
The envelope generator emulation under DOSBox doesn't work properly so you will have to test that on actual hardware. The present implementation assumes that in order to use the envelope generator, it is necessary to enable it and also enable the frequency generator on the corresponding channel. On actual hardware, it's possible to enable just the envelope generator's waveform and not have the channel's square wave mixed in with the final output.
Bit 4 affects the effective frequency range (pitch) of the envelope generator; if you want to get very low pitches leave it clear and for the "normal" pitch ranges set it. I could never figure it out how, but I think Bit 5 can be used to supply a custom envelope shape to the generator.
The best usage of the SAA1099 has been on the Sam Coupe hardware platform. While the envelope generators on the SAA1099 aren't as varied as the AY-3-8912, I think there are some interesting things that can be done with the chip.
You can download the CMSVIEW program I made a while back to play around with the register settings (for the first three channels on the SAA1099) to get a feel for what the chip does (apart from the usage of Bit 5) here.