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 1 of 11, by Beegle

User metadata
Rank Member
Rank
Member

I have a Game Blaster. If you give me a test program, I can record the output for you.
Maybe they cut some of the features when doing backwards compatibility with SB+CMS chips.

The more sound cards, the better.
AdLib documentary : Official Thread
Youtube Channel : The Sound Card Database

Reply 2 of 11, by Deksor

User metadata
Rank l33t
Rank
l33t

Here you go

Filename
envelope.zip
File size
11.23 KiB
Downloads
47 downloads
File license
Fair use/fair dealing exception

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 3 of 11, by Beegle

User metadata
Rank Member
Rank
Member

If the card is 220 by default I should be good.
Not sure if I have environment variables set for a CMS setup. Will verify and test during the weekend.

The more sound cards, the better.
AdLib documentary : Official Thread
Youtube Channel : The Sound Card Database

Reply 4 of 11, by Deksor

User metadata
Rank l33t
Rank
l33t

My program don't use any sort of autodection right now, it just writes to port 0x220

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

Reply 5 of 11, by Scali

User metadata
Rank l33t
Rank
l33t

I have a CMS clone card, but it is configured to port 0x240.
It might be possible that the SB 2.0 filters out some register writes. It passes through a GAL.

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

Reply 6 of 11, by Deksor

User metadata
Rank l33t
Rank
l33t

Here's a version targetting address 0x240 if you want to test it yourself ^^

Filename
envelope240.zip
File size
11.23 KiB
Downloads
45 downloads
File license
Fair use/fair dealing exception

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

Reply 8 of 11, by Deksor

User metadata
Rank l33t
Rank
l33t

So it behaves the same as my Sound Blaster 2.0 ... Interesting ...

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

Reply 9 of 11, by Beegle

User metadata
Rank Member
Rank
Member

Unless the envelope effect is very subtle, I can't hear it either on a real CT1300B.
Just a constant low buzzing note for the couple of seconds.

The more sound cards, the better.
AdLib documentary : Official Thread
Youtube Channel : The Sound Card Database

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.