26 void reset(EmuTime::param time);
27 void writeReg (
unsigned r,
byte v, EmuTime::param time);
28 void writeReg512(
unsigned r,
byte v, EmuTime::param time);
29 [[nodiscard]]
byte readReg(
unsigned reg);
30 [[nodiscard]]
byte peekReg(
unsigned reg)
const;
36 template<
typename Archive>
37 void serialize(Archive& ar,
unsigned version);
53 [[nodiscard]]
inline int op_calc(
unsigned phase,
unsigned lfo_am)
const;
54 inline void FM_KEYON(
byte key_set);
55 inline void FM_KEYOFF(
byte key_clr);
56 inline void advanceEnvelopeGenerator(
unsigned egCnt);
57 inline void advancePhaseGenerator(Channel& ch,
unsigned lfo_pm);
60 void calc_fc(
const Channel& ch);
64 void setFeedbackShift(
byte value) {
65 fb_shift = value ? 9 - value : 0;
68 template<
typename Archive>
69 void serialize(Archive& ar,
unsigned version);
83 const unsigned* wavetable;
118 void chan_calc(
unsigned lfo_am);
119 void chan_calc_ext(
unsigned lfo_am);
121 template<
typename Archive>
122 void serialize(Archive& ar,
unsigned version);
145 [[nodiscard]]
float getAmplificationFactorImpl()
const override;
146 void generateChannels(
float** bufs,
unsigned num)
override;
148 void callback(
byte flag)
override;
150 void writeRegDirect(
unsigned r,
byte v, EmuTime::param time);
152 void setStatus(
byte flag);
153 void resetStatus(
byte flag);
154 void changeStatusMask(
byte flag);
157 [[nodiscard]]
inline int genPhaseHighHat();
158 [[nodiscard]]
inline int genPhaseSnare();
159 [[nodiscard]]
inline int genPhaseCymbal();
161 void chan_calc_rhythm(
unsigned lfo_am);
162 void set_mul(
unsigned sl,
byte v);
163 void set_ksl_tl(
unsigned sl,
byte v);
164 void set_ar_dr(
unsigned sl,
byte v);
165 void set_sl_rr(
unsigned sl,
byte v);
166 bool checkMuteHelper();
168 [[nodiscard]]
inline bool isExtended(
unsigned ch)
const;
169 [[nodiscard]]
inline Channel& getFirstOfPair(
unsigned ch);
170 [[nodiscard]]
inline Channel& getSecondOfPair(
unsigned ch);
172 struct Debuggable final : SimpleDebuggable {
173 Debuggable(MSXMotherBoard& motherBoard,
const std::string& name);
174 [[nodiscard]]
byte read(
unsigned address)
override;
175 void write(
unsigned address,
byte value, EmuTime::param time)
override;
179 static constexpr
int R04_ST1 = 0x01;
180 static constexpr
int R04_ST2 = 0x02;
181 static constexpr
int R04_MASK_T2 = 0x20;
182 static constexpr
int R04_MASK_T1 = 0x40;
183 static constexpr
int R04_IRQ_RESET = 0x80;
186 static constexpr
int STATUS_T2 = R04_MASK_T2;
187 static constexpr
int STATUS_T1 = R04_MASK_T1;
189 const std::unique_ptr<EmuTimer> timer1;
190 const std::unique_ptr<EmuTimer> timer2;
199 unsigned pan[18 * 4];
205 using LFOAMIndex = FixedPoint< 6>;
206 using LFOPMIndex = FixedPoint<10>;
207 LFOAMIndex lfo_am_cnt;
208 LFOPMIndex lfo_pm_cnt;
210 byte lfo_pm_depth_range;
220 bool alreadySignaledNEW2;
Debuggable(const Debuggable &)=delete
virtual byte read(unsigned address, EmuTime::param time)
void write(unsigned address, byte value) override
void reset(EmuTime::param time)
void setMixLevel(uint8_t x, EmuTime::param time)
void writeReg512(unsigned r, byte v, EmuTime::param time)
YMF262(const std::string &name, const DeviceConfig &config, bool isYMF278)
byte readReg(unsigned reg)
void writeReg(unsigned r, byte v, EmuTime::param time)
byte peekReg(unsigned reg) const
FixedPoint< 16 > FreqIndex
16.16 fixed point type for frequency calculations
void serialize(Archive &ar, unsigned version)
This file implemented 3 utility functions:
SERIALIZE_CLASS_VERSION(CassettePlayer, 2)
constexpr KeyMatrixPosition x
Keyboard bindings.
IntHelper< IRQSource > IRQHelper