How in gods name did you emulate the OPL2 chip, this just blags my head how programmers like your self can emulate hardware through code.
How did you get started to emulate this hardware ?
How long did it take you to get it so accurate ?
Why don't you put it into yours and JonoF's port of Duke3D ?
Thanks in advance,
Awesoken at
It took a free week of time and a whole lot of reverse engineering. The first step was setting up the Sound Blaster's mixer to record the OPL2 signal digitally, so I could compare waveforms in a consistent and repeatable manner. Once that was done, I started with simple instruments, such as pure sin wave or square wave. I'd say the hardest parts were figuring out how the modulator cell mixed in with the carrier cell, figuring out an acceptable attack curve, and of course the drums. I got a lot of hints from existing OPL2 documentation, although as you can imagine, the docs don't have everything you need. After a while, my KSM music was sounding ok - and that's about when I stopped.
I believe JonoF plans to incorporate my adlib emulator at some point, although it's not a high priority since the MIDI version is closer to the original, I think.
Laptop_Stuff at
Your ADLIB emulator Ken,
Has it got every single instrument the original OPL2 chip had ?
What percent is it completed ?
Awesoken at
That's a silly question. Adlib has a nearly an infinite number of instruments. They are defined by 11 bytes worth of information. In these bytes are characteristics such as: attack, sustain, release, decay, waveform shape, volume, feedback, vibrato, etc.. Since my emulator supports everything except for vibrato, it will do a pretty good job in most cases. The emulator that comes with DosBox or Adplug will probably sound better because it's been tested more thoroughly. If you want to use ADLIBEMU.C, that's great, but keep in mind that it's optimized mainly for my KSM songs.