Crude implementation for cmos A update-in-progress bit

This commit is contained in:
Fabian 2022-09-07 20:18:25 +09:00
parent 4e9ceb0ec1
commit 1a27b72311

View file

@ -242,6 +242,13 @@ RTC.prototype.cmos_port_read = function()
return this.encode_time(new Date(this.rtc_time).getUTCFullYear() % 100);
case CMOS_STATUS_A:
if(v86.microtick() % 1000 >= 999)
{
// Set update-in-progress for one millisecond every second (we
// may not have precision higher than that in browser
// environments)
return this.cmos_a | 0x80;
}
return this.cmos_a;
case CMOS_STATUS_B:
//dbg_log("cmos read from index " + h(index));