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 class  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 (uint8_t rg, uint8_t data, EmuTime::param time)
uint8_t readReg (uint8_t rg, EmuTime::param time)
uint8_t peekReg (uint8_t rg, EmuTime::param time) const
uint8_t readStatus (EmuTime::param time) const
uint8_t peekStatus (EmuTime::param time) const
void setStatus (uint8_t flags)
void resetStatus (uint8_t flags)
uint8_t 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_PCM_BSY = 0x01
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 27 of file Y8950.hh.

Member Typedef Documentation

◆ EnvPhaseIndex

Definition at line 109 of file Y8950.hh.

Member Enumeration Documentation

◆ EnvelopeState

enum class openmsx::Y8950::EnvelopeState

Definition at line 111 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 

Definition at line 484 of file

References openmsx::SoundDevice::registerSound(), reset(), and xrange().

◆ ~Y8950()

openmsx::Y8950::~Y8950 ( )

Definition at line 547 of file

References openmsx::SoundDevice::unregisterSound().

Member Function Documentation

◆ clearRam()

void openmsx::Y8950::clearRam ( )

Definition at line 552 of file

References openmsx::Y8950Adpcm::clearRam().

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

◆ peekRawStatus()

uint8_t openmsx::Y8950::peekRawStatus ( ) const

Definition at line 1214 of file

◆ peekReg()

uint8_t openmsx::Y8950::peekReg ( uint8_t  rg,
EmuTime::param  time 
) const

◆ peekStatus()

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

Definition at line 1187 of file

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

◆ readReg()

uint8_t openmsx::Y8950::readReg ( uint8_t  rg,
EmuTime::param  time 

◆ readStatus()

uint8_t openmsx::Y8950::readStatus ( EmuTime::param  time) const

Definition at line 1182 of file

References peekStatus().

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

◆ reset()

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

◆ resetStatus()

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

Definition at line 1206 of file

References openmsx::IntHelper< SOURCE >::reset().

Referenced by openmsx::Y8950Adpcm::writeReg(), and writeReg().

◆ serialize()

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

Definition at line 1309 of file

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

◆ setEnabled()

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

◆ setStatus()

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

◆ writeReg()

void openmsx::Y8950::writeReg ( uint8_t  rg,
uint8_t  data,
EmuTime::param  time 

Member Data Documentation


constexpr int openmsx::Y8950::CLOCK_FREQ = 3579545

Definition at line 30 of file Y8950.hh.


constexpr int openmsx::Y8950::CLOCK_FREQ_DIV = 72

Definition at line 31 of file Y8950.hh.


constexpr int openmsx::Y8950::EG_BITS = 9

Definition at line 105 of file Y8950.hh.


constexpr int openmsx::Y8950::EG_DP_BITS = 23

Definition at line 108 of file Y8950.hh.


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

Definition at line 49 of file Y8950.hh.

Referenced by writeReg().


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

Definition at line 41 of file Y8950.hh.


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

Definition at line 43 of file Y8950.hh.

◆ R04_MASK_T1

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

Definition at line 47 of file Y8950.hh.

◆ R04_MASK_T2

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

Definition at line 45 of file Y8950.hh.

◆ R04_ST1

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

Definition at line 35 of file Y8950.hh.

Referenced by writeReg().

◆ R04_ST2

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

Definition at line 37 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

Definition at line 53 of file Y8950.hh.


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

Definition at line 52 of file Y8950.hh.

Referenced by openmsx::Y8950Adpcm::writeReg().


constexpr int openmsx::Y8950::STATUS_T1 = R04_MASK_T1

Definition at line 56 of file Y8950.hh.


constexpr int openmsx::Y8950::STATUS_T2 = R04_MASK_T2

Definition at line 55 of file Y8950.hh.

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