Public Member Functions | List of all members
openmsx::DiskPartition Class Referencefinal

#include <DiskPartition.hh>

Inheritance diagram for openmsx::DiskPartition:
Inheritance graph
Collaboration diagram for openmsx::DiskPartition:
Collaboration graph

Public Member Functions

 DiskPartition (SectorAccessibleDisk &disk, unsigned partition, std::shared_ptr< SectorAccessibleDisk > owned=nullptr)
 Return a partition (as a SectorbasedDisk) from another Disk. More...
 DiskPartition (SectorAccessibleDisk &parent, size_t start, size_t length)
- Public Member Functions inherited from openmsx::Disk
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...
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)

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 (byte track, byte side, byte 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 void checkCaches ()
virtual Sha1Sum getSha1SumImpl (FilePool &filepool)

Detailed Description

Definition at line 9 of file DiskPartition.hh.

Constructor & Destructor Documentation

◆ DiskPartition() [1/2]

openmsx::DiskPartition::DiskPartition ( SectorAccessibleDisk disk,
unsigned  partition,
std::shared_ptr< SectorAccessibleDisk owned = nullptr 

Return a partition (as a SectorbasedDisk) from another Disk.

diskThe whole disk.
partitionThe partition number. 0 for the whole disk 1-31 for a specific partition, this must be a valid partition.
ownedIf specified it should be a shared_ptr to the Disk object passed as first parameter. This DiskPartition will then take (shared) ownership of that Disk.

Definition at line 21 of file

References openmsx::DiskImageUtils::checkValidPartition(), openmsx::SectorAccessibleDisk::getNbSectors(), openmsx::PartitionTable::part, openmsx::DiskImageUtils::partition(), openmsx::SectorBuffer::pt, openmsx::SectorAccessibleDisk::readSector(), and openmsx::SectorBasedDisk::setNbSectors().

◆ DiskPartition() [2/2]

openmsx::DiskPartition::DiskPartition ( SectorAccessibleDisk parent,
size_t  start,
size_t  length 

Definition at line 42 of file

References gl::length(), and openmsx::SectorBasedDisk::setNbSectors().

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