mmontag wrote:
Another noob question: what kind of glue code is needed to use the YMF262 as a MIDI device? Any good examples you know of?
I'm looking at bisqwit's ADLMIDI [1] and malicex's opl3-synth-driver now. It looks...scary. [2]
In order to play MIDIs on OPL2/3, you need to write an additional abstraction layer that does the conversion between MIDI commands and the OPL chip.
I'm afraid this is not a trivial task, as that layer has to take care a few things, like:
- choosing an "instrument" on a MIDI channel requires you to load OPL register settings from a table (or file) and write them to the chip
- MIDIs have 16 polyphonic channels, OPL chips have only monophonic channels, so you need to remap the MIDI notes to whatever OPL channel is free
- MIDI channel 10 is for drums, which require you to load separate settings per note
mmontag wrote:
What tool was used to produce the vgmrips of OPL3 PC games, such as Tyrian and Duke Nukem?
Those were logged with DOSBox. Most of those older logs were done by logging DRO files (with a custom DOSBox version that produces more verbose DRO logs) and converting them to VGM.
These days the recommended way to log VGMs from DOS games is to use the DOSBox VGM mod. (see the
VGM Creators topic for links)