1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-25 03:32:01 +00:00

Works further towards NIB, but still isn't close.

This commit is contained in:
Thomas Harte 2018-04-23 20:01:12 -07:00
parent 38b2302b59
commit 4cbe5068a9
2 changed files with 10 additions and 11 deletions

View File

@ -28,17 +28,18 @@ NIB::NIB(const std::string &file_name) :
}
int NIB::get_head_position_count() {
return 35;
}
int NIB::get_head_count() {
return 1;
}
bool NIB::get_is_read_only() {
return true;
return number_of_tracks * 4;
}
std::shared_ptr<::Storage::Disk::Track> NIB::get_track_at_position(::Storage::Disk::Track::Address address) {
// NIBs contain data for even-numbered tracks underneath a single head only.
if(address.head || (address.position&1)) return nullptr;
// const int file_track = address.position >> 1;
// file_.seek(static_cast<long>(file_track * track_length), SEEK_SET);
// std::vector<uint8_t> track_data = file_.read(track_length);
// TODO: determine which FFs are syncs, and produce track.
return nullptr;
}

View File

@ -29,8 +29,6 @@ class NIB: public DiskImage {
};
int get_head_position_count() override;
int get_head_count() override;
bool get_is_read_only() override;
std::shared_ptr<::Storage::Disk::Track> get_track_at_position(::Storage::Disk::Track::Address address) override;