mirror of
https://github.com/sethm/symon.git
synced 2024-09-29 04:54:53 +00:00
Compare commits
No commits in common. "b725fb5fddcbb39aa52f32048c2920b40adff7c4" and "cda9a218afd0a35431054b2f5927b22ea257ee37" have entirely different histories.
b725fb5fdd
...
cda9a218af
@ -28,7 +28,7 @@ import com.loomcom.symon.exceptions.MemoryRangeException;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a simulation of the MOS 6551 ACIA, with limited
|
* This is a simulation of the MOS 6551 ACIA, with limited
|
||||||
* functionality.
|
* functionality. Interrupts are not supported.
|
||||||
* <p/>
|
* <p/>
|
||||||
* Unlike a 16550 UART, the 6551 ACIA has only one-byte transmit and
|
* Unlike a 16550 UART, the 6551 ACIA has only one-byte transmit and
|
||||||
* receive buffers. It is the programmer's responsibility to check the
|
* receive buffers. It is the programmer's responsibility to check the
|
||||||
@ -74,16 +74,16 @@ public class Acia6551 extends Acia {
|
|||||||
@Override
|
@Override
|
||||||
public void write(int address, int data) throws MemoryAccessException {
|
public void write(int address, int data) throws MemoryAccessException {
|
||||||
switch (address) {
|
switch (address) {
|
||||||
case DATA_REG:
|
case 0:
|
||||||
txWrite(data);
|
txWrite(data);
|
||||||
break;
|
break;
|
||||||
case STAT_REG:
|
case 1:
|
||||||
reset();
|
reset();
|
||||||
break;
|
break;
|
||||||
case CMND_REG:
|
case 2:
|
||||||
setCommandRegister(data);
|
setCommandRegister(data);
|
||||||
break;
|
break;
|
||||||
case CTRL_REG:
|
case 3:
|
||||||
setControlRegister(data);
|
setControlRegister(data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -116,7 +116,7 @@ public class Acia6551 extends Acia {
|
|||||||
if (data == 0) {
|
if (data == 0) {
|
||||||
reset();
|
reset();
|
||||||
} else {
|
} else {
|
||||||
// Mask the lower four bits to get the baud rate.
|
// Mask the lower three bits to get the baud rate.
|
||||||
int baudSelector = data & 0x0f;
|
int baudSelector = data & 0x0f;
|
||||||
switch (baudSelector) {
|
switch (baudSelector) {
|
||||||
case 0:
|
case 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user