Getting Your MIDI Hardware to Work With DOSBox

It's actually pretty easy to get DOSBox to use your actual MIDI hardware. In this article, we're using the term 'MIDI device' when we talk about your Roland MT-32, SC-55, Yamaha MU50, MU80, and so on. Basically, any device that takes MIDI messages as its input and sends back the audio from its samples - that's a MIDI device.

The hardware you need is:

  • A Windows PC with DOSBox installed.
  • A MIDI device, such as Roland MT-32, SC-55, SC-88, etc.
  • A USB MIDI interface, e.g. Roland UM-1EX or other.
  • Audio cable to connect the MIDI device to your PC.

Setting up the Hardware

Follow these steps to connect your Roland MIDI device to your PC:

1) A typical USB MIDI InterfaceThe USB MIDI interface has 3 connectors: 2 x MIDI plugs and 1 x USB plug. On the sleeve of the two MIDI plugs will be marked "IN" and "OUT". Be careful here, as the meanings of these can be misunderstood. "OUT" really means "MIDI signals coming OUT of the PC and into the external device" and "IN" really means "MIDI signals from the external device coming INto the PC". Power down your MIDI device and connect the one that reads "OUT" to the MIDI IN socket on the back of your MT-32/SC-55.

Note: You don't need to connect the "IN" MIDI plug anywhere, since the MIDI signals only need to go in one direction (from the PC to the external device). Just leave it hanging.

2) Connect the USB plug to a free USB socket on your PC.

3) If you have a Roland SC-series, or Yamaha MU-series, with the MIDI device still switched off set the MIDI/PC-1/PC-2/MAC switch on the back to "MIDI":

4) Connect the outputs from the MIDI device to your sound card's Line-In socket. These outputs are usually two sockets (for L and R). This cable differs depending on the MIDI device you have. The table below should guide you to the correct cable:

MIDI Device Connectors
Roland MT-32, MT-100, CM-32L, CM-64, CM-500.
Yamaha MU50, MU80

MIDI Device end: Two x 6.35mm (1.4") mono jack plugs.
Sound Card end: One x 3.5mm (1/8th") stereo jack plug*.

Roland SC-55, SC-88/Pro, SC-155
Yamaha MU90, MU100

MIDI Device end: Two x phono (RCA) mono jack plugs.
Sound Card end: One x 3.5mm (1/8th") stereo jack plug*.

*Note that the majority of sound cards use 3.5mm jack sockets for their inputs, including Line-In, but some more premium sound cards use phono (RCA) jack sockets. Double-check what yours is before buying!

 

Running DOSBox

1) Run DOSBox and at the DOS prompt, type mixer /listmidi

Running mixer /listmidi displays a list of all the MIDI interfaces that have been detected by your computer.
Since Windows has its own emulation for General MIDI, you will always see the "Microsoft GS Wavetable Synth" one listed. This is widely regarded as being of poor audio sample quality. Any others listed are probably your USB-to-MIDI interface (the Roland UM-1EX appears as "UM-1". Another generic one on Ebay appears as "USB2.0-MIDI" and also as "MIDIOUT2 (USB2.0-MIDI)". If you don't see any apart from Microsoft GS Wavetable Synth, double-check the physical USB connection to your MIDI interface and in Device Manager to ensure it's not got a conflict or driver problem.

2) Make a mental note of the ID number beside the name of your physical USB MIDI interface (if there are two for your interface, it's the "OUT" one you want!). Exit DOSBox.

3) Now edit the DOSBox configuration file, dosbox.conf. This is usually stored in the folder C:\Users\<your username>\AppData\Local\DOSBox.

4) Do a search for the text "midiconfig=" within that file and set its ID to the one you memorised in (2). Save the configuration file:

5) Re-run DOSBox, mount any necessary drives, run the setup.exe or install.exe file to configure your game for your MIDI device, and play the game!

Troubleshooting

Symptoms: I did everything mentioned above, but I still get no sound when playing the game!
Possible Causes:
1) Incorrect cable connection - Double-check you have the correct MIDI cable ("OUT") from the USB MIDI interface plugged into the "MIDI IN" socket on your MIDI device.

2) Volume is too low - Check the volume knob on the front of the MIDI device and also make sure the volume isn't too low in Windows. Test something else in Windows that you know emits sound.

3) Invalid Game Config - Confirm the game is configured for Roland, MT-32, CM-xx, SC-xx or General MIDI (depending on the MIDI device you have). Then check in-game that it's transmitting MIDI messages - most USB MIDI interfaces have an LED that indicates when it's receiving a MIDI message - this should be flashing. If it's not, the game is not configured properly or your USB MIDI interface is not installed correctly (see next Q&A item).

4) USB MIDI interface Device - Q) Is your USB MIDI interface detected by Windows and has no conflicts?
A) Usually there are no device drivers needed for these - just plug it in and Windows should detect it without issue. To be sure, go into the Windows Device Manager. Your interface may be under Software Devices as well as Sound, video and game controllers. Make sure there are no warning icons beside these. If there are, your interface may need device drivers, so go to the manufacturer's website and download them or do an internet search for them.

5) It's a GoG Game With It's Own Config - many Good Old Games (GoG) games embed their own copy of DOSBox in order to run the game as a suitable speed. These are often preconfigured to use Ad Lib or Sound Blaster for music. An example of this is Wing Commander - to get this to work you need to edit the WINGCMDR.CFG file and change the middle letter to an 'r' (for Roland). Then retry. Wing Commander II also needs a similar change (the config file for that is simply wc2.cfg).

6) Line-In is muted in your mixer - By default, often the "Line-In" signal is muted, causing the audio from your MIDI device to not be heard. Many sound cards come with a DOS mixer utility that allows you to set the levels of the inputs and outputs, including MIDI, Line-In, CD, MIC, etc. Creative's mixer is called MIXERSET.EXE. For some OPL3 sound cards like the Yamaha Audician, it's called SETUPSA.EXE.

Daisy-Chaining

If you're in the luxurious position of owning both an MT-32 (or equivalent) for older DOS games, AND a newer MIDI device that support General MIDI such as the Roland SC-series or Yamaha's MU-series, you can connect one MIDI device to another, thus daisy-chaining them together.

If you're running pre-General MIDI games on one PC and GM games on a second PC, there's no need for this. But if you're like me, and want to run both from a single PC, daisy chaining is a good option. By doing so, you don't need to be messing about with your MIDI wiring whenever you wish to go from playing pre-GM games to GM-supported games.

The only disadvantage is that you must have the first MIDI device powered on as well as the second if you want the second device to be receiving the messages.

Here's are two diagrams of what worked for me:

MODERN PC RUNNING DOSBOX AND USING A USB MIDI INTERFACE:

The game being played sends MIDI messages from the PC, out of the USB port to the USB MIDI Interface. This is received by the Roland MT-32 via its MIDI IN socket. The MT-32 sends its audio signal back to the PC's Line-In port, so if you're playing an MT-32 game, this will work. In addition, the same MIDI messages received by the MT-32 are also sent out of its MIDI THRU socket to the Roland SC-88's MIDI IN socket. The output jacks of the SC-88 are also connected to the PC's Line-In (using a 3.5mm jack socket splitter cable or adapter)

 

VINTAGE PC USING SOUND CARD GAME/MIDI PORT AND CABLE:

The game being played sends MIDI messages from the PC, out of the sound card's Game/MIDI port (so UART mode only). This is received by the Roland MT-32 via its MIDI IN socket. The MT-32 sends its audio signal back to the PC's Line-In port, so if you're playing an MT-32 game, this will work. In addition, the same MIDI messages received by the MT-32 are also sent out of its MIDI THRU socket to the Roland SC-88's MIDI IN socket. The output jacks of the SC-88 are also connected to the PC's Line-In (using a 3.5mm jack socket splitter cable or adapter)

Strangely, having the SC-88 act as the first recipient of MIDI Messages from the PC and having the MT-32 at the end (being fed these messages off the SC-88's MIDI THRU socket) didn't work. Perhaps there is some additional setup that is needed to have the SC-88 pass through MIDI messages?