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 class  EnvelopeState {
  ATTACK , DECAY , SUSTAIN , RELEASE ,
  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

enum class openmsx::YMF262::EnvelopeState
strong
Enumerator
ATTACK 
DECAY 
SUSTAIN 
RELEASE 
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 1468 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 1481 of file YMF262.cc.

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

◆ readReg()

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

Definition at line 1024 of file YMF262.cc.

References peekReg().

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

◆ readStatus()

uint8_t openmsx::YMF262::readStatus ( )

Definition at line 1473 of file YMF262.cc.

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

◆ reset()

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

Definition at line 1397 of file YMF262.cc.

References OFF, and setMixLevel().

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

◆ serialize()

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

Definition at line 1662 of file YMF262.cc.

References xrange().

◆ setMixLevel()

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

Definition at line 1501 of file YMF262.cc.

References openmsx::SoundDevice::setSoftwareVolume().

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

◆ writeReg()

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

Definition at line 1035 of file YMF262.cc.

References writeReg512().

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

◆ writeReg512()

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

Definition at line 1043 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: