#include <fmopl.h>
Public Types | |
enum | { kDefaultCallbackFrequency = 250 } |
Public Types inherited from Audio::Chip | |
typedef Common::Functor0< void > | TimerCallback |
Public Member Functions | |
virtual bool | init ()=0 |
virtual void | reset ()=0 |
virtual void | write (int a, int v)=0 |
virtual void | writeReg (int r, int v)=0 |
void | start (TimerCallback *callback) |
Public Member Functions inherited from Audio::Chip | |
void | start (TimerCallback *callback, int timerFrequency) |
void | stop () |
virtual void | setCallbackFrequency (int timerFrequency)=0 |
Protected Member Functions | |
void | initDualOpl2OnOpl3 (Config::OplType oplType) |
bool | emulateDualOpl2OnOpl3 (int r, int v, Config::OplType oplType) |
Protected Member Functions inherited from Audio::Chip | |
virtual void | startCallbacks (int timerFrequency)=0 |
virtual void | stopCallbacks ()=0 |
Protected Attributes | |
bool | _rhythmMode |
int | _connectionFeedbackValues [3] |
Protected Attributes inherited from Audio::Chip | |
Common::ScopedPtr< TimerCallback > | _callback |
A representation of a Yamaha OPL chip.
|
pure virtual |
Initializes the OPL emulator.
Implemented in OPL::MAME::OPL, OPL::NUKED::OPL, OPL::DOSBox::OPL, and OPL::RetroWaveOPL3::OPL.
|
pure virtual |
Reinitializes the OPL emulator
Implemented in OPL::MAME::OPL, OPL::NUKED::OPL, OPL::DOSBox::OPL, and OPL::RetroWaveOPL3::OPL.
|
pure virtual |
Writes a byte to the given I/O port.
a | port address |
v | value, which will be written |
Implemented in OPL::MAME::OPL, OPL::NUKED::OPL, OPL::DOSBox::OPL, and OPL::RetroWaveOPL3::OPL.
|
pure virtual |
Function to directly write to a specific OPL register. This writes to both chips for a Dual OPL2. We allow writing to secondary OPL registers by using register values >= 0x100.
r | hardware register number to write to |
v | value, which will be written |
Implemented in OPL::MAME::OPL, OPL::NUKED::OPL, OPL::DOSBox::OPL, and OPL::RetroWaveOPL3::OPL.
|
protected |
Initializes an OPL3 chip for emulating dual OPL2.
oplType | The type of OPL configuration that the engine expects. If this is not DualOpl2, this function will do nothing. |
|
protected |
Processes the specified register write so it will be correctly handled for emulating dual OPL2 on an OPL3 chip.
r | The register that is written to. |
v | The value written to the register. |
oplType | The type of OPL configuration that the engine expects. If this is not DualOpl2, this function will do nothing. |