Classes | Public Member Functions | Protected Member Functions | List of all members
openmsx::Disk Class Referenceabstract

#include <Disk.hh>

Inheritance diagram for openmsx::Disk:
Inheritance graph
Collaboration diagram for openmsx::Disk:
Collaboration graph


struct  TSS

Public Member Functions

virtual ~Disk ()=default
const DiskNamegetName () const
void writeTrack (byte track, byte side, const RawTrack &input)
 Replace a full track in this image with the given track. More...
virtual void readTrack (byte track, byte side, RawTrack &output)=0
 Read a full track from this disk image. More...
bool isDoubleSided ()
- Public Member Functions inherited from openmsx::SectorAccessibleDisk
void readSector (size_t sector, SectorBuffer &buf)
void writeSector (size_t sector, const SectorBuffer &buf)
void readSectors (SectorBuffer *buffers, size_t startSector, size_t nbSectors)
void writeSectors (const SectorBuffer *buffers, size_t startSector, size_t nbSectors)
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. More...
virtual void readSectorsImpl (SectorBuffer *buffers, size_t startSector, size_t nbSectors)
virtual void readSectorImpl (size_t sector, SectorBuffer &buf)

Protected Member Functions

 Disk (DiskName name)
size_t physToLog (byte track, byte side, byte 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 (byte track, byte side, const RawTrack &input)=0
- Protected Member Functions inherited from openmsx::SectorAccessibleDisk
 SectorAccessibleDisk ()
 ~SectorAccessibleDisk ()
void setPeekMode (bool peek)
bool isPeekMode () const
virtual void checkCaches ()
virtual void flushCaches ()
virtual Sha1Sum getSha1SumImpl (FilePool &filepool)

Additional Inherited Members

- Static Public Attributes inherited from openmsx::SectorAccessibleDisk
static constexpr size_t SECTOR_SIZE = sizeof(SectorBuffer)

Detailed Description

Definition at line 12 of file Disk.hh.

Constructor & Destructor Documentation

◆ ~Disk()

virtual openmsx::Disk::~Disk ( )

◆ Disk()

openmsx::Disk::Disk ( DiskName  name)

Definition at line 7 of file

Member Function Documentation

◆ detectGeometry()

void openmsx::Disk::detectGeometry ( )

◆ detectGeometryFallback()

void openmsx::Disk::detectGeometryFallback ( )

Definition at line 70 of file

References openmsx::SectorAccessibleDisk::getNbSectors().

Referenced by detectGeometry().

◆ getName()

const DiskName& openmsx::Disk::getName ( ) const

Definition at line 17 of file Disk.hh.

◆ getSectorsPerTrack()

unsigned openmsx::Disk::getSectorsPerTrack ( )

Definition at line 62 of file

References detectGeometry().

Referenced by openmsx::DMKDiskImage::getNbSectorsImpl().

◆ isDoubleSided()

bool openmsx::Disk::isDoubleSided ( )

Definition at line 21 of file

References detectGeometry().

◆ logToPhys()

Disk::TSS openmsx::Disk::logToPhys ( size_t  log)

◆ physToLog()

size_t openmsx::Disk::physToLog ( byte  track,
byte  side,
byte  sector 

Definition at line 35 of file

References detectGeometry().

◆ readTrack()

virtual void openmsx::Disk::readTrack ( byte  track,
byte  side,
RawTrack output 
pure virtual

Read a full track from this disk image.

Implemented in openmsx::DMKDiskImage.

◆ setNbSides()

void openmsx::Disk::setNbSides ( unsigned  num)

◆ setSectorsPerTrack()

void openmsx::Disk::setSectorsPerTrack ( unsigned  num)

◆ writeTrack()

void openmsx::Disk::writeTrack ( byte  track,
byte  side,
const RawTrack input 

Replace a full track in this image with the given track.

Definition at line 12 of file

References openmsx::SectorAccessibleDisk::flushCaches(), openmsx::SectorAccessibleDisk::isWriteProtected(), and writeTrackImpl().

Referenced by openmsx::DMKDiskImage::writeSectorImpl().

◆ writeTrackImpl()

virtual void openmsx::Disk::writeTrackImpl ( byte  track,
byte  side,
const RawTrack input 
protectedpure virtual

Implemented in openmsx::DMKDiskImage.

Referenced by writeTrack().

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