QEMU Ad Lib MIDI in Windows 3.1x
After much head scratching, I finally got retro MIDI sound working in Windows 3.11 and PC DOS 7 in QEMU! Wow, that was a mouthful. Here’s how you do it, with a caveat.
In its default
./configure-ation, QEMU emulates a Sound Blaster 16 card which can be detected and used in Windows 3.1 with the bundled Windows Sound Blaster 1.5 drivers. Unfortunately, with MPU401 disabled this means no MIDI support, on any guest OS. As of writing this post, there’s no way around this.
Fortunately, QEMU also emulates Ad Lib, that early generation sound system that pre-dated SoundBlaster and has rudimentary MIDI support. Like SoundBlaster, Windows 3.11 can also use it out of the box without additional drivers.
As a caveat: if you install any drivers for Sound Blaster before or after doing this, Ad Lib apparently loses control of MIDI and subsequently you don’t hear anything. I’ve yet to find a workaround for this, but as soon as I do, I’ll post it here.
Building QEMU with Ad Lib support
For what I've been told are performance reasons, QEMU doesn't include Ad Lib support by default. Browsing the hundreds of pages of duplicated documentation online, I was told the solution to this was to build QEMU with the following option:
This no longer works. This does:
I use QEMU exclusively for older OSs and have no need for the other sound cards it supports; if you want others you’ll want to add them there.
This should be a blast from the past for those of you who did this back in 1992… I was 6 at the time! My earliest memories of our first home computer were with a Sound Blaster card, so this was new to me :).
1. Fire up your QEMU DOS VM (that’s a lot of acronyms), then launch Windows 3.1. If you needed to be told that, how did you build your own custom version of QEMU?
2. Go to Control Panel, then Drivers.
3. Click Add…, choose Ad Lib from the List of Drivers, and hit OK. You’ll be prompted for a Windows 3.1 install disk, or you can put in a different path. I tend to keep setup files on the virtual drive C for this purpose; it’s not like I don’t have space for it!
4. Quit Windows, then launch it again. Ah the days when rebooting your "OS" was that simple!
5. Go back to Control Panel and choose MIDI Mapper. Choose Ad Lib general from the Name list box, then hit Close.
All done! Now you can launch Media Player and play
CANYON.MID in all its electronic, MIDI glory!
Why are you running Windows 3.1?
While its come in incredibly handy for a few paid jobs (spur of the moment things that earn some serious brownie points, then later more seriously!), our first family home computer ran Windows 3.0 and later 3.1.
My ultimate goal is to recreate that first system with all our classic software and games on my modern hardware. I’ve got all the original disks, made images of them, and am ready to go! I’m a sucker for nostalgia :’)