Comparing CMS emulation with hardware, which games support?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
jepael
Posts: 26
Joined: Sat Oct 25, 2008 8:16 pm

Comparing CMS emulation with hardware, which games support?

Post by jepael » Tue Feb 19, 2013 1:20 pm

I recently got a Sound Blaster with the Philips SAA1099 chips, and after writing some code for them, reading the datasheets and ScummVM CMS emulator source code, I noticed the emulation of some aspects might be implemented in a way that does not match the actual hardware.

So can anyone point me which games have the most complex audio support regarding CMS chips, for comparing with the actual hardware? Mainly I'd like to be able to test sounds with a volume envelope, and noise mixed with tone on the same channel.

Basically, I don't think the emulator should apply volume envelope to all channels, but only to one. And I believe using both noise and tone on a channel is not a pure sum of both but a logical operation between tone and noise bits. But I will have to verify these, and I'd be happy to supply any source code patches if I find anything that could be improved.

Oh and I cannot figure out if the sampling rate discrepancy has been fixed already, it seems at some point the pitch was too high. Is this still the case?

User avatar
LordHoto
ScummVM Developer
Posts: 1030
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Re: Comparing CMS emulation with hardware, which games suppo

Post by LordHoto » Tue Feb 19, 2013 3:57 pm

jepael wrote:So can anyone point me which games have the most complex audio support regarding CMS chips, for comparing with the actual hardware? Mainly I'd like to be able to test sounds with a volume envelope, and noise mixed with tone on the same channel.
I don't think any of the games we support uses the volume envelope of the SAA1099 chips.

Sound effects in SCUMM games might use noise and tone on the same channel.

The version of the SCI CMS driver we support does not use noise at all IIRC. It should be only use pretty basic things, so it is probably not interesting for your tests.

At any rate if you want to know more you should dig through the sources:
engines/scumm/player_v2cms.cpp
engines/sci/sound/drivers/cms.cpp
jepael wrote:Oh and I cannot figure out if the sampling rate discrepancy has been fixed already, it seems at some point the pitch was too high. Is this still the case?
This should still be the case IIRC.

jepael
Posts: 26
Joined: Sat Oct 25, 2008 8:16 pm

Re: Comparing CMS emulation with hardware, which games suppo

Post by jepael » Wed Feb 20, 2013 7:39 am

LordHoto wrote: I don't think any of the games we support uses the volume envelope of the SAA1099 chips.

Sound effects in SCUMM games might use noise and tone on the same channel.

The version of the SCI CMS driver we support does not use noise at all IIRC. It should be only use pretty basic things, so it is probably not interesting for your tests.
Thank you very much for the info, it does seem that SCI does not use those features and only the sound effects on SCUMM could ever take use of such feature. So there is not much benefit from improving the emulator in this case as the improvements could not be heard. I guess I have to seek some CMS games not supported by ScummVM then.

And it was interesting to see the reason SCUMM games do not use hardware envelopes, the sound system itself supports rapid updating of volume register to create envelopes on all channels (and frequency registers for vibrato).

How is that standalone Adlib music player of yours going, by the way?

User avatar
LordHoto
ScummVM Developer
Posts: 1030
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Re: Comparing CMS emulation with hardware, which games suppo

Post by LordHoto » Wed Feb 20, 2013 5:00 pm

jepael wrote:How is that standalone Adlib music player of yours going, by the way?
The standalone version is working.

Post Reply