OXYGENHUB
◆ main openmsx / src / memory / RomHolyQuran2.hh
991 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#ifndef ROMHOLYQURAN2_HH
2
#define ROMHOLYQURAN2_HH
3
4
#include "MSXRom.hh"
5
#include "RomBlockDebuggable.hh"
6
#include <array>
7
8
namespace openmsx {
9
10
class RomHolyQuran2 final : public MSXRom
11
{
12
public:
13
	RomHolyQuran2(const DeviceConfig& config, Rom&& rom);
14
15
	void reset(EmuTime time) override;
16
	[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override;
17
	[[nodiscard]] byte peekMem(uint16_t address, EmuTime time) const override;
18
	void writeMem(uint16_t address, byte value, EmuTime time) override;
19
	[[nodiscard]] const byte* getReadCacheLine(uint16_t address) const override;
20
	[[nodiscard]] byte* getWriteCacheLine(uint16_t address) override;
21
22
	template<typename Archive>
23
	void serialize(Archive& ar, unsigned version);
24
25
private:
26
	struct Blocks final : RomBlockDebuggableBase {
27
		explicit Blocks(const RomHolyQuran2& device);
28
		[[nodiscard]] unsigned readExt(unsigned address) override;
29
	} romBlocks;
30
31
	std::array<const byte*, 4> bank;
32
	bool decrypt;
33
};
34
35
} // namespace openmsx
36
37
#endif