mirror of
https://codeberg.org/sethm/symon.git
synced 2026-11-13 12:32:23 +00:00
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() {
|
||||
lastRxRead = System.nanoTime();
|
||||
overrun = false;
|
||||
rxFull = false;
|
||||
return rxChar;
|
||||
}
|
||||
|
||||
public synchronized void rxWrite(int data) {
|
||||
if(rxFull) {
|
||||
overrun = true;
|
||||
}
|
||||
|
||||
rxFull = true;
|
||||
|
||||
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) {
|
||||
commandRegister = data;
|
||||
|
||||
|
||||
Reference in new issue
Block a user