openMSX
TurboRFDC.hh
Go to the documentation of this file.
1 #ifndef TURBORFDC_HH
2 #define TURBORFDC_HH
3 
4 #include "MSXFDC.hh"
5 #include "RomBlockDebuggable.hh"
6 #include "TC8566AF.hh"
7 
8 namespace openmsx {
9 
10 class TurboRFDC final : public MSXFDC
11 {
12 public:
13  enum Type { BOTH, R7FF2, R7FF8 };
14 
15  explicit TurboRFDC(const DeviceConfig& config);
16 
17  void reset(EmuTime::param time) override;
18  [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
19  [[nodiscard]] byte peekMem(word address, EmuTime::param time) const override;
20  void writeMem(word address, byte value, EmuTime::param time) override;
21  [[nodiscard]] const byte* getReadCacheLine(word start) const override;
22  [[nodiscard]] byte* getWriteCacheLine(word address) const override;
23 
24  template<typename Archive>
25  void serialize(Archive& ar, unsigned version);
26 
27 private:
28  void setBank(byte value);
29 
30 private:
31  TC8566AF controller;
32  RomBlockDebuggable romBlockDebug;
33  const byte* memory;
34  const byte blockMask;
35  byte bank;
36  const Type type;
37 };
38 
39 } // namespace openmsx
40 
41 #endif
void reset(EmuTime::param time) override
This method is called on reset.
Definition: TurboRFDC.cc:51
void serialize(Archive &ar, unsigned version)
Definition: TurboRFDC.cc:212
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
Definition: TurboRFDC.cc:91
TurboRFDC(const DeviceConfig &config)
Definition: TurboRFDC.cc:40
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: TurboRFDC.cc:154
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition: TurboRFDC.cc:143
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition: TurboRFDC.cc:200
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: TurboRFDC.cc:57
This file implemented 3 utility functions:
Definition: Autofire.cc:9
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29