Tweaked how the PCx86 RTC Update-in-Progress bit is set/cleared (allows SpinRite 3.1 to cleanly exit on a PC AT now)
This commit is contained in:
parent
b2d9b4b7b6
commit
7fb74e7d0d
10 changed files with 181 additions and 165 deletions
|
|
@ -38026,10 +38026,10 @@ class ChipSet extends Component {
|
|||
} else {
|
||||
if (iRTC == ChipSet.CMOS.ADDR.STATUSA) {
|
||||
/*
|
||||
* HACK: Perform a mindless toggling of the "Update-In-Progress" bit, so that it's flipped
|
||||
* on the next read; this makes the MODEL_5170 BIOS ("POST2_RTCUP") happy.
|
||||
* Make sure that the "Update-In-Progress" bit we set in updateRTCTime() doesn't stay set for
|
||||
* more than one read.
|
||||
*/
|
||||
this.abCMOSData[iRTC] ^= ChipSet.CMOS.STATUSA.UIP;
|
||||
this.abCMOSData[iRTC] &= ~ChipSet.CMOS.STATUSA.UIP;
|
||||
}
|
||||
}
|
||||
return b;
|
||||
|
|
@ -38256,6 +38256,14 @@ class ChipSet extends Component {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Obviously, setting the "Update-In-Progress" bit now might seem rather pointless, since we just
|
||||
* updated the RTC "atomically" as far as the machine is concerned; however, the bit must be set at
|
||||
* at some point, in order to make the MODEL_5170 BIOS ("POST2_RTCUP") happy.
|
||||
*/
|
||||
this.abCMOSData[ChipSet.CMOS.ADDR.STATUSA] |= ChipSet.CMOS.STATUSA.UIP;
|
||||
|
||||
this.abCMOSData[ChipSet.CMOS.ADDR.STATUSC] |= ChipSet.CMOS.STATUSC.UF;
|
||||
if (this.abCMOSData[ChipSet.CMOS.ADDR.STATUSB] & ChipSet.CMOS.STATUSB.UIE) {
|
||||
this.abCMOSData[ChipSet.CMOS.ADDR.STATUSC] |= ChipSet.CMOS.STATUSC.IRQF;
|
||||
|
|
|
|||
Loading…
Reference in a new issue