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
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
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
void reset(EmuTime::param time) override
This method is called on reset.
Definition: RomAscii8_8.cc:38
void serialize(Archive &ar, unsigned version)
Definition: RomAscii8_8.cc:116
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:102
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
static const unsigned NUM_BANKS
Definition: RomBlocks.hh:17
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
RomAscii8_8(const DeviceConfig &config, Rom &&rom, SubType subType)
Definition: RomAscii8_8.cc:23
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
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