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 "FirmwareSwitch.hh"
7 #include "SRAM.hh"
8 
9 namespace openmsx {
10 
11 class MSXMatsushita final : public MSXDevice, public MSXSwitchedDevice
12 {
13 public:
14  explicit MSXMatsushita(const DeviceConfig& config);
15 
16  // MSXDevice
17  void reset(EmuTime::param time) override;
18 
19  // MSXSwitchedDevice
20  byte readSwitchedIO(word port, EmuTime::param time) override;
21  byte peekSwitchedIO(word port, EmuTime::param time) const override;
22  void writeSwitchedIO(word port, byte value, EmuTime::param time) override;
23 
24  template<typename Archive>
25  void serialize(Archive& ar, unsigned version);
26 
27 private:
28  FirmwareSwitch firmwareSwitch;
29  SRAM sram;
30  word address;
31  nibble color1, color2;
32  byte pattern;
33 };
34 
35 } // namespace openmsx
36 
37 #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)
Definition: MSXMatsushita.cc:9
unsigned char nibble
4 bit integer
Definition: openmsx.hh:22
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
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