VOGONS


First post, by darry

User metadata
Rank l33t++
Rank
l33t++

or does it always mix at at 44.1kHz, like in native mode ?

Reply 1 of 5, by 640K!enough

User metadata
Rank Oldbie
Rank
Oldbie

The programmer's guide has the following to say on the matter:

The synthesizer register set is a superset of that used in the Advanced Gravis UltraSound (GUS) synthesizer. The GUS synthesizer processes up to 14 voices at 44.1 kHz, after which the frame rate slows by 1.6 μs per added voice. Because the InterWave synthesizer runs at 44.1 kHz even when all 32 voices are being used, the GUS-compatible mode allows matching the frame timing to that of the GUS synthesizer.

When GUS-compatibility mode is enabled (Enhanced Mode bit of the Synthesizer Global Mode register (SGMI[0]) set Low), a 44.1-kHz sampling rate is maintained only for 14 or fewer active voices. If a 15th voice is active, 1.6 μs is added to the sample period, resulting in a sampling rate of 41.2 kHz. This same process continues up to a maximum number of 32 voices, resulting in a minimum sampling rate of 19.4 kHz.

So, when properly initialised for compatibility mode, the InterWave will approximate the behaviour of the GF1.

Reply 2 of 5, by tpowell.ca

User metadata
Rank Member
Rank
Member
darry wrote:

or does it always mix at at 44.1kHz, like in native mode ?

I believe it depends on the application. If the game initializes the card with 32 active voices but only uses 4, you will unfortunately only have a 19kHz sampling rate.
I noticed this on Star Control II where the MODs are only 4 channels, and maybe 4 channels in reserve for sound effects, yet the sound quality on my GUS Pnp was far from what 44.1kHz would produce.

  • Merlin: MS-4144, AMD5x86-160 32MB, 16GB CF, ZIP100, Orpheus, GUS, S3 VirgeGX 2MB
    Tesla: GA-6BXC, VIA C3 Ezra-T, 256MB, 120GB SATA, YMF744, GUSpnp, Quadro2
    Newton: K6XV3+/66, AMD K6-III+500, 256MB, 32GB SSD, AWE32, Voodoo3

Reply 3 of 5, by darry

User metadata
Rank l33t++
Rank
l33t++

Thank you for the answers .

Would I then be correct in assuming that iwinit sets the "Enhanced Mode bit of the Synthesizer Global Mode register (SGMI[0])" to Low by default for compatibility and that native Interwave compatible applications would be expected to set it high upon detecting the enhanced hardware ?

Reply 4 of 5, by 640K!enough

User metadata
Rank Oldbie
Rank
Oldbie
darry wrote:

Would I then be correct in assuming that iwinit sets the "Enhanced Mode bit of the Synthesizer Global Mode register (SGMI[0])" to Low by default for compatibility and that native Interwave compatible applications would be expected to set it high upon detecting the enhanced hardware ?

That is the way that I would have designed it, but the programmer's manual states the exact opposite. It is worth noting that the programmer's manual has been wrong before, so we have no way to know if that's actually how the officially-released software behaves. If nobody gets to it before I do, I will write a bit of test code to see what the register values are following initialisation when I have time.

It is unclear if this has an effect on sound quality, but one assumes that it would. It is also unlcear at the moment if older UltraSound software writes to that register as part of its sound card initialisation, making the default value of the register rather unimportant. I have been wondering about this for a while; I just haven't bothered to investigate it yet.

Reply 5 of 5, by 640K!enough

User metadata
Rank Oldbie
Rank
Oldbie

From some brief testing, it looks like iwinit does indeed set SGMI[0] high, meaning that enhanced mode is enabled. As suspected, however, the default value of this bit doesn't seem to be particularly important. Native InterWave software always seems to set this bit as required for its use. Older software that is not InterWave-aware also seems to set this bit appropriately for its intended use, which has the effect of enabling frame expansion to approximate GF1 behaviour.

The exact mechanism by which the bit is cleared by older software is a bit of a mystery. It could be that most software issues a soft-reset to the card, re-establishing the hardware-default value of 0, or it could be that the old developer documentation listed that as "reserved, set to 0". I haven't bothered to check the old documentation, so wouldn't know for sure. This does leave the possibility that some software that was sloppily thrown together never bothered with the correct initialisation procedure, and distorted sound may result. If someone finds such software, a utility to set the registers to values appropriate for GF1 compatibility should be a fairly simple thing to write.

EDIT: It looks like my hypothesis was correct; properly-written legacy GUS software will issue a reset (likely via the URSTI register) as part of its initialisation of the card, thereby bringing the enhanced-mode bit back to 0. This means that GUS-compatibility mode is enabled (frame expansion, 1 MiB on-board DRAM limit, etc.) until and unless enhanced InterWave features are configured.