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 
13 class MSXMatsushita final : public MSXDevice, public MSXSwitchedDevice
14 {
15 public:
16  explicit MSXMatsushita(const DeviceConfig& config);
18 
19  // MSXDevice
20  void reset(EmuTime::param time) override;
21 
22  // MSXSwitchedDevice
23  byte readSwitchedIO(word port, EmuTime::param time) override;
24  byte peekSwitchedIO(word port, EmuTime::param time) const override;
25  void writeSwitchedIO(word port, byte value, EmuTime::param time) override;
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
unsigned char byte
8 bit unsigned integer
Definition: openmsx.hh:27
void writeSwitchedIO(word port, byte value, EmuTime::param time) override
byte readSwitchedIO(word port, EmuTime::param time) override
MSXMatsushita(const DeviceConfig &config)
SRAM
Definition: SRAM.cc:140
unsigned char nibble
4 bit integer
Definition: openmsx.hh:22
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:7
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
void reset(EmuTime::param time) override
This method is called on reset.
void serialize(Archive &ar, unsigned version)
byte peekSwitchedIO(word port, EmuTime::param time) const override