DosBox configuration (MIDI only) - DhrBaksteen/ArduinoOPL2 GitHub Wiki

You can use the OPL2 board to output MIDI music from DosBox if the board is controlled by a Teensy++ 2.0 or later dev board. This article will tell you how to configure DosBox.

Setting up the Teensy

  1. Load the TeensyMidi sketch in the Arduino IDE. The sketch can be found under examples > Arduino OPL2 > Teensy.
  2. Set the USB type of the Teensy to MIDI. Select Tools > USB Type > MIDI.
  3. Compile and install the sketch on your Teensy

After installing the sketch you should see that an audio device called 'OPL2 Audio Board MIDI` has been added to the system tree. Note that the device can also be called 'Teensy MIDI' since the device names do not always update immediately.

Configuring DosBox

  1. We need to find the MIDI device id of the OPL2 board. Open DosBox and run z:\mixer /listmidi. This should show you what MIDI devices are available on your system and the OPL2 board should be one of them. Remember the number in front of the device.

    /images/listmidi.png

    If you are using Linux or OS X run pmidi -l in the console.

    /images/pmidi.png

  2. Now open your DosBox configuration file and look for the [midi] section. We need to alter the following:

    • mpu401=uart
    • mididevice=win32, or what MIDI device is more appropriate for your OS
    • midiconfig=1, or what ever the id of the OPL2 board is on your system (in the Linux example this would be 20:0)
  3. Restart DosBox and configure your games to use MT-32 or General Midi on port 330 to enjoy MIDI music through your OPL2 Audio Board!

For more info visit the DosBox Wiki on MIDI Configuration.