// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : Structs.cs // Author(s) : Natalia Portillo // // Component : Disk image plugins. // // --[ Description ] ---------------------------------------------------------- // // Contains structures for IBM SaveDskF disk images. // // --[ License ] -------------------------------------------------------------- // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of the // License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2025 Natalia Portillo // ****************************************************************************/ using System.Runtime.InteropServices; namespace Aaru.Images; public sealed partial class SaveDskF { #region Nested type: Header [StructLayout(LayoutKind.Sequential, Pack = 1)] struct Header { /// 0x00 magic number public ushort magic; /// 0x02 media type from FAT public readonly ushort mediaType; /// 0x04 bytes per sector public ushort sectorSize; /// 0x06 sectors per cluster - 1 public readonly byte clusterMask; /// 0x07 log2(cluster / sector) public readonly byte clusterShift; /// 0x08 reserved sectors public readonly ushort reservedSectors; /// 0x0A copies of FAT public readonly byte fatCopies; /// 0x0B entries in root directory public readonly ushort rootEntries; /// 0x0D first cluster public readonly ushort firstCluster; /// 0x0F clusters present in image public readonly ushort clustersCopied; /// 0x11 sectors per FAT public readonly byte sectorsPerFat; /// 0x12 sector number of root directory public readonly ushort rootDirectorySector; /// 0x14 sum of all image bytes public uint checksum; /// 0x18 cylinders public ushort cylinders; /// 0x1A heads public ushort heads; /// 0x1C sectors per track public ushort sectorsPerTrack; /// 0x1E always zero public readonly uint padding; /// 0x22 sectors present in image public ushort sectorsCopied; /// 0x24 offset to comment public ushort commentOffset; /// 0x26 offset to data public ushort dataOffset; } #endregion }