openMSX
MSXRTC.hh
Go to the documentation of this file.
1 #ifndef MSXRTC_HH
2 #define MSXRTC_HH
3 
4 #include "MSXDevice.hh"
5 #include "SRAM.hh"
6 #include "RP5C01.hh"
7 
8 namespace openmsx {
9 
10 class MSXRTC final : public MSXDevice
11 {
12 public:
13  explicit MSXRTC(const DeviceConfig& config);
14 
15  void reset(EmuTime::param time) override;
16  byte readIO(word port, EmuTime::param time) override;
17  byte peekIO(word port, EmuTime::param time) const override;
18  void writeIO(word port, byte value, EmuTime::param time) override;
19 
20  template<typename Archive>
21  void serialize(Archive& ar, unsigned version);
22 
23 private:
24  SRAM sram;
25  RP5C01 rp5c01;
26  nibble registerLatch;
27 };
28 
29 } // namespace openmsx
30 
31 #endif
openmsx::MSXDevice
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition: MSXDevice.hh:32
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
openmsx::RP5C01
Definition: RP5C01.hh:20
openmsx::SRAM
Definition: SRAM.hh:12
RP5C01.hh
openmsx::MSXRTC::readIO
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
Definition: MSXRTC.cc:24
openmsx::MSXRTC
Definition: MSXRTC.hh:11
openmsx::nibble
uint8_t nibble
4 bit integer
Definition: openmsx.hh:23
MSXDevice.hh
openmsx::MSXRTC::peekIO
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Definition: MSXRTC.cc:29
openmsx::MSXRTC::serialize
void serialize(Archive &ar, unsigned version)
Definition: MSXRTC.cc:49
SRAM.hh
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::MSXRTC::writeIO
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
Definition: MSXRTC.cc:34
openmsx::MSXRTC::MSXRTC
MSXRTC(const DeviceConfig &config)
Definition: MSXRTC.cc:7
openmsx::MSXRTC::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: MSXRTC.cc:15
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5