示例#1
0
文件: dirtc.c 项目: Ilgrim/MAMEHub
void device_rtc_interface::advance_seconds()
{
	m_register[RTC_SECOND]++;

	if (m_register[RTC_SECOND] == 60)
	{
		m_register[RTC_SECOND] = 0;

		advance_minutes();
	}
	else
	{
		clock_updated();
	}
}
示例#2
0
文件: dirtc.c 项目: Ilgrim/MAMEHub
void device_rtc_interface::adjust_seconds()
{
	int seconds = get_clock_register(RTC_SECOND);

	set_clock_register(RTC_SECOND, 0);

	if (seconds >= 30)
	{
		advance_minutes();
	}
	else
	{
		clock_updated();
	}
}
示例#3
0
inline void msm5832_device::advance_seconds()
{
	int seconds = read_counter(REGISTER_S1);

	seconds++;

	if (seconds > 59)
	{
		seconds = 0;

		advance_minutes();
	}

	write_counter(REGISTER_S1, seconds);
}