Always update workcycles

This commit is contained in:
Will Scullin 2021-06-29 13:51:12 -07:00
parent 086c99f870
commit f10f3abcab
No known key found for this signature in database
GPG Key ID: 26DCD1042C6638CD

View File

@ -403,18 +403,18 @@ export default class DiskII implements Card {
// Only used for WOZ disks
private moveHead() {
if (!isWozDrive(this.cur)) {
return;
}
const track: bit[] =
this.cur.rawTracks[this.cur.trackMap[this.cur.track]] || [0];
const cycles = this.io.cycles();
// Spin the disk the number of elapsed cycles since last call
let workCycles = (cycles - this.lastCycles) * 2;
this.lastCycles = cycles;
if (!isWozDrive(this.cur)) {
return;
}
const track: bit[] =
this.cur.rawTracks[this.cur.trackMap[this.cur.track]] || [0];
while (workCycles-- > 0) {
let pulse: bit = 0;
if (this.clock == 4) {