openMSX
RomAscii8_8.hh
Go to the documentation of this file.
1 #ifndef ROMASCII8_8_HH
2 #define ROMASCII8_8_HH
3 
4 #include "RomBlocks.hh"
5 
6 namespace openmsx {
7 
8 class RomAscii8_8 final : public Rom8kBBlocks
9 {
10 public:
12  RomAscii8_8(const DeviceConfig& config,
13  Rom&& rom, SubType subType);
14 
15  void reset(EmuTime::param time) override;
16  byte readMem(word address, EmuTime::param time) override;
17  void writeMem(word address, byte value, EmuTime::param time) override;
18  const byte* getReadCacheLine(word address) const override;
19  byte* getWriteCacheLine(word address) const override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  const byte sramEnableBit;
26  const byte sramPages;
27  byte sramEnabled;
28  byte sramBlock[NUM_BANKS];
29 };
30 
31 } // namespace openmsx
32 
33 #endif
openmsx::RomAscii8_8::ASCII8_32
Definition: RomAscii8_8.hh:11
openmsx::RomAscii8_8::SubType
SubType
Definition: RomAscii8_8.hh:11
openmsx::RomAscii8_8::KOEI_32
Definition: RomAscii8_8.hh:11
openmsx::RomAscii8_8::WIZARDRY
Definition: RomAscii8_8.hh:11
openmsx::RomAscii8_8::ASCII8_8
Definition: RomAscii8_8.hh:11
openmsx::DeviceConfig
Definition: DeviceConfig.hh:19
openmsx::RomAscii8_8::getWriteCacheLine
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition: RomAscii8_8.cc:104
openmsx::RomAscii8_8::writeMem
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.
Definition: RomAscii8_8.cc:77
openmsx::RomAscii8_8::RomAscii8_8
RomAscii8_8(const DeviceConfig &config, Rom &&rom, SubType subType)
Definition: RomAscii8_8.cc:23
openmsx::RomAscii8_8::serialize
void serialize(Archive &ar, unsigned version)
Definition: RomAscii8_8.cc:118
openmsx::RomAscii8_8::getReadCacheLine
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition: RomAscii8_8.cc:64
openmsx::RomBlocks::NUM_BANKS
static constexpr unsigned NUM_BANKS
Definition: RomBlocks.hh:17
openmsx::RomAscii8_8
Definition: RomAscii8_8.hh:8
openmsx::RomBlocks
Definition: RomBlocks.hh:13
openmsx::MSXRom::rom
Rom rom
Definition: MSXRom.hh:20
openmsx::Rom
Definition: Rom.hh:20
openmsx::RomAscii8_8::readMem
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: RomAscii8_8.cc:51
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::RomAscii8_8::ASCII8_2
Definition: RomAscii8_8.hh:11
openmsx::RomAscii8_8::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: RomAscii8_8.cc:38
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::RomAscii8_8::KOEI_8
Definition: RomAscii8_8.hh:11
RomBlocks.hh