34 void reset(EmuTime::param time);
35 void write(
byte value, EmuTime::param time);
37 template<
typename Archive>
38 void serialize(Archive& ar,
unsigned version);
46 inline void initState(
unsigned pattern,
unsigned period);
50 [[nodiscard]]
inline unsigned getOutput()
const;
59 inline void queueAdvance(
unsigned steps);
65 template<
typename Archive>
66 void serialize(Archive& ar,
unsigned version);
84 [[nodiscard]]
word peekRegister(
unsigned reg, EmuTime::param time)
const;
85 void writeRegister(
unsigned reg,
word value, EmuTime::param time);
86 template<
bool NOISE>
void synthesizeChannel(
87 float*& buffer,
unsigned num,
unsigned generator);
90 NoiseShifter noiseShifter;
95 std::array<word, 8> regs;
105 std::array<word, 4> counters;
109 std::array<byte, 4> outputs;
113 [[nodiscard]]
byte read(
unsigned address, EmuTime::param time)
override;
114 void write(
unsigned address,
byte value, EmuTime::param time)
override;
This class implements the Texas Instruments SN76489 sound chip.
void serialize(Archive &ar, unsigned version)
void reset(EmuTime::param time)
void write(byte value, EmuTime::param time)
SN76489(const DeviceConfig &config)
void generateChannels(std::span< float * > buffers, unsigned num) override
Abstract method to generate the actual sound data.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
void advance(octet_iterator &it, distance_type n, octet_iterator end)