openMSX
|
#include <DirAsDSK.hh>
Public Types | |
enum | SyncMode { SYNC_READONLY , SYNC_FULL } |
enum | BootSectorType { BOOT_SECTOR_DOS1 , BOOT_SECTOR_DOS2 } |
Public Member Functions | |
DirAsDSK (DiskChanger &diskChanger, CliComm &cliComm, const Filename &hostDir, SyncMode syncMode, BootSectorType bootSectorType) | |
void | readSectorImpl (size_t sector, SectorBuffer &buf) override |
void | writeSectorImpl (size_t sector, const SectorBuffer &buf) override |
bool | isWriteProtectedImpl () const override |
bool | hasChanged () const override |
Has the content of this disk changed, by some other means than the MSX writing to the disk. More... | |
void | checkCaches () override |
![]() | |
virtual | ~Disk ()=default |
const DiskName & | getName () const |
void | writeTrack (uint8_t track, uint8_t side, const RawTrack &input) |
Replace a full track in this image with the given track. More... | |
virtual void | readTrack (uint8_t track, uint8_t side, RawTrack &output)=0 |
Read a full track from this disk image. More... | |
virtual bool | hasChanged () const |
Has the content of this disk changed, by some other means than the MSX writing to the disk. More... | |
bool | isDoubleSided () |
![]() | |
void | readSector (size_t sector, SectorBuffer &buf) |
void | writeSector (size_t sector, const SectorBuffer &buf) |
void | readSectors (std::span< SectorBuffer > buffers, size_t startSector) |
void | writeSectors (std::span< const SectorBuffer > buffers, size_t startSector) |
size_t | getNbSectors () const |
bool | isWriteProtected () const |
void | forceWriteProtect () |
virtual bool | isDummyDisk () const |
void | applyPatch (Filename patchFile) |
std::vector< Filename > | getPatches () const |
bool | hasPatches () const |
Sha1Sum | getSha1Sum (FilePool &filePool) |
Calculate SHA1 of the content of this disk. More... | |
virtual void | readSectorsImpl (std::span< SectorBuffer > buffers, size_t startSector) |
virtual void | readSectorImpl (size_t sector, SectorBuffer &buf) |
Friends | |
struct | NullScanner |
struct | DirScanner |
struct | IsDirSector |
struct | DirEntryForCluster |
struct | UnmapHostFiles |
Additional Inherited Members | |
![]() | |
static constexpr size_t | SECTOR_SIZE = sizeof(SectorBuffer) |
![]() | |
SectorBasedDisk (DiskName name) | |
void | detectGeometry () override |
void | flushCaches () override |
void | setNbSectors (size_t num) |
~SectorBasedDisk () override=default | |
![]() | |
Disk (DiskName name) | |
size_t | physToLog (uint8_t track, uint8_t side, uint8_t sector) |
TSS | logToPhys (size_t log) |
virtual void | detectGeometry () |
virtual void | detectGeometryFallback () |
void | setSectorsPerTrack (unsigned num) |
unsigned | getSectorsPerTrack () |
void | setNbSides (unsigned num) |
virtual void | writeTrackImpl (uint8_t track, uint8_t side, const RawTrack &input)=0 |
![]() | |
SectorAccessibleDisk () | |
~SectorAccessibleDisk () | |
void | setPeekMode (bool peek) |
bool | isPeekMode () const |
virtual void | checkCaches () |
virtual void | flushCaches () |
virtual Sha1Sum | getSha1SumImpl (FilePool &filePool) |
Definition at line 16 of file DirAsDSK.hh.
Enumerator | |
---|---|
BOOT_SECTOR_DOS1 | |
BOOT_SECTOR_DOS2 |
Definition at line 20 of file DirAsDSK.hh.
Enumerator | |
---|---|
SYNC_READONLY | |
SYNC_FULL |
Definition at line 19 of file DirAsDSK.hh.
openmsx::DirAsDSK::DirAsDSK | ( | DiskChanger & | diskChanger, |
CliComm & | cliComm, | ||
const Filename & | hostDir, | ||
SyncMode | syncMode, | ||
BootSectorType | bootSectorType | ||
) |
Definition at line 260 of file DirAsDSK.cc.
References BOOT_SECTOR_DOS1, openmsx::BootBlocks::dos1BootBlock, openmsx::BootBlocks::dos2BootBlock, ranges::fill(), openmsx::FileOperations::isDirectory(), openmsx::DiskChanger::isDoubleSidedDrive(), openmsx::SectorAccessibleDisk::SECTOR_SIZE, openmsx::SectorBasedDisk::setNbSectors(), openmsx::Disk::setNbSides(), and openmsx::Disk::setSectorsPerTrack().
|
overridevirtual |
Reimplemented from openmsx::SectorAccessibleDisk.
Definition at line 347 of file DirAsDSK.cc.
References openmsx::SectorBasedDisk::flushCaches(), openmsx::DiskChanger::getScheduler(), and openmsx::EmuDuration::sec().
|
overridevirtual |
Has the content of this disk changed, by some other means than the MSX writing to the disk.
In other words: should caches on the MSX side be dropped? (E.g. via the 'disk-changed-signal' that's present in (some) MSX disk interfaces).
Reimplemented from openmsx::Disk.
Definition at line 337 of file DirAsDSK.cc.
|
overridevirtual |
Implements openmsx::SectorAccessibleDisk.
Definition at line 332 of file DirAsDSK.cc.
References SYNC_READONLY.
|
overridevirtual |
Reimplemented from openmsx::SectorAccessibleDisk.
Definition at line 366 of file DirAsDSK.cc.
References openmsx::SectorBasedDisk::flushCaches(), openmsx::DiskChanger::forceDiskChange(), openmsx::DiskChanger::getScheduler(), openmsx::SectorAccessibleDisk::isPeekMode(), and openmsx::EmuDuration::sec().
|
overridevirtual |
Implements openmsx::SectorAccessibleDisk.
Definition at line 898 of file DirAsDSK.cc.
References openmsx::DiskChanger::getScheduler(), and SYNC_READONLY.
|
friend |
Definition at line 113 of file DirAsDSK.hh.
|
friend |
Definition at line 111 of file DirAsDSK.hh.
|
friend |
Definition at line 112 of file DirAsDSK.hh.
|
friend |
Definition at line 110 of file DirAsDSK.hh.
|
friend |
Definition at line 114 of file DirAsDSK.hh.