move overrun detection and reset into the abstract superclass for ACIAs
This commit is contained in:
1 parent
cf36f731da
commit
4a37dd7463
2 files changed
+5
-15
No files matched your search
@@ -108,11 +108,16 @@ public abstract class Acia extends Device {
|
|||||||
|
|
||||||
public synchronized int rxRead() {
|
public synchronized int rxRead() {
|
||||||
lastRxRead = System.nanoTime();
|
lastRxRead = System.nanoTime();
|
||||||
|
overrun = false;
|
||||||
rxFull = false;
|
rxFull = false;
|
||||||
return rxChar;
|
return rxChar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void rxWrite(int data) {
|
public synchronized void rxWrite(int data) {
|
||||||
|
if(rxFull) {
|
||||||
|
overrun = true;
|
||||||
|
}
|
||||||
|
|
||||||
rxFull = true;
|
rxFull = true;
|
||||||
|
|
||||||
if (receiveIrqEnabled) {
|
if (receiveIrqEnabled) {
|
||||||
|
|||||||
@@ -87,21 +87,6 @@ public class Acia6850 extends Acia {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public synchronized int rxRead() {
|
|
||||||
overrun = false;
|
|
||||||
return super.rxRead();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public synchronized void rxWrite(int data) {
|
|
||||||
if(rxFull) {
|
|
||||||
overrun = true;
|
|
||||||
}
|
|
||||||
super.rxWrite(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void setCommandRegister(int data) {
|
private void setCommandRegister(int data) {
|
||||||
commandRegister = data;
|
commandRegister = data;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user