1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Fixed addressing: types are 1 and 2, not 0 and 1.

This commit is contained in:
Thomas Harte 2016-11-26 10:13:12 +08:00
parent b9677c9927
commit 7613755f94

View File

@ -21,7 +21,7 @@ OricMFMDSK::OricMFMDSK(const char *file_name) :
track_count_ = fgetc32le();
geometry_type_ = fgetc32le();
if(geometry_type_ > 1)
if(geometry_type_ < 1 || geometry_type_ > 2)
throw ErrorNotOricMFMDSK;
}
@ -40,10 +40,10 @@ std::shared_ptr<Track> OricMFMDSK::get_track_at_position(unsigned int head, unsi
long offset = 0;
switch(geometry_type_)
{
case 0:
case 1:
offset = (head * track_count_) + position;
break;
case 1:
case 2:
offset = (position * track_count_ * head_count_) + head;
break;
}