| 1 |
#ifndef MSXRTC_HH |
| 2 |
#define MSXRTC_HH |
| 3 |
|
| 4 |
#include "MSXDevice.hh" |
| 5 |
#include "RP5C01.hh" |
| 6 |
#include "SRAM.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 time) override; |
| 16 |
[[nodiscard]] uint8_t readIO(uint16_t port, EmuTime time) override; |
| 17 |
[[nodiscard]] uint8_t peekIO(uint16_t port, EmuTime time) const override; |
| 18 |
void writeIO(uint16_t port, uint8_t value, EmuTime time) override; |
| 19 |
|
| 20 |
template<typename Archive> |
| 21 |
void serialize(Archive& ar, unsigned version); |
| 22 |
|
| 23 |
private: |
| 24 |
SRAM sram; |
| 25 |
RP5C01 rp5c01; |
| 26 |
uint4_t registerLatch; |
| 27 |
}; |
| 28 |
|
| 29 |
} |
| 30 |
|
| 31 |
#endif |