openMSX
|
This class connects to a FDC as a normal DiskDrive and delegates all requests to one of four other DiskDrives. More...
#include <DriveMultiplexer.hh>
Public Types | |
enum class | Drive { A , B , C , D , NONE , NUM } |
Public Types inherited from openmsx::DiskDrive | |
enum class | TrackMode { NORMAL , YAMAHA_FD_03 } |
Public Member Functions | |
DriveMultiplexer (std::span< std::unique_ptr< DiskDrive >, 4 > drv) | |
void | selectDrive (Drive num, EmuTime::param time) |
Drive | getSelectedDrive () const |
bool | isDiskInserted () const override |
Is drive ready? | |
bool | isWriteProtected () const override |
Is disk write protected? | |
bool | isDoubleSided () override |
Is disk double sided? | |
bool | isTrack00 () const override |
Head above track 0. | |
void | setSide (bool side) override |
Side select. | |
bool | getSide () const override |
void | step (bool direction, EmuTime::param time) override |
Step head. | |
void | setMotor (bool status, EmuTime::param time) override |
Set motor on/off. | |
bool | getMotor () const override |
Returns the previously set motor status. | |
bool | indexPulse (EmuTime::param time) override |
Gets the state of the index pulse. | |
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 disk is not spinning, this function returns the current time. | |
unsigned | getTrackLength () override |
void | writeTrackByte (int idx, uint8_t val, bool addIdam) override |
uint8_t | readTrackByte (int idx) override |
EmuTime | getNextSector (EmuTime::param time, RawTrack::Sector §or) override |
void | flushTrack () override |
bool | diskChanged () override |
Is disk changed? | |
bool | peekDiskChanged () const override |
bool | isDummyDrive () const override |
Is there a dummy (unconnected) drive? | |
void | applyWd2793ReadTrackQuirk () override |
See RawTrack::applyWd2793ReadTrackQuirk() | |
void | invalidateWd2793ReadTrackQuirk () override |
bool | isDiskInserted (Drive num) const |
bool | diskChanged (Drive num) |
bool | peekDiskChanged (Drive num) const |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Public Member Functions inherited from openmsx::DiskDrive | |
virtual | ~DiskDrive ()=default |
Additional Inherited Members | |
Static Public Attributes inherited from openmsx::DiskDrive | |
static constexpr unsigned | ROTATIONS_PER_SECOND = 5 |
This class connects to a FDC as a normal DiskDrive and delegates all requests to one of four other DiskDrives.
Definition at line 15 of file DriveMultiplexer.hh.
|
strong |
Enumerator | |
---|---|
A | |
B | |
C | |
D | |
NONE | |
NUM |
Definition at line 18 of file DriveMultiplexer.hh.
|
explicit |
|
overridevirtual |
See RawTrack::applyWd2793ReadTrackQuirk()
Implements openmsx::DiskDrive.
Definition at line 137 of file DriveMultiplexer.cc.
|
overridevirtual |
Is disk changed?
Implements openmsx::DiskDrive.
Definition at line 112 of file DriveMultiplexer.cc.
Referenced by openmsx::CanonFDC::readMem(), openmsx::PhilipsFDC::readMem(), openmsx::ToshibaFDC::readMem(), openmsx::YamahaFDC::readMem(), and openmsx::YamahaFDC::writeMem().
bool openmsx::DriveMultiplexer::diskChanged | ( | Drive | num | ) |
Definition at line 117 of file DriveMultiplexer.cc.
|
overridevirtual |
Implements openmsx::DiskDrive.
Definition at line 107 of file DriveMultiplexer.cc.
|
overridevirtual |
Returns the previously set motor status.
Implements openmsx::DiskDrive.
Definition at line 72 of file DriveMultiplexer.cc.
Referenced by openmsx::ToshibaFDC::peekMem().
|
overridevirtual |
Implements openmsx::DiskDrive.
Definition at line 102 of file DriveMultiplexer.cc.
|
inline |
Definition at line 27 of file DriveMultiplexer.hh.
Referenced by openmsx::ToshibaFDC::peekMem().
|
overridevirtual |
Implements openmsx::DiskDrive.
Definition at line 51 of file DriveMultiplexer.cc.
Referenced by openmsx::ToshibaFDC::peekMem().
|
overridevirtual |
Return the time till the start of the next index pulse When there is no disk in the drive or when the disk is not spinning, this function returns the current time.
time | The current time |
count | Number of required index pulses. |
Implements openmsx::DiskDrive.
Definition at line 82 of file DriveMultiplexer.cc.
|
overridevirtual |
Implements openmsx::DiskDrive.
Definition at line 87 of file DriveMultiplexer.cc.
|
overridevirtual |
Gets the state of the index pulse.
time | The moment in emulated time to get the pulse state for. |
Implements openmsx::DiskDrive.
Definition at line 77 of file DriveMultiplexer.cc.
|
overridevirtual |
Implements openmsx::DiskDrive.
Definition at line 142 of file DriveMultiplexer.cc.
|
overridevirtual |
Is drive ready?
Implements openmsx::DiskDrive.
Definition at line 25 of file DriveMultiplexer.cc.
Referenced by openmsx::YamahaFDC::peekMem(), and openmsx::YamahaFDC::readMem().
bool openmsx::DriveMultiplexer::isDiskInserted | ( | Drive | num | ) | const |
Definition at line 30 of file DriveMultiplexer.cc.
|
overridevirtual |
Is disk double sided?
Implements openmsx::DiskDrive.
Definition at line 40 of file DriveMultiplexer.cc.
|
overridevirtual |
Is there a dummy (unconnected) drive?
Implements openmsx::DiskDrive.
Definition at line 132 of file DriveMultiplexer.cc.
|
overridevirtual |
Head above track 0.
Implements openmsx::DiskDrive.
Definition at line 61 of file DriveMultiplexer.cc.
|
overridevirtual |
Is disk write protected?
Implements openmsx::DiskDrive.
Definition at line 35 of file DriveMultiplexer.cc.
|
overridevirtual |
Implements openmsx::DiskDrive.
Definition at line 122 of file DriveMultiplexer.cc.
Referenced by openmsx::CanonFDC::peekMem(), openmsx::PhilipsFDC::peekMem(), openmsx::ToshibaFDC::peekMem(), openmsx::YamahaFDC::peekMem(), and openmsx::YamahaFDC::readMem().
bool openmsx::DriveMultiplexer::peekDiskChanged | ( | Drive | num | ) | const |
Definition at line 127 of file DriveMultiplexer.cc.
|
overridevirtual |
Implements openmsx::DiskDrive.
Definition at line 97 of file DriveMultiplexer.cc.
void openmsx::DriveMultiplexer::selectDrive | ( | Drive | num, |
EmuTime::param | time | ||
) |
Definition at line 15 of file DriveMultiplexer.cc.
Referenced by openmsx::AVTFDC::writeIO(), openmsx::MicrosolFDC::writeIO(), openmsx::SVIFDC::writeIO(), openmsx::CanonFDC::writeMem(), openmsx::NationalFDC::writeMem(), openmsx::PhilipsFDC::writeMem(), openmsx::SanyoFDC::writeMem(), openmsx::SpectravideoFDC::writeMem(), openmsx::ToshibaFDC::writeMem(), openmsx::VictorFDC::writeMem(), and openmsx::YamahaFDC::writeMem().
void openmsx::DriveMultiplexer::serialize | ( | Archive & | ar, |
unsigned | version | ||
) |
Definition at line 158 of file DriveMultiplexer.cc.
|
overridevirtual |
Set motor on/off.
status | false = off, true = on. |
time | The moment in emulated time this action takes place. |
Implements openmsx::DiskDrive.
Definition at line 66 of file DriveMultiplexer.cc.
Referenced by openmsx::AVTFDC::writeIO(), openmsx::MicrosolFDC::writeIO(), openmsx::SVIFDC::writeIO(), openmsx::CanonFDC::writeMem(), openmsx::NationalFDC::writeMem(), openmsx::PhilipsFDC::writeMem(), openmsx::SanyoFDC::writeMem(), openmsx::SpectravideoFDC::writeMem(), openmsx::ToshibaFDC::writeMem(), openmsx::VictorFDC::writeMem(), and openmsx::YamahaFDC::writeMem().
|
overridevirtual |
Side select.
side | false = side 0, true = side 1. |
Implements openmsx::DiskDrive.
Definition at line 45 of file DriveMultiplexer.cc.
Referenced by openmsx::AVTFDC::writeIO(), openmsx::MicrosolFDC::writeIO(), openmsx::SVIFDC::writeIO(), openmsx::CanonFDC::writeMem(), openmsx::NationalFDC::writeMem(), openmsx::PhilipsFDC::writeMem(), openmsx::SanyoFDC::writeMem(), openmsx::SpectravideoFDC::writeMem(), openmsx::ToshibaFDC::writeMem(), openmsx::VictorFDC::writeMem(), and openmsx::YamahaFDC::writeMem().
|
overridevirtual |
Step head.
direction | false = out, true = in. |
time | The moment in emulated time this action takes place. |
Implements openmsx::DiskDrive.
Definition at line 56 of file DriveMultiplexer.cc.
|
overridevirtual |
Implements openmsx::DiskDrive.
Definition at line 92 of file DriveMultiplexer.cc.