Skip to content
morphinejh edited this page Jun 4, 2022 · 8 revisions

Using dosboxece-opl

Once you have obtained or compiled the binaries the usage is very simple. Upon running the executable a configuration file will be created, just like Dosbox and DosboxECE. Usually located at: ~\.dosbox\dosbox-ECE-OPL.conf.

OPL2Audio and OPL3Duo!

Ensure your user is added to the dialout group for tty access.

OPL2LPT and OPL3LPT

Ensure your user is added to the lp group for parallel port access.

Required Libraries

Please make sure you have the following libraries installed before running the dosbox executable.

  • libsdl1.2debian
  • libfluidsynth3
  • libieee1284-3
  • libsdl-net1.2
  • libmt32emu
    • You will probably need to compile this yourself. See the Compiling section of this wiki.

Configuration

In the configuration file you will find some new and different settings:

  • oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well).
    • Possible values: default, compat, fast, mame, nuked, opl2lpt, opl3lpt, opl2board, opl3duoboard.
  • oplport: Parallel or Serial port of the OPL2/3 Audio Board only
    • Examples: ttyACM0, ttyS0, parport0, etc. There is no need to include '/dev/' in front of them.
    • only valid if oplemu=opl2board, opl3duo, opl2lpt, opl3lpt
    • When any opl2 only device is selected, opl2mode is automatically set to opl2.
  • oplbaudrate: Serial port baud rate of the OPL2/3 audio board only
    • Examples: 115200(default), 213400, 400000, etc
    • This field only applies to the OPL2Audio and OPL3Duo! boards

Serial Example with OPL3Duo!

[sblaster]
...
oplemu      = opl3duoboard
oplport     = ttyACM0
oplbaudrate = 115200
...

Parallel Port Example with OPL3LPT board

[sblaster]
...
oplemu      = opl3lpt
oplport     = parport0
oplbaudrate = 115200 #this valued is ignored when using parallel port
...

Serial Example with OPL2Audio board

[sblaster]
...
oplemu      = opl2board
oplport     = ttyUSB0
oplbaudrate = 115200
...

DosboxECE Configuration File Suggestions

  • Make sure you have a sound font file (.sf2) and its location specified
[midi]
...
fluid.soundfont = /home/SomeUser/Music/sf2/SomeSoundfont.sf2
...
  • I suggest running the mt32 on a seperate thread.
    • this is basically required on a Raspberry Pi for usability.
  • Make sure you have obtained the MT-32 roms and defined their location in the configuration file.
[midi]
...
mt32.romdir     = /home/SomeUser/roms
...
mt32.thread     = true
...

Does fluidsynth make static/crackly noises when playing midi files?

  • Reference information
  • The newer implementation of the PulseAudio sound server uses timer-based audio scheduling instead of the traditional, interrupt-driven approach.Timer-based scheduling may expose issues in some ALSA drivers. On the other hand, other drivers might be glitchy without it on, so check to see what works on your system.
  • To turn timer-based scheduling off add tsched=0 in /etc/pulse/default.pa:
    • sudo nano /etc/pulse/default.pa

Look For:

load-module module-udev-detect 

Change it to:

load-module module-udev-detect tsched=0

Then restart your computer, or just the PulseAudio server:

$ pulseaudio -k
$ pulseaudio --start

Do the reverse to enable timer-based scheduling, if not already enabled by default.