mirror of
https://github.com/holub/mame
synced 2025-05-25 15:25:33 +03:00
Fix clock used in Namco systems 12 & 23.
This commit is contained in:
parent
4df40b369c
commit
1b4e540fbd
@ -10,7 +10,6 @@
|
|||||||
not all games work due to either banking, dma or protection issues.
|
not all games work due to either banking, dma or protection issues.
|
||||||
graphics are glitchy in some games.
|
graphics are glitchy in some games.
|
||||||
|
|
||||||
- day, date, and year from the RTC appear to be ignored (hour/min/sec are fine). H8 core bug or BIOS doesn't care?
|
|
||||||
- golgo13 assumes the test switch is a switch, not a button - must hold down F2 to stay in test mode
|
- golgo13 assumes the test switch is a switch, not a button - must hold down F2 to stay in test mode
|
||||||
|
|
||||||
|
|
||||||
@ -1311,16 +1310,19 @@ static READ8_HANDLER( s12_mcu_rtc_r )
|
|||||||
ret = make_bcd(systime.local_time.hour); // hour (BCD, 0-23)
|
ret = make_bcd(systime.local_time.hour); // hour (BCD, 0-23)
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ret = make_bcd(weekday[systime.local_time.weekday]); // day of the week (1 = Monday, 7 = Sunday)
|
ret = make_bcd(weekday[systime.local_time.weekday]); // low nibble = day of the week
|
||||||
|
ret |= (make_bcd(systime.local_time.mday) & 0x0f)<<4; // high nibble = low digit of day
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
ret = make_bcd(systime.local_time.mday); // day (BCD, 1-31)
|
ret = (make_bcd(systime.local_time.mday) >> 4); // low nibble = high digit of day
|
||||||
|
ret |= (make_bcd(systime.local_time.month + 1) & 0x0f)<<4; // high nibble = low digit of month
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
ret = make_bcd(systime.local_time.month + 1); // month (BCD, 1-12)
|
ret = make_bcd(systime.local_time.month + 1) >> 4; // low nibble = high digit of month
|
||||||
|
ret |= (make_bcd(systime.local_time.year % 10) << 4); // high nibble = low digit of year
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
ret = make_bcd(systime.local_time.year % 100); // year (BCD, 0-99)
|
ret = make_bcd(systime.local_time.year % 100) >> 4; // low nibble = tens digit of year (BCD, 0-9)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1152,16 +1152,19 @@ static READ8_HANDLER( s23_mcu_rtc_r )
|
|||||||
ret = make_bcd(systime.local_time.hour); // hour (BCD, 0-23)
|
ret = make_bcd(systime.local_time.hour); // hour (BCD, 0-23)
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ret = make_bcd(weekday[systime.local_time.weekday]); // day of the week (1 = Monday, 7 = Sunday)
|
ret = make_bcd(weekday[systime.local_time.weekday]); // low nibble = day of the week
|
||||||
|
ret |= (make_bcd(systime.local_time.mday) & 0x0f)<<4; // high nibble = low digit of day
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
ret = make_bcd(systime.local_time.mday); // day (BCD, 1-31)
|
ret = (make_bcd(systime.local_time.mday) >> 4); // low nibble = high digit of day
|
||||||
|
ret |= (make_bcd(systime.local_time.month + 1) & 0x0f)<<4; // high nibble = low digit of month
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
ret = make_bcd(systime.local_time.month + 1); // month (BCD, 1-12)
|
ret = make_bcd(systime.local_time.month + 1) >> 4; // low nibble = high digit of month
|
||||||
|
ret |= (make_bcd(systime.local_time.year % 10) << 4); // high nibble = low digit of year
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
ret = make_bcd(systime.local_time.year % 100); // year (BCD, 0-99)
|
ret = make_bcd(systime.local_time.year % 100) >> 4; // low nibble = tens digit of year (BCD, 0-9)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user