OXYGENHUB
◆ main openmsx / src / memory / RomAscii8_8.hh
913 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef ROMASCII8_8_HH
2
#define ROMASCII8_8_HH
3
4
#include "RomBlocks.hh"
5
6
#include <array>
7
#include <cstdint>
8
9
namespace openmsx {
10
11
class RomAscii8_8 final : public Rom8kBBlocks
12
{
13
public:
14
	enum class SubType : uint8_t { ASCII8_8, KOEI_8, KOEI_32, WIZARDRY, ASCII8_2, ASCII8_32 };
15
	RomAscii8_8(const DeviceConfig& config,
16
	            Rom&& rom, SubType subType);
17
18
	void reset(EmuTime time) override;
19
	[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override;
20
	void writeMem(uint16_t address, byte value, EmuTime time) override;
21
	[[nodiscard]] const byte* getReadCacheLine(uint16_t address) const override;
22
	[[nodiscard]] byte* getWriteCacheLine(uint16_t address) override;
23
24
	template<typename Archive>
25
	void serialize(Archive& ar, unsigned version);
26
27
private:
28
	const byte sramEnableBit;
29
	const byte sramPages;
30
	byte sramEnabled;
31
	std::array<byte, NUM_BANKS> sramBlock;
32
};
33
34
} // namespace openmsx
35
36
#endif