mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-26 19:17:52 +00:00
Makes disk head position explicitly something with sub-integral precision.
Also as a drive-by fix, corrects accidental assumption of 10 sectors for all MFMSectorDump descendants.
This commit is contained in:
@@ -36,8 +36,8 @@ SSD::SSD(const std::string &file_name) : MFMSectorDump(file_name) {
|
||||
set_geometry(sectors_per_track, sector_size, 0, false);
|
||||
}
|
||||
|
||||
int SSD::get_head_position_count() {
|
||||
return track_count_;
|
||||
HeadPosition SSD::get_maximum_head_position() {
|
||||
return HeadPosition(track_count_);
|
||||
}
|
||||
|
||||
int SSD::get_head_count() {
|
||||
@@ -45,5 +45,5 @@ int SSD::get_head_count() {
|
||||
}
|
||||
|
||||
long SSD::get_file_offset_for_position(Track::Address address) {
|
||||
return (address.position * head_count_ + address.head) * 256 * 10;
|
||||
return (address.position.as_int() * head_count_ + address.head) * 256 * 10;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user