// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // Filename : Structs.cs // Author(s) : Natalia Portillo // // Component : Disk image plugins. // // --[ Description ] ---------------------------------------------------------- // // Contains structures for Digital Research's DISKCOPY 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-2019 Natalia Portillo // ****************************************************************************/ using System.Runtime.InteropServices; namespace DiscImageChef.DiscImages { public partial class DriDiskCopy { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct DriFooter { /// Signature: "DiskImage 2.01 (C) 1990,1991 Digital Research Inc\0" [MarshalAs(UnmanagedType.ByValArray, SizeConst = 51)] public byte[] signature; /// Information about the disk image, mostly imitates FAT BPB public DriBpb bpb; /// Information about the disk image, mostly imitates FAT BPB, copy public DriBpb bpbcopy; } [StructLayout(LayoutKind.Sequential, Pack = 1)] struct DriBpb { /// Seems to be always 0x05 public byte five; /// A drive code that corresponds (but it not equal to) CMOS drive types public DriDriveCodes driveCode; /// Unknown seems to be always 2 public ushort unknown; /// Cylinders public ushort cylinders; /// Seems to always be 0 public byte unknown2; /// Bytes per sector public ushort bps; /// Sectors per cluster public byte spc; /// Sectors between BPB and FAT public ushort rsectors; /// How many FATs public byte fats_no; /// Entries in root directory public ushort root_entries; /// Total sectors public ushort sectors; /// Media descriptor public byte media_descriptor; /// Sectors per FAT public ushort spfat; /// Sectors per track public ushort sptrack; /// Heads public ushort heads; /// Hidden sectors before BPB public uint hsectors; /// Drive number public byte drive_no; /// Seems to be 0 public ulong unknown3; /// Seems to be 0 public byte unknown4; /// Sectors per track (again?) public ushort sptrack2; /// Seems to be 0 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 144)] public byte[] unknown5; } } }