https://github.com/rofl0r/dbopl
dosbox dbopl OPL3 emulator
https://github.com/rofl0r/dbopl
dosbox opl2 opl3
Last synced: about 1 month ago
JSON representation
dosbox dbopl OPL3 emulator
- Host: GitHub
- URL: https://github.com/rofl0r/dbopl
- Owner: rofl0r
- Created: 2020-11-09T19:11:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-25T21:42:44.000Z (over 1 year ago)
- Last Synced: 2025-03-24T12:12:46.404Z (about 2 months ago)
- Topics: dosbox, opl2, opl3
- Language: C++
- Homepage:
- Size: 31.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
dbopl OPL3 emulator
===================this is the so-called dbopl opl3 emulator, ripped from DOSBOX svn rev 4391
(November 2020), with full commit history and some tiny touch-ups to make
it compile standalone. as of the time of this writing, this is the default
OPL emulator used by DOSBOX.Usage:
======drop files into your project, include dbopl.h, and use in your code:
// initialize the chip(s). samplerate is typicallly 44100.
DBOPL::Handler chip = DBOPL::Handler();// write a value into a register.
chip.WriteReg(reg, val);// get a sample from the chip.
int32_t sample_tmp;
int16_t sample;
chip.Generate(&tmp, 1);
sample = sample_tmp;then compile it and link dbopl.cpp to your code.
that's pretty much all there is to it.check https://github.com/digital-sound-antiques/emu2413/blob/master/sample2413.c
for a good example of what and how to feed into the chip, and when to read
samples (and how many) from it.
although the example uses a different chip emulator, the strategy is identical.License
=======
unfortunately, the code is licensed as GPL2+.TODO
====
convert to a language that doesn't suck, i.e. C.
also it would be nice to poke the original authors whether they could relicense
the code as MIT.