// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // Filename : Structs.cs // Author(s) : Natalia Portillo // // Component : Disk image plugins. // // --[ Description ] ---------------------------------------------------------- // // Contains structures for Sydex TeleDisk 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 // ****************************************************************************/ namespace DiscImageChef.DiscImages { public partial class TeleDisk { struct TeleDiskHeader { /// "TD" or "td" depending on compression public ushort Signature; /// Sequence, but TeleDisk seems to complaing if != 0 public byte Sequence; /// Random, same byte for all disks in the same set public byte DiskSet; /// TeleDisk version, major in high nibble, minor in low nibble public byte Version; /// Data rate public byte DataRate; /// BIOS drive type public byte DriveType; /// Stepping used public byte Stepping; /// If set means image only allocates sectors marked in-use by FAT12 public byte DosAllocation; /// Sides of disk public byte Sides; /// CRC of all the previous public ushort Crc; } struct TeleDiskCommentBlockHeader { /// CRC of comment block after crc field public ushort Crc; /// Length of comment public ushort Length; public byte Year; public byte Month; public byte Day; public byte Hour; public byte Minute; public byte Second; } struct TeleDiskTrackHeader { /// Sectors in the track, 0xFF if end of disk image (there is no spoon) public byte Sectors; /// Cylinder the head was on public byte Cylinder; /// Head/side used public byte Head; /// Lower byte of CRC of previous fields public byte Crc; } struct TeleDiskSectorHeader { /// Cylinder as stored on sector address mark public byte Cylinder; /// Head as stored on sector address mark public byte Head; /// Sector number as stored on sector address mark public byte SectorNumber; /// Sector size public byte SectorSize; /// Sector flags public byte Flags; /// Lower byte of TeleDisk CRC of sector header, data header and data block public byte Crc; } struct TeleDiskDataHeader { /// Size of all data (encoded) + next field (1) public ushort DataSize; /// Encoding used for data block public byte DataEncoding; } } }