From cc169d414fdc0ffcf6668455c6bd5ba8944da41e Mon Sep 17 00:00:00 2001 From: David Given Date: Fri, 29 Nov 2024 22:39:34 +0100 Subject: [PATCH] Add experimental support for libdsk 'altback' mode layouts. --- lib/config/layout.proto | 5 +++-- lib/data/layout.cc | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/config/layout.proto b/lib/config/layout.proto index 94ec350b..dcb91f41 100644 --- a/lib/config/layout.proto +++ b/lib/config/layout.proto @@ -22,8 +22,9 @@ message LayoutProto enum Order { UNDEFINED = 0; - CHS = 1; - HCS = 2; + CHS = 1; // sort by cylinder, then head, then sector -- libdsk 'alt' + HCS = 2; // sort by head, then cylinder, then sector -- libdsk 'outout' + HCS_RH1 = 3; // as HCS, except the cylinder count for head 1 is reversed -- libdsk 'outback' } message LayoutdataProto diff --git a/lib/data/layout.cc b/lib/data/layout.cc index 5d89220c..929ee5c0 100644 --- a/lib/data/layout.cc +++ b/lib/data/layout.cc @@ -137,6 +137,20 @@ std::vector> Layout::getTrackOrdering( break; } + case LayoutProto::HCS_RH1: + { + for (int side = 0; side < sides; side++) + { + if (side == 0) + for (int track = 0; track < tracks; track++) + trackList.push_back(std::make_pair(track, side)); + if (side == 1) + for (int track = tracks; track >= 0; track--) + trackList.push_back(std::make_pair(track - 1, side)); + } + break; + } + default: error("LAYOUT: invalid track trackList"); }