VOGONS


First post, by Deksor

User metadata
Rank l33t
Rank
l33t

Hi everyone.

I am currently writing a program that will use the CMS chips to produce sounds/music. However I noticed something : creative's documentation shows that the CMS chips have frequency control and noise generators and that's it. However when you look at Phillips' documentation, it appears there are also two "envelope generators" https://html.alldatasheet.fr/html-pdf/155677/ … 13/SAA1099.html

So I wrote a program that programs this register, and I tested it in DOSBox. And it works !

But since emulators aren't the best when you want to really make sure it works, I took my 386SX which have a Creative Sound Blaster 2.0 with CMS chips (and they work, no problem here), but there, it doesn't change ANYTHING at all ...

I've tested the other functions of my program which controls the tone, octave, noise, etc and this works as well on the Sound Blaster 2.0, but not this "undocumented" feature.

So now I'm unsure : is Creative's documentation "incomplete" because the way the Sound blaster communicates with the CMS chips that doesn't allow you to touch these registers, is this just a bug of the Sound Blaster 2.0 (or Sound blasters in general and something that would work on an original Game Blaster) or is there just something wrong with my program ?

Has anybody tried to do this before ?

Trying to identify old hardware ? Visit The retro web - Project's thread The Retro Web project - a stason.org/TH99 alternative

Reply 2 of 11, by Deksor

User metadata
Rank l33t
Rank
l33t

Here you go

The attachment envelope.zip is no longer available

This is a really basic test, all it's supposed to do is to output a tone, then turn on the envelope control of the generator 0 by setting 1000 0000 in the 0x18 register, and then it tests 8 settings (bits En1 to En3).

In dosbox this has an effect. On my sound blaster 2.0, it does nothing at all to the tone 🙁

I have yet another idea why it doesn't work, maybe, maybe that's because I'm improperly using the chip, which for an emulator works, but not with the real deal (like you have to set things in a specific order, etc), though I don't need to do any of that for other functions so I doubt this is valid

Also, your card must be on address 0x220 (if not, tell me, I'll change my program ^^)

Trying to identify old hardware ? Visit The retro web - Project's thread The Retro Web project - a stason.org/TH99 alternative

Reply 10 of 11, by Scali

User metadata
Rank l33t
Rank
l33t

Anyway, afaik all CMS/SB cards use original Philips SAA1099 chips. My clone certainly does, I bought them and put them on there myself 😀
So unless something strange is going on in the handling of commands sent to the chip, the envelopes should work.
I could have a try writing some code myself.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 11 of 11, by OPLx

User metadata
Rank Member
Rank
Member
Deksor wrote:
Here you go […]
Show full quote

Here you go

envelope.zip

This is a really basic test, all it's supposed to do is to output a tone, then turn on the envelope control of the generator 0 by setting 1000 0000 in the 0x18 register, and then it tests 8 settings (bits En1 to En3).

In dosbox this has an effect. On my sound blaster 2.0, it does nothing at all to the tone 🙁

I have yet another idea why it doesn't work, maybe, maybe that's because I'm improperly using the chip, which for an emulator works, but not with the real deal (like you have to set things in a specific order, etc), though I don't need to do any of that for other functions so I doubt this is valid

Also, your card must be on address 0x220 (if not, tell me, I'll change my program ^^)

It's been a while since I've played around with the envelope generators, but the present version of DOSBox has a bug on how they are activated. On actual hardware, using the mixer one has the option to allow the envelope shape only to be output or it can be mixed with the square wave. I think the current version of DOSBox seems to only work when both the envelope shape and square wave outputs are set. You might be able to play around with the envelopes on real hardware using CMSVIEW that I wrote. It's located on this thread: CMS/GameBlaster emulation thread.

I haven't had a chance to take a look at your program, but let me know if you are still having trouble if using CMSVIEW doesn't help.