105106107108109110111112113114115
@Test public void aciaShouldHaveTxEmptyAndRxFullStatusOffIfRxAndTxHaveData() throws Exception { Acia acia = new Acia6551(0x000); acia.rxWrite('a'); acia.txWrite('b'); assertEquals(0x08, acia.read(0x0001)); }
118119120121122123124125126127128
throws Exception { Acia acia = new Acia6551(0x0000); // overrun ACIA acia.rxWrite('a'); acia.rxWrite('b'); assertEquals(0x04, acia.read(0x0001) & 0x04); // read should reset
119120121122123124125126127128129
Acia acia = new Acia6551(0x0000); // overrun ACIA acia.rxWrite('a'); acia.rxWrite('b'); assertEquals(0x04, acia.read(0x0001) & 0x04); // read should reset acia.rxRead();
135136137138139140141142143144145
@Test public void readingBuffersShouldResetStatus() throws Exception { Acia acia = new Acia6551(0x0000); acia.rxWrite('a'); acia.txWrite('b'); assertEquals(0x08, acia.read(0x0001));
96979899100101102103104105106
@Test public void aciaShouldHaveRxFullStatusOffIfRxHasData() throws Exception { Acia acia = new Acia6551(0x000); acia.rxWrite('a'); assertEquals(0x18, acia.read(0x0001)); } @Test public void aciaShouldHaveTxEmptyAndRxFullStatusOffIfRxAndTxHaveData()
1718192021222324252627
acia.setBus(mockBus); // Disable TX IRQ, Enable RX IRQ acia.write(2, 0x00); acia.rxWrite('a'); verify(mockBus, atLeastOnce()).assertIrq(); } @Test