The other day I pulled an old ThinkPad 770X (300 MHz Pentium II, good old 440BX chipset, released in late 1998) out of the closet to see if it still works. It does, but I had the terrible idea to get audio support (Crystal Audio CS4239 chip) working in DOS and OS/2. That turned out to be far more difficult than it should have, thanks to Plug and Play.
The laptop has DOS, Windows 98 SE, and OS/2 installed. I never even considered that there might be something physically wrong with the audio chip because it works fine under Windows 98. But it just would not work under OS/2, and when I tried installing audio support in DOS/Windows 3.1, it wouldn’t work either.
As an aside, the ThinkPad 770X actually has two audio chips: Crystal CS4239, an ISA PnP audio controller with Windows Sound System (WSS) and Sound Blaster compatibility, as well as an OPL3-compatible FM synthesizer. The 770X additionally has a Crystal CS4610 PCI audio accelerator, essentially a DSP capable of multi-channel mixing or MPEG-2 audio and AC3 decoding. The output of the CS4610 chip is routed to the CS4239’s codec. For the problem at hand, the CS4610 is not really relevant as it’s not used by OS/2, Windows 3.1, or DOS.
I tried three slightly different sets of OS/2 Crystal Audio drivers: The ones that came with the OS (MCP2), the ones that Lenovo still kindly offers on their site, and another set from the web. The driver that comes with MCP2 is dated newer than the one from Lenovo (version 2.08), but is in fact an older version (1.x) with a slightly different structure. The set that I randomly downloaded somewhere is a slightly newer version (2.09) of the drivers that IBM/Lenovo provided.
All the OS/2 driver sets have essentially the same problem: They see that a Crystal chip is there, but can’t set it up. The DOS/Windows 3.1 drivers from IBM/Lenovo have that trouble as well, just with slightly different error messages.
A rather bizarre conundrum is the fact that under DOS, Sound Blaster emulation works but not the native Crystal drivers. In practice that means DOS games work with Sound Blaster audio, but the native Windows 3.1 crystal drivers refuse to load. What gives?
One OS/2 driver set offered a clue in the form of the following error message:
RM: IRQ 65535 (Resource Conflict)
Now, 65535 is obviously -1 in 16-bit two’s complement arithmetic, probably indicating an erroneous or unassigned interrupt. Googling that error message found someone who not only had the exact same problem 18 years earlier, but actually solved it.
The other person had a slightly newer Thinkpad 770Z, but my 770X has the exact same Crystal CS4239/CS4610 audio chips and clearly also the same problem, namely Plug and Play.
PnP Audio Hell
I have had enough run-ins with ISA PnP sound cards over the years that I hate them with a passion. The trouble with audio and especially Sound Blaster audio is that there is no real plug and play. Software, especially DOS games, tends to be very inflexible; I/O base 220h, DMA 1, and IRQ 5 or 7 is generally supported (Creative’s old Sound Blasters defaulted to IRQ 7, newer ones to IRQ 5, which is why both values are well supported). Going anywhere beyond that is iffy and may or may not work.
The gist of the problem is that in theory audio is configurable with a wide range of I/O bases, IRQ lines, and DMA channels, but in practice it is much, much closer to VGA or IDE fixed resources. For most likely historical reasons, audio did not get the same special treatment as VGA or IDE, presumably because it is not as critical to system operation (which, together with very problematic DMA support, makes Sound Blaster emulation on PCI cards another special circle of hell).
The upshot is that audio is a non-essential PnP function, and ISA PnP never seems to have functioned all that well outside of perhaps Windows 9x.
One of the best solutions/hacks for ISA PnP audio I’ve seen was on Terratec’s EWS64 cards. These are fully ISA PnP devices, but instead of offering a range of resources and letting the BIOS/OS configure them, they have an EEPROM which can be configured to provide one configuration to the PnP manager—exactly the one the user desires. While that certainly violates the spirit of PnP, it actually works very well in practice.
ThinkPad 770X Audio Configuration
The 770X seemingly has absolutely no PnP-related configuration options in its BIOS setup. But only seemingly, as that old newsgroup posting made me realize. There is an option called Quick Boot; the 770X User Guide notes the following: “If you are going to use a non–Plug and Play–capable operating system, disable this function so that the BIOS will configure hardware resources.”
This option is normally called “Boot Non-PnP OS” or something similar in conventional BIOS setups. IBM made it much less obvious but it still does the same thing: When Quick Boot is enabled, the BIOS only sets up critical devices (disk, video) and leaves everything else, including audio, disabled. The manual is clear that when using DOS or OS/2, the Quick Boot option needs to be turned off. So I disabled it (by default it’s enabled)… and it made absolutely no difference.
Now, there are other audio configuration options, but those are not in the BIOS setup. They are accessible through the PS2 utility (old naming that goes back to the original Microchannel PS/2 branded ThinkPads). Said utility can enable or disable the audio chip and set the I/O base addresses, IRQs, and DMA channels.
I checked everything in the PS2 utility and found no obvious problem, everything was supposedly correctly configured and enabled. Yet DOS and OS/2 were still completely unconvinced. Notably the OS/2 Resource Manager (RM) did not show any trace of the audio device.
Finally I read through the old discussion again. There was a suggestion to “initialize” the BIOS settings, in addition (or perhaps prior to) turning off Quick Boot. So I did that, and lo and behold—or maybe hear, hear!—there was audio! Suddenly both DOS/Windows 3.1 and OS/2 audio started working.
I am not at all sure what initializing the firmware configuration did, but it did something. Whatever it was, it sounds good. The ThinkPad 770X user manual only says that the “Initialize button sets all device settings to their default values”. What those device settings might be or what the default values are is anyone’s guess.
Another win for Plug and Pray…