openMSX
RomMitsubishiMLTS2.hh
Go to the documentation of this file.
1 #ifndef ROMMITSUBISHIMLTS2_HH
2 #define ROMMITSUBISHIMLTS2_HH
3 
4 #include "RomBlocks.hh"
5 #include "Ram.hh"
6 
7 // PLEASE NOTE!
8 //
9 // This mapper is work in progress. It's just a guess based on some reverse
10 // engineering of the ROM by BiFi. It even contains some debug prints :)
11 
12 namespace openmsx {
13 
14 class RomMitsubishiMLTS2 final : public Rom8kBBlocks
15 {
16 public:
17  RomMitsubishiMLTS2(const DeviceConfig& config, Rom&& rom);
18 
19  void reset(EmuTime::param time) override;
20  void writeMem(word address, byte value, EmuTime::param time) override;
21  byte readMem(word address, EmuTime::param time) override;
22  byte peekMem(word address, EmuTime::param time) const override;
23  byte* getWriteCacheLine(word address) const override;
24  const byte* getReadCacheLine(word address) const override;
25 
26  template<typename Archive>
27  void serialize(Archive& ar, unsigned version);
28 
29 private:
30  Ram ram;
31 };
32 
33 } // namespace openmsx
34 
35 #endif
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
void serialize(Archive &ar, unsigned version)
RomMitsubishiMLTS2(const DeviceConfig &config, Rom &&rom)
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 readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void reset(EmuTime::param time) override
This method is called on reset.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading...
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing...