Skip to content

Commit

Permalink
Teach the Amiga decoder how many sectors to expect on each track.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Mar 9, 2020
1 parent ce76dc4 commit a401173
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/amiga/amiga.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class AmigaDecoder : public AbstractDecoder

RecordType advanceToNextRecord();
void decodeSectorRecord();

std::set<unsigned> requiredSectors(Track& track) const;
};

class AmigaEncoder : public AbstractEncoder
Expand Down
7 changes: 7 additions & 0 deletions arch/amiga/decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ void AmigaDecoder::decodeSectorRecord()
_sector->data.writer().append(amigaDeinterleave(ptr, 512)).append(recoveryinfo);
_sector->status = (gotdatachecksum == wanteddatachecksum) ? Sector::OK : Sector::BAD_CHECKSUM;
}

std::set<unsigned> AmigaDecoder::requiredSectors(Track& track) const
{
static std::set<unsigned> sectors = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
return sectors;
}

0 comments on commit a401173

Please sign in to comment.