Add support for ignoring certain sectors (needed for FastCopy disks on the

Atari ST).
This commit is contained in:
David Given
2022-02-16 22:02:50 +01:00
parent eeb5ba40fb
commit 0d7de7bbc0
2 changed files with 10 additions and 1 deletions

View File

@@ -156,6 +156,13 @@ public:
_sector->logicalSide = _sector->physicalHead;
if (trackdata.ignore_track_byte())
_sector->logicalTrack = _sector->physicalCylinder;
for (int sector : trackdata.ignore_sector())
if (_sector->logicalSector == sector)
{
_sector->status = Sector::MISSING;
break;
}
}
void decodeDataRecord() override

View File

@@ -3,7 +3,7 @@ syntax = "proto2";
import "lib/common.proto";
message IbmDecoderProto {
// Next: 10
// Next: 11
message TrackdataProto {
message SectorsProto {
repeated int32 sector = 1 [(help) = "require these sectors to exist for a good read"];
@@ -20,6 +20,8 @@ message IbmDecoderProto {
optional bool ignore_track_byte = 6 [default = false, (help) = "ignore track byte in sector header"];
optional bool swap_sides = 4 [default = false, (help) = "put logical side 1 on physical side 0"];
repeated int32 ignore_sector = 10 [(help) = "sectors with these IDs will not be read"];
oneof required_sectors {
SectorsProto sectors = 5 [(help) = "require these sectors to exist for a good read"];
SectorRangeProto sector_range = 9 [(help) = "require these sectors to exist for a good read"];