openMSX
YM2413Core.hh
Go to the documentation of this file.
1 #ifndef YM2413CORE_HH
2 #define YM2413CORE_HH
3 
4 #include "openmsx.hh"
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 
50  virtual void writeReg(byte reg, byte value) = 0;
51 
58  virtual byte peekReg(byte reg) const = 0;
59 
96  virtual void generateChannels(float* bufs[11], unsigned num) = 0;
97 
108  virtual float getAmplificationFactor() const = 0;
109 
110 protected:
111  YM2413Core() = default;
112 };
113 
114 } // namespace openmsx
115 
116 #endif
virtual byte peekReg(byte reg) const =0
Read from a YM2413 register.
virtual void reset()=0
Reset this YM2413 core.
virtual void writeReg(byte reg, byte value)=0
Write to a YM2413 register.
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
Abstract interface for the YM2413 core.
Definition: YM2413Core.hh:26
virtual void generateChannels(float *bufs[11], unsigned num)=0
Generate the sound output.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
virtual ~YM2413Core()=default
static constexpr int CLOCK_FREQ
Input clock frequency.
Definition: YM2413Core.hh:40
virtual float getAmplificationFactor() const =0
Returns normalization factor.