20 if (selected != num) {
21 drive[selected]->
setMotor(
false, time);
24 drive[selected]->
setMotor(motor, time);
61 drive[selected]->
step(direction, time);
72 drive[selected]->
setMotor(status, time);
151 static constexpr std::initializer_list<enum_string<DriveMultiplexer::DriveNum>> driveNumInfo = {
160 template<
typename Archive>
163 ar.serialize(
"selected", selected,
This (abstract) class defines the DiskDrive interface.
virtual bool isDummyDrive() const =0
Is there a dummy (unconnected) drive?
virtual void applyWd2793ReadTrackQuirk()=0
See RawTrack::applyWd2793ReadTrackQuirk()
virtual bool peekDiskChanged() const =0
virtual bool isDiskInserted() const =0
Is drive ready?
virtual bool isWriteProtected() const =0
Is disk write protected?
virtual EmuTime getNextSector(EmuTime::param time, RawTrack::Sector §or)=0
virtual void setMotor(bool status, EmuTime::param time)=0
Set motor on/off.
virtual void step(bool direction, EmuTime::param time)=0
Step head.
virtual bool isTrack00() const =0
Head above track 0.
virtual byte readTrackByte(int idx)=0
virtual bool indexPulse(EmuTime::param time)=0
Gets the state of the index pulse.
virtual bool isDoubleSided() const =0
Is disk double sided?
virtual void writeTrackByte(int idx, byte val, bool addIdam=false)=0
virtual EmuTime getTimeTillIndexPulse(EmuTime::param time, int count=1)=0
Return the time till the start of the next index pulse When there is no disk in the drive or when the...
virtual bool diskChanged()=0
Is disk changed?
virtual void setSide(bool side)=0
Side select.
virtual void flushTrack()=0
virtual unsigned getTrackLength()=0
virtual void invalidateWd2793ReadTrackQuirk()=0
This class connects to a FDC as a normal DiskDrive and deligates 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
byte readTrackByte(int idx) override
bool isTrack00() const override
Head above track 0.
bool isWriteProtected() const override
Is disk write protected?
bool peekDiskChanged() const override
void selectDrive(DriveNum num, EmuTime::param time)
bool isDiskInserted() const override
Is drive ready?
DriveMultiplexer(DiskDrive *drv[4])
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.
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.
bool isDoubleSided() const override
Is disk double sided?
void writeTrackByte(int idx, byte val, bool addIdam) override
void setSide(bool side) override
Side select.
unsigned getTrackLength() override
ALWAYS_INLINE unsigned count(const uint8_t *pIn, const uint8_t *pMatch, const uint8_t *pInLimit)
This file implemented 3 utility functions:
SERIALIZE_ENUM(CassettePlayer::State, stateInfo)
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)