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

DMK disk image. More...

#include <DMKDiskImage.hh>

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

Public Member Functions

 DMKDiskImage (Filename filename, std::shared_ptr< File > file)
 
void readTrack (uint8_t track, uint8_t side, RawTrack &output) override
 Read a full track from this disk image.
 
void writeTrackImpl (uint8_t track, uint8_t side, const RawTrack &input) override
 
void readSectorImpl (size_t sector, SectorBuffer &buf) override
 
void writeSectorImpl (size_t sector, const SectorBuffer &buf) override
 
size_t getNbSectorsImpl () const override
 
bool isWriteProtectedImpl () const override
 
Sha1Sum getSha1SumImpl (FilePool &filePool) override
 
- 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.
 
virtual bool hasChanged () const
 Has the content of this disk changed, by some other means than the MSX writing to the disk.
 
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.
 
virtual void readSectorsImpl (std::span< SectorBuffer > buffers, size_t startSector)
 

Additional Inherited Members

- Static Public Attributes inherited from openmsx::SectorAccessibleDisk
static constexpr size_t SECTOR_SIZE = sizeof(SectorBuffer)
 
- 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 ()
 
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 void flushCaches ()
 

Detailed Description

DMK disk image.

A description of the file format can be found in doc/DMK-Format-Details.txt or at the original site: http://www.trs-80.com/wordpress/dsk-and-dmk-image-utilities/ (at the bottom of the page)

Definition at line 16 of file DMKDiskImage.hh.

Constructor & Destructor Documentation

◆ DMKDiskImage()

openmsx::DMKDiskImage::DMKDiskImage ( Filename  filename,
std::shared_ptr< File file 
)

Member Function Documentation

◆ getNbSectorsImpl()

size_t openmsx::DMKDiskImage::getNbSectorsImpl ( ) const
overridevirtual

Implements openmsx::SectorAccessibleDisk.

Definition at line 206 of file DMKDiskImage.cc.

References openmsx::Disk::getSectorsPerTrack(), and t.

◆ getSha1SumImpl()

Sha1Sum openmsx::DMKDiskImage::getSha1SumImpl ( FilePool filePool)
overridevirtual

Reimplemented from openmsx::SectorAccessibleDisk.

Definition at line 217 of file DMKDiskImage.cc.

References openmsx::FilePool::getSha1Sum().

◆ isWriteProtectedImpl()

bool openmsx::DMKDiskImage::isWriteProtectedImpl ( ) const
overridevirtual

Implements openmsx::SectorAccessibleDisk.

Definition at line 212 of file DMKDiskImage.cc.

◆ readSectorImpl()

void openmsx::DMKDiskImage::readSectorImpl ( size_t  sector,
SectorBuffer buf 
)
overridevirtual

◆ readTrack()

void openmsx::DMKDiskImage::readTrack ( uint8_t  track,
uint8_t  side,
RawTrack output 
)
overridevirtual

Read a full track from this disk image.

Implements openmsx::Disk.

Definition at line 72 of file DMKDiskImage.cc.

References openmsx::RawTrack::addIdam(), openmsx::RawTrack::clear(), openmsx::RawTrack::getRawBuffer(), and xrange().

Referenced by readSectorImpl(), and writeSectorImpl().

◆ writeSectorImpl()

void openmsx::DMKDiskImage::writeSectorImpl ( size_t  sector,
const SectorBuffer buf 
)
overridevirtual

◆ writeTrackImpl()

void openmsx::DMKDiskImage::writeTrackImpl ( uint8_t  track,
uint8_t  side,
const RawTrack input 
)
overridevirtual

Implements openmsx::Disk.

Definition at line 123 of file DMKDiskImage.cc.


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