DOSContainer logo DOSContainer

Audio device configuration

📅 2025-05-08  · ✍️ Bas v.d. Wiel  ·  🏷 design

One of the most complicated aspects of DOS gaming used to be the support for a whole forest of different audio hardware. Initially the PC came with nothing beyond a simple speaker that was intended to produce simple square wave bleeps as a means of auditory feedback, like system alerts. As computers found their way into markets IBM had not envisioned, like gaming and music, lots of add-ons appeared that would readily slot into the supplied ISA-slots of the PC. DOSContainer intends to support the most relevant such hardware, primarily for gaming. If you think something important is missing, drop me a note!

Configuring a piece of audio hardware is done through the HwSpec TOML file for your collection. You can define multiple pieces of kit like so:

[[audio]]
device = "bleeper"

[[audio]]
device = "adlib"

Mind you, this is just you telling DOSContainer how to build your software collection. You can configure as many sound cards as you like, it’s not DOSContainer’s problem to actually get them working.

Supported devices

The table below tells you what’s supported and how to tell DOSContainer that you have it in your system. The device name is the preferred name for the device. Use it if you’re writing a new HwSpec file. Aliases are there to make DOSContainer just a bit forgiving when it comes to input validation.

Device namealiasesActual product
bleeperspeaker, pcspeakerPC Speaker
tandytandy1000, pcjrTandy 1000 / IBM PCjr.
adlibAdLib Synthesizer
cmsgameblasterCMS GameBlaster
sb10Sound Blaster 1.0
sb15Sound Blaster 1.5
sb20Sound Blaster 2.0
sbproSound Blaster Pro
sbpro2sbpro20Sound Blaster Pro 2
sb16Sound Blaster 16
sbawe32awe32Sound Blaster AWE32
mt32mt-32Roland MT-32
lapc1lapciRoland LAPC-I
mpu401mpu-401Roland MPU-401
sc55sc-55Roland SoundCanvas 55
scc1scc-1Roland SCC-1
covoxdisneyCOVOX SpeechThing, Disney Sound Source
gusultrasoundGravis UltraSound
gusmaxultrasoundmaxGravis UltraSound MAX

Hardware configuration

When you specify just a device in your HwSpec, DOSContainer will set it up with the factory defaults of the original device at the time. If your device is the only expansion to an otherwise bare-bones PC, chances are very good that things will simply work out of the box.

If, however, you need to tweak your hardware settings then we’ve got your back:

[[audio]]
device = "gus"
io: 220
dma_low: 1
dma_high: 5
irq_low: 5
irq_high: 11

The above example shows all the settings you can (currently) tweak.

SettingExplanation
deviceOne of the devices from the table above.
ioThe device’s base I/O port.
dma_lowThe 8-bit DMA channel for an ISA card.
dma_highThe 16-bit DMA channel for an ISA card.
irq_lowThe 8-bit IRQ-line for an ISA card.
irq_highThe 16-bit IRQ-line for an ISA card.

Originally, expansion cards and the PC’s they would slot into only had 8-bit ISA connectors. This would limit the number of interrupt lines the bus would support to 8: IRQ’s 0 through 7, of which only a few were available. The 8-bit IRQ that your sound card should use, is configured through the irq_low field. For many cards it’s the only IRQ that’s needed. A similar situation applies to DMA channels, where the emergence of the 16-bit AT-standard opened up additional pins on the ISA bus and additional DMA channels came with it.

Not all of these settings apply to every card. When configuring a card, treat the low setting as the primary or only IRQ or DMA. If you configure something nonsensical or conflicting, DOSContainer will not stop you.

General MIDI and niche synths?

Some games by Sierra On-Line support lots of esoteric MIDI hardware, like old consumer keyboards by Casio and the like. If you have one of those, pick mpu401 as the sound device here and it should just work as a placeholder for anything that outputs to external MIDI and you can twiddle its I/O address.

If you have something else with a MIDI Out, like a Sound Blaster, it’ll assume I/O address 330 for MIDI. If enough issues with this arise, I may add a specific setting for MIDI I/O but for now I’m deciding that this is too much of a corner case to handle.

Tags: