openMSX
DiskDrive.cc
Go to the documentation of this file.
1#include "DiskDrive.hh"
2#include "DiskExceptions.hh"
3
4namespace openmsx {
5
6// class DummyDrive
7
9{
10 return false;
11}
12
14{
15 return true;
16}
17
19{
20 return false;
21}
22
24{
25 return false; // National_FS-5500F1 2nd drive detection depends on this
26}
27
28void DummyDrive::setSide(bool /*side*/)
29{
30 // ignore
31}
32
34{
35 return false;
36}
37
38void DummyDrive::step(bool /*direction*/, EmuTime::param /*time*/)
39{
40 // ignore
41}
42
43void DummyDrive::setMotor(bool /*status*/, EmuTime::param /*time*/)
44{
45 // ignore
46}
47
49{
50 return false;
51}
52
53bool DummyDrive::indexPulse(EmuTime::param /*time*/)
54{
55 return false;
56}
57
58EmuTime DummyDrive::getTimeTillIndexPulse(EmuTime::param /*time*/, int /*count*/)
59{
60 return EmuTime::infinity();
61}
62
67
68void DummyDrive::writeTrackByte(int /*idx*/, uint8_t /*val*/, bool /*addIdam*/)
69{
70 throw DriveEmptyException("No drive selected");
71}
72
73uint8_t DummyDrive::readTrackByte(int /*idx*/)
74{
75 throw DriveEmptyException("No drive selected");
76}
77
78EmuTime DummyDrive::getNextSector(EmuTime::param /*time*/, RawTrack::Sector& /*sector*/)
79{
80 return EmuTime::infinity();
81}
82
84{
85 // ignore
86}
87
89{
90 return false;
91}
92
94{
95 return false;
96}
97
99{
100 return true;
101}
102
104{
105 // nothing
106}
107
109{
110 // nothing
111}
112
113} // namespace openmsx
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...
Definition DiskDrive.cc:58
bool peekDiskChanged() const override
Definition DiskDrive.cc:93
void writeTrackByte(int idx, uint8_t val, bool addIdam) override
Definition DiskDrive.cc:68
bool indexPulse(EmuTime::param time) override
Gets the state of the index pulse.
Definition DiskDrive.cc:53
unsigned getTrackLength() override
Definition DiskDrive.cc:63
void step(bool direction, EmuTime::param time) override
Step head.
Definition DiskDrive.cc:38
bool isDiskInserted() const override
Is drive ready?
Definition DiskDrive.cc:8
uint8_t readTrackByte(int idx) override
Definition DiskDrive.cc:73
bool isWriteProtected() const override
Is disk write protected?
Definition DiskDrive.cc:13
EmuTime getNextSector(EmuTime::param time, RawTrack::Sector &sector) override
Definition DiskDrive.cc:78
void invalidateWd2793ReadTrackQuirk() override
Definition DiskDrive.cc:108
bool getMotor() const override
Returns the previously set motor status.
Definition DiskDrive.cc:48
bool isDummyDrive() const override
Is there a dummy (unconnected) drive?
Definition DiskDrive.cc:98
void setSide(bool side) override
Side select.
Definition DiskDrive.cc:28
void setMotor(bool status, EmuTime::param time) override
Set motor on/off.
Definition DiskDrive.cc:43
void flushTrack() override
Definition DiskDrive.cc:83
bool getSide() const override
Definition DiskDrive.cc:33
bool isTrack00() const override
Head above track 0.
Definition DiskDrive.cc:23
void applyWd2793ReadTrackQuirk() override
See RawTrack::applyWd2793ReadTrackQuirk()
Definition DiskDrive.cc:103
bool isDoubleSided() override
Is disk double sided?
Definition DiskDrive.cc:18
bool diskChanged() override
Is disk changed?
Definition DiskDrive.cc:88
static constexpr unsigned STANDARD_SIZE
Definition RawTrack.hh:74
This file implemented 3 utility functions:
Definition Autofire.cc:11