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
8namespace openmsx {
9
10class MSXRTC final : public MSXDevice
11{
12public:
13 explicit MSXRTC(const DeviceConfig& config);
14
15 void reset(EmuTime::param time) override;
16 [[nodiscard]] byte readIO(word port, EmuTime::param time) override;
17 [[nodiscard]] 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
23private:
24 SRAM sram;
25 RP5C01 rp5c01;
26 nibble registerLatch;
27};
28
29} // namespace openmsx
30
31#endif
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition MSXDevice.hh:36
void reset(EmuTime::param time) override
This method is called on reset.
Definition MSXRTC.cc:15
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Definition MSXRTC.cc:29
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
void serialize(Archive &ar, unsigned version)
Definition MSXRTC.cc:49
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
This file implemented 3 utility functions:
Definition Autofire.cc:11
uint8_t nibble
4 bit integer
Definition openmsx.hh:23
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29