OXYGENHUB
◆ main openmsx / src / fdc / DiskDrive.cc
1.6 KiB · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#include "DiskDrive.hh"
2
3
#include "DiskExceptions.hh"
4
5
namespace openmsx {
6
7
// class DummyDrive
8
9
bool DummyDrive::isDiskInserted() const
10
{
11
	return false;
12
}
13
14
bool DummyDrive::isWriteProtected() const
15
{
16
	return true;
17
}
18
19
bool DummyDrive::isDoubleSided()
20
{
21
	return false;
22
}
23
24
bool DummyDrive::isTrack00() const
25
{
26
	return false; // National_FS-5500F1 2nd drive detection depends on this
27
}
28
29
void DummyDrive::setSide(bool /*side*/)
30
{
31
	// ignore
32
}
33
34
bool DummyDrive::getSide() const
35
{
36
	return false;
37
}
38
39
void DummyDrive::step(bool /*direction*/, EmuTime /*time*/)
40
{
41
	// ignore
42
}
43
44
void DummyDrive::setMotor(bool /*status*/, EmuTime /*time*/)
45
{
46
	// ignore
47
}
48
49
bool DummyDrive::getMotor() const
50
{
51
	return false;
52
}
53
54
bool DummyDrive::indexPulse(EmuTime /*time*/)
55
{
56
	return false;
57
}
58
59
EmuTime DummyDrive::getTimeTillIndexPulse(EmuTime /*time*/, int /*count*/)
60
{
61
	return EmuTime::infinity();
62
}
63
64
unsigned DummyDrive::getTrackLength()
65
{
66
	return RawTrack::STANDARD_SIZE;
67
}
68
69
void DummyDrive::writeTrackByte(int /*idx*/, uint8_t /*val*/, bool /*addIdam*/)
70
{
71
	throw DriveEmptyException("No drive selected");
72
}
73
74
uint8_t DummyDrive::readTrackByte(int /*idx*/)
75
{
76
	throw DriveEmptyException("No drive selected");
77
}
78
79
EmuTime DummyDrive::getNextSector(EmuTime /*time*/, RawTrack::Sector& /*sector*/)
80
{
81
	return EmuTime::infinity();
82
}
83
84
void DummyDrive::flushTrack()
85
{
86
	// ignore
87
}
88
89
bool DummyDrive::diskChanged()
90
{
91
	return false;
92
}
93
94
bool DummyDrive::peekDiskChanged() const
95
{
96
	return false;
97
}
98
99
bool DummyDrive::isDummyDrive() const
100
{
101
	return true;
102
}
103
104
void DummyDrive::applyWd2793ReadTrackQuirk()
105
{
106
	// nothing
107
}
108
109
void DummyDrive::invalidateWd2793ReadTrackQuirk()
110
{
111
	// nothing
112
}
113
114
} // namespace openmsx