openMSX
RomMSXtra.hh
Go to the documentation of this file.
1 #ifndef ROMMSXTRA_HH
2 #define ROMMSXTRA_HH
3 
4 #include "MSXRom.hh"
5 #include "Ram.hh"
6 
7 namespace openmsx {
8 
9 class RomMSXtra final : public MSXRom
10 {
11 public:
12  RomMSXtra(const DeviceConfig& config, Rom&& rom);
13 
14  byte readMem(word address, EmuTime::param time) override;
15  const byte* getReadCacheLine(word address) const override;
16  void writeMem(word address, byte value, EmuTime::param time) override;
17  byte* getWriteCacheLine(word address) const override;
18 
19  template<typename Archive>
20  void serialize(Archive& ar, unsigned version);
21 
22 private:
23  Ram ram;
24 };
25 
26 } // namespace openmsx
27 
28 #endif
openmsx::RomMSXtra::RomMSXtra
RomMSXtra(const DeviceConfig &config, Rom &&rom)
Definition: RomMSXtra.cc:6
openmsx::RomMSXtra::getReadCacheLine
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition: RomMSXtra.cc:26
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
openmsx::MSXRom
Definition: MSXRom.hh:10
Ram.hh
MSXRom.hh
openmsx::RomMSXtra::getWriteCacheLine
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition: RomMSXtra.cc:46
openmsx::MSXRom::rom
Rom rom
Definition: MSXRom.hh:20
openmsx::RomMSXtra::readMem
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: RomMSXtra.cc:15
openmsx::Rom
Definition: Rom.hh:21
openmsx::RomMSXtra
Definition: RomMSXtra.hh:10
openmsx::Ram
Definition: Ram.hh:16
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::RomMSXtra::writeMem
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.
Definition: RomMSXtra.cc:39
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::RomMSXtra::serialize
void serialize(Archive &ar, unsigned version)
Definition: RomMSXtra.cc:56