openMSX
YM2413Core.hh
Go to the documentation of this file.
1 #ifndef YM2413CORE_HH
2 #define YM2413CORE_HH
3 
4 #include <cstdint>
5 
6 namespace openmsx {
7 
27 {
28 public:
40  static constexpr int CLOCK_FREQ = 3579545;
41 
42  virtual ~YM2413Core() = default;
43 
46  virtual void reset() = 0;
47 
67  virtual void writePort(bool port, uint8_t value, int offset) = 0;
68 
74  virtual void pokeReg(uint8_t reg, uint8_t value) = 0;
75 
82  virtual uint8_t peekReg(uint8_t reg) const = 0;
83 
120  virtual void generateChannels(float* bufs[11], unsigned num) = 0;
121 
132  virtual float getAmplificationFactor() const = 0;
133 
134 protected:
135  YM2413Core() = default;
136 };
137 
138 } // namespace openmsx
139 
140 #endif
openmsx::YM2413Core::YM2413Core
YM2413Core()=default
openmsx::YM2413Core::peekReg
virtual uint8_t peekReg(uint8_t reg) const =0
Read from a YM2413 register (for debug).
openmsx::YM2413Core::generateChannels
virtual void generateChannels(float *bufs[11], unsigned num)=0
Generate the sound output.
openmsx::YM2413Core::writePort
virtual void writePort(bool port, uint8_t value, int offset)=0
Write to the YM2413 register/data port.
openmsx::YM2413Core::CLOCK_FREQ
static constexpr int CLOCK_FREQ
Input clock frequency.
Definition: YM2413Core.hh:40
openmsx::YM2413Core::~YM2413Core
virtual ~YM2413Core()=default
openmsx::YM2413Core::getAmplificationFactor
virtual float getAmplificationFactor() const =0
Returns normalization factor.
openmsx::YM2413Core::reset
virtual void reset()=0
Reset this YM2413 core.
openmsx::YM2413Core
Abstract interface for the YM2413 core.
Definition: YM2413Core.hh:27
openmsx::YM2413Core::pokeReg
virtual void pokeReg(uint8_t reg, uint8_t value)=0
Write to a YM2413 register (for debug).
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5