// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // Filename : Structs.cs // Author(s) : Natalia Portillo // // Component : Disk image plugins. // // --[ Description ] ---------------------------------------------------------- // // Contains structures for Quasi88 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; using DiscImageChef.Decoders.Floppy; namespace DiscImageChef.DiscImages { public partial class D88 { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct D88Header { /// /// Disk name, nul-terminated ASCII /// ディスクの名前(ASCII + '\0') /// [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] public byte[] name; /// /// Reserved /// ディスクの名前(ASCII + '\0') /// [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9)] public byte[] reserved; /// /// Write protect status /// ライトプロテクト: 0x00 なし、0x10 あり /// public byte write_protect; /// /// Disk type /// ディスクの種類: 0x00 2D、 0x10 2DD、 0x20 2HD /// public DiskType disk_type; /// /// Disk image size /// ディスクのサイズ /// public int disk_size; /// /// Track pointers /// トラック部のオフセットテーブル 0 Track ~ 163 Track /// [MarshalAs(UnmanagedType.ByValArray, SizeConst = 164)] public int[] track_table; } [StructLayout(LayoutKind.Sequential, Pack = 1)] struct SectorHeader { /// /// Cylinder /// ID の C /// public byte c; /// /// Head /// ID の H /// public byte h; /// /// Sector number /// ID の R /// public byte r; /// /// Sector size /// ID の N /// public IBMSectorSizeCode n; /// /// Number of sectors in this track /// このトラック内に存在するセクタの数 /// public short spt; /// /// Density: 0x00 MFM, 0x40 FM /// 記録密度: 0x00 倍密度、0x40 単密度 /// public DensityType density; /// /// Deleted sector, 0x00 not deleted, 0x10 deleted /// DELETED MARK: 0x00 ノーマル、 0x10 DELETED /// public byte deleted_mark; /// /// Sector status /// ステータス /// public byte status; /// /// Reserved /// リザーブ /// [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public byte[] reserved; /// /// Size of data following this field /// このセクタ部のデータサイズ /// public short size_of_data; } } }