openMSX
SpectravideoFDC.hh
Go to the documentation of this file.
1 #ifndef SPECTRAVIDEOFDC_HH
2 #define SPECTRAVIDEOFDC_HH
3 
4 #include "WD2793BasedFDC.hh"
5 #include "Rom.hh"
6 
7 namespace openmsx {
8 
9 class SpectravideoFDC final : public WD2793BasedFDC
10 {
11 public:
12  explicit SpectravideoFDC(const DeviceConfig& config);
13 
14  void reset(EmuTime::param time) override;
15  [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
16  [[nodiscard]] byte peekMem(word address, EmuTime::param time) const override;
17  void writeMem(word address, byte value, EmuTime::param time) override;
18  [[nodiscard]] const byte* getReadCacheLine(word start) const override;
19  [[nodiscard]] byte* getWriteCacheLine(word address) const override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  bool cpmRomEnabled;
26  Rom cpmRom;
27 };
28 
29 } // namespace openmsx
30 
31 #endif
Rom.hh
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
openmsx::SpectravideoFDC::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: SpectravideoFDC.cc:33
openmsx::SpectravideoFDC::readMem
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: SpectravideoFDC.cc:38
openmsx::SpectravideoFDC::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: SpectravideoFDC.cc:118
openmsx::SpectravideoFDC::getReadCacheLine
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition: SpectravideoFDC.cc:102
openmsx::WD2793BasedFDC
Definition: WD2793BasedFDC.hh:12
openmsx::SpectravideoFDC::SpectravideoFDC
SpectravideoFDC(const DeviceConfig &config)
Definition: SpectravideoFDC.cc:23
openmsx::Rom
Definition: Rom.hh:21
openmsx::SpectravideoFDC::peekMem
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
Definition: SpectravideoFDC.cc:68
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
WD2793BasedFDC.hh
openmsx::SpectravideoFDC::getWriteCacheLine
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
Definition: SpectravideoFDC.cc:152
openmsx::SpectravideoFDC::serialize
void serialize(Archive &ar, unsigned version)
Definition: SpectravideoFDC.cc:163
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::SpectravideoFDC
Definition: SpectravideoFDC.hh:10