openMSX
NowindInterface.hh
Go to the documentation of this file.
1 #ifndef NOWINDINTERFACE_HH
2 #define NOWINDINTERFACE_HH
3 
4 #include "MSXDevice.hh"
5 #include <memory>
6 #include <vector>
7 #include <string>
8 
9 namespace openmsx {
10 
11 class NowindCommand;
12 class Rom;
13 class AmdFlash;
14 class DiskChanger;
15 class DiskContainer;
16 class NowindHost;
17 
18 class NowindInterface : public MSXDevice
19 {
20 public:
21  typedef std::vector<std::unique_ptr<DiskContainer>> Drives;
22 
23  explicit NowindInterface(const DeviceConfig& config);
24  virtual ~NowindInterface();
25 
26  virtual void reset(EmuTime::param time);
27  virtual byte peek(word address, EmuTime::param time) const;
28  virtual byte readMem(word address, EmuTime::param time);
29  virtual void writeMem(word address, byte value, EmuTime::param time);
30  virtual const byte* getReadCacheLine(word address) const;
31  virtual byte* getWriteCacheLine(word address) const;
32 
33  template<typename Archive>
34  void serialize(Archive& ar, unsigned version);
35 
36 private:
37  const std::unique_ptr<Rom> rom;
38  const std::unique_ptr<AmdFlash> flash;
39  const std::unique_ptr<NowindHost> host;
40  std::unique_ptr<NowindCommand> command;
41  Drives drives;
42  std::string basename;
43  byte bank;
44 
45  friend class NowindCommand;
46 };
47 
48 } // namespace openmsx
49 
50 #endif