Rip out the old approach to soft sector remapping as it wasn't working.

This commit is contained in:
David Given
2022-09-11 17:05:40 +02:00
parent ea1ab029f3
commit 3cb098f9ba
43 changed files with 141 additions and 161 deletions

View File

@@ -91,7 +91,7 @@ public:
dev.devType = DEVTYPE_FLOPDD;
dev.cylinders = config.layout().tracks();
dev.heads = config.layout().sides();
dev.sectors = Layout::getLayoutOfTrack(0, 0).logicalSectors.size();
dev.sectors = Layout::getLayoutOfTrack(0, 0).numSectors;
adfInitDevice(&dev, nullptr, false);
int res = adfCreateFlop(&dev, (char*)volumeName.c_str(), 0);
if (res != RC_OK)

View File

@@ -70,7 +70,7 @@ public:
* a time. */
if (!imageContainsAllSectorsOf(
_changedSectors, track, side, trackLayout.logicalSectors))
_changedSectors, track, side, trackLayout.logicalSectorOrder))
{
/* If we don't have any loaded sectors for this track, pre-read
* it. */
@@ -81,7 +81,7 @@ public:
/* Now merge the loaded track with the changed one, and write
* the result back. */
for (unsigned sectorId : trackLayout.logicalSectors)
for (unsigned sectorId : trackLayout.logicalSectorOrder)
{
if (!_changedSectors.contains(track, side, sectorId))
_changedSectors.put(track, side, sectorId)->data =

View File

@@ -165,11 +165,11 @@ Filesystem::Filesystem(std::shared_ptr<SectorInterface> sectors):
int side = p.second;
auto& trackLayout = Layout::getLayoutOfTrack(track, side);
if (trackLayout.logicalSectors.empty())
if (trackLayout.numSectors == 0)
Error() << "FS: filesystem support cannot be used without concrete "
"layout information";
for (int sectorId : trackLayout.logicalSectors)
for (int sectorId : trackLayout.logicalSectorOrder)
_locations.push_back(std::make_tuple(track, side, sectorId));
}
}

View File

@@ -1,6 +1,7 @@
syntax = "proto2";
import "lib/common.proto";
import "lib/layout.proto";
message AcornDfsProto
{
@@ -58,6 +59,7 @@ message CbmfsProto
message ProdosProto {}
// NEXT_TAG: 10
message FilesystemProto
{
oneof filesystem
@@ -71,4 +73,6 @@ message FilesystemProto
CbmfsProto cbmfs = 7;
ProdosProto prodos = 8;
}
optional SectorListProto sector_order = 9 [(help) = "specify the filesystem order of sectors"];
}