1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 17:16:44 +00:00

Makes joined-up attempt to run data through the Disk II.

This commit is contained in:
Thomas Harte
2018-04-24 19:44:45 -07:00
parent 2f2390b5aa
commit 7061537ff5
7 changed files with 100 additions and 13 deletions
+3 -2
View File
@@ -47,6 +47,7 @@ bool Drive::get_is_track_zero() {
}
void Drive::step(int direction) {
printf("Step %d\n", direction);
int old_head_position = head_position_;
head_position_ = std::max(head_position_ + direction, 0);
@@ -70,7 +71,7 @@ Storage::Time Drive::get_time_into_track() {
Time result(cycles_since_index_hole_, static_cast<int>(get_input_clock_rate()));
result /= rotational_multiplier_;
result.simplify();
assert(result <= Time(1));
// assert(result <= Time(1));
return result;
}
@@ -168,7 +169,7 @@ void Drive::get_next_event(const Time &duration_already_passed) {
void Drive::process_next_event() {
// TODO: ready test here.
if(current_event_.type == Track::Event::IndexHole) {
assert(get_time_into_track() == Time(1) || get_time_into_track() == Time(0));
// assert(get_time_into_track() == Time(1) || get_time_into_track() == Time(0));
if(ready_index_count_ < 2) ready_index_count_++;
cycles_since_index_hole_ = 0;
}