25 void powerUp(EmuTime::param time)
override;
26 void reset(EmuTime::param time)
override;
27 [[nodiscard]]
byte readIO(
word port, EmuTime::param time)
override;
28 [[nodiscard]]
byte peekIO(
word port, EmuTime::param time)
const override;
29 void writeIO(
word port,
byte value, EmuTime::param time)
override;
30 [[nodiscard]]
byte readMem(
word address, EmuTime::param time)
override;
31 [[nodiscard]]
byte peekMem(
word address, EmuTime::param time)
const override;
32 void writeMem(
word address,
byte value, EmuTime::param time)
override;
36 template<
typename Archive>
37 void serialize(Archive& ar,
unsigned version);
40 void enableDAC(
bool enable, EmuTime::param time);
43 std::unique_ptr<Y8950Periphery> periphery;
45 std::unique_ptr<DACSound8U> dac;
48 bool dacEnabled =
false;
void powerUp(EmuTime::param time) override
This method is called when MSX is powered up.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
byte * getWriteCacheLine(word start) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
void writeMem(word address, byte value, EmuTime::param time) override
Write a given byte to a given location at a certain time to this device.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void serialize(Archive &ar, unsigned version)
void reset(EmuTime::param time) override
This method is called on reset.
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Y8950Periphery & createPeriphery(const std::string &soundDeviceName)
Creates a periphery object for this MSXAudio cartridge.
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Models the 4 general purpose I/O pins on the Y8950 (controlled by registers r#18 and r#19)
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer