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