diff --git a/MC6809/test/Board.cpp b/MC6809/test/Board.cpp index c3bbf86..16e976c 100644 --- a/MC6809/test/Board.cpp +++ b/MC6809/test/Board.cpp @@ -19,8 +19,9 @@ void Board::raisePOWER() { // Get the ACIA ready for action ADDRESS() = 0b1010000000000000; DATA() = EightBit::mc6850::CR0 | EightBit::mc6850::CR1; // Master reset - updateAciaPinsWrite(); ACIA().lower(ACIA().CTS()); + ACIA().lower(ACIA().RW()); + updateAciaPins(); ACIA().raisePOWER(); accessAcia(); } @@ -45,16 +46,17 @@ void Board::initialise() { // Marshal data from memory -> ACIA WrittenByte.connect([this] (EightBit::EventArgs&) { - updateAciaPinsWrite(); + updateAciaPins(); if (ACIA().selected()) { - ACIA().DATA() = DATA(); + ACIA().lower(ACIA().RW()); accessAcia(); } }); // Marshal data from ACIA -> memory ReadingByte.connect([this] (EightBit::EventArgs&) { - updateAciaPinsRead(); + updateAciaPins(); + ACIA().raise(ACIA().RW()); if (accessAcia()) poke(ACIA().DATA()); }); diff --git a/MC6809/test/Board.h b/MC6809/test/Board.h index e4898e1..b581054 100644 --- a/MC6809/test/Board.h +++ b/MC6809/test/Board.h @@ -46,17 +46,6 @@ private: EightBit::register16_t m_disassembleAt = 0x0000; bool m_ignoreDisassembly = false; - // Use the bus data to update the ACIA access/address pins - void updateAciaPinsRead() { - ACIA().raise(ACIA().RW()); - updateAciaPins(); - } - - void updateAciaPinsWrite() { - ACIA().lower(ACIA().RW()); - updateAciaPins(); - } - void updateAciaPins(); bool accessAcia(); diff --git a/MC6850/inc/MC6850.h b/MC6850/inc/MC6850.h index cd3c7b9..47f2e02 100644 --- a/MC6850/inc/MC6850.h +++ b/MC6850/inc/MC6850.h @@ -204,8 +204,6 @@ namespace EightBit { // Receive data register; auto& RDR() { return m_RDR; } - void step(); - bool activated() { return powered() && raised(E()) && selected(); } bool selected(); @@ -266,6 +264,8 @@ namespace EightBit { DECLARE_PIN_OUTPUT(IRQ) private: + void step(); + uint8_t status(); void reset();