diff --git a/Components/8272/i8272.cpp b/Components/8272/i8272.cpp index 285ec755d..facc29dc7 100644 --- a/Components/8272/i8272.cpp +++ b/Components/8272/i8272.cpp @@ -532,8 +532,8 @@ void i8272::posit_event(int event_type) { (command_[1] & 7) | // drive and head number 0x08 | // single sided (drives_[drive].drive->get_is_track_zero() ? 0x10 : 0x00) | - (drives_[drive].drive->has_disk() ? 0x20 : 0x00) | // ready, approximately (TODO) - 0x40 // write protected + (drives_[drive].drive->get_is_ready() ? 0x20 : 0x00) | + (drives_[drive].drive->get_is_read_only() ? 0x40 : 0x00) ); } goto post_result; diff --git a/Storage/Disk/Drive.cpp b/Storage/Disk/Drive.cpp index 1911d7916..1d5a80d69 100644 --- a/Storage/Disk/Drive.cpp +++ b/Storage/Disk/Drive.cpp @@ -42,8 +42,7 @@ void Drive::set_head(unsigned int head) { bool Drive::get_is_read_only() { if(disk_) return disk_->get_is_read_only(); - if(track_) return true; - return false; + return true; } bool Drive::get_is_ready() { diff --git a/Storage/Disk/Drive.hpp b/Storage/Disk/Drive.hpp index c67f5d1b6..d65cb5435 100644 --- a/Storage/Disk/Drive.hpp +++ b/Storage/Disk/Drive.hpp @@ -51,7 +51,7 @@ class Drive { void set_head(unsigned int head); /*! - @returns @c true if the inserted disk is read-only; @c false otherwise. + @returns @c true if the inserted disk is read-only or no disk is inserted; @c false otherwise. */ bool get_is_read_only();