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

#include <Y8950.hh>

Inheritance diagram for openmsx::Y8950:
Inheritance graph
Collaboration diagram for openmsx::Y8950:
Collaboration graph

Public Types

enum  EnvelopeState {
using EnvPhaseIndex = FixedPoint< EG_DP_BITS - EG_BITS >

Public Member Functions

 Y8950 (const std::string &name, const DeviceConfig &config, unsigned sampleRam, EmuTime::param time, MSXAudio &audio)
 ~Y8950 ()
void setEnabled (bool enabled, EmuTime::param time)
void clearRam ()
void reset (EmuTime::param time)
void writeReg (byte reg, byte data, EmuTime::param time)
byte readReg (byte reg, EmuTime::param time)
byte peekReg (byte reg, EmuTime::param time) const
byte readStatus (EmuTime::param time)
byte peekStatus (EmuTime::param time) const
void setStatus (byte flags)
void resetStatus (byte flags)
byte peekRawStatus () const
template<typename Archive >
void serialize (Archive &ar, unsigned version)

Static Public Attributes

static constexpr int CLOCK_FREQ = 3579545
static constexpr int CLOCK_FREQ_DIV = 72
static constexpr int R04_ST1 = 0x01
static constexpr int R04_ST2 = 0x02
static constexpr int R04_MASK_BUF_RDY = 0x08
static constexpr int R04_MASK_EOS = 0x10
static constexpr int R04_MASK_T2 = 0x20
static constexpr int R04_MASK_T1 = 0x40
static constexpr int R04_IRQ_RESET = 0x80
static constexpr int STATUS_EOS = R04_MASK_EOS
static constexpr int STATUS_BUF_RDY = R04_MASK_BUF_RDY
static constexpr int STATUS_T2 = R04_MASK_T2
static constexpr int STATUS_T1 = R04_MASK_T1
static constexpr int EG_BITS = 9
static constexpr int EG_DP_BITS = 23

Detailed Description

Definition at line 23 of file Y8950.hh.

Member Typedef Documentation

◆ EnvPhaseIndex

Definition at line 104 of file Y8950.hh.

Member Enumeration Documentation

◆ EnvelopeState


Definition at line 106 of file Y8950.hh.

Constructor & Destructor Documentation

◆ Y8950()

openmsx::Y8950::Y8950 ( const std::string &  name,
const DeviceConfig config,
unsigned  sampleRam,
EmuTime::param  time,
MSXAudio audio 

◆ ~Y8950()

openmsx::Y8950::~Y8950 ( )

Definition at line 574 of file

References openmsx::SoundDevice::unregisterSound().

Member Function Documentation

◆ clearRam()

void openmsx::Y8950::clearRam ( )

Definition at line 579 of file

References openmsx::Y8950Adpcm::clearRam().

Referenced by openmsx::MSXAudio::powerUp().

◆ peekRawStatus()

byte openmsx::Y8950::peekRawStatus ( ) const

◆ peekReg()

byte openmsx::Y8950::peekReg ( byte  reg,
EmuTime::param  time 
) const

◆ peekStatus()

byte openmsx::Y8950::peekStatus ( EmuTime::param  time) const

Definition at line 1222 of file

References setStatus().

Referenced by openmsx::MSXAudio::peekIO(), and readStatus().

◆ readReg()

byte openmsx::Y8950::readReg ( byte  reg,
EmuTime::param  time 

◆ readStatus()

byte openmsx::Y8950::readStatus ( EmuTime::param  time)

Definition at line 1215 of file

References peekStatus().

Referenced by openmsx::MSXAudio::readIO().

◆ reset()

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

◆ resetStatus()

void openmsx::Y8950::resetStatus ( byte  flags)

◆ serialize()

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

Definition at line 1343 of file

References openmsx::MSXMotherBoard::getCurrentTime(), and writeReg().

◆ setEnabled()

void openmsx::Y8950::setEnabled ( bool  enabled,
EmuTime::param  time 

◆ setStatus()

void openmsx::Y8950::setStatus ( byte  flags)

◆ writeReg()

void openmsx::Y8950::writeReg ( byte  reg,
byte  data,
EmuTime::param  time 

Member Data Documentation


constexpr int openmsx::Y8950::CLOCK_FREQ = 3579545

Definition at line 26 of file Y8950.hh.

Referenced by Y8950().


constexpr int openmsx::Y8950::CLOCK_FREQ_DIV = 72

Definition at line 27 of file Y8950.hh.

Referenced by Y8950().


constexpr int openmsx::Y8950::EG_BITS = 9

Definition at line 100 of file Y8950.hh.


constexpr int openmsx::Y8950::EG_DP_BITS = 23

Definition at line 103 of file Y8950.hh.


constexpr int openmsx::Y8950::R04_IRQ_RESET = 0x80

Definition at line 45 of file Y8950.hh.

Referenced by writeReg().


constexpr int openmsx::Y8950::R04_MASK_BUF_RDY = 0x08

Definition at line 37 of file Y8950.hh.


constexpr int openmsx::Y8950::R04_MASK_EOS = 0x10

Definition at line 39 of file Y8950.hh.

◆ R04_MASK_T1

constexpr int openmsx::Y8950::R04_MASK_T1 = 0x40

Definition at line 43 of file Y8950.hh.

◆ R04_MASK_T2

constexpr int openmsx::Y8950::R04_MASK_T2 = 0x20

Definition at line 41 of file Y8950.hh.

◆ R04_ST1

constexpr int openmsx::Y8950::R04_ST1 = 0x01

Definition at line 31 of file Y8950.hh.

Referenced by writeReg().

◆ R04_ST2

constexpr int openmsx::Y8950::R04_ST2 = 0x02

Definition at line 33 of file Y8950.hh.

Referenced by writeReg().


constexpr int openmsx::Y8950::STATUS_BUF_RDY = R04_MASK_BUF_RDY


constexpr int openmsx::Y8950::STATUS_EOS = R04_MASK_EOS


constexpr int openmsx::Y8950::STATUS_T1 = R04_MASK_T1

Definition at line 51 of file Y8950.hh.


constexpr int openmsx::Y8950::STATUS_T2 = R04_MASK_T2

Definition at line 50 of file Y8950.hh.

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