openMSX
DummyDisk.cc
Go to the documentation of this file.
1 #include "DummyDisk.hh"
2 #include "DiskExceptions.hh"
3 
4 namespace openmsx {
5 
8 {
9  setNbSectors(0);
10 }
11 
13 {
14  return true;
15 }
16 
17 bool DummyDisk::isWriteProtectedImpl() const
18 {
19  return true; // TODO check
20 }
21 
22 void DummyDisk::readSectorImpl(size_t /*sector*/, SectorBuffer& /*buf*/)
23 {
24  throw DriveEmptyException("No disk in drive");
25 }
26 
27 void DummyDisk::writeSectorImpl(size_t /*sector*/, const SectorBuffer& /*buf*/)
28 {
29  throw DriveEmptyException("No disk in drive");
30 }
31 
32 } // namespace openmsx
DiskExceptions.hh
DummyDisk.hh
openmsx::SectorBasedDisk::setNbSectors
void setNbSectors(size_t num)
Definition: SectorBasedDisk.cc:147
openmsx::DummyDisk::DummyDisk
DummyDisk()
Definition: DummyDisk.cc:6
openmsx::SectorBasedDisk
Abstract class for disk images that only represent the logical sector information (so not the raw tra...
Definition: SectorBasedDisk.hh:13
openmsx::DummyDisk::isDummyDisk
bool isDummyDisk() const override
Definition: DummyDisk.cc:12
openmsx::Filename
This class represents a filename.
Definition: Filename.hh:17
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5