2019-10-11 00:54:29 +00:00
|
|
|
//
|
|
|
|
// 6850.cpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 10/10/2019.
|
|
|
|
// Copyright © 2019 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "6850.hpp"
|
|
|
|
|
2019-10-12 04:04:02 +00:00
|
|
|
#define LOG_PREFIX "[6850] "
|
|
|
|
#include "../../Outputs/Log.hpp"
|
|
|
|
|
2019-10-11 00:54:29 +00:00
|
|
|
using namespace Motorola::ACIA;
|
|
|
|
|
|
|
|
uint8_t ACIA::read(int address) {
|
2019-10-12 04:04:02 +00:00
|
|
|
if(address&1) {
|
|
|
|
LOG("Read from receive register");
|
|
|
|
} else {
|
|
|
|
LOG("Read status");
|
|
|
|
return status_;
|
|
|
|
}
|
|
|
|
return 0x00;
|
2019-10-11 00:54:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ACIA::write(int address, uint8_t value) {
|
2019-10-12 04:04:02 +00:00
|
|
|
if(address&1) {
|
|
|
|
LOG("Write to transmit register");
|
|
|
|
} else {
|
|
|
|
if((value&3) == 3) {
|
|
|
|
LOG("Reset");
|
|
|
|
} else {
|
|
|
|
LOG("Write to control register");
|
|
|
|
}
|
|
|
|
}
|
2019-10-11 00:54:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ACIA::run_for(HalfCycles) {
|
|
|
|
}
|