Expand description
§fluxfox
fluxfox is a library crate for reading, writing, and manipulating floppy disk images of the kind used with vintage IBM Personal Computers and compatibles.
fluxfox is primarily designed for emulator authors who may be writing a PC emulator and would like to support disk images in a variety of formats, however it can be used for visualization, dumping, editing, and other disk image tasks.
fluxfox currently supports several different disk image formats, both modern and vintage, of flux, bitstream and sector-based resolution.
The main interface to fluxfox is via a DiskImage
object, which can be created by loading
a disk image file, or by creating a new disk image from scratch.
It is recommended to use the image_builder::ImageBuilder
interface to load or create a disk image.
Re-exports§
pub use crate::diskimage::DiskImage;
pub use crate::diskimage::DiskImageFileFormat;
pub use crate::diskimage::SectorMapEntry;
pub use crate::image_builder::ImageBuilder;
pub use crate::standard_format::StandardFormat;
Modules§
- bitstream
- diskimage
- The
diskimage
module defines theDiskImage
struct which serves as the main interface to fluxfox. ADiskImage
represents the single disk image as read from a disk image file, or created new as a specified format. - flux
- image_
builder - standard_
format - The
standard_format
module defines theStandardFormat
enum that defines parameters for several standard PC disk formats. - structure_
parsers - The
structure_parsers
module defines aDiskStructureParser
trait that can be implemented by different parser types. - util
- The
util
module provides various utility functions. - visualization
- The
visualization
module provides rendering functions for disk images. This module requires theviz
feature to be enabled. Graphics support is provided by thetiny-skia
crate, which will be re-exported.
Structs§
- DiskCh
- A structure representing two of the four components of Sector ID:
- DiskChs
- A structure representing three of the four components of Sector ID:
- Disk
Chsn - A structure representing the four components of Sector ID:
- Image
Writer
Enums§
- Disk
Data Encoding - The base bitcell encoding method of the data in a disk image. Note that some disk images may contain tracks with different encodings.
- Disk
Data Rate - DiskDataRate defines the data rate of the disk image - for MFM and FM encoding, this is the bit rate / 2. DiskDataRate defines standard data rate categories, while storing a clock adjustment factor to make possible calculation of the exact data rate if required.
- Disk
Data Resolution - The resolution of the data in the disk image. Currently only ByteStream and BitStream are implemented.
- Disk
Density - The density of the disk image.
- Disk
Image Error - Disk
Physical Dimensions - The physical dimensions of a disk corresponding to the format of the image. This is rarely stored by disk image formats, so it is determined automatically.
- DiskRpm
- A
DiskRpm
may represent the standard rotation speed of a standard disk image, or the actual rotation speed of a disk drive while reading a disk. Double density 5.25“ disk drives rotate at 300RPM, but a double-density disk read in a high-density 5.25“ drive may rotate at 360RPM. - Disk
Visualization Error - Loading
Status - The status of a disk image loading operation, for file parsers that support progress reporting.
- Parser
Write Compatibility
Constants§
Traits§
- Image
Parser - Currently called via enum dispatch - implement on parsers directly?
Functions§
- format_
from_ ext - Returns a DiskImageFormat enum variant based on the file extension provided. If the extension is not recognized, None is returned.
- supported_
extensions - Returns a list of advertised file extensions supported by available image format parsers. This is a convenience function for use in file dialogs - internal image detection is not based on file extension, but by image file content and size.