Skip to content

Commit

Permalink
Fix state in 1770
Browse files Browse the repository at this point in the history
Closes #432
  • Loading branch information
mattgodbolt committed Sep 2, 2024
1 parent c4f6eb7 commit 7e4e43e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wd-fdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ export class WdFdc {
`ptrk ${this._currentDrive.track} hpos ${this._currentDrive.headPosition}`,
);
}
if (state === undefined) {
throw new Error("Undefined state");
}
this._state = state;
this._stateCount = 0;
}
Expand Down Expand Up @@ -1201,7 +1204,7 @@ export class WdFdc {
// delivers the CRC error, before it goes not busy, etc.
// EMU NOTE: must not clear busy flag right away. The 1770 delivers the
// last header byte DRQ separately from lowering the busy flag.
this._setState(Status.done);
this._setState(State.done);
return;
}

Expand Down

0 comments on commit 7e4e43e

Please sign in to comment.