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