openMSX
|
Classes | |
struct | CHS |
struct | SetBootSectorResult |
Enumerations | |
enum class | PartitionTableType { SUNRISE_IDE , NEXTOR } |
Functions | |
bool | hasPartitionTable (SectorAccessibleDisk &disk) |
Check whether the given disk is partitioned. More... | |
Partition & | getPartition (SectorAccessibleDisk &disk, unsigned partition, SectorBuffer &buf) |
Gets the requested partition. More... | |
void | checkSupportedPartition (SectorAccessibleDisk &disk, unsigned partition) |
Check whether partition is of type FAT12 or FAT16. More... | |
void | format (SectorAccessibleDisk &disk, MSXBootSectorType bootType) |
Format the given disk (= a single partition). More... | |
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. More... | |
|
strong |
Enumerator | |
---|---|
SUNRISE_IDE | |
NEXTOR |
Definition at line 25 of file DiskImageUtils.cc.
void openmsx::DiskImageUtils::checkSupportedPartition | ( | SectorAccessibleDisk & | disk, |
unsigned | partition | ||
) |
Check whether partition is of type FAT12 or FAT16.
Definition at line 138 of file DiskImageUtils.cc.
References getPartition(), partition(), and openmsx::Partition::sys_ind.
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 402 of file DiskImageUtils.cc.
References format(), and openmsx::SectorAccessibleDisk::getNbSectors().
Referenced by openmsx::yuv2rgb::convert(), openmsx::SuperImposedFrame::create(), openmsx::Deflicker::create(), openmsx::Deflicker::Deflicker(), openmsx::DeflickerImpl< Pixel >::DeflickerImpl(), openmsx::DeinterlacedFrame::DeinterlacedFrame(), openmsx::DoubledFrame::DoubledFrame(), format(), openmsx::FrameSource::FrameSource(), openmsx::GLHQLiteScaler::GLHQLiteScaler(), openmsx::GLHQScaler::GLHQScaler(), partition(), openmsx::RamDSKDiskImage::RamDSKDiskImage(), openmsx::RawFrame::RawFrame(), openmsx::OutputSurface::setPixelFormat(), openmsx::SDLOutputSurface::setSDLPixelFormat(), openmsx::SuperImposedFrame::SuperImposedFrame(), openmsx::SuperImposedFrameImpl< Pixel >::SuperImposedFrameImpl(), openmsx::GLHQLiteScaler::uploadBlock(), openmsx::GLHQScaler::uploadBlock(), and openmsx::WavWriter::WavWriter().
void openmsx::DiskImageUtils::format | ( | SectorAccessibleDisk & | disk, |
MSXBootSectorType | bootType, | ||
size_t | nbSectors | ||
) |
Definition at line 407 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(), gl::min(), openmsx::SectorBuffer::raw, openmsx::DiskImageUtils::SetBootSectorResult::rootDirStart, openmsx::DiskImageUtils::SetBootSectorResult::sectorsPerFat, openmsx::SectorAccessibleDisk::writeSector(), and xrange().
Partition & openmsx::DiskImageUtils::getPartition | ( | 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 123 of file DiskImageUtils.cc.
References NEXTOR, partition(), openmsx::SectorAccessibleDisk::readSector(), and SUNRISE_IDE.
Referenced by checkSupportedPartition(), and openmsx::DiskPartition::DiskPartition().
bool openmsx::DiskImageUtils::hasPartitionTable | ( | SectorAccessibleDisk & | disk | ) |
Check whether the given disk is partitioned.
Definition at line 48 of file DiskImageUtils.cc.
References openmsx::SectorAccessibleDisk::readSector().
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 617 of file DiskImageUtils.cc.
References openmsx::DOS1, openmsx::DOS2, enumerate(), format(), openmsx::NEXTOR, utf8::unchecked::size(), and UNREACHABLE.
Referenced by checkSupportedPartition(), openmsx::DiskPartition::DiskPartition(), and getPartition().