mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Honour the logical track numbering in MX disks (allows reading 40-track disks).
This commit is contained in:
@@ -37,7 +37,7 @@ AbstractDecoder::RecordType MxDecoder::advanceToNextRecord()
|
|||||||
const FluxMatcher* matcher = nullptr;
|
const FluxMatcher* matcher = nullptr;
|
||||||
_sector->clock = _clock = _fmr->seekToPattern(ID_PATTERN, matcher);
|
_sector->clock = _clock = _fmr->seekToPattern(ID_PATTERN, matcher);
|
||||||
readRawBits(32); /* skip the ID mark */
|
readRawBits(32); /* skip the ID mark */
|
||||||
readRawBits(32); /* skip the track number */
|
_logicalTrack = decodeFmMfm(readRawBits(32)).reader().read_be16();
|
||||||
}
|
}
|
||||||
else if (_currentSector == 10)
|
else if (_currentSector == 10)
|
||||||
{
|
{
|
||||||
@@ -67,7 +67,7 @@ void MxDecoder::decodeSectorRecord()
|
|||||||
gotChecksum += br.read_le16();
|
gotChecksum += br.read_le16();
|
||||||
uint16_t wantChecksum = br.read_le16();
|
uint16_t wantChecksum = br.read_le16();
|
||||||
|
|
||||||
_sector->logicalTrack = _track->physicalTrack;
|
_sector->logicalTrack = _logicalTrack;
|
||||||
_sector->logicalSide = _track->physicalSide;
|
_sector->logicalSide = _track->physicalSide;
|
||||||
_sector->logicalSector = _currentSector;
|
_sector->logicalSector = _currentSector;
|
||||||
_sector->data = bytes.slice(0, SECTOR_SIZE);
|
_sector->data = bytes.slice(0, SECTOR_SIZE);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
nanoseconds_t _clock;
|
nanoseconds_t _clock;
|
||||||
int _currentSector;
|
int _currentSector;
|
||||||
|
int _logicalTrack;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user