openMSX
|
Classes | |
struct | SetBootSectorResult |
struct | CHS |
Functions | |
bool | hasPartitionTable (SectorAccessibleDisk &disk) |
Check whether the given disk is partitioned. More... | |
void | checkValidPartition (SectorAccessibleDisk &disk, unsigned partition) |
Checks whether the disk is partitioned the specified partition exists throws a CommandException if one of these conditions is false. More... | |
void | checkFAT12Partition (SectorAccessibleDisk &disk, unsigned partition) |
Like above, but also check whether partition is of type FAT12. More... | |
void | format (SectorAccessibleDisk &disk, bool dos1=false) |
Format the given disk (= a single partition). More... | |
void | partition (SectorAccessibleDisk &disk, std::span< const unsigned > sizes) |
Write a partition table to the given disk and format each partition. More... | |
void openmsx::DiskImageUtils::checkFAT12Partition | ( | SectorAccessibleDisk & | disk, |
unsigned | partition | ||
) |
Like above, but also check whether partition is of type FAT12.
Definition at line 59 of file DiskImageUtils.cc.
References partition(), and openmsx::Partition::sys_ind.
void openmsx::DiskImageUtils::checkValidPartition | ( | SectorAccessibleDisk & | disk, |
unsigned | 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..31]. |
Definition at line 53 of file DiskImageUtils.cc.
References partition().
Referenced by openmsx::DiskPartition::DiskPartition().
void openmsx::DiskImageUtils::format | ( | SectorAccessibleDisk & | disk, |
bool | dos1 = false |
||
) |
Format the given disk (= a single partition).
The formatting depends on the size of the image.
disk | the disk/partition image to be formatted |
dos1 | set to true if you want to force dos1 formatting (boot sector) |
Definition at line 190 of file DiskImageUtils.cc.
References openmsx::SectorBuffer::bootSector, openmsx::SectorAccessibleDisk::getNbSectors(), openmsx::SectorBuffer::raw, openmsx::SectorAccessibleDisk::writeSector(), and xrange().
Referenced by openmsx::yuv2rgb::convert(), openmsx::SuperImposedFrame::create(), openmsx::Deflicker::create(), openmsx::Deflicker::Deflicker(), openmsx::DeflickerImpl< Pixel >::DeflickerImpl(), openmsx::DeinterlacedFrame::DeinterlacedFrame(), openmsx::DoubledFrame::DoubledFrame(), 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().
bool openmsx::DiskImageUtils::hasPartitionTable | ( | SectorAccessibleDisk & | disk | ) |
Check whether the given disk is partitioned.
Definition at line 23 of file DiskImageUtils.cc.
References openmsx::SectorBuffer::pt, and openmsx::SectorAccessibleDisk::readSector().
void openmsx::DiskImageUtils::partition | ( | SectorAccessibleDisk & | disk, |
std::span< const unsigned > | sizes | ||
) |
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. |
Definition at line 236 of file DiskImageUtils.cc.
References openmsx::PartitionTable::end, enumerate(), format(), openmsx::PartitionTable::header, openmsx::PartitionTable::part, openmsx::SectorBuffer::pt, utf8::unchecked::size(), and openmsx::SectorAccessibleDisk::writeSector().
Referenced by checkFAT12Partition(), checkValidPartition(), and openmsx::DiskPartition::DiskPartition().