OXYGENHUB
◆ main openmsx / src / memory / MSXPac.hh
725 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#ifndef MSXPAC_HH
2
#define MSXPAC_HH
3
4
#include "MSXDevice.hh"
5
#include "SRAM.hh"
6
7
namespace openmsx {
8
9
class MSXPac final : public MSXDevice
10
{
11
public:
12
	explicit MSXPac(const DeviceConfig& config);
13
14
	void reset(EmuTime time) override;
15
	[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override;
16
	void writeMem(uint16_t address, byte value, EmuTime time) override;
17
	[[nodiscard]] const byte* getReadCacheLine(uint16_t address) const override;
18
	[[nodiscard]] byte* getWriteCacheLine(uint16_t address) override;
19
20
	template<typename Archive>
21
	void serialize(Archive& ar, unsigned version);
22
23
private:
24
	void checkSramEnable();
25
26
private:
27
	SRAM sram;
28
	byte r1ffe, r1fff;
29
	bool sramEnabled;
30
};
31
32
} // namespace openmsx
33
34
#endif