diff --git a/Machines/Thomson/MO5/CD90-640.cpp b/Machines/Thomson/MO5/CD90-640.cpp index c24e21fbf..bc8fcdf98 100644 --- a/Machines/Thomson/MO5/CD90-640.cpp +++ b/Machines/Thomson/MO5/CD90-640.cpp @@ -36,8 +36,9 @@ void CD90_640::set_activity_observer(Activity::Observer *const observer) { void CD90_640::set_disk(std::shared_ptr disk, const size_t drive) { get_drive(drive).set_disk(disk); - // TODO: what is really in charge of motor control? + // TODO: what is really in charge of motor control and drive selection? get_drive(drive).set_motor_on(true); + set_drive(1 << drive); } const Storage::Disk::Disk *CD90_640::disk(const std::string &name) { diff --git a/Machines/Thomson/MO5/CD90-640.hpp b/Machines/Thomson/MO5/CD90-640.hpp index b9701ae96..4af1f4b5e 100644 --- a/Machines/Thomson/MO5/CD90-640.hpp +++ b/Machines/Thomson/MO5/CD90-640.hpp @@ -25,12 +25,15 @@ public: template uint8_t read() { - Logger::info().append("Read %04x", address); - if(address & 8) { - return control(); - } else { - return WD::WD1770::read(address); - } + const uint8_t result = [&] { + if(address & 8) { + return control(); + } else { + return WD::WD1770::read(address); + } + } (); + Logger::info().append("Read %02x <- %04x", result, address); + return result; } template