// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : Amiga.cs // Author(s) : Natalia Portillo // // Component : Device structures decoders. // // --[ Description ] ---------------------------------------------------------- // // Decodes Commodore Amiga floppy structures. // // --[ 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-2021 Natalia Portillo // ****************************************************************************/ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Aaru.Decoders.Floppy { /// Methods and structures for Commodore Amiga decoding [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"), SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] public static class Amiga { public struct Sector { /// Set to 0x00 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] zero; /// Set to 0xA1 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] sync; /// Set to 0xFF public byte amiga; /// Track number public byte track; /// Sector number public byte sector; /// Remaining sectors til end of writing public byte remaining; /// OS dependent tag [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] label; /// Checksum from to public uint headerChecksum; /// Checksum from public uint dataChecksum; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] public byte[] data; } } }