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
openmsx::RomMitsubishiMLTS2::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: RomMitsubishiMLTS2.cc:16
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
openmsx::RomMitsubishiMLTS2
Definition: RomMitsubishiMLTS2.hh:15
openmsx::RomMitsubishiMLTS2::RomMitsubishiMLTS2
RomMitsubishiMLTS2(const DeviceConfig &config, Rom &&rom)
Definition: RomMitsubishiMLTS2.cc:9
openmsx::RomMitsubishiMLTS2::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: RomMitsubishiMLTS2.cc:21
Ram.hh
openmsx::RomMitsubishiMLTS2::getWriteCacheLine
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition: RomMitsubishiMLTS2.cc:78
openmsx::RomMitsubishiMLTS2::serialize
void serialize(Archive &ar, unsigned version)
Definition: RomMitsubishiMLTS2.cc:88
openmsx::RomBlocks
Definition: RomBlocks.hh:14
openmsx::MSXRom::rom
Rom rom
Definition: MSXRom.hh:20
openmsx::Rom
Definition: Rom.hh:21
openmsx::Ram
Definition: Ram.hh:16
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::RomMitsubishiMLTS2::peekMem
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
Definition: RomMitsubishiMLTS2.cc:49
openmsx::RomMitsubishiMLTS2::readMem
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: RomMitsubishiMLTS2.cc:44
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::RomMitsubishiMLTS2::getReadCacheLine
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition: RomMitsubishiMLTS2.cc:69
RomBlocks.hh