mirror of
https://github.com/jscrane/r65emu.git
synced 2025-01-13 07:30:28 +00:00
acia now a real device
This commit is contained in:
parent
5d8524f5c0
commit
b8e9532628
21
acia.cpp
Normal file
21
acia.cpp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "memory.h"
|
||||||
|
#include "acia.h"
|
||||||
|
|
||||||
|
void acia::operator=(uint8_t b) {
|
||||||
|
if (_acc & 1) {
|
||||||
|
_device->write(b);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((b & cd_mask) == 0x03)
|
||||||
|
_device->reset();
|
||||||
|
// FIXME: more
|
||||||
|
}
|
||||||
|
|
||||||
|
acia::operator uint8_t() {
|
||||||
|
if (_acc & 1)
|
||||||
|
return _device->read();
|
||||||
|
|
||||||
|
return _device->more()? rdrf | tdre: 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user