First post, by sdz
Edit:
https://github.com/sdz-mods/VOPL3/releases/tag/A05
It does exactly what the title says, Virtual OPL3 FM for Windows 98/ME — plus an optional MPU-401 MIDI bridge that routes DOS-game MIDI to any installed MIDI device.
How it works:
VOPL3.VXD (ring-0 port trap -> ring buffers) -> VOPLSRV.EXE (drains the buffers; FM: Nuked OPL3 -> waveOut -> KMIXER; MIDI: parser -> midiOut -> the MIDI device of your choice). It works alongside Microsoft's SBEMUL.SYS.
There's also VOPLCFG.EXE, an optional control panel / system-tray app: change the FM volume and the MIDI output device live (no restart needed), and see VOPL3's status and debug counters.
Installation:
run INSTALL.BAT. It does the following:
-stops any running VOPL3 programs first
-copies VOPL3.VXD to C:\WINDOWS\SYSTEM
-copies the renderer to C:\VOPL3 — you pick between two builds with identical sound output: Nuked OPL3 (reference) or Nuked-OPL3-fast (about half the CPU use, recommended on slower machines)
-copies VOPLCFG.EXE (the control panel) to C:\VOPL3 and asks whether it should start with Windows, minimized to the system tray
-asks FM only or FM + MIDI
-makes a backup of SBEMUL.SYS, then patches it to stop binding to ports 388-38B and bind to 2A0-2A3 instead (hopefully these are unused). This is needed because SBEMUL only grabs those ports to fake AdLib detection, without doing any sort of FM emulation — and if the ports are claimed before SBEMUL, it breaks digital audio as well. If you chose FM + MIDI, the MPU-401 ports 330-331 are relocated the same way (to 2A4-2A5), so VOPL3 can take over MIDI.
-registers VOPL3.VXD and VOPLSRV.EXE so they're loaded/started automatically at boot/login
-settings live in C:\VOPL3\VOPL3.INI (FM volume, MIDI output device) — easiest changed from the control panel, applied live
How to use:
After installation, set the game to use AdLib for music and Sound Blaster for sound effects. You will get OPL3 music via VOPL3 and digital sound effects via SBEMUL.
If you chose FM + MIDI, you can instead set music to General MIDI: the game's MIDI is routed to whatever device you picked — a software synth, a hardware wavetable, or an external module — instead of SBEMUL's fixed Microsoft GS synth. Pick the device in the control panel, or in Control Panel > Multimedia > MIDI. The MIDI device is only held while a DOS program is actually playing music and is released when its DOS box closes, so it's immediately available for Windows applications.
For uninstalling, there's an UNINSTALL.BAT. This will remove all VOPL3 installed files/registry keys and revert SBEMUL.SYS to the unpatched version.
Github:
https://github.com/sdz-mods/VOPL3
Credits:
-nukeykt's Nuked-OPL3 https://github.com/nukeykt/Nuked-OPL3 - the actual OPL3 emulator inside VOPLSRV.EXE
-JHRobotics's vdmdisp9x https://github.com/JHRobotics/vmdisp9x - VxD glue (vmm.h io32.h code32.h) and for figuring out how to build an actually working VxD
-onethirdxcubed's WDMHDA https://github.com/andrew-hoffman/WDMHDA/releases -without which this project wouldn’t have made sense to me
-agovtman's Nuked-OPL3-fast fork https://github.com/tgies/Nuked-OPL3-fast
-Anthropic's Fable 5 - helped a lot
This is very much an alpha release, so any testing is appreciated.
Currently tested on:
Dell Precision M4800 with coreboot/SeaBIOS, running Windows 98 SE with WDMHDA
VirtualBox VM running Windows 98 SE with WDMHDA
So far, it has only been tested with HDA + WDMHDA, but it is not intended to be limited to that setup.