14 [[nodiscard]]
virtual byte readIO(
word port, EmuTime::param time) = 0;
15 [[nodiscard]]
virtual byte peekIO(
word port, EmuTime::param time)
const = 0;
16 virtual void writeIO(
word port,
byte value, EmuTime::param time) = 0;
33 [[nodiscard]]
byte readIO(
word port, EmuTime::param time)
override;
34 [[nodiscard]]
byte peekIO(
word port, EmuTime::param time)
const override;
35 void writeIO(
word port,
byte value, EmuTime::param time)
override;
40 template<
typename Archive>
41 void serialize(Archive& ar,
unsigned version);
46 [[nodiscard]]
byte read(
unsigned address)
override;
47 void write(
unsigned address,
byte value, EmuTime::param time)
override;
50 std::vector<MSXMemoryMapperInterface*> mappers;
52 std::array<byte, 4> registers;
54 byte baseValue = 0xff;
70 : motherBoard(motherBoard_)
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
MSXMapperIOClient(const MSXMapperIOClient &)=delete
MSXMapperIOClient & operator=(const MSXMapperIOClient &)=delete
MSXMapperIOClient & operator=(MSXMapperIOClient &&)=delete
MSXMapperIOClient(MSXMapperIOClient &&)=delete
MSXMapperIOClient(MSXMotherBoard &motherBoard_)
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
void registerMapper(MSXMemoryMapperInterface *mapper)
void serialize(Archive &ar, unsigned version)
void unregisterMapper(MSXMemoryMapperInterface *mapper)
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 readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
void setMode(Mode mode, byte mask, byte baseValue)
MSXMapperIO & getMapperIO() const
MSXMapperIO & createMapperIO()
All memory mappers in one MSX machine share the same four (logical) memory mapper registers.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer
virtual byte readIO(word port, EmuTime::param time)=0
virtual byte getSelectedSegment(byte page) const =0
virtual void writeIO(word port, byte value, EmuTime::param time)=0
~MSXMemoryMapperInterface()=default
virtual byte peekIO(word port, EmuTime::param time) const =0