Rework the flux decoders to add a desync opcode for separating multiple reads

in a flux stream. Finally add a unit test for the flux decoder.
This commit is contained in:
dg
2021-12-05 14:42:57 +00:00
parent 298f77f52e
commit 18d90c44dd
21 changed files with 210 additions and 47 deletions

View File

@@ -84,7 +84,7 @@ std::unique_ptr<TrackDataFlux> AbstractDecoder::decodeToSectors(
return std::move(_trackdata);
if ((r == UNKNOWN_RECORD) || (r == DATA_RECORD))
{
fmr.findEvent(F_BIT_PULSE);
fmr.skipToEvent(F_BIT_PULSE);
continue;
}
@@ -106,7 +106,7 @@ std::unique_ptr<TrackDataFlux> AbstractDecoder::decodeToSectors(
r = advanceToNextRecord();
if (r != UNKNOWN_RECORD)
break;
if (fmr.findEvent(F_BIT_PULSE) == 0)
if (fmr.eof())
break;
}
recordStart = fmr.tell();