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

Flips meaning of ejected bit, to please the IIgs.

This commit is contained in:
Thomas Harte
2020-11-18 17:20:48 -05:00
parent 62f936128d
commit cddd72876f
4 changed files with 13 additions and 7 deletions
@@ -142,8 +142,11 @@ bool DoubleDensityDrive::read() {
return !get_is_track_zero();
case CA1|CA0: // Disk has been ejected.
// (0 = user has ejected disk)
return !has_new_disk_;
// (1 = user has ejected disk)
//
// TODO: does this really mean _user_ has ejected disk? If so then I should avoid
// changing the flag upon a programmatic eject.
return has_new_disk_;
case CA1|CA0|SEL: // Tachometer.
// (arbitrary)
@@ -174,6 +177,6 @@ bool DoubleDensityDrive::read() {
}
}
void DoubleDensityDrive::did_set_disk() {
has_new_disk_ = true;
void DoubleDensityDrive::did_set_disk(bool did_replace) {
has_new_disk_ = did_replace;
}
@@ -39,7 +39,7 @@ class DoubleDensityDrive: public IWMDrive {
// To receive the proper notifications from Storage::Disk::Drive.
void did_step(Storage::Disk::HeadPosition to_position) final;
void did_set_disk() final;
void did_set_disk(bool) final;
const bool is_800k_;
bool has_new_disk_ = false;