23 void powerUp(EmuTime::param time)
override;
24 void reset(EmuTime::param time)
override;
25 [[nodiscard]]
byte readIO(
word port, EmuTime::param time)
override;
26 [[nodiscard]]
byte peekIO(
word port, EmuTime::param time)
const override;
27 void writeIO(
word port,
byte value, EmuTime::param time)
override;
28 [[nodiscard]]
byte readMem(
word address, EmuTime::param time)
override;
31 void writeMem(
word address,
byte value, EmuTime::param time)
override;
39 void recvByte(
byte value, EmuTime::param time)
override;
40 [[nodiscard]]
bool ready()
override;
43 template<
typename Archive>
44 void serialize(Archive& ar,
unsigned version);
47 [[nodiscard]]
byte readIOImpl(
word port, EmuTime::param time);
48 void writeIOImpl(
word port,
byte value, EmuTime::param time);
50 [[nodiscard]]
byte readStatus(EmuTime::param time);
51 void setIRQMask(
byte value);
52 void setRxRDYIRQ(
bool status);
53 void enableRxRDYIRQ(
bool enabled);
56 void signal(
ClockPin& pin, EmuTime::param time)
override;
57 void signalPosEdge(
ClockPin& pin, EmuTime::param time)
override;
61 void signal(
ClockPin& pin, EmuTime::param time)
override;
62 void signalPosEdge(
ClockPin& pin, EmuTime::param time)
override;
67 struct Interface final : I8251Interface {
68 void setRxRDY(
bool status, EmuTime::param time)
override;
69 void setDTR(
bool status, EmuTime::param time)
override;
70 void setRTS(
bool status, EmuTime::param time)
override;
71 [[nodiscard]]
bool getDSR(EmuTime::param time)
override;
72 [[nodiscard]]
bool getCTS(EmuTime::param time)
override;
76 void recvByte(
byte value, EmuTime::param time)
override;
77 void signal(EmuTime::param time)
override;
81 const std::unique_ptr<Rom> rom;
82 const std::unique_ptr<Ram> ram;
85 bool rxrdyIRQlatch =
false;
86 bool rxrdyIRQenabled =
false;
88 const bool hasMemoryBasedIo;
91 const std::unique_ptr<BooleanSetting> switchSetting;
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
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.
MSXRS232(const DeviceConfig &config)
void setDataBits(DataBits bits) override
void reset(EmuTime::param time) override
This method is called on reset.
bool acceptsData() override
byte * getWriteCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
void setParityBit(bool enable, ParityBit parity) override
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
void powerUp(EmuTime::param time) override
This method is called when MSX is powered up.
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
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 setStopBits(StopBits bits) override
bool allowUnaligned() const override
By default we don't allow unaligned <mem> specifications in the config file.
void serialize(Archive &ar, unsigned version)
void recvByte(byte value, EmuTime::param time) override
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
SERIALIZE_CLASS_VERSION(CassettePlayer, 2)
IntHelper< IRQSource > IRQHelper