17 if (selected != num) {
18 drive[selected]->setMotor(
false, time);
20 drive[selected]->setSide(side);
21 drive[selected]->setMotor(motor, time);
27 return drive[selected]->isDiskInserted();
32 return drive[num]->isDiskInserted();
37 return drive[selected]->isWriteProtected();
42 return drive[selected]->isDoubleSided();
48 drive[selected]->setSide(side);
58 drive[selected]->step(direction, time);
63 return drive[selected]->isTrack00();
69 drive[selected]->setMotor(status, time);
79 return drive[selected]->indexPulse(time);
84 return drive[selected]->getTimeTillIndexPulse(time, count);
89 return drive[selected]->getTrackLength();
94 drive[selected]->writeTrackByte(idx, val, addIdam);
99 return drive[selected]->readTrackByte(idx);
104 return drive[selected]->getNextSector(time, sector);
109 drive[selected]->flushTrack();
114 return drive[selected]->diskChanged();
119 return drive[num]->diskChanged();
124 return drive[selected]->peekDiskChanged();
129 return drive[num]->peekDiskChanged();
134 return drive[selected]->isDummyDrive();
139 drive[selected]->applyWd2793ReadTrackQuirk();
144 drive[selected]->invalidateWd2793ReadTrackQuirk();
148static constexpr std::initializer_list<enum_string<DriveMultiplexer::Drive>> driveNumInfo = {
157template<
typename Archive>
160 ar.serialize(
"selected", selected,
This class connects to a FDC as a normal DiskDrive and delegates all requests to one of four other Di...
EmuTime getNextSector(EmuTime::param time, RawTrack::Sector §or) override
void flushTrack() override
void setMotor(bool status, EmuTime::param time) override
Set motor on/off.
void invalidateWd2793ReadTrackQuirk() override
bool isTrack00() const override
Head above track 0.
bool isWriteProtected() const override
Is disk write protected?
bool peekDiskChanged() const override
uint8_t readTrackByte(int idx) override
void selectDrive(Drive num, EmuTime::param time)
bool isDiskInserted() const override
Is drive ready?
EmuTime getTimeTillIndexPulse(EmuTime::param time, int count) override
Return the time till the start of the next index pulse When there is no disk in the drive or when the...
bool getMotor() const override
Returns the previously set motor status.
void writeTrackByte(int idx, uint8_t val, bool addIdam) override
DriveMultiplexer(std::span< std::unique_ptr< DiskDrive >, 4 > drv)
bool getSide() const override
bool diskChanged() override
Is disk changed?
void serialize(Archive &ar, unsigned version)
bool isDummyDrive() const override
Is there a dummy (unconnected) drive?
void applyWd2793ReadTrackQuirk() override
See RawTrack::applyWd2793ReadTrackQuirk()
bool indexPulse(EmuTime::param time) override
Gets the state of the index pulse.
void step(bool direction, EmuTime::param time) override
Step head.
void setSide(bool side) override
Side select.
bool isDoubleSided() override
Is disk double sided?
unsigned getTrackLength() override
This file implemented 3 utility functions:
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)
#define SERIALIZE_ENUM(TYPE, INFO)