openMSX
|
Classes | |
struct | CHS |
struct | FatTimeDate |
struct | SetBootSectorResult |
Enumerations | |
enum class | PartitionTableType { SUNRISE_IDE , NEXTOR } |
Functions | |
bool | hasPartitionTable (const SectorAccessibleDisk &disk) |
Check whether the given disk is partitioned. | |
Partition & | getPartition (const SectorAccessibleDisk &disk, unsigned partition, SectorBuffer &buf) |
Gets the requested partition. | |
void | checkSupportedPartition (const SectorAccessibleDisk &disk, unsigned partition) |
Check whether partition is of type FAT12 or FAT16. | |
void | format (SectorAccessibleDisk &disk, MSXBootSectorType bootType) |
Format the given disk (= a single partition). | |
void | format (SectorAccessibleDisk &disk, MSXBootSectorType bootType, size_t nbSectors) |
unsigned | partition (SectorAccessibleDisk &disk, std::span< const unsigned > sizes, MSXBootSectorType bootType) |
Write a partition table to the given disk and format each partition. | |
FatTimeDate | toTimeDate (time_t totalSeconds) |
time_t | fromTimeDate (FatTimeDate timeDate) |
std::string | formatAttrib (MSXDirEntry::AttribValue attrib) |
|
strong |
Enumerator | |
---|---|
SUNRISE_IDE | |
NEXTOR |
Definition at line 26 of file DiskImageUtils.cc.
void openmsx::DiskImageUtils::checkSupportedPartition | ( | const SectorAccessibleDisk & | disk, |
unsigned | partition | ||
) |
Check whether partition is of type FAT12 or FAT16.
Definition at line 139 of file DiskImageUtils.cc.
References getPartition(), partition(), and openmsx::Partition::sys_ind.
Referenced by openmsx::DiskManipulator::getDriveNamesForCurrentMachine().
void openmsx::DiskImageUtils::format | ( | SectorAccessibleDisk & | disk, |
MSXBootSectorType | bootType | ||
) |
Format the given disk (= a single partition).
The formatting depends on the size of the image.
disk | The disk/partition image to be formatted. |
bootType | The boot sector type to use. |
Definition at line 403 of file DiskImageUtils.cc.
References format(), and openmsx::SectorAccessibleDisk::getNbSectors().
Referenced by openmsx::DiskManipulator::create(), format(), openmsx::GLHQLiteScaler::GLHQLiteScaler(), openmsx::GLHQScaler::GLHQScaler(), partition(), openmsx::RamDSKDiskImage::RamDSKDiskImage(), openmsx::SliderFloat(), openmsx::SliderFloat(), openmsx::GLHQLiteScaler::uploadBlock(), openmsx::GLHQScaler::uploadBlock(), and openmsx::WavWriter::WavWriter().
void openmsx::DiskImageUtils::format | ( | SectorAccessibleDisk & | disk, |
MSXBootSectorType | bootType, | ||
size_t | nbSectors | ||
) |
Definition at line 408 of file DiskImageUtils.cc.
References openmsx::SectorBuffer::bootSector, openmsx::DiskImageUtils::SetBootSectorResult::dataStart, openmsx::DiskImageUtils::SetBootSectorResult::descriptor, openmsx::DiskImageUtils::SetBootSectorResult::fat16, openmsx::DiskImageUtils::SetBootSectorResult::fatCount, openmsx::DiskImageUtils::SetBootSectorResult::fatStart, ranges::fill(), openmsx::SectorAccessibleDisk::getNbSectors(), openmsx::SectorBuffer::raw, openmsx::DiskImageUtils::SetBootSectorResult::rootDirStart, openmsx::DiskImageUtils::SetBootSectorResult::sectorsPerFat, openmsx::SectorAccessibleDisk::writeSector(), and xrange().
std::string openmsx::DiskImageUtils::formatAttrib | ( | MSXDirEntry::AttribValue | attrib | ) |
Definition at line 667 of file DiskImageUtils.cc.
References strCat().
time_t openmsx::DiskImageUtils::fromTimeDate | ( | FatTimeDate | timeDate | ) |
Definition at line 654 of file DiskImageUtils.cc.
References openmsx::DiskImageUtils::FatTimeDate::date, and openmsx::DiskImageUtils::FatTimeDate::time.
Partition & openmsx::DiskImageUtils::getPartition | ( | const SectorAccessibleDisk & | disk, |
unsigned | partition, | ||
SectorBuffer & | buf | ||
) |
Gets the requested partition.
Checks whether: the disk is partitioned the specified partition exists throws a CommandException if one of these conditions is false
disk | The disk to check. |
partition | Partition number, in range [1..]. |
buf | Sector buffer for partition table. |
Definition at line 124 of file DiskImageUtils.cc.
References NEXTOR, partition(), openmsx::SectorAccessibleDisk::readSector(), and SUNRISE_IDE.
Referenced by checkSupportedPartition(), openmsx::DiskPartition::DiskPartition(), and openmsx::DiskManipulator::getDriveNamesForCurrentMachine().
bool openmsx::DiskImageUtils::hasPartitionTable | ( | const SectorAccessibleDisk & | disk | ) |
Check whether the given disk is partitioned.
Definition at line 49 of file DiskImageUtils.cc.
References openmsx::SectorAccessibleDisk::readSector().
Referenced by openmsx::DiskManipulator::getDriveNamesForCurrentMachine().
unsigned openmsx::DiskImageUtils::partition | ( | SectorAccessibleDisk & | disk, |
std::span< const unsigned > | sizes, | ||
MSXBootSectorType | bootType | ||
) |
Write a partition table to the given disk and format each partition.
disk | The disk to partition. |
sizes | The number of sectors for each partition. |
bootType | The boot sector type to use. |
Definition at line 618 of file DiskImageUtils.cc.
References openmsx::DOS1, openmsx::DOS2, enumerate(), format(), openmsx::NEXTOR, and UNREACHABLE.
Referenced by checkSupportedPartition(), openmsx::DiskManipulator::create(), openmsx::DiskPartition::DiskPartition(), and getPartition().
FatTimeDate openmsx::DiskImageUtils::toTimeDate | ( | time_t | totalSeconds | ) |
Definition at line 640 of file DiskImageUtils.cc.