diff --git a/MC6809/test/Board.cpp b/MC6809/test/Board.cpp index f7cd108..7fe5e4a 100644 --- a/MC6809/test/Board.cpp +++ b/MC6809/test/Board.cpp @@ -78,10 +78,14 @@ EightBit::MemoryMapping Board::mapping(uint16_t address) { void Board::Bus_WritingByte_Acia(EightBit::EventArgs&) { updateAciaPins(EightBit::Chip::Low); + if (ACIA().selected()) + ACIA().DATA() = DATA(); } void Board::Bus_ReadingByte_Acia(EightBit::EventArgs&) { updateAciaPins(EightBit::Chip::High); + if (ACIA().selected()) + poke(ADDRESS(), ACIA().DATA()); } void Board::updateAciaPins(const EightBit::Chip::PinLevel rw) { diff --git a/MC6850/inc/MC6850.h b/MC6850/inc/MC6850.h index 2055f90..586c2b0 100644 --- a/MC6850/inc/MC6850.h +++ b/MC6850/inc/MC6850.h @@ -99,6 +99,8 @@ namespace EightBit { void step(int cycles); + bool selected(); + void markTransmitComplete(); void markReceiveStarting(); @@ -114,8 +116,6 @@ namespace EightBit { private: uint8_t& status() { return m_status; } - bool selected(); - void reset(); void step(); diff --git a/MC6850/src/MC6850.cpp b/MC6850/src/MC6850.cpp index c94d541..fb6a2cb 100644 Binary files a/MC6850/src/MC6850.cpp and b/MC6850/src/MC6850.cpp differ