Merge pull request #591 from davidgiven/c64

Rework the entire layout stuff.
This commit is contained in:
David Given
2022-09-15 21:07:16 +02:00
committed by GitHub
31 changed files with 856 additions and 762 deletions

View File

@@ -384,14 +384,14 @@ public:
if (blnOptionalHeadMap) //there was een optional head map. write it to the sector
//The Sector Head Map has one entry for each sector, and contains the logical Head ID for the corresponding sector in the Sector Numbering Map.
{
sector->physicalHead = header.Head;
sector->physicalSide = header.Head;
sector->logicalSide = optionalhead_map[s];
blnOptionalHeadMap = false;
}
else
{
sector->logicalSide = header.Head;
sector->physicalHead = header.Head;
sector->physicalSide = header.Head;
}
}

View File

@@ -112,7 +112,7 @@ public:
break;
uint8_t physicalTrack = br.read_8();
uint8_t physicalHead = br.read_8() & 1;
uint8_t physicalSide = br.read_8() & 1;
br.skip(1); /* crc */
for (int i = 0; i < sectorCount; i++)
@@ -186,7 +186,7 @@ public:
image->put(logicalTrack, logicalSide, sectorId);
sector->status = Sector::OK;
sector->physicalTrack = physicalTrack;
sector->physicalHead = physicalHead;
sector->physicalSide = physicalSide;
sector->data = data.slice(0, sectorSize);
totalSize += sectorSize;
}