Notes on Sound Blaster ISA hardware ----------------------------------- In the world of PC hardware, Sound Blaster cards were the market leader in terms of install base. There are three different types of Sound Blaster cards which interest us. The types are derived from the BLASTER environment variable from DOS. We discuss the non-Vibra and non-PCI types only, because compatibility was really suffering with those. T1 = CT-1310 (SB 1.0, DSP 1.x: 1.05), CT-1320 (SB 1.5, DSP 1.x: 1.05) T2 = CT-1330 SB Pro (DSP 3.00?) T3 = CT-1350 SB 2.0 (DSP 2.x: 2.01) T4 = CT-16x0 SB Pro 2 (DSP 3.x: 3.01/3.02) T6 = CT-17xx, CT-22xx, CT-27xx, CT-28xx SB16 (DSP 4.x: 4.01/4.04/4.05/4.11/4.12+) T1 and T3 both have a single OPL2 chip. T1 and T3 have sockets for SAA1099 Game Blaster (CT-1300) chips. CT-1310 comes with SAA1099 chips installed. OPL2 chip can be read/written at 0x228-0x229 or 0x388-0x389 for Ad Lib compatibility. Writing 0x220-0x221 will access the first SAA1099 chip, and writing 0x222-0x223 will access the second. Writing to 0x220-0x223 on T1/T3 with no GB chips causes a hang on the real hardware. Therefore, not only must T1/T3 be checked, but also the user must deliberately enable GB support in the application to be safe. T2 has two OPL2 chips, one on the left and one on the right channel. Reading/writing 0x220-0x221 will access the first, and reading/writing 0x222-0x223 will access the second. Writing to 0x228/0x229 or 0x388/0x389 will perform the write to both chips, providing backwards compatibility for the previous mono FM cards. Reading from 0x228 or 0x388 will read from the first chip. T4 and T6 have one OPL3 chip. The OPL3 powers up in OPL2 compatibility mode. Writes to either bank of the OPL2 will result in an output on both channels. The OPL3 has 4 ports and is mapped at 0x220-0x223 and 0x388-0x38b. Half of the OPL3 is available at 0x228-0x229. The status register is accessed at 0x220, 0x228, or 0x388. In OPL3 mode, all 4 ports are used, so only 0x220-0x223 and 0x388-0x38b are useful ranges. The OPL2<->OPL3 mode can only be changed by accessing the second bank. Note on mixers: T2 and T4 also have a special setting in the mixer chip for stereo 8-bit audio. T1/T3 do not have stereo, and T6 does not implement this setting. Because T2 and T4 do not have 16-bit DMA, the stereo samples are read in an interleaved format specific to the CT-1345 mixer chip. T6 does not use this mixer chip and thus does not support this hack (though it has a backwards-compatible mixer mapping in other regards). This means that software programmed for a T2/T4 will sound incorrect on a T6 if it uses a stereo output stream. (The output stream will sound mono, and slightly garbled.) The only stereo mode on a T2/T4 that is also supported with T6 cards is 8-bit auto-init DMA mode, but few T2/T4 applications use this mode because it was not documented until SB16 SDK was released. The CT-1345 also has filters that are omitted in later mixers. Note on MIDI: All cards except T6 support only SB-MIDI (through the DSP). T6 supports SB-MIDI along with MPU-401 UART mode on port 0x330. UART mode requires a DSP >= 2.00, which T6 has. SB 2.0 is reported to have "full duplex midi with time stamp and 64 byte FIFO" whereas earlier versions have only half duplex MIDI. Notes on errata: Some SB 1.0/1.5 clones erroneously return a DSP revision of 2.00. Some SB16 SCSI-2 cards (DSP 4.11, 4.12) have a problem communicating with the daughterboard, resulting in stuck MIDI notes or wrong instruments when using the daughterboard and playing audio simultaneously. This is because the daughterboard does not receive all the MIDI commands that the application is sending. Later DSP revisions (4.13+) don't exhibit this problem, and even an earlier (4.05) revision does not exhibit this problem. DSP 4.01 and 4.04 have bugs related to playback hanging, and noise in 8-bit sample playback. Only T6 DSP 4.04 or later has full duplex audio support (playback and record one 8-bit and one 16-bit stream at a time). To sum up: T6 is compatible with T4 OPL3 and T1/T3 single OPL2 at all ports. T2 is the only card to have two OPL2 chips, and nothing else is thus compatible with it. The best thing to be done is emulate the two OPL2 through OPL3 stereo settings. T2 and T4 are the only non-AWE cards to have filters and a special stereo mode on their mixer; nothing else is compatible with them and stereo software designed for T2 and T4 will produce wrong sounds on T6. T1 and T3 are the only cards with SAA1099 chips/sockets. T6 (SB16/AWE) is the only card with a MPU-401 UART (0x330). T6 (SB16 and some specific AWE32) is the only card where the "CSP" 12 MIPS DSP chip is available. T6 (AWE32/64) are the only cards with a EMU-8000 150 MIPS DSP (0x620). A standalone EMU-8000 card (CT-1920, CT-1924) is provided. Creative provides a redirector (AWEUTIL) that sends MPU-401 accesses to port 0x330 to the EMU-8000, and emulating the MIDI interface. In this way, software which is programmed to use a General MIDI synthesizer through the MPU-401 UART can play sound through the EMU-8000 chip. Only the AWE32 has a 26-pin internal MIDI synthesizer upgrade header ("wave blaster"), not AWE64. T6 (AWE32/64) comes with 512KB RAM. AWE64 Gold comes with 4MB RAM. AWE32 can be upgraded to 28MB with two 16MB 30-pin SIMMS that are 80ns or faster. (4MB of address space is reserved for ROM, even though the EMU-8000 is only shipped with 1MB ROM.) When a AWE32 upgrade is applied, the onboard memory is disabled. The standalone EMU-8000 cards and certain AWE32 variants come with _no_ RAM onboard (upgradable to 28MB). AWE64 can be upgraded with proprietary Creative RAM. Creative supplied 2MB, 4MB, 8MB, 16MB, and 24MB upgrades. It is possible to use standard SIMMS to provide a 16MB upgrade to a AWE64, with Jeff Briden's adapter: (http://web.archive.org/web/19990219231113/www.basec.net/~jbriden/) When a AWE64 is upgraded, the onboard memory is still used. The RAM is used for GS and MT32 emulation and for storing samples for the EMU-8000 chip. The EMU-8000 can play 32 samples at once, but only 30 are actually available (the other two voices are used for the [digital] connection of the OPL3 FM synthesizer, and are also used for refreshing RAM). A software synthesizer (WaveGuide) was provided for 32 more voices with a AWE64, but this is pointless to mention as it has nothing to do with the hardware. On AWE32, the SPDIF connector only carries output from the EMU-8000 chip (and the OPL3 synthesizer, which is rather noisy when enabled). On AWE64, the SPDIF connector carries digital audio as well. The SPDIF interface is an unbuffered TTL interface. The AWE32/64's digital audio is 18-bit, while the AWE64 Gold's digital audio is 20-bit. So much for "SB Compatibility" that clone cards would advertise - even the whole SB family is not compatible with itself. Only the DSP revisions are backwards compatible, and OPL3 is backwards compatible with _single_ OPL2, and the whole family supports half duplex SB-MIDI. So the most compatible thing to do is use the 8-bit PCM/ADPCM mono auto-init DMA method of playing sounds (compatible with T2/T3/T4 and T6 as well as clones), use a OPL2 at 0x388 (compatible with all SB cards as well as Ad Lib), and use SB-MIDI for sending MIDI data to an external module only. This is a very limited feature set and basically represents what was available in T3. But every time Creative added new features to their hardware, in later hardware they would remove support for the previous generation's new features, so the features of T3 and T6 happen to be the most widely supported features of the SB family. All of the AWE cards' hardware were backwards steps from the very first AWE32, except arguably the AWE64 Gold. The Gold uses proprietary RAM, has no CSP and no 26-pin upgrade connector, and requires PnP support in the OS. However, the AWE32 cannot output normal audio via SPDIF and has only 18-bit SPDIF support at best. Unless top SPDIF support is the only objective, an original AWE32 is a more flexible card than any AWE64. Relevant files: sbmpu.exe: Fix for MPU-401 support on SB16 for certain games sbalib.exe: SB-SOUND.COM driver for old AdLib games cspu.exe: Advanced Signal Processing upgrade