mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-06 10:38:16 +00:00
Experimentally marked ADF as writable too, immediately discovering a mistake in the analysing MFM decoder.
This commit is contained in:
parent
e4000bd060
commit
9cb902cc4f
@ -319,7 +319,8 @@ std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_next_sector()
|
||||
while(index_count_ < 2)
|
||||
{
|
||||
// look for an ID address mark
|
||||
while(1)
|
||||
bool id_found = false;
|
||||
while(!id_found)
|
||||
{
|
||||
run_for_cycles(1);
|
||||
if(is_mfm_)
|
||||
@ -330,6 +331,7 @@ std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_next_sector()
|
||||
if(mark == Storage::Encodings::MFM::MFMIDAddressByte)
|
||||
{
|
||||
crc_generator_.set_value(MFMPostSyncCRCValue);
|
||||
id_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -339,7 +341,7 @@ std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_next_sector()
|
||||
if(shift_register_ == Storage::Encodings::MFM::FMIDAddressMark)
|
||||
{
|
||||
crc_generator_.reset();
|
||||
break;
|
||||
id_found = true;
|
||||
}
|
||||
}
|
||||
if(index_count_ >= 2) return nullptr;
|
||||
@ -355,7 +357,8 @@ std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_next_sector()
|
||||
if((header_crc & 0xff) != get_next_byte()) continue;
|
||||
|
||||
// look for data mark
|
||||
while(1)
|
||||
bool data_found = false;
|
||||
while(!data_found)
|
||||
{
|
||||
run_for_cycles(1);
|
||||
if(is_mfm_)
|
||||
@ -366,6 +369,7 @@ std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_next_sector()
|
||||
if(mark == Storage::Encodings::MFM::MFMDataAddressByte)
|
||||
{
|
||||
crc_generator_.set_value(MFMPostSyncCRCValue);
|
||||
data_found = true;
|
||||
break;
|
||||
}
|
||||
if(mark == Storage::Encodings::MFM::MFMIDAddressByte) return nullptr;
|
||||
@ -376,7 +380,7 @@ std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_next_sector()
|
||||
if(shift_register_ == Storage::Encodings::MFM::FMDataAddressMark)
|
||||
{
|
||||
crc_generator_.reset();
|
||||
break;
|
||||
data_found = true;
|
||||
}
|
||||
if(shift_register_ == Storage::Encodings::MFM::FMIDAddressMark) return nullptr;
|
||||
}
|
||||
|
@ -47,6 +47,11 @@ unsigned int AcornADF::get_head_count()
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool AcornADF::get_is_read_only()
|
||||
{
|
||||
return is_read_only_;
|
||||
}
|
||||
|
||||
std::shared_ptr<Track> AcornADF::get_uncached_track_at_position(unsigned int head, unsigned int position)
|
||||
{
|
||||
std::shared_ptr<Track> track;
|
||||
|
@ -35,6 +35,7 @@ class AcornADF: public Disk, public Storage::FileHolder {
|
||||
// implemented to satisfy @c Disk
|
||||
unsigned int get_head_position_count();
|
||||
unsigned int get_head_count();
|
||||
bool get_is_read_only();
|
||||
private:
|
||||
std::shared_ptr<Track> get_uncached_track_at_position(unsigned int head, unsigned int position);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user