25 void powerUp(EmuTime::param time);
26 void reset(EmuTime::param time);
27 [[nodiscard]] uint8_t
readMem(uint8_t address,EmuTime::param time);
28 [[nodiscard]] uint8_t
peekMem(uint8_t address,EmuTime::param time)
const;
29 void writeMem(uint8_t address, uint8_t value, EmuTime::param time);
33 const std::array<std::array<int8_t, 32>, 5>&
getWaveData()
const {
return wave; }
35 template<
typename Archive>
36 void serialize(Archive& ar,
unsigned version);
40 [[nodiscard]]
float getAmplificationFactorImpl()
const override;
41 void generateChannels(std::span<float*> bufs,
unsigned num)
override;
43 [[nodiscard]] uint8_t readWave(
unsigned channel,
unsigned address, EmuTime::param time)
const;
44 void writeWave(
unsigned channel,
unsigned address, uint8_t value);
45 void setDeformReg(uint8_t value, EmuTime::param time);
46 void setDeformRegHelper(uint8_t value);
47 void setFreqVol(
unsigned address, uint8_t value, EmuTime::param time);
48 [[nodiscard]] uint8_t getFreqVol(
unsigned address)
const;
51 static constexpr int CLOCK_FREQ = 3579545;
55 [[nodiscard]] uint8_t read(
unsigned address, EmuTime::param time)
override;
56 void write(
unsigned address, uint8_t value, EmuTime::param time)
override;
59 Clock<CLOCK_FREQ> deformTimer;
62 std::array<std::array<int8_t, 32>, 5> wave;
63 std::array<std::array<float, 32>, 5> volAdjustedWave;
64 std::array<unsigned, 5> incr;
65 std::array<unsigned, 5> count;
66 std::array<unsigned, 5> pos;
67 std::array<unsigned, 5> period;
68 std::array<unsigned, 5> orgPeriod;
69 std::array<float, 5> out;
70 std::array<uint8_t, 5> volume;
74 std::array<bool, 5> rotate;
75 std::array<bool, 5> readOnly;