summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/ds128x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/ds128x.cpp')
-rw-r--r--src/devices/machine/ds128x.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/devices/machine/ds128x.cpp b/src/devices/machine/ds128x.cpp
index 7c824aba638..7a397aab303 100644
--- a/src/devices/machine/ds128x.cpp
+++ b/src/devices/machine/ds128x.cpp
@@ -3,8 +3,6 @@
#include "emu.h"
#include "ds128x.h"
-/// TODO: Only DV2/DV1/DV0 == 0/1/0 is supported as the chip only has a 15 stage divider and not 22.
-
DEFINE_DEVICE_TYPE(DS12885, ds12885_device, "ds12885", "DS12885 RTC/NVRAM")
//-------------------------------------------------
@@ -15,3 +13,13 @@ ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, d
: mc146818_device(mconfig, DS12885, tag, owner, clock)
{
}
+
+int ds12885_device::get_timer_bypass()
+{
+ if( !( m_data[REG_A] & REG_A_DV0 ) ) //DV0 must be 0 for timekeeping
+ {
+ return 7; // Fixed at 1 Hz with clock at 32768Hz
+ }
+
+ return 22; // No tick
+}