openMSX
RomHolyQuran2.hh
Go to the documentation of this file.
1 #ifndef ROMHOLYQURAN2_HH
2 #define ROMHOLYQURAN2_HH
3 
4 #include "MSXRom.hh"
5 #include "RomBlockDebuggable.hh"
6 
7 namespace openmsx {
8 
9 class RomHolyQuran2 : public MSXRom
10 {
11 public:
12  RomHolyQuran2(const DeviceConfig& config, Rom&& rom);
13 
14  void reset(EmuTime::param time) override;
15  byte readMem(word address, EmuTime::param time) override;
16  byte peekMem(word address, EmuTime::param time) const override;
17  void writeMem(word address, byte value, EmuTime::param time) override;
18  const byte* getReadCacheLine(word address) const override;
19  byte* getWriteCacheLine(word address) const override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  struct Blocks final : RomBlockDebuggableBase {
26  explicit Blocks(RomHolyQuran2& device);
27  byte read(unsigned address) override;
28  } romBlocks;
29 
30  const byte* bank[4];
31  bool decrypt;
32 };
33 
34 } // namespace openmsx
35 
36 #endif
openmsx::RomHolyQuran2::getReadCacheLine
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition: RomHolyQuran2.cc:81
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
openmsx::RomHolyQuran2::peekMem
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
Definition: RomHolyQuran2.cc:61
openmsx::RomHolyQuran2::RomHolyQuran2
RomHolyQuran2(const DeviceConfig &config, Rom &&rom)
Definition: RomHolyQuran2.cc:20
openmsx::RomHolyQuran2::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: RomHolyQuran2.cc:41
openmsx::MSXRom
Definition: MSXRom.hh:10
openmsx::RomHolyQuran2::readMem
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: RomHolyQuran2.cc:49
MSXRom.hh
openmsx::RomHolyQuran2::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: RomHolyQuran2.cc:72
openmsx::MSXRom::rom
Rom rom
Definition: MSXRom.hh:20
openmsx::Rom
Definition: Rom.hh:21
openmsx::RomHolyQuran2::getWriteCacheLine
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition: RomHolyQuran2.cc:90
RomBlockDebuggable.hh
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::RomHolyQuran2::serialize
void serialize(Archive &ar, unsigned version)
Definition: RomHolyQuran2.cc:100
openmsx::RomBlockDebuggableBase
Definition: RomBlockDebuggable.hh:11
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::RomHolyQuran2
Definition: RomHolyQuran2.hh:10