mirror of
https://github.com/holub/mame
synced 2025-06-04 11:56:28 +03:00

In the MC146818, DV2-DV0 were used to select the input frequency to provide a proper time base. Since the DS12885/87 and DS1685/87 use only the 32.768kHz crystal these 3 bits are used to turn the oscillator on or off and to reset the countdown chain. There are not used anymore to select the main clock divider value.
26 lines
669 B
C++
26 lines
669 B
C++
// license:BSD-3-Clause
|
|
// copyright-holders:smf
|
|
#include "emu.h"
|
|
#include "ds128x.h"
|
|
|
|
DEFINE_DEVICE_TYPE(DS12885, ds12885_device, "ds12885", "DS12885 RTC/NVRAM")
|
|
|
|
//-------------------------------------------------
|
|
// ds12885_device - constructor
|
|
//-------------------------------------------------
|
|
|
|
ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
|
: 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
|
|
}
|