From 2eed24e859678b03606ef6e3ba57fcce256688db Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 10 Aug 2017 11:11:26 -0400 Subject: [PATCH] Made an initial attempt at [a subset of] multi-sector reads. --- Components/8272/i8272.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Components/8272/i8272.cpp b/Components/8272/i8272.cpp index 47322dbcc..e4c68be49 100644 --- a/Components/8272/i8272.cpp +++ b/Components/8272/i8272.cpp @@ -253,6 +253,8 @@ void i8272::posit_event(int event_type) { sector_ = command_[4]; size_ = command_[5]; + read_next_data: + // Sets a maximum index hole limit of 2 then performs a find header/read header loop, continuing either until // the index hole limit is breached or a sector is found with a cylinder, head, sector and size equal to the // values in the internal registers. @@ -286,6 +288,12 @@ void i8272::posit_event(int event_type) { WAIT_FOR_EVENT(Event::Token); WAIT_FOR_EVENT(Event::Token); + // check whether that's it + if(sector_ != command_[6]) { + sector_++; + goto read_next_data; + } + // For a final result phase, post the standard ST0, ST1, ST2, C, H, R, N goto post_st012chrn;