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 name | aliases | Actual product |
---|---|---|
bleeper | speaker, pcspeaker | PC Speaker |
tandy | tandy1000, pcjr | Tandy 1000 / IBM PCjr. |
adlib | AdLib Synthesizer | |
cms | gameblaster | CMS GameBlaster |
sb10 | Sound Blaster 1.0 | |
sb15 | Sound Blaster 1.5 | |
sb20 | Sound Blaster 2.0 | |
sbpro | Sound Blaster Pro | |
sbpro2 | sbpro20 | Sound Blaster Pro 2 |
sb16 | Sound Blaster 16 | |
sbawe32 | awe32 | Sound Blaster AWE32 |
mt32 | mt-32 | Roland MT-32 |
lapc1 | lapci | Roland LAPC-I |
mpu401 | mpu-401 | Roland MPU-401 |
sc55 | sc-55 | Roland SoundCanvas 55 |
scc1 | scc-1 | Roland SCC-1 |
covox | disney | COVOX SpeechThing, Disney Sound Source |
gus | ultrasound | Gravis UltraSound |
gusmax | ultrasoundmax | Gravis 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.
Setting | Explanation |
---|---|
device | One of the devices from the table above. |
io | The device’s base I/O port. |
dma_low | The 8-bit DMA channel for an ISA card. |
dma_high | The 16-bit DMA channel for an ISA card. |
irq_low | The 8-bit IRQ-line for an ISA card. |
irq_high | The 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.