mirror of
https://github.com/TomHarte/CLK.git
synced 2024-08-16 16:28:59 +00:00
Fixed addressing: types are 1 and 2, not 0 and 1.
This commit is contained in:
parent
b9677c9927
commit
7613755f94
@ -21,7 +21,7 @@ OricMFMDSK::OricMFMDSK(const char *file_name) :
|
|||||||
track_count_ = fgetc32le();
|
track_count_ = fgetc32le();
|
||||||
geometry_type_ = fgetc32le();
|
geometry_type_ = fgetc32le();
|
||||||
|
|
||||||
if(geometry_type_ > 1)
|
if(geometry_type_ < 1 || geometry_type_ > 2)
|
||||||
throw ErrorNotOricMFMDSK;
|
throw ErrorNotOricMFMDSK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,10 +40,10 @@ std::shared_ptr<Track> OricMFMDSK::get_track_at_position(unsigned int head, unsi
|
|||||||
long offset = 0;
|
long offset = 0;
|
||||||
switch(geometry_type_)
|
switch(geometry_type_)
|
||||||
{
|
{
|
||||||
case 0:
|
case 1:
|
||||||
offset = (head * track_count_) + position;
|
offset = (head * track_count_) + position;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
offset = (position * track_count_ * head_count_) + head;
|
offset = (position * track_count_ * head_count_) + head;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user