This Arduino program, along with the adplug-serial and adplay-unix-serial forks, allow adplay to use an OPL3 Duo! board by sending register writes to the Arduino over the serial port.
Now with dosbox support via a dosbox-opl3duo fork!
- Connect the OPL3 Duo! board to the Arduino as the instructions indicate
- In the Arduino IDE, install the OPL2 library (Sketch > Include Library > Manage Libraries... > Arduino OPL2)
- Open opl3serial.ino in the Arduino IDE
- Upload to your device
In this example, I'm going to install adplay
to $HOME/.local/
:
export PREFIX=$HOME/.local
- If you don't have libbinio installed, build and install it first:
git clone https://github.com/adplug/libbinio.git
cd libbinio
autoreconf --install
./configure --prefix=$PREFIX
make && make install
- Build the adplug-serial fork:
git clone https://github.com/cknave/adplug-serial.git
cd adplug-serial
autoreconf --install
./configure --prefix=$PREFIX PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
make && make install
- Build the adplay-serial fork:
git clone https://github.com/cknave/adplay-unix-serial.git
cd adplay-serial
autoreconf --install
./configure --prefix=$PREFIX PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
make && make install
Assuming adplay is installed to $PREFIX/bin
and your Arduino serial port is
/dev/ttyACM0
:
$PREFIX/bin/adplay -O serial -d /dev/ttyACM0 <file>
- Build dosbox:
git clone https://github.com/cknave/dosbox-opl3duo
cd dosbox-opl3duo
./autogen.sh
./configure --prefix=$PREFIX PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
make && make install
- Update your dosbox.conf file (
~/.dosbox/dosbox-SVN.conf
by default)sblaster
section withoplemu
andoplserialport
:
[sblaster]
oplemu=serial
oplserialport=/dev/ttyACM0
- Run dosbox! It should initialize the OPL3 Duo! on startup.
$PREFIX/bin/dosbox