openMSX
RomKonamiSCC.hh
Go to the documentation of this file.
1#ifndef ROMKONAMISCC_HH
2#define ROMKONAMISCC_HH
3
4#include "RomBlocks.hh"
5#include "SCC.hh"
6
7namespace openmsx {
8
9class RomKonamiSCC final : public Rom8kBBlocks
10{
11public:
12 RomKonamiSCC(const DeviceConfig& config, Rom&& rom);
13
14 void powerUp(EmuTime::param time) override;
15 void reset(EmuTime::param time) override;
16 [[nodiscard]] byte peekMem(word address, EmuTime::param time) const override;
17 [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
18 [[nodiscard]] const byte* getReadCacheLine(word address) const override;
19 void writeMem(word address, byte value, EmuTime::param time) override;
20 [[nodiscard]] byte* getWriteCacheLine(word address) override;
21
22 template<typename Archive>
23 void serialize(Archive& ar, unsigned version);
24
25private:
26 void bankSwitch(unsigned page, unsigned block);
27
28private:
29 SCC scc;
30 bool sccEnabled;
31};
32
33} // namespace openmsx
34
35#endif
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void writeMem(word address, byte value, EmuTime::param time) override
Write a given byte to a given location at a certain time to this device.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
void powerUp(EmuTime::param time) override
This method is called when MSX is powered up.
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void serialize(Archive &ar, unsigned version)
byte * getWriteCacheLine(word address) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
void reset(EmuTime::param time) override
This method is called on reset.
This file implemented 3 utility functions:
Definition Autofire.cc:11
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29