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

#include <DiskPartition.hh>

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

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 (uint8_t track, uint8_t side, const RawTrack &input)
 Replace a full track in this image with the given track. More...
 
virtual void readTrack (uint8_t track, uint8_t side, RawTrack &output)=0
 Read a full track from this disk image. More...
 
virtual bool hasChanged () const
 Has the content of this disk changed, by some other means than the MSX writing to the disk. 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 (std::span< SectorBuffer > buffers, size_t startSector)
 
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. More...
 
virtual void readSectorsImpl (std::span< SectorBuffer > buffers, size_t startSector)
 
virtual void readSectorImpl (size_t sector, SectorBuffer &buf)
 

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 detectGeometry ()
 
virtual void detectGeometryFallback ()
 
void setSectorsPerTrack (unsigned num)
 
unsigned getSectorsPerTrack ()
 
void setNbSides (unsigned num)
 
virtual void writeTrackImpl (uint8_t track, uint8_t 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)
 

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.

Parameters
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 DiskPartition.cc.

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 DiskPartition.cc.

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


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