openMSX
MSXMirrorDevice.hh
Go to the documentation of this file.
1 #ifndef MSXMIRRORDEVICE_HH
2 #define MSXMIRRORDEVICE_HH
3 
4 #include "MSXDevice.hh"
5 
6 namespace openmsx {
7 
8 class MSXCPUInterface;
9 
10 class MSXMirrorDevice final : public MSXDevice
11 {
12 public:
13  explicit MSXMirrorDevice(const DeviceConfig& config);
14 
15  byte readMem(word address, EmuTime::param time) override;
16  void writeMem(word address, byte value, EmuTime::param time) override;
17  const byte* getReadCacheLine(word start) const override;
18  byte* getWriteCacheLine(word start) const override;
19  byte peekMem(word address, EmuTime::param time) const override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  MSXCPUInterface& interface;
26  const unsigned addressHigh;
27 };
28 
29 } // namespace openmsx
30 
31 #endif
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
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.
void serialize(Archive &ar, unsigned version)
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX...
Definition: MSXDevice.hh:31
byte * getWriteCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing...
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
MSXMirrorDevice(const DeviceConfig &config)