openMSX
Classes | Namespaces | Functions
DiskImageUtils.hh File Reference
#include "openmsx.hh"
#include "endian.hh"
#include "alignof.hh"
#include <vector>
#include <memory>
Include dependency graph for DiskImageUtils.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openmsx::MSXBootSector
struct  openmsx::MSXDirEntry
struct  openmsx::Partition
struct  openmsx::PartitionTable

Namespaces

namespace  openmsx
 Thanks to enen for testing this on a real cartridge:
namespace  openmsx::DiskImageUtils

Functions

 openmsx::static_assert (sizeof(MSXBootSector)==512,"must be size 512")
 openmsx::static_assert (ALIGNOF(MSXBootSector)==1,"must not have alignment requirements")
 openmsx::static_assert (sizeof(MSXDirEntry)==32,"must be size 32")
 openmsx::static_assert (ALIGNOF(MSXDirEntry)==1,"must not have alignment requirements")
 openmsx::static_assert (sizeof(Partition)==16,"must be size 16")
 openmsx::static_assert (ALIGNOF(Partition)==1,"must not have alignment requirements")
 openmsx::static_assert (sizeof(PartitionTable)==512,"must be size 512")
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.
void openmsx::DiskImageUtils::checkFAT12Partition (SectorAccessibleDisk &disk, unsigned partition)
 Like above, but also check whether partition is of type FAT12.
bool openmsx::DiskImageUtils::hasPartitionTable (SectorAccessibleDisk &disk)
 Check whether the given disk is partitioned.
void openmsx::DiskImageUtils::format (SectorAccessibleDisk &disk)
 Format the given disk (= a single partition).
void openmsx::DiskImageUtils::partition (SectorAccessibleDisk &disk, const std::vector< unsigned > &sizes)
 Write a partition table to the given disk and format each partition.