openMSX
Classes | Public Types | Public Member Functions | Friends | List of all members
openmsx::DirAsDSK Class Referencefinal

#include <DirAsDSK.hh>

Inheritance diagram for openmsx::DirAsDSK:
Inheritance graph
[legend]
Collaboration diagram for openmsx::DirAsDSK:
Collaboration graph
[legend]

Public Types

enum class  SyncMode { READONLY , FULL }
 
enum class  BootSectorType { DOS1 , 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.
 
void checkCaches () override
 
- Public Member Functions inherited from openmsx::Disk
virtual ~Disk ()=default
 
const DiskNamegetName () const
 
void writeTrack (uint8_t track, uint8_t side, const RawTrack &input)
 Replace a full track in this image with the given track.
 
bool isDoubleSided ()
 
- Public Member Functions inherited from openmsx::SectorAccessibleDisk
void readSector (size_t sector, SectorBuffer &buf) const
 
void writeSector (size_t sector, const SectorBuffer &buf)
 
void readSectors (std::span< SectorBuffer > buffers, size_t startSector) const
 
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< FilenamegetPatches () const
 
bool hasPatches () const
 
Sha1Sum getSha1Sum (FilePool &filePool)
 Calculate SHA1 of the content of this disk.
 
virtual void readSectorsImpl (std::span< SectorBuffer > buffers, size_t startSector)
 

Friends

struct NullScanner
 
struct DirScanner
 
struct IsDirSector
 
struct DirEntryForCluster
 
struct UnmapHostFiles
 

Additional Inherited Members

- Static Public Attributes inherited from openmsx::SectorAccessibleDisk
static constexpr size_t SECTOR_SIZE = sizeof(SectorBuffer)
 
- Protected Member Functions inherited from openmsx::SectorBasedDisk
 SectorBasedDisk (DiskName name)
 
void detectGeometry () override
 
void flushCaches () override
 
void setNbSectors (size_t num)
 
 ~SectorBasedDisk () override=default
 
- Protected Member Functions inherited from openmsx::Disk
 Disk (DiskName name)
 
size_t physToLog (uint8_t track, uint8_t side, uint8_t sector)
 
TSS logToPhys (size_t log)
 
virtual void detectGeometryFallback ()
 
void setSectorsPerTrack (unsigned num)
 
unsigned getSectorsPerTrack ()
 
void setNbSides (unsigned num)
 
- Protected Member Functions inherited from openmsx::SectorAccessibleDisk
 SectorAccessibleDisk ()
 
 ~SectorAccessibleDisk ()
 
void setPeekMode (bool peek)
 
bool isPeekMode () const
 
virtual Sha1Sum getSha1SumImpl (FilePool &filePool)
 

Detailed Description

Definition at line 18 of file DirAsDSK.hh.

Member Enumeration Documentation

◆ BootSectorType

Enumerator
DOS1 
DOS2 

Definition at line 22 of file DirAsDSK.hh.

◆ SyncMode

enum class openmsx::DirAsDSK::SyncMode
strong
Enumerator
READONLY 
FULL 

Definition at line 21 of file DirAsDSK.hh.

Constructor & Destructor Documentation

◆ DirAsDSK()

openmsx::DirAsDSK::DirAsDSK ( DiskChanger diskChanger,
CliComm cliComm,
const Filename hostDir,
SyncMode  syncMode,
BootSectorType  bootSectorType 
)

Member Function Documentation

◆ checkCaches()

void openmsx::DirAsDSK::checkCaches ( )
overridevirtual

◆ hasChanged()

bool openmsx::DirAsDSK::hasChanged ( ) const
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 339 of file DirAsDSK.cc.

◆ isWriteProtectedImpl()

bool openmsx::DirAsDSK::isWriteProtectedImpl ( ) const
overridevirtual

Implements openmsx::SectorAccessibleDisk.

Definition at line 334 of file DirAsDSK.cc.

References READONLY.

◆ readSectorImpl()

void openmsx::DirAsDSK::readSectorImpl ( size_t  sector,
SectorBuffer buf 
)
overridevirtual

◆ writeSectorImpl()

void openmsx::DirAsDSK::writeSectorImpl ( size_t  sector,
const SectorBuffer buf 
)
overridevirtual

Implements openmsx::SectorAccessibleDisk.

Definition at line 899 of file DirAsDSK.cc.

References openmsx::DiskChanger::getScheduler(), and READONLY.

Friends And Related Symbol Documentation

◆ DirEntryForCluster

friend struct DirEntryForCluster
friend

Definition at line 119 of file DirAsDSK.hh.

◆ DirScanner

friend struct DirScanner
friend

Definition at line 117 of file DirAsDSK.hh.

◆ IsDirSector

friend struct IsDirSector
friend

Definition at line 118 of file DirAsDSK.hh.

◆ NullScanner

friend struct NullScanner
friend

Definition at line 116 of file DirAsDSK.hh.

◆ UnmapHostFiles

friend struct UnmapHostFiles
friend

Definition at line 120 of file DirAsDSK.hh.


The documentation for this class was generated from the following files: