summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-06-14 16:59:53 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-06-14 16:59:53 -0400
commitb99ebe6d620bfdb32e28fa6c8d12f0658d199993 (patch)
tree8a4e3cf16106c073261acadba452b554043db647 /src/devices/machine
parent650c0c04db11352aa69d565af12109d1a3787a19 (diff)
yesnoj: Add TC8521 RTC (though the game remains stuck in the 20th century)
tc8521: Add device type as alias for RP5C01 (nw)
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/rp5c01.cpp19
-rw-r--r--src/devices/machine/rp5c01.h13
2 files changed, 30 insertions, 2 deletions
diff --git a/src/devices/machine/rp5c01.cpp b/src/devices/machine/rp5c01.cpp
index 99eb81ca4df..6bbc68be94e 100644
--- a/src/devices/machine/rp5c01.cpp
+++ b/src/devices/machine/rp5c01.cpp
@@ -20,8 +20,9 @@
#include "rp5c01.h"
-// device type definition
+// device type definitions
DEFINE_DEVICE_TYPE(RP5C01, rp5c01_device, "rp5c01", "Ricoh RP5C01 RTC")
+DEFINE_DEVICE_TYPE(TC8521, tc8521_device, "tc8521", "Toshiba TC8521 RTC")
//**************************************************************************
@@ -169,7 +170,12 @@ inline void rp5c01_device::check_alarm()
//-------------------------------------------------
rp5c01_device::rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, RP5C01, tag, owner, clock),
+ : rp5c01_device(mconfig, RP5C01, tag, owner, clock)
+{
+}
+
+rp5c01_device::rp5c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, type, tag, owner, clock),
device_rtc_interface(mconfig, *this),
device_nvram_interface(mconfig, *this),
m_out_alarm_cb(*this),
@@ -416,3 +422,12 @@ WRITE8_MEMBER( rp5c01_device::write )
break;
}
}
+
+//-------------------------------------------------
+// tc8521_device - constructor
+//-------------------------------------------------
+
+tc8521_device::tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : rp5c01_device(mconfig, TC8521, tag, owner, clock)
+{
+}
diff --git a/src/devices/machine/rp5c01.h b/src/devices/machine/rp5c01.h
index c80d9c48405..247c6157ad0 100644
--- a/src/devices/machine/rp5c01.h
+++ b/src/devices/machine/rp5c01.h
@@ -62,6 +62,9 @@ public:
DECLARE_WRITE_LINE_MEMBER( adj_w ) { if (state) adjust_seconds(); }
protected:
+ // construction/destruction
+ rp5c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
// device-level overrides
virtual void device_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@@ -103,8 +106,18 @@ private:
emu_timer *m_16hz_timer;
};
+// ======================> tc8521_device
+
+class tc8521_device : public rp5c01_device
+{
+public:
+ // construction/destruction
+ tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+};
+
// device type definition
DECLARE_DEVICE_TYPE(RP5C01, rp5c01_device)
+DECLARE_DEVICE_TYPE(TC8521, tc8521_device)
#endif // MAME_MACHINE_RP5C01_H