mirror of
https://github.com/jscrane/r65emu.git
synced 2024-06-04 11:29:32 +00:00
22 lines
324 B
C++
22 lines
324 B
C++
#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;
|
|
}
|