From 42926e72ccfb681886bb5a8ab883b72b64cc297d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 24 Dec 2019 19:57:12 -0500 Subject: [PATCH] Adjusted: Flag::WriteProtect works in real time for a type-1 status. --- Components/1770/1770.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Components/1770/1770.cpp b/Components/1770/1770.cpp index aa29fdb97..61c476088 100644 --- a/Components/1770/1770.cpp +++ b/Components/1770/1770.cpp @@ -61,20 +61,21 @@ uint8_t WD1770::get_register(int address) { status.interrupt_request = false; }); uint8_t status = - (status_.write_protect ? Flag::WriteProtect : 0) | - (status_.crc_error ? Flag::CRCError : 0) | - (status_.busy ? Flag::Busy : 0); + (status_.crc_error ? Flag::CRCError : 0) | + (status_.busy ? Flag::Busy : 0); switch(status_.type) { case Status::One: status |= (get_drive().get_is_track_zero() ? Flag::TrackZero : 0) | - (status_.seek_error ? Flag::SeekError : 0); + (status_.seek_error ? Flag::SeekError : 0) | + (get_drive().get_is_read_only() ? Flag::WriteProtect : 0); // TODO: index hole break; case Status::Two: case Status::Three: status |= + (status_.write_protect ? Flag::WriteProtect : 0) | (status_.record_type ? Flag::RecordType : 0) | (status_.lost_data ? Flag::LostData : 0) | (status_.data_request ? Flag::DataRequest : 0) |