OXYGENHUB
◆ main openmsx / src / memory / RomNational.hh
802 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#ifndef ROMNATIONAL_HH
2
#define ROMNATIONAL_HH
3
4
#include "RomBlocks.hh"
5
#include <array>
6
7
namespace openmsx {
8
9
class RomNational final : public Rom16kBBlocks
10
{
11
public:
12
	RomNational(const DeviceConfig& config, Rom&& rom);
13
14
	void reset(EmuTime time) override;
15
	[[nodiscard]] byte peekMem(uint16_t address, EmuTime time) const override;
16
	[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override;
17
	[[nodiscard]] const byte* getReadCacheLine(uint16_t address) const override;
18
	void writeMem(uint16_t address, byte value, EmuTime time) override;
19
	[[nodiscard]] byte* getWriteCacheLine(uint16_t address) override;
20
21
	template<typename Archive>
22
	void serialize(Archive& ar, unsigned version);
23
24
private:
25
	int sramAddr;
26
	byte control;
27
	std::array<byte, 4> bankSelect;
28
};
29
30
} // namespace openmsx
31
32
#endif