openMSX
MSXMatsushita.hh
Go to the documentation of this file.
1 #ifndef MSXMATSUSHITA_HH
2 #define MSXMATSUSHITA_HH
3 
4 #include "MSXDevice.hh"
5 #include "MSXSwitchedDevice.hh"
6 #include <memory>
7 
8 namespace openmsx {
9 
10 class FirmwareSwitch;
11 class SRAM;
12 
14 {
15 public:
16  explicit MSXMatsushita(const DeviceConfig& config);
17  virtual ~MSXMatsushita();
18 
19  // MSXDevice
20  virtual void reset(EmuTime::param time);
21 
22  // MSXSwitchedDevice
23  virtual byte readSwitchedIO(word port, EmuTime::param time);
24  virtual byte peekSwitchedIO(word port, EmuTime::param time) const;
25  virtual void writeSwitchedIO(word port, byte value, EmuTime::param time);
26 
27  template<typename Archive>
28  void serialize(Archive& ar, unsigned version);
29 
30 private:
31  const std::unique_ptr<FirmwareSwitch> firmwareSwitch;
32  const std::unique_ptr<SRAM> sram;
33  word address;
34  nibble color1, color2;
35  byte pattern;
36 };
37 
38 } // namespace openmsx
39 
40 #endif
virtual void writeSwitchedIO(word port, byte value, EmuTime::param time)
unsigned char byte
8 bit unsigned integer
Definition: openmsx.hh:33
virtual byte peekSwitchedIO(word port, EmuTime::param time) const
MSXMatsushita(const DeviceConfig &config)
SRAM
Definition: SRAM.cc:140
virtual byte readSwitchedIO(word port, EmuTime::param time)
unsigned char nibble
4 bit integer
Definition: openmsx.hh:28
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:38
void serialize(Archive &ar, unsigned version)
virtual void reset(EmuTime::param time)
This method is called on reset.