OXYGENHUB
◆ main openmsx / src / fdc / DummyDisk.cc
578 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#include "DummyDisk.hh"
2
3
#include "DiskExceptions.hh"
4
5
namespace openmsx {
6
7
DummyDisk::DummyDisk()
8
	: SectorBasedDisk(DiskName(Filename()))
9
{
10
	setNbSectors(0);
11
}
12
13
bool DummyDisk::isDummyDisk() const
14
{
15
	return true;
16
}
17
18
bool DummyDisk::isWriteProtectedImpl() const
19
{
20
	return true; // TODO check
21
}
22
23
void DummyDisk::readSectorImpl(size_t /*sector*/, SectorBuffer& /*buf*/)
24
{
25
	throw DriveEmptyException("No disk in drive");
26
}
27
28
void DummyDisk::writeSectorImpl(size_t /*sector*/, const SectorBuffer& /*buf*/)
29
{
30
	throw DriveEmptyException("No disk in drive");
31
}
32
33
} // namespace openmsx