summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/rtc9701.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/rtc9701.h')
-rw-r--r--src/devices/machine/rtc9701.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/devices/machine/rtc9701.h b/src/devices/machine/rtc9701.h
index 922fc6a0ad6..8d25983fefb 100644
--- a/src/devices/machine/rtc9701.h
+++ b/src/devices/machine/rtc9701.h
@@ -13,6 +13,8 @@
#pragma once
+#include "dirtc.h"
+
//**************************************************************************
// TYPE DEFINITIONS
@@ -22,7 +24,8 @@
// ======================> rtc9701_device
class rtc9701_device : public device_t,
- public device_nvram_interface
+ public device_nvram_interface,
+ public device_rtc_interface
{
public:
// construction/destruction
@@ -30,10 +33,10 @@ public:
// I/O operations
- DECLARE_WRITE_LINE_MEMBER( write_bit );
- DECLARE_READ_LINE_MEMBER( read_bit );
- DECLARE_WRITE_LINE_MEMBER( set_cs_line );
- DECLARE_WRITE_LINE_MEMBER( set_clock_line );
+ void write_bit(int state);
+ int read_bit();
+ void set_cs_line(int state);
+ void set_clock_line(int state);
TIMER_CALLBACK_MEMBER(timer_callback);
protected:
@@ -60,11 +63,16 @@ protected:
// device_nvram_interface overrides
virtual void nvram_default() override;
- virtual void nvram_read(emu_file &file) override;
- virtual void nvram_write(emu_file &file) override;
+ virtual bool nvram_read(util::read_stream &file) override;
+ virtual bool nvram_write(util::write_stream &file) override;
inline uint8_t rtc_read(uint8_t offset);
inline void rtc_write(uint8_t offset,uint8_t data);
+ // device_rtc_interface overrides
+ virtual bool rtc_feature_y2k() const override { return false; }
+ virtual bool rtc_feature_leap_year() const override { return true; }
+ virtual void rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second) override;
+
int m_latch;
int m_reset_line;
int m_clock_line;