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  [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
17  void writeMem(word address, byte value, EmuTime::param time) override;
18  [[nodiscard]] const byte* getReadCacheLine(word address) const override;
19  [[nodiscard]] 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
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:106
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:52
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:78
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:65
void serialize(Archive &ar, unsigned version)
Definition: RomAscii8_8.cc:120
void reset(EmuTime::param time) override
This method is called on reset.
Definition: RomAscii8_8.cc:39
RomAscii8_8(const DeviceConfig &config, Rom &&rom, SubType subType)
Definition: RomAscii8_8.cc:25
static constexpr unsigned NUM_BANKS
Definition: RomBlocks.hh:17
This file implemented 3 utility functions:
Definition: Autofire.cc:9
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29