Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
openmsx::SectorAccessibleDisk Class Referenceabstract

#include <SectorAccessibleDisk.hh>

Inheritance diagram for openmsx::SectorAccessibleDisk:
Inheritance graph

Public Member Functions

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 (Filename patchFile)
std::vector< FilenamegetPatches () const
bool hasPatches () const
Sha1Sum getSha1Sum (FilePool &filepool)
 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)
virtual void readSectorImpl (size_t sector, SectorBuffer &buf)=0

Static Public Attributes

static const size_t SECTOR_SIZE = sizeof(SectorBuffer)

Protected Member Functions

 SectorAccessibleDisk ()
 ~SectorAccessibleDisk ()
void setPeekMode (bool peek)
bool isPeekMode () const
virtual void checkCaches ()
virtual void flushCaches ()
virtual Sha1Sum getSha1SumImpl (FilePool &filepool)

Detailed Description

Definition at line 15 of file SectorAccessibleDisk.hh.

Constructor & Destructor Documentation

◆ SectorAccessibleDisk()

openmsx::SectorAccessibleDisk::SectorAccessibleDisk ( )

Definition at line 18 of file

References ~SectorAccessibleDisk().

◆ ~SectorAccessibleDisk()

openmsx::SectorAccessibleDisk::~SectorAccessibleDisk ( )

Referenced by SectorAccessibleDisk().

Member Function Documentation

◆ applyPatch()

void openmsx::SectorAccessibleDisk::applyPatch ( Filename  patchFile)

Definition at line 64 of file

◆ checkCaches()

void openmsx::SectorAccessibleDisk::checkCaches ( )

Reimplemented in openmsx::DirAsDSK.

Definition at line 148 of file

Referenced by getSha1Sum(), isPeekMode(), and openmsx::SectorBasedDisk::SectorBasedDisk().

◆ flushCaches()

void openmsx::SectorAccessibleDisk::flushCaches ( )

◆ forceWriteProtect()

void openmsx::SectorAccessibleDisk::forceWriteProtect ( )

◆ getNbSectors()

size_t openmsx::SectorAccessibleDisk::getNbSectors ( ) const

◆ getPatches()

std::vector< Filename > openmsx::SectorAccessibleDisk::getPatches ( ) const

Definition at line 69 of file

Referenced by openmsx::DiskChanger::serialize().

◆ getSha1Sum()

Sha1Sum openmsx::SectorAccessibleDisk::getSha1Sum ( FilePool filepool)

Calculate SHA1 of the content of this disk.

This value is cached (and flushed on writes).

Definition at line 79 of file

References checkCaches(), openmsx::Sha1Sum::empty(), and getSha1SumImpl().

Referenced by openmsx::DiskCommand::needRecord(), and openmsx::HD::serialize().

◆ getSha1SumImpl()

Sha1Sum openmsx::SectorAccessibleDisk::getSha1SumImpl ( FilePool filepool)

◆ hasPatches()

bool openmsx::SectorAccessibleDisk::hasPatches ( ) const

◆ isDummyDisk()

bool openmsx::SectorAccessibleDisk::isDummyDisk ( ) const

Reimplemented in openmsx::DummyDisk.

Definition at line 143 of file

Referenced by readSector(), and writeSector().

◆ isPeekMode()

bool openmsx::SectorAccessibleDisk::isPeekMode ( ) const

Definition at line 61 of file SectorAccessibleDisk.hh.

References checkCaches(), flushCaches(), and getSha1SumImpl().

Referenced by openmsx::DirAsDSK::readSectorImpl().

◆ isWriteProtected()

bool openmsx::SectorAccessibleDisk::isWriteProtected ( ) const

◆ readSector()

void openmsx::SectorAccessibleDisk::readSector ( size_t  sector,
SectorBuffer buf 

◆ readSectorImpl()

virtual void openmsx::SectorAccessibleDisk::readSectorImpl ( size_t  sector,
SectorBuffer buf 
pure virtual

◆ readSectors()

int openmsx::SectorAccessibleDisk::readSectors ( SectorBuffer buffers,
size_t  startSector,
size_t  nbSectors 

Definition at line 106 of file

References readSector(), and xrange().

Referenced by openmsx::NowindHost::write().

◆ setPeekMode()

void openmsx::SectorAccessibleDisk::setPeekMode ( bool  peek)

Definition at line 60 of file SectorAccessibleDisk.hh.

Referenced by getSha1SumImpl().

◆ writeSector()

void openmsx::SectorAccessibleDisk::writeSector ( size_t  sector,
const SectorBuffer buf 

◆ writeSectors()

int openmsx::SectorAccessibleDisk::writeSectors ( const SectorBuffer buffers,
size_t  startSector,
size_t  nbSectors 

Definition at line 119 of file

References writeSector(), and xrange().

Referenced by openmsx::NowindHost::write().

Member Data Documentation


const size_t openmsx::SectorAccessibleDisk::SECTOR_SIZE = sizeof(SectorBuffer)

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