openMSX
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
openmsx::YMF262 Class Referencefinal

#include <YMF262.hh>

Inheritance diagram for openmsx::YMF262:
Inheritance graph
[legend]
Collaboration diagram for openmsx::YMF262:
Collaboration graph
[legend]

Public Types

enum  EnvelopeState {
  EG_ATTACK , EG_DECAY , EG_SUSTAIN , EG_RELEASE ,
  EG_OFF
}
 
using FreqIndex = FixedPoint< 16 >
 16.16 fixed point type for frequency calculations
 

Public Member Functions

 YMF262 (const std::string &name, const DeviceConfig &config, bool isYMF278)
 
 ~YMF262 ()
 
void reset (EmuTime::param time)
 
void writeReg (unsigned r, uint8_t v, EmuTime::param time)
 
void writeReg512 (unsigned r, uint8_t v, EmuTime::param time)
 
uint8_t readReg (unsigned reg) const
 
uint8_t peekReg (unsigned reg) const
 
uint8_t readStatus ()
 
uint8_t peekStatus () const
 
void setMixLevel (uint8_t x, EmuTime::param time)
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Static Public Attributes

static constexpr int SIN_BITS = 10
 
static constexpr int SIN_LEN = 1 << SIN_BITS
 
static constexpr int SIN_MASK = SIN_LEN - 1
 

Detailed Description

Definition at line 24 of file YMF262.hh.

Member Typedef Documentation

◆ FreqIndex

16.16 fixed point type for frequency calculations

Definition at line 52 of file YMF262.hh.

Member Enumeration Documentation

◆ EnvelopeState

Enumerator
EG_ATTACK 
EG_DECAY 
EG_SUSTAIN 
EG_RELEASE 
EG_OFF 

Definition at line 54 of file YMF262.hh.

Constructor & Destructor Documentation

◆ YMF262()

openmsx::YMF262::YMF262 ( const std::string &  name,
const DeviceConfig config,
bool  isYMF278 
)

◆ ~YMF262()

openmsx::YMF262::~YMF262 ( )

Definition at line 1467 of file YMF262.cc.

References openmsx::SoundDevice::unregisterSound().

Member Function Documentation

◆ peekReg()

uint8_t openmsx::YMF262::peekReg ( unsigned  reg) const

◆ peekStatus()

uint8_t openmsx::YMF262::peekStatus ( ) const

Definition at line 1480 of file YMF262.cc.

Referenced by openmsx::MSXMoonSound::peekIO(), and openmsx::MSXOPL3Cartridge::peekIO().

◆ readReg()

uint8_t openmsx::YMF262::readReg ( unsigned  reg) const

Definition at line 1023 of file YMF262.cc.

References peekReg().

Referenced by openmsx::MSXMoonSound::readIO(), and openmsx::MSXOPL3Cartridge::readIO().

◆ readStatus()

uint8_t openmsx::YMF262::readStatus ( )

Definition at line 1472 of file YMF262.cc.

Referenced by openmsx::MSXMoonSound::readIO(), and openmsx::MSXOPL3Cartridge::readIO().

◆ reset()

void openmsx::YMF262::reset ( EmuTime::param  time)

Definition at line 1396 of file YMF262.cc.

References EG_OFF, and setMixLevel().

Referenced by openmsx::MSXMoonSound::reset(), openmsx::MSXOPL3Cartridge::reset(), and YMF262().

◆ serialize()

template<typename Archive >
void openmsx::YMF262::serialize ( Archive &  ar,
unsigned  version 
)

Definition at line 1661 of file YMF262.cc.

References xrange().

◆ setMixLevel()

void openmsx::YMF262::setMixLevel ( uint8_t  x,
EmuTime::param  time 
)

Definition at line 1500 of file YMF262.cc.

References openmsx::SoundDevice::setSoftwareVolume().

Referenced by reset(), and openmsx::MSXMoonSound::writeIO().

◆ writeReg()

void openmsx::YMF262::writeReg ( unsigned  r,
uint8_t  v,
EmuTime::param  time 
)

Definition at line 1034 of file YMF262.cc.

References writeReg512().

Referenced by openmsx::MSXMoonSound::writeIO(), and openmsx::MSXOPL3Cartridge::writeIO().

◆ writeReg512()

void openmsx::YMF262::writeReg512 ( unsigned  r,
uint8_t  v,
EmuTime::param  time 
)

Definition at line 1042 of file YMF262.cc.

References openmsx::SoundDevice::updateStream().

Referenced by writeReg().

Member Data Documentation

◆ SIN_BITS

constexpr int openmsx::YMF262::SIN_BITS = 10
staticconstexpr

Definition at line 28 of file YMF262.hh.

◆ SIN_LEN

constexpr int openmsx::YMF262::SIN_LEN = 1 << SIN_BITS
staticconstexpr

Definition at line 29 of file YMF262.hh.

◆ SIN_MASK

constexpr int openmsx::YMF262::SIN_MASK = SIN_LEN - 1
staticconstexpr

Definition at line 30 of file YMF262.hh.


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