diff --git a/Machines/Thomson/MO/MO.cpp b/Machines/Thomson/MO/MO.cpp index 7f5589855..a95f7d1cc 100644 --- a/Machines/Thomson/MO/MO.cpp +++ b/Machines/Thomson/MO/MO.cpp @@ -244,17 +244,25 @@ struct ConcreteMachine: value = memory_.read(address); if constexpr (lic == CPU::M6809::LIC::InstructionFetch) { + // // Catch RDBITS. - if(allow_fast_tape_hack_ && address == 0xf168) { - // Inputs: - // - // M0044 = current tape polarity (complement if applicable). - // M0045 = byte in progress; ROL new bit into here. - // - // Additional output: - // - // A = 00 or FF as per bit detected. - // + // + // Inputs: + // + // M0044 = current tape polarity (complement if applicable). + // M0045 = byte in progress; ROL new bit into here. + // + // Additional output: + // + // A = 00 or FF as per bit detected. + // + // TODO: MO6: check for 1200 or 2400 baud? + if( + ( + (!is_mo6 && address == 0xf168) || + (is_mo6 && memory_.visible_monitor_page() && address == 0xf3fd) + ) && allow_fast_tape_hack_ + ) [[unlikely]] { [&] { auto *const serialiser = tape_player_.serialiser(); if(!serialiser) return; @@ -357,8 +365,7 @@ private: template uint8_t input() { if constexpr (port == Motorola::MC6821::Port::A) { - return - (machine_.tape_player_.input() ? 0x00 : 0x80); + return machine_.tape_player_.input() ? 0x00 : 0x80; } if constexpr (port == Motorola::MC6821::Port::B) { diff --git a/Machines/Thomson/MO/MemoryMap.hpp b/Machines/Thomson/MO/MemoryMap.hpp index ca90a13a0..734adda51 100644 --- a/Machines/Thomson/MO/MemoryMap.hpp +++ b/Machines/Thomson/MO/MemoryMap.hpp @@ -103,6 +103,10 @@ public: } } + bool visible_monitor_page() const { + return rom_page_; + } + // MARK: - Memory Access. template