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