mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-25 11:17:26 +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:
@@ -282,7 +282,7 @@ void WD1770::posit_event(int new_event_type) {
|
||||
track_ = 0;
|
||||
goto verify;
|
||||
}
|
||||
get_drive().step(step_direction_ ? 1 : -1);
|
||||
get_drive().step(Storage::Disk::HeadPosition(step_direction_ ? 1 : -1));
|
||||
unsigned int time_to_wait;
|
||||
switch(command_ & 3) {
|
||||
default:
|
||||
|
||||
@@ -115,7 +115,7 @@ void i8272::run_for(Cycles cycles) {
|
||||
int direction = (drives_[c].target_head_position < drives_[c].head_position) ? -1 : 1;
|
||||
printf("Target %d versus believed %d\n", drives_[c].target_head_position, drives_[c].head_position);
|
||||
select_drive(c);
|
||||
get_drive().step(direction);
|
||||
get_drive().step(Storage::Disk::HeadPosition(direction));
|
||||
if(drives_[c].target_head_position >= 0) drives_[c].head_position += direction;
|
||||
|
||||
// Check for completion.
|
||||
|
||||
@@ -57,7 +57,7 @@ void DiskII::set_control(Control control, bool on) {
|
||||
|
||||
// Compare to the stepper position to decide whether that pulls in the current cog notch,
|
||||
// or grabs a later one.
|
||||
drives_[active_drive_].step(-direction);
|
||||
drives_[active_drive_].step(Storage::Disk::HeadPosition(-direction, 4));
|
||||
stepper_position_ = (stepper_position_ - direction + 8) & 7;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user