implement overrun status flag for the 6551 ACIA
This commit is contained in:
1 parent
4a37dd7463
commit
252ebe0569
2 files changed
+23
-1
No files matched your search
@@ -181,7 +181,7 @@ public class Acia6551 extends Acia {
|
||||
*/
|
||||
@Override
|
||||
public int statusReg() {
|
||||
// TODO: Overrun, Parity Error, Framing Error, DTR, DSR, and Interrupt flags.
|
||||
// TODO: Parity Error, Framing Error, DTR, DSR, and Interrupt flags.
|
||||
int stat = 0;
|
||||
if (rxFull && System.nanoTime() >= (lastRxRead + baudRateDelay)) {
|
||||
stat |= 0x08;
|
||||
@@ -189,6 +189,9 @@ public class Acia6551 extends Acia {
|
||||
if (txEmpty && System.nanoTime() >= (lastTxWrite + baudRateDelay)) {
|
||||
stat |= 0x10;
|
||||
}
|
||||
if (overrun) {
|
||||
stat |= 0x04;
|
||||
}
|
||||
return stat;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user