OXYGENHUB
◆ main openmsx / src / memory / RomKonamiSCC.hh
868 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef ROMKONAMISCC_HH
2
#define ROMKONAMISCC_HH
3
4
#include "RomBlocks.hh"
5
#include "SCC.hh"
6
7
namespace openmsx {
8
9
class RomKonamiSCC final : public Rom8kBBlocks
10
{
11
public:
12
	RomKonamiSCC(const DeviceConfig& config, Rom&& rom);
13
14
	void powerUp(EmuTime time) override;
15
	void reset(EmuTime time) override;
16
	[[nodiscard]] byte peekMem(uint16_t address, EmuTime time) const override;
17
	[[nodiscard]] byte readMem(uint16_t address, EmuTime time) override;
18
	[[nodiscard]] const byte* getReadCacheLine(uint16_t address) const override;
19
	void writeMem(uint16_t address, byte value, EmuTime time) 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
	void bankSwitch(unsigned page, unsigned block);
27
28
private:
29
	SCC scc;
30
	bool sccEnabled;
31
};
32
33
} // namespace openmsx
34
35
#endif