24 void powerUp(EmuTime::param time)
override;
25 void reset(EmuTime::param time)
override;
26 [[nodiscard]]
byte readIO(
word port, EmuTime::param time)
override;
27 [[nodiscard]]
byte peekIO(
word port, EmuTime::param time)
const override;
28 void writeIO(
word port,
byte value, EmuTime::param time)
override;
29 [[nodiscard]]
byte readMem(
word address, EmuTime::param time)
override;
32 void writeMem(
word address,
byte value, EmuTime::param time)
override;
40 void recvByte(
byte value, EmuTime::param time)
override;
41 [[nodiscard]]
bool ready()
override;
44 template<
typename Archive>
45 void serialize(Archive& ar,
unsigned version);
48 [[nodiscard]]
byte readIOImpl(
word port, EmuTime::param time);
49 void writeIOImpl(
word port,
byte value, EmuTime::param time);
51 [[nodiscard]]
byte readStatus(EmuTime::param time);
52 void setIRQMask(
byte value);
53 void setRxRDYIRQ(
bool status);
54 void enableRxRDYIRQ(
bool enabled);
57 void signal(
ClockPin& pin, EmuTime::param time)
override;
58 void signalPosEdge(
ClockPin& pin, EmuTime::param time)
override;
62 void signal(
ClockPin& pin, EmuTime::param time)
override;
63 void signalPosEdge(
ClockPin& pin, EmuTime::param time)
override;
68 struct Interface final : I8251Interface {
69 void setRxRDY(
bool status, EmuTime::param time)
override;
70 void setDTR(
bool status, EmuTime::param time)
override;
71 void setRTS(
bool status, EmuTime::param time)
override;
72 [[nodiscard]]
bool getDSR(EmuTime::param time)
override;
73 [[nodiscard]]
bool getCTS(EmuTime::param time)
override;
74 void setDataBits(
DataBits bits)
override;
75 void setStopBits(
StopBits bits)
override;
76 void setParityBit(
bool enable,
Parity parity)
override;
77 void recvByte(
byte value, EmuTime::param time)
override;
78 void signal(EmuTime::param time)
override;
82 const std::unique_ptr<Rom> rom;
83 const std::unique_ptr<Ram> ram;
86 bool rxrdyIRQlatch =
false;
87 bool rxrdyIRQenabled =
false;
89 const bool hasMemoryBasedIo;
91 const bool inputsPullup;
94 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.
void setDataBits(DataBits bits) override
void reset(EmuTime::param time) override
This method is called on reset.
bool acceptsData() 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.
byte * getWriteCacheLine(word start) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
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 setParityBit(bool enable, Parity parity) override
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
IntHelper< IRQSource > IRQHelper