1
0
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:
Thomas Harte
2018-05-06 23:17:36 -04:00
parent 1139caa83f
commit f65c65569a
40 changed files with 135 additions and 97 deletions
+3 -3
View File
@@ -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;
}