openMSX
MSXBunsetsu.hh
Go to the documentation of this file.
1 #ifndef MSXBUNSETSU_HH
2 #define MSXBUNSETSU_HH
3 
4 #include "MSXDevice.hh"
5 #include <memory>
6 
7 namespace openmsx {
8 
9 class Rom;
10 
11 class MSXBunsetsu final : public MSXDevice
12 {
13 public:
14  explicit MSXBunsetsu(const DeviceConfig& DeviceConfig);
15  ~MSXBunsetsu();
16 
17  void reset(EmuTime::param time) override;
18 
19  byte readMem(word address, EmuTime::param time) override;
20  void writeMem(word address, byte value, EmuTime::param time) override;
21  const byte* getReadCacheLine(word start) const override;
22  byte* getWriteCacheLine(word start) const override;
23 
24  template<typename Archive>
25  void serialize(Archive& ar, unsigned version);
26 
27 private:
28  const std::unique_ptr<Rom> bunsetsuRom;
29  const std::unique_ptr<Rom> jisyoRom;
30  unsigned jisyoAddress;
31 };
32 
33 } // namespace openmsx
34 
35 #endif
MSXBunsetsu(const DeviceConfig &DeviceConfig)
Definition: MSXBunsetsu.cc:9
unsigned char byte
8 bit unsigned integer
Definition: openmsx.hh:27
void serialize(Archive &ar, unsigned version)
Definition: MSXBunsetsu.cc:77
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: MSXBunsetsu.cc:42
void reset(EmuTime::param time) override
This method is called on reset.
Definition: MSXBunsetsu.cc:23
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading...
Definition: MSXBunsetsu.cc:58
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:7
byte * getWriteCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing...
Definition: MSXBunsetsu.cc:67
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX...
Definition: MSXDevice.hh:32
unsigned short word
16 bit unsigned integer
Definition: openmsx.hh:32
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: MSXBunsetsu.cc:28