// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // 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-2018 Natalia Portillo // ****************************************************************************/ using System.Runtime.InteropServices; namespace DiscImageChef.DiscImages { public partial class SaveDskF { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct SaveDskFHeader { /// 0x00 magic number public ushort magic; /// 0x02 media type from FAT public ushort mediaType; /// 0x04 bytes per sector public ushort sectorSize; /// 0x06 sectors per cluster - 1 public byte clusterMask; /// 0x07 log2(cluster / sector) public byte clusterShift; /// 0x08 reserved sectors public ushort reservedSectors; /// 0x0A copies of FAT public byte fatCopies; /// 0x0B entries in root directory public ushort rootEntries; /// 0x0D first cluster public ushort firstCluster; /// 0x0F clusters present in image public ushort clustersCopied; /// 0x11 sectors per FAT public byte sectorsPerFat; /// 0x12 sector number of root directory public 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 uint padding; /// 0x22 sectors present in image public ushort sectorsCopied; /// 0x24 offset to comment public ushort commentOffset; /// 0x26 offset to data public ushort dataOffset; } } }