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

#include <Disk.hh>

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

Public Member Functions

virtual ~Disk ()
 
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
virtual ~SectorAccessibleDisk ()
 
void readSector (size_t sector, SectorBuffer &buf)
 
void writeSector (size_t sector, const SectorBuffer &buf)
 
size_t getNbSectors () const
 
bool isWriteProtected () const
 
void forceWriteProtect ()
 
virtual bool isDummyDisk () const
 
void applyPatch (const Filename &patchFile)
 
std::vector< FilenamegetPatches () const
 
bool hasPatches () const
 
virtual Sha1Sum getSha1Sum ()
 Calculate SHA1 of the content of this disk. More...
 
int readSectors (SectorBuffer *buffers, size_t startSector, size_t nbSectors)
 
int writeSectors (const SectorBuffer *buffers, size_t startSector, size_t nbSectors)
 

Protected Member Functions

 Disk (const DiskName &name)
 
size_t physToLog (byte track, byte side, byte sector)
 
void logToPhys (size_t log, byte &track, byte &side, byte &sector)
 
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 ()
 
void setPeekMode (bool peek)
 
bool isPeekMode () const
 
virtual void checkCaches ()
 
virtual void flushCaches ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 12 of file Disk.hh.

Constructor & Destructor Documentation

virtual openmsx::Disk::~Disk ( )
inlinevirtual

Definition at line 15 of file Disk.hh.

openmsx::Disk::Disk ( const DiskName name)
explicitprotected

Definition at line 8 of file Disk.cc.

Member Function Documentation

void openmsx::Disk::detectGeometry ( )
protectedvirtual
void openmsx::Disk::detectGeometryFallback ( )
protectedvirtual

Definition at line 70 of file Disk.cc.

References openmsx::SectorAccessibleDisk::getNbSectors().

Referenced by detectGeometry().

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

Definition at line 17 of file Disk.hh.

unsigned openmsx::Disk::getSectorsPerTrack ( )
protected

Definition at line 62 of file Disk.cc.

References detectGeometry().

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

bool openmsx::Disk::isDoubleSided ( )

Definition at line 22 of file Disk.cc.

References detectGeometry().

void openmsx::Disk::logToPhys ( size_t  log,
byte track,
byte side,
byte sector 
)
protected
size_t openmsx::Disk::physToLog ( byte  track,
byte  side,
byte  sector 
)
protected

Definition at line 36 of file Disk.cc.

References detectGeometry().

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.

void openmsx::Disk::setNbSides ( unsigned  num)
inlineprotected
void openmsx::Disk::setSectorsPerTrack ( unsigned  num)
inlineprotected
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 13 of file Disk.cc.

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

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

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: