| 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; |
| 21 |
} |
| 22 |
|
| 23 |
void DummyDisk::readSectorImpl(size_t , SectorBuffer& ) |
| 24 |
{ |
| 25 |
throw DriveEmptyException("No disk in drive"); |
| 26 |
} |
| 27 |
|
| 28 |
void DummyDisk::writeSectorImpl(size_t , const SectorBuffer& ) |
| 29 |
{ |
| 30 |
throw DriveEmptyException("No disk in drive"); |
| 31 |
} |
| 32 |
|
| 33 |
} |