27 static constexpr auto k128 = size_t(128 * 1024);
32 std::span<const uint8_t> ,
33 std::span<const uint8_t> ,
34 std::span<YMF278::Block128, 32> )>;
41 void reset(EmuTime::param time);
42 void writeReg(uint8_t reg, uint8_t data, EmuTime::param time);
43 [[nodiscard]] uint8_t
readReg(uint8_t reg);
44 [[nodiscard]] uint8_t
peekReg(uint8_t reg)
const;
46 [[nodiscard]] uint8_t
readMem(
unsigned address)
const;
47 void writeMem(
unsigned address, uint8_t value);
53 template<
typename Archive>
54 void serialize(Archive& ar,
unsigned version);
61 [[nodiscard]] uint8_t compute_rate(
int val)
const;
62 [[nodiscard]] uint8_t compute_decay_rate(
int val)
const;
63 [[nodiscard]]
unsigned decay_rate(
int num,
int sample_rate);
64 void envelope_next(
int sample_rate);
65 [[nodiscard]] int16_t compute_vib()
const;
66 [[nodiscard]] uint16_t compute_am()
const;
68 template<
typename Archive>
69 void serialize(Archive& ar,
unsigned version);
109 void generateChannels(std::span<float*> bufs,
unsigned num)
override;
111 void writeRegDirect(uint8_t reg, uint8_t data, EmuTime::param time);
112 [[nodiscard]]
unsigned getRamAddress(
unsigned addr)
const;
113 [[nodiscard]] int16_t getSample(
const Slot& slot, uint16_t pos)
const;
114 [[nodiscard]]
static uint16_t nextPos(
const Slot& slot, uint16_t pos, uint16_t increment);
116 [[nodiscard]]
bool anyActive();
117 void keyOnHelper(Slot& slot)
const;
122 DebugRegisters(
MSXMotherBoard& motherBoard,
const std::string& name);
123 [[nodiscard]] uint8_t read(
unsigned address)
override;
124 void write(
unsigned address, uint8_t value, EmuTime::param time)
override;
127 struct DebugMemory final : SimpleDebuggable {
128 DebugMemory(MSXMotherBoard& motherBoard,
const std::string& name);
129 [[nodiscard]] uint8_t read(
unsigned address)
override;
130 void write(
unsigned address, uint8_t value)
override;
133 std::array<Slot, 24> slots;
143 std::array<uint8_t, 256> regs;
149 std::array<Block128, 32> memPtrs;