openMSX
RomGameMaster2.hh
Go to the documentation of this file.
1 #ifndef ROMGAMEMASTER2_HH
2 #define ROMGAMEMASTER2_HH
3 
4 #include "RomBlocks.hh"
5 
6 namespace openmsx {
7 
8 class RomGameMaster2 final : public Rom4kBBlocks
9 {
10 public:
11  RomGameMaster2(const DeviceConfig& config, Rom&& rom);
12 
13  void reset(EmuTime::param time) override;
14  void writeMem(word address, byte value, EmuTime::param time) override;
15  byte* getWriteCacheLine(word address) const override;
16 
17  template<typename Archive>
18  void serialize(Archive& ar, unsigned version);
19 
20 private:
21  word sramOffset;
22  bool sramEnabled;
23 };
24 
25 } // namespace openmsx
26 
27 #endif
openmsx::RomGameMaster2
Definition: RomGameMaster2.hh:8
openmsx::DeviceConfig
Definition: DeviceConfig.hh:19
openmsx::RomGameMaster2::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: RomGameMaster2.cc:68
openmsx::RomGameMaster2::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: RomGameMaster2.cc:53
openmsx::RomGameMaster2::RomGameMaster2
RomGameMaster2(const DeviceConfig &config, Rom &&rom)
Definition: RomGameMaster2.cc:46
openmsx::RomGameMaster2::getWriteCacheLine
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition: RomGameMaster2.cc:96
openmsx::RomBlocks
Definition: RomBlocks.hh:13
openmsx::MSXRom::rom
Rom rom
Definition: MSXRom.hh:20
openmsx::Rom
Definition: Rom.hh:20
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::RomGameMaster2::serialize
void serialize(Archive &ar, unsigned version)
Definition: RomGameMaster2.cc:113
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
RomBlocks.hh