* Add ACIA Interrupt tests.

* Fix ACIA6850 Interrupt behavior, Interrupt should be cleared on status register read.
* Remove unneeded cpuAccess if statement from Acia6850 write that was preventing build completion
* Fix ACIA6850 Tests so they run.
This commit is contained in:
Matt Harlum committed 2017-06-06 12:55:35 +10:00
1 parent 3c3aee30a7
commit faf5d22660
3 files changed
+173 -13

No files matched your search

@@ -30,8 +30,8 @@ import com.loomcom.symon.exceptions.MemoryRangeException;
/**
* This is a simulation of the Motorola 6850 ACIA, with limited
* functionality. Interrupts are not supported.
* <p/>
* functionality.
*
* Unlike a 16550 UART, the 6850 ACIA has only one-byte transmit and
* receive buffers. It is the programmer's responsibility to check the
* status (full or empty) for transmit and receive buffers before
@@ -56,9 +56,6 @@ public class Acia6850 extends Acia {
public int read(int address, boolean cpuAccess) throws MemoryAccessException {
switch (address) {
case RX_REG:
if (cpuAccess) {
interrupt = false;
}
return rxRead(cpuAccess);
case STAT_REG:
return statusReg(cpuAccess);
@@ -72,9 +69,6 @@ public class Acia6850 extends Acia {
public void write(int address, int data) throws MemoryAccessException {
switch (address) {
case TX_REG:
if (cpuAccess) {
interrupt = false;
}
txWrite(data);
break;
case CTRL_REG:
@@ -119,6 +113,10 @@ public class Acia6850 extends Acia {
stat |= 0x80;
}
if (cpuAccess) {
interrupt = false;
}
return stat;
}