// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : Consts.cs // Author(s) : Natalia Portillo // // Component : Apple Lisa 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-2023 Natalia Portillo // ****************************************************************************/ using System.Diagnostics.CodeAnalysis; namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class LisaFS { /// Lisa FS v1, from Lisa OS 1.0 (Workshop or Office) Never seen on Sony floppies. const byte LISA_V1 = 0x0E; /// /// Lisa FS v2, from Lisa OS 2.0 (Workshop or Office) Contrary to what most information online says the only /// difference with V1 is the Extents File size. Catalog format is the same /// const byte LISA_V2 = 0x0F; /// /// Lisa FS v3, from Lisa OS 3.0 (Workshop or Office) Adds support for user catalogs (aka subdirectories), and /// changes the catalog format from extents to double-linked list. Uses '-' as path separator (so people that created /// Lisa/FILE.TEXT just created a file named like that :p) /// const byte LISA_V3 = 0x11; /// Maximum string size in LisaFS const uint E_NAME = 32; /// Unused file ID const ushort FILEID_FREE = 0x0000; /// Used by the boot blocks const ushort FILEID_BOOT = 0xAAAA; /// Used by the operating system loader blocks const ushort FILEID_LOADER = 0xBBBB; /// Used by the MDDF const ushort FILEID_MDDF = 0x0001; /// Used by the volume bitmap, sits between MDDF and S-Records file. const ushort FILEID_BITMAP = 0x0002; /// S-Records file const ushort FILEID_SRECORD = 0x0003; /// The root catalog const ushort FILEID_CATALOG = 0x0004; const short FILEID_BOOT_SIGNED = -21846; const short FILEID_LOADER_SIGNED = -17477; /// A file that has been erased const ushort FILEID_ERASED = 0x7FFF; const ushort FILEID_MAX = FILEID_ERASED; /// Root directory ID const short DIRID_ROOT = 0; enum FileType : byte { /// Undefined file type Undefined = 0, /// MDDF MDDFile = 1, /// Root catalog RootCat = 2, /// Bitmap FreeList = 3, /// Unknown, maybe refers to the S-Records File? BadBlocks = 4, /// System data SysData = 5, /// Printer spool Spool = 6, /// Executable. Yet application files don't use it Exec = 7, /// User catalog UserCat = 8, /// Pipe. Not seen on disk. Pipe = 9, /// Boot file? BootFile = 10, /// Swap for data SwapData = 11, /// Swap for code SwapCode = 12, /// Unknown RamAP = 13, /// Any file UserFile = 14, /// Erased? KilledObject = 15 } const string FS_TYPE = "lisafs"; }