From d674fd0e675aa7c5ac20debc9d29182bce199483 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 18 Jan 2020 13:40:50 -0500 Subject: [PATCH] The WD uses only the low two bits for sector size. --- Components/1770/1770.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Components/1770/1770.cpp b/Components/1770/1770.cpp index 00aa5711f..1a0b393ea 100644 --- a/Components/1770/1770.cpp +++ b/Components/1770/1770.cpp @@ -481,7 +481,7 @@ void WD1770::posit_event(int new_event_type) { status.data_request = true; }); distance_into_section_++; - if(distance_into_section_ == 128 << header_[3]) { + if(distance_into_section_ == 128 << (header_[3]&3)) { distance_into_section_ = 0; goto type2_check_crc; } @@ -564,7 +564,7 @@ void WD1770::posit_event(int new_event_type) { */ write_byte(data_); distance_into_section_++; - if(distance_into_section_ == 128 << header_[3]) { + if(distance_into_section_ == 128 << (header_[3]&3)) { goto type2_write_crc; }