mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-13 00:25:26 +00:00
Fixed file offset calculation for single-sided images.
This commit is contained in:
@@ -56,7 +56,7 @@ std::shared_ptr<Track> SSD::get_track_at_position(unsigned int head, unsigned in
|
|||||||
std::shared_ptr<Track> track;
|
std::shared_ptr<Track> track;
|
||||||
|
|
||||||
if(head >= _head_count) return track;
|
if(head >= _head_count) return track;
|
||||||
long file_offset = (position * (_head_count ? 2 : 1) + head) * 256 * 10;
|
long file_offset = (position * _head_count + head) * 256 * 10;
|
||||||
fseek(_file, file_offset, SEEK_SET);
|
fseek(_file, file_offset, SEEK_SET);
|
||||||
|
|
||||||
std::vector<Storage::Encodings::MFM::Sector> sectors;
|
std::vector<Storage::Encodings::MFM::Sector> sectors;
|
||||||
|
Reference in New Issue
Block a user