ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge
Inheritance diagram for OPL::ALSA::OPL:
Collaboration diagram for OPL::ALSA::OPL:

List of all members.

Public Member Functions

 OPL (Config::OplType type)
 ~OPL ()
bool init ()
 Initializes the OPL emulator.
void reset ()
 Reinitializes the OPL emulator.
void write (int a, int v)
 Writes a byte to the given I/O port.
byte read (int a)
 Reads a byte from the given I/O port.
void writeReg (int r, int v)
 Function to directly write to a specific OPL register.

Private Types

enum  { kOpl2Voices = 9, kVoices = 18, kOpl2Operators = 18, kOperators = 36 }

Private Member Functions

void writeOplReg (int c, int r, int v)
void clear ()

Private Attributes

Config::OplType _type
int _iface
snd_hwdep_t * _opl
snd_dm_fm_voice _oper [kOperators]
snd_dm_fm_note _voice [kVoices]
snd_dm_fm_params _params
int index [2]

Static Private Attributes

static const int voiceToOper0 [kVoices]
static const int regOffsetToOper [0x20]

Detailed Description

Definition at line 47 of file alsa_opl.cpp.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
kOpl2Voices 
kVoices 
kOpl2Operators 
kOperators 

Definition at line 49 of file alsa_opl.cpp.


Constructor & Destructor Documentation

OPL::ALSA::OPL::OPL ( Config::OplType  type  ) 

Definition at line 89 of file alsa_opl.cpp.

OPL::ALSA::OPL::~OPL (  )  [virtual]

Reimplemented from OPL::OPL.

Definition at line 92 of file alsa_opl.cpp.


Member Function Documentation

void OPL::ALSA::OPL::clear (  )  [private]

Definition at line 101 of file alsa_opl.cpp.

bool OPL::ALSA::OPL::init (  )  [virtual]

Initializes the OPL emulator.

Returns:
true on success, false on failure

Implements OPL::OPL.

Definition at line 132 of file alsa_opl.cpp.

byte OPL::ALSA::OPL::read ( int  a  )  [virtual]

Reads a byte from the given I/O port.

Parameters:
a port address
Returns:
value read

Implements OPL::OPL.

Definition at line 232 of file alsa_opl.cpp.

void OPL::ALSA::OPL::reset (  )  [virtual]

Reinitializes the OPL emulator.

Implements OPL::OPL.

Definition at line 180 of file alsa_opl.cpp.

void OPL::ALSA::OPL::write ( int  a,
int  v 
) [virtual]

Writes a byte to the given I/O port.

Parameters:
a port address
v value, which will be written

Implements OPL::OPL.

Definition at line 195 of file alsa_opl.cpp.

void OPL::ALSA::OPL::writeOplReg ( int  c,
int  r,
int  v 
) [private]

Definition at line 250 of file alsa_opl.cpp.

void OPL::ALSA::OPL::writeReg ( int  r,
int  v 
) [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.

Parameters:
r hardware register number to write to
v value, which will be written

Implements OPL::OPL.

Definition at line 236 of file alsa_opl.cpp.


Member Data Documentation

int OPL::ALSA::OPL::_iface [private]

Definition at line 57 of file alsa_opl.cpp.

snd_dm_fm_voice OPL::ALSA::OPL::_oper[kOperators] [private]

Definition at line 59 of file alsa_opl.cpp.

snd_hwdep_t* OPL::ALSA::OPL::_opl [private]

Definition at line 58 of file alsa_opl.cpp.

snd_dm_fm_params OPL::ALSA::OPL::_params [private]

Definition at line 61 of file alsa_opl.cpp.

Definition at line 56 of file alsa_opl.cpp.

snd_dm_fm_note OPL::ALSA::OPL::_voice[kVoices] [private]

Definition at line 60 of file alsa_opl.cpp.

int OPL::ALSA::OPL::index[2] [private]

Definition at line 62 of file alsa_opl.cpp.

const int OPL::ALSA::OPL::regOffsetToOper [static, private]
Initial value:
    { 0,  1,  2,  3,  4,  5, -1, -1, 6, 7, 8, 9, 10, 11, -1, -1,
     12, 13, 14, 15, 16, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1 }

Definition at line 64 of file alsa_opl.cpp.

const int OPL::ALSA::OPL::voiceToOper0 [static, private]
Initial value:
    { 0, 1, 2, 6, 7, 8, 12, 13, 14, 18, 19, 20, 24, 25, 26, 30, 31, 32 }

Definition at line 63 of file alsa_opl.cpp.


The documentation for this class was generated from the following file:


Generated on Sat May 25 2019 05:06:26 for ResidualVM by doxygen 1.7.1
curved edge   curved edge