17 void powerUp(EmuTime::param time)
override;
18 void reset(EmuTime::param time)
override;
19 [[nodiscard]]
byte readIO(
word port, EmuTime::param time)
override;
20 [[nodiscard]]
byte peekIO(
word port, EmuTime::param time)
const override;
21 void writeIO(
word port,
byte value, EmuTime::param time)
override;
22 byte readMem(
word addr, EmuTime::param time)
override;
23 byte peekMem(
word addr, EmuTime::param time)
const override;
26 void writeMem(
word addr,
byte value, EmuTime::param time)
override;
28 template<
typename Archive>
29 void serialize(Archive& ar,
unsigned version);
32 void setRegCfg(
byte value);
33 byte* getSramAddr(
word addr);
34 unsigned getFlashAddr(
word addr)
const;
38 std::span<const uint8_t> rom,
39 std::span<const uint8_t> ram,
40 std::span<YMF278::Block128, 32> memPtrs);
56 std::array<byte, 4> regBank = {};
57 std::array<byte, 2> regFrame = {};
void writeMem(word addr, byte value, EmuTime::param time) override
Write a given byte to a given location at a certain time to this device.
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 peekMem(word addr, 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.
byte readMem(word addr, EmuTime::param time) override
Read a byte from a location at a certain time from 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 powerUp(EmuTime::param time) override
This method is called when MSX is powered up.
void reset(EmuTime::param time) override
This method is called on reset.
byte * getWriteCacheLine(word start) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
void serialize(Archive &ar, unsigned version)
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Generic Gang-of-Four Observer class, templatized edition.
This file implemented 3 utility functions:
uint16_t word
16 bit unsigned integer