openMSX
DiskDrive.cc
Go to the documentation of this file.
1 #include "DiskDrive.hh"
2 #include "DiskExceptions.hh"
3 
4 namespace 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 
28 void DummyDrive::setSide(bool /*side*/)
29 {
30  // ignore
31 }
32 
33 bool DummyDrive::getSide() const
34 {
35  return false;
36 }
37 
38 void DummyDrive::step(bool /*direction*/, EmuTime::param /*time*/)
39 {
40  // ignore
41 }
42 
43 void DummyDrive::setMotor(bool /*status*/, EmuTime::param /*time*/)
44 {
45  // ignore
46 }
47 
49 {
50  return false;
51 }
52 
53 bool DummyDrive::indexPulse(EmuTime::param /*time*/)
54 {
55  return false;
56 }
57 
58 EmuTime DummyDrive::getTimeTillIndexPulse(EmuTime::param /*time*/, int /*count*/)
59 {
60  return EmuTime::infinity();
61 }
62 
64 {
66 }
67 
68 void DummyDrive::writeTrackByte(int /*idx*/, byte /*val*/, bool /*addIdam*/)
69 {
70  throw DriveEmptyException("No drive selected");
71 }
72 
74 {
75  throw DriveEmptyException("No drive selected");
76 }
77 
78 EmuTime 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
void invalidateWd2793ReadTrackQuirk() override
Definition: DiskDrive.cc:108
bool isTrack00() const override
Head above track 0.
Definition: DiskDrive.cc:23
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
bool peekDiskChanged() const override
Definition: DiskDrive.cc:93
bool getSide() const override
Definition: DiskDrive.cc:33
byte readTrackByte(int idx) override
Definition: DiskDrive.cc:73
static constexpr unsigned STANDARD_SIZE
Definition: RawTrack.hh:71
void setMotor(bool status, EmuTime::param time) override
Set motor on/off.
Definition: DiskDrive.cc:43
void setSide(bool side) override
Side select.
Definition: DiskDrive.cc:28
void flushTrack() override
Definition: DiskDrive.cc:83
bool isDiskInserted() const override
Is drive ready?
Definition: DiskDrive.cc:8
bool isDummyDrive() const override
Is there a dummy (unconncted) drive?
Definition: DiskDrive.cc:98
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
unsigned getTrackLength() override
Definition: DiskDrive.cc:63
bool indexPulse(EmuTime::param time) override
Gets the state of the index pulse.
Definition: DiskDrive.cc:53
bool getMotor() const override
Returns the previously set motor status.
Definition: DiskDrive.cc:48
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 step(bool direction, EmuTime::param time) override
Step head.
Definition: DiskDrive.cc:38
bool diskChanged() override
Is disk changed?
Definition: DiskDrive.cc:88
void applyWd2793ReadTrackQuirk() override
See RawTrack::applyWd2793ReadTrackQuirk()
Definition: DiskDrive.cc:103
void writeTrackByte(int idx, byte val, bool addIdam) override
Definition: DiskDrive.cc:68
bool isDoubleSided() const override
Is disk double sided?
Definition: DiskDrive.cc:18
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