tashiy wrote:I read there is adlib support in scumm vm. Because of that I think the OPL FM Synthesizer chip must be emulated.
Sure, we have an OPL emulator in ScummVM (courtesy of DOSBox, based, partially on MAME's emulator by Tatsuyuki Satoh).
However, so that it's easy to plug in, from the engine's perspective, it behaves just like an actual AdLib card.
Meaning:
1) It still synthesizes the instruments. Only this time, it does so per software, instead of per hardware. Take a look at
the source, you'll see math and small waveform tables there, no PCM data.
2) You still program it by writing control data into registers, just like DOS programs used to do it in the olden days. See this document for the interface works:
http://www.shipbrook.net/jeff/sb.html.
Of course, the AdLib output is now easier to capture; you have get the generated digital PCM data directly at the emulator, instead of having to read the analog output of a real AdLib card back into your soundcard's input.
However, telling the emulator which operator parameters you want it to take, and generate one clear note is exactly as if you had a real AdLib card.
Again, ScummVM does not provide such a capability for you. You still have to write that yourself.