コード例 #1
0
ファイル: timekeep.c プロジェクト: cgrobbelaar/svofski
void time_nextsecond() {
    time.ss = bcd_increment(time.ss);
    if (time.ss == 0x60) {
        time.ss = 0;
        time_nextminute();
    }
}
コード例 #2
0
ファイル: timekeep.c プロジェクト: cgrobbelaar/svofski
void time_nextminute() {
    time.mm = bcd_increment(time.mm);
    if (time.mm == 0x60) {
        time.mm = 0;
        time_nexthour();
    }
}
コード例 #3
0
ファイル: timekeep.c プロジェクト: cgrobbelaar/svofski
void time_nexthour() {
    time.hh = bcd_increment(time.hh);
    if (time.hh == 0x24) {
        time.hh = 0;
    }
}
コード例 #4
0
ファイル: 6526cia.c プロジェクト: bdidier/MAME-OS-X
	return value;
}

/*-------------------------------------------------
    cia6526_increment
-------------------------------------------------*/

void mos6526_device::increment()
{
	/* break down TOD value into components */
	UINT8 subsecond	= (UINT8) (m_tod >>  0);
	UINT8 second	= (UINT8) (m_tod >>  8);
	UINT8 minute	= (UINT8) (m_tod >> 16);
	UINT8 hour		= (UINT8) (m_tod >> 24);

	subsecond = bcd_increment(subsecond);
	if (subsecond >= 0x10)
	{
		subsecond = 0x00;
		second = bcd_increment(second);
		if (second >= ((m_timer[0].m_mode & 0x80) ? 0x50 : 0x60))
		{
			second = 0x00;
			minute = bcd_increment(minute);
			if (minute >= 0x60)
			{
				minute = 0x00;
				if (hour == 0x91)
					hour = 0x00;
				else if (hour == 0x89)
					hour = 0x90;