1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-11 08:30:55 +00:00

Fixed file offset calculation for single-sided images.

This commit is contained in:
Thomas Harte 2016-09-19 07:34:10 -04:00
parent 231f3dd0f4
commit 8a1b805d11

View File

@ -56,7 +56,7 @@ std::shared_ptr<Track> SSD::get_track_at_position(unsigned int head, unsigned in
std::shared_ptr<Track> 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);
std::vector<Storage::Encodings::MFM::Sector> sectors;