// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : Structs.cs // Author(s) : Natalia Portillo // // Component : SolarOS filesystem plugin. // // --[ 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.Diagnostics.CodeAnalysis; namespace Aaru.Filesystems; // Based on FAT's BPB, cannot find a FAT or directory /// /// Implements detection of the Solar OS filesystem public sealed partial class SolarFS { #region Nested type: BiosParameterBlock [SuppressMessage("ReSharper", "InconsistentNaming")] struct BiosParameterBlock { /// 0x00, x86 jump (3 bytes), jumps to 0x60 public byte[] x86_jump; /// 0x03, 8 bytes, "SOLAR_OS" public string OEMName; /// 0x0B, Bytes per sector public ushort bps; /// 0x0D, unknown, 0x01 public byte unk1; /// 0x0E, unknown, 0x0201 public ushort unk2; /// 0x10, Number of entries on root directory ? (no root directory found) public ushort root_ent; /// 0x12, Sectors in volume public ushort sectors; /// 0x14, Media descriptor public byte media; /// 0x15, Sectors per FAT ? (no FAT found) public ushort spfat; /// 0x17, Sectors per track public ushort sptrk; /// 0x19, Heads public ushort heads; /// 0x1B, unknown, 10 bytes, zero-filled public byte[] unk3; /// 0x25, 0x29 public byte signature; /// 0x26, unknown, zero-filled public uint unk4; /// 0x2A, 11 bytes, volume name, space-padded public string vol_name; /// 0x35, 8 bytes, "SOL_FS " public string fs_type; } #endregion }