diff --git a/Aaru.Filesystems/AODOS/AODOS.cs b/Aaru.Filesystems/AODOS/AODOS.cs index c5d3c40b9..bc3507ec2 100644 --- a/Aaru.Filesystems/AODOS/AODOS.cs +++ b/Aaru.Filesystems/AODOS/AODOS.cs @@ -41,10 +41,16 @@ namespace Aaru.Filesystems; /// Implements detection of the AO-DOS filesystem public sealed partial class AODOS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.AODOS_Name; + /// public Guid Id => new("668E5039-9DDD-442A-BE1B-A315D6E38E26"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AODOS/Info.cs b/Aaru.Filesystems/AODOS/Info.cs index 48c264adc..3ff68299c 100644 --- a/Aaru.Filesystems/AODOS/Info.cs +++ b/Aaru.Filesystems/AODOS/Info.cs @@ -46,6 +46,8 @@ namespace Aaru.Filesystems; /// Implements detection of the AO-DOS filesystem public sealed partial class AODOS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -101,7 +103,7 @@ public sealed partial class AODOS Bootable = true }; - sbInformation.AppendFormat(Localization._0_files_in_volume, bb.files).AppendLine(); + sbInformation.AppendFormat(Localization._0_files_in_volume, bb.files).AppendLine(); sbInformation.AppendFormat(Localization._0_used_sectors_on_volume, bb.usedSectors).AppendLine(); sbInformation.AppendFormat(Localization.Disk_name_0, StringHandlers.CToString(bb.volumeLabel, encoding)). @@ -109,4 +111,6 @@ public sealed partial class AODOS information = sbInformation.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AODOS/Structs.cs b/Aaru.Filesystems/AODOS/Structs.cs index 510e732e3..ffa20c874 100644 --- a/Aaru.Filesystems/AODOS/Structs.cs +++ b/Aaru.Filesystems/AODOS/Structs.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// Implements detection of the AO-DOS filesystem public sealed partial class AODOS { +#region Nested type: BootBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BootBlock { @@ -60,4 +62,6 @@ public sealed partial class AODOS /// How many sectors are used public readonly ushort usedSectors; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/APFS/APFS.cs b/Aaru.Filesystems/APFS/APFS.cs index 93abbdfb8..b720ec3b8 100644 --- a/Aaru.Filesystems/APFS/APFS.cs +++ b/Aaru.Filesystems/APFS/APFS.cs @@ -37,10 +37,16 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class APFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.APFS_Name; + /// public Guid Id => new("A4060F9D-2909-42E2-9D95-DB31FA7EA797"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/APFS/Info.cs b/Aaru.Filesystems/APFS/Info.cs index 88cfe996f..d78255af2 100644 --- a/Aaru.Filesystems/APFS/Info.cs +++ b/Aaru.Filesystems/APFS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class APFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -113,4 +115,6 @@ public sealed partial class APFS Type = FS_TYPE }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/APFS/Structs.cs b/Aaru.Filesystems/APFS/Structs.cs index 7aafba092..b67ac12bb 100644 --- a/Aaru.Filesystems/APFS/Structs.cs +++ b/Aaru.Filesystems/APFS/Structs.cs @@ -36,6 +36,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class APFS { +#region Nested type: ContainerSuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct ContainerSuperBlock { @@ -47,4 +49,6 @@ public sealed partial class APFS public readonly uint blockSize; public readonly ulong containerBlocks; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Aaru.Filesystems.csproj b/Aaru.Filesystems/Aaru.Filesystems.csproj index 3dacb6351..a985a3956 100644 --- a/Aaru.Filesystems/Aaru.Filesystems.csproj +++ b/Aaru.Filesystems/Aaru.Filesystems.csproj @@ -35,8 +35,8 @@ CS1591;CS1574 - - + + $(Version)+{chash:8} @@ -44,40 +44,40 @@ true - - - + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + LICENSE.LGPL - + ResXFileCodeGenerator Localization.Designer.cs - + \ No newline at end of file diff --git a/Aaru.Filesystems/Aaru.Filesystems.csproj.DotSettings b/Aaru.Filesystems/Aaru.Filesystems.csproj.DotSettings index 394a5020a..4cbd7fcd6 100644 --- a/Aaru.Filesystems/Aaru.Filesystems.csproj.DotSettings +++ b/Aaru.Filesystems/Aaru.Filesystems.csproj.DotSettings @@ -2,129 +2,129 @@ xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xml:space="preserve"> True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True \ No newline at end of file + x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=acorn/@EntryIndexedValue">True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True \ No newline at end of file diff --git a/Aaru.Filesystems/Acorn/Acorn.cs b/Aaru.Filesystems/Acorn/Acorn.cs index f2bfd723d..8d5501df9 100644 --- a/Aaru.Filesystems/Acorn/Acorn.cs +++ b/Aaru.Filesystems/Acorn/Acorn.cs @@ -35,11 +35,18 @@ namespace Aaru.Filesystems; /// Implements detection of Acorn's Advanced Data Filing System (ADFS) public sealed partial class AcornADFS : IFilesystem { + const string MODULE_NAME = "ADFS Plugin"; + +#region IFilesystem Members + /// public string Name => Localization.AcornADFS_Name; + /// public Guid Id => new("BAFC1E50-9C64-4CD3-8400-80628CC27AFA"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "ADFS Plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Acorn/Helpers.cs b/Aaru.Filesystems/Acorn/Helpers.cs index fdc93d629..f5e341778 100644 --- a/Aaru.Filesystems/Acorn/Helpers.cs +++ b/Aaru.Filesystems/Acorn/Helpers.cs @@ -36,8 +36,8 @@ public sealed partial class AcornADFS { static byte AcornMapChecksum(byte[] data, int length) { - int sum = 0; - int carry = 0; + var sum = 0; + var carry = 0; if(length > data.Length) length = data.Length; @@ -101,7 +101,7 @@ public sealed partial class AcornADFS length = data.Count; // EOR r0, r1, r0, ROR #13 - for(int i = 0; i < length; i++) + for(var i = 0; i < length; i++) { uint carry = sum & 0x1FFF; sum >>= 13; @@ -109,6 +109,6 @@ public sealed partial class AcornADFS sum += carry << 19; } - return (byte)(((sum & 0xFF000000) >> 24) ^ ((sum & 0xFF0000) >> 16) ^ ((sum & 0xFF00) >> 8) ^ (sum & 0xFF)); + return (byte)((sum & 0xFF000000) >> 24 ^ (sum & 0xFF0000) >> 16 ^ (sum & 0xFF00) >> 8 ^ sum & 0xFF); } } \ No newline at end of file diff --git a/Aaru.Filesystems/Acorn/Info.cs b/Aaru.Filesystems/Acorn/Info.cs index 44ecb12a5..23830fbb8 100644 --- a/Aaru.Filesystems/Acorn/Info.cs +++ b/Aaru.Filesystems/Acorn/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of Acorn's Advanced Data Filing System (ADFS) public sealed partial class AcornADFS { +#region IFilesystem Members + // TODO: BBC Master hard disks are untested... /// public bool Identify(IMediaImage imagePlugin, Partition partition) @@ -77,7 +79,7 @@ public sealed partial class AcornADFS OldMapSector1 oldMap1 = Marshal.ByteArrayToStructureLittleEndian(sector); AaruConsole.DebugWriteLine(MODULE_NAME, "oldMap0.checksum = {0}", oldMap0.checksum); - AaruConsole.DebugWriteLine(MODULE_NAME, "oldChk0 = {0}", oldChk0); + AaruConsole.DebugWriteLine(MODULE_NAME, "oldChk0 = {0}", oldChk0); // According to documentation map1 MUST start on sector 1. On ADFS-D it starts at 0x100, not on sector 1 (0x400) if(oldMap0.checksum == oldChk0 && @@ -89,14 +91,14 @@ public sealed partial class AcornADFS if(errno != ErrorNumber.NoError) return false; - byte[] tmp = new byte[256]; + var tmp = new byte[256]; Array.Copy(sector, 256, tmp, 0, 256); oldChk1 = AcornMapChecksum(tmp, 255); oldMap1 = Marshal.ByteArrayToStructureLittleEndian(tmp); } AaruConsole.DebugWriteLine(MODULE_NAME, "oldMap1.checksum = {0}", oldMap1.checksum); - AaruConsole.DebugWriteLine(MODULE_NAME, "oldChk1 = {0}", oldChk1); + AaruConsole.DebugWriteLine(MODULE_NAME, "oldChk1 = {0}", oldChk1); if(oldMap0.checksum == oldChk0 && oldMap1.checksum == oldChk1 && @@ -116,7 +118,7 @@ public sealed partial class AcornADFS if(sector.Length > OLD_DIRECTORY_SIZE) { - byte[] tmp = new byte[OLD_DIRECTORY_SIZE]; + var tmp = new byte[OLD_DIRECTORY_SIZE]; Array.Copy(sector, 0, tmp, 0, OLD_DIRECTORY_SIZE - 53); Array.Copy(sector, sector.Length - 54, tmp, OLD_DIRECTORY_SIZE - 54, 53); sector = tmp; @@ -134,8 +136,8 @@ public sealed partial class AcornADFS AaruConsole.DebugWriteLine(MODULE_NAME, "dirChk at 0x200 = {0}", dirChk); - if((oldRoot.header.magic == OLD_DIR_MAGIC && oldRoot.tail.magic == OLD_DIR_MAGIC) || - (oldRoot.header.magic == NEW_DIR_MAGIC && oldRoot.tail.magic == NEW_DIR_MAGIC)) + if(oldRoot.header.magic == OLD_DIR_MAGIC && oldRoot.tail.magic == OLD_DIR_MAGIC || + oldRoot.header.magic == NEW_DIR_MAGIC && oldRoot.tail.magic == NEW_DIR_MAGIC) return true; // RISC OS says the old directory can't be in the new location, hard disks created by RISC OS 3.10 do that... @@ -152,7 +154,7 @@ public sealed partial class AcornADFS if(sector.Length > OLD_DIRECTORY_SIZE) { - byte[] tmp = new byte[OLD_DIRECTORY_SIZE]; + var tmp = new byte[OLD_DIRECTORY_SIZE]; Array.Copy(sector, 0, tmp, 0, OLD_DIRECTORY_SIZE - 53); Array.Copy(sector, sector.Length - 54, tmp, OLD_DIRECTORY_SIZE - 54, 53); sector = tmp; @@ -170,8 +172,8 @@ public sealed partial class AcornADFS AaruConsole.DebugWriteLine(MODULE_NAME, "dirChk at 0x400 = {0}", dirChk); - if((oldRoot.header.magic == OLD_DIR_MAGIC && oldRoot.tail.magic == OLD_DIR_MAGIC) || - (oldRoot.header.magic == NEW_DIR_MAGIC && oldRoot.tail.magic == NEW_DIR_MAGIC)) + if(oldRoot.header.magic == OLD_DIR_MAGIC && oldRoot.tail.magic == OLD_DIR_MAGIC || + oldRoot.header.magic == NEW_DIR_MAGIC && oldRoot.tail.magic == NEW_DIR_MAGIC) return true; } } @@ -185,7 +187,7 @@ public sealed partial class AcornADFS return false; byte newChk = NewMapChecksum(sector); - AaruConsole.DebugWriteLine(MODULE_NAME, "newChk = {0}", newChk); + AaruConsole.DebugWriteLine(MODULE_NAME, "newChk = {0}", newChk); AaruConsole.DebugWriteLine(MODULE_NAME, "map.zoneChecksum = {0}", sector[0]); sbSector = BOOT_BLOCK_LOCATION / imagePlugin.Info.SectorSize; @@ -202,15 +204,15 @@ public sealed partial class AcornADFS if(errno != ErrorNumber.NoError) return false; - int bootChk = 0; + var bootChk = 0; if(bootSector.Length < 512) return false; - for(int i = 0; i < 0x1FF; i++) + for(var i = 0; i < 0x1FF; i++) bootChk = (bootChk & 0xFF) + (bootChk >> 8) + bootSector[i]; - AaruConsole.DebugWriteLine(MODULE_NAME, "bootChk = {0}", bootChk); + AaruConsole.DebugWriteLine(MODULE_NAME, "bootChk = {0}", bootChk); AaruConsole.DebugWriteLine(MODULE_NAME, "bBlock.checksum = {0}", bootSector[0x1FF]); if(newChk == sector[0] && @@ -227,10 +229,10 @@ public sealed partial class AcornADFS else return false; - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.log2secsize = {0}", drSb.log2secsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.idlen = {0}", drSb.idlen); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.log2secsize = {0}", drSb.log2secsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.idlen = {0}", drSb.idlen); AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_size_high = {0}", drSb.disc_size_high); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_size = {0}", drSb.disc_size); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_size = {0}", drSb.disc_size); AaruConsole.DebugWriteLine(MODULE_NAME, "IsNullOrEmpty(drSb.reserved) = {0}", ArrayHelpers.ArrayIsNullOrEmpty(drSb.reserved)); @@ -302,7 +304,7 @@ public sealed partial class AcornADFS if(errno != ErrorNumber.NoError) return; - byte[] tmp = new byte[256]; + var tmp = new byte[256]; Array.Copy(sector, 256, tmp, 0, 256); oldChk1 = AcornMapChecksum(tmp, 255); oldMap1 = Marshal.ByteArrayToStructureLittleEndian(tmp); @@ -314,12 +316,12 @@ public sealed partial class AcornADFS oldMap1.checksum != 0) { bytes = (ulong)((oldMap0.size[2] << 16) + (oldMap0.size[1] << 8) + oldMap0.size[0]) * 256; - byte[] namebytes = new byte[10]; + var namebytes = new byte[10]; - for(int i = 0; i < 5; i++) + for(var i = 0; i < 5; i++) { - namebytes[i * 2] = oldMap0.name[i]; - namebytes[(i * 2) + 1] = oldMap1.name[i]; + namebytes[i * 2] = oldMap0.name[i]; + namebytes[i * 2 + 1] = oldMap1.name[i]; } metadata = new FileSystem @@ -345,7 +347,7 @@ public sealed partial class AcornADFS if(sector.Length > OLD_DIRECTORY_SIZE) { - byte[] tmp = new byte[OLD_DIRECTORY_SIZE]; + var tmp = new byte[OLD_DIRECTORY_SIZE]; Array.Copy(sector, 0, tmp, 0, OLD_DIRECTORY_SIZE - 53); Array.Copy(sector, sector.Length - 54, tmp, OLD_DIRECTORY_SIZE - 54, 53); sector = tmp; @@ -372,7 +374,7 @@ public sealed partial class AcornADFS if(sector.Length > OLD_DIRECTORY_SIZE) { - byte[] tmp = new byte[OLD_DIRECTORY_SIZE]; + var tmp = new byte[OLD_DIRECTORY_SIZE]; Array.Copy(sector, 0, tmp, 0, OLD_DIRECTORY_SIZE - 53); Array.Copy(sector, sector.Length - 54, tmp, OLD_DIRECTORY_SIZE - 54, 53); @@ -394,7 +396,7 @@ public sealed partial class AcornADFS if(sector.Length > NEW_DIRECTORY_SIZE) { - byte[] tmp = new byte[NEW_DIRECTORY_SIZE]; + var tmp = new byte[NEW_DIRECTORY_SIZE]; Array.Copy(sector, 0, tmp, 0, NEW_DIRECTORY_SIZE - 41); Array.Copy(sector, sector.Length - 42, tmp, NEW_DIRECTORY_SIZE - 42, 41); @@ -414,7 +416,7 @@ public sealed partial class AcornADFS sbInformation.AppendLine(Localization.Acorn_Advanced_Disc_Filing_System); sbInformation.AppendLine(); sbInformation.AppendFormat(Localization._0_bytes_per_sector, imagePlugin.Info.SectorSize).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_bytes, bytes).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_bytes, bytes).AppendLine(); sbInformation.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(namebytes, encoding)). AppendLine(); @@ -443,7 +445,7 @@ public sealed partial class AcornADFS return; byte newChk = NewMapChecksum(sector); - AaruConsole.DebugWriteLine(MODULE_NAME, "newChk = {0}", newChk); + AaruConsole.DebugWriteLine(MODULE_NAME, "newChk = {0}", newChk); AaruConsole.DebugWriteLine(MODULE_NAME, "map.zoneChecksum = {0}", sector[0]); sbSector = BOOT_BLOCK_LOCATION / imagePlugin.Info.SectorSize; @@ -457,12 +459,12 @@ public sealed partial class AcornADFS if(errno != ErrorNumber.NoError) return; - int bootChk = 0; + var bootChk = 0; - for(int i = 0; i < 0x1FF; i++) + for(var i = 0; i < 0x1FF; i++) bootChk = (bootChk & 0xFF) + (bootChk >> 8) + bootSector[i]; - AaruConsole.DebugWriteLine(MODULE_NAME, "bootChk = {0}", bootChk); + AaruConsole.DebugWriteLine(MODULE_NAME, "bootChk = {0}", bootChk); AaruConsole.DebugWriteLine(MODULE_NAME, "bBlock.checksum = {0}", bootSector[0x1FF]); if(newChk == sector[0] && @@ -480,29 +482,29 @@ public sealed partial class AcornADFS return; AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.log2secsize = {0}", drSb.log2secsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.spt = {0}", drSb.spt); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.heads = {0}", drSb.heads); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.density = {0}", drSb.density); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.idlen = {0}", drSb.idlen); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.log2bpmb = {0}", drSb.log2bpmb); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.skew = {0}", drSb.skew); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.bootoption = {0}", drSb.bootoption); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.lowsector = {0}", drSb.lowsector); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.nzones = {0}", drSb.nzones); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.zone_spare = {0}", drSb.zone_spare); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.root = {0}", drSb.root); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_size = {0}", drSb.disc_size); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_id = {0}", drSb.disc_id); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.spt = {0}", drSb.spt); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.heads = {0}", drSb.heads); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.density = {0}", drSb.density); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.idlen = {0}", drSb.idlen); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.log2bpmb = {0}", drSb.log2bpmb); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.skew = {0}", drSb.skew); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.bootoption = {0}", drSb.bootoption); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.lowsector = {0}", drSb.lowsector); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.nzones = {0}", drSb.nzones); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.zone_spare = {0}", drSb.zone_spare); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.root = {0}", drSb.root); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_size = {0}", drSb.disc_size); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_id = {0}", drSb.disc_id); AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_name = {0}", StringHandlers.CToString(drSb.disc_name, encoding)); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_type = {0}", drSb.disc_type); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_type = {0}", drSb.disc_type); AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.disc_size_high = {0}", drSb.disc_size_high); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.flags = {0}", drSb.flags); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.nzones_high = {0}", drSb.nzones_high); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.flags = {0}", drSb.flags); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.nzones_high = {0}", drSb.nzones_high); AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.format_version = {0}", drSb.format_version); - AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.root_size = {0}", drSb.root_size); + AaruConsole.DebugWriteLine(MODULE_NAME, "drSb.root_size = {0}", drSb.root_size); if(drSb.log2secsize is < 8 or > 10) return; @@ -532,20 +534,20 @@ public sealed partial class AcornADFS sbInformation.AppendLine(Localization.Acorn_Advanced_Disc_Filing_System); sbInformation.AppendLine(); - sbInformation.AppendFormat(Localization.Version_0, drSb.format_version).AppendLine(); - sbInformation.AppendFormat(Localization._0_bytes_per_sector, 1 << drSb.log2secsize).AppendLine(); + sbInformation.AppendFormat(Localization.Version_0, drSb.format_version).AppendLine(); + sbInformation.AppendFormat(Localization._0_bytes_per_sector, 1 << drSb.log2secsize).AppendLine(); sbInformation.AppendFormat(Localization._0_sectors_per_track, drSb.spt).AppendLine(); - sbInformation.AppendFormat(Localization._0_heads, drSb.heads).AppendLine(); - sbInformation.AppendFormat(Localization.Density_code_0, drSb.density).AppendLine(); - sbInformation.AppendFormat(Localization.Skew_0, drSb.skew).AppendLine(); - sbInformation.AppendFormat(Localization.Boot_option_0, drSb.bootoption).AppendLine(); + sbInformation.AppendFormat(Localization._0_heads, drSb.heads).AppendLine(); + sbInformation.AppendFormat(Localization.Density_code_0, drSb.density).AppendLine(); + sbInformation.AppendFormat(Localization.Skew_0, drSb.skew).AppendLine(); + sbInformation.AppendFormat(Localization.Boot_option_0, drSb.bootoption).AppendLine(); // TODO: What the hell is this field refering to? sbInformation.AppendFormat(Localization.Root_starts_at_frag_0, drSb.root).AppendLine(); //sbInformation.AppendFormat("Root is {0} bytes long", drSb.root_size).AppendLine(); sbInformation.AppendFormat(Localization.Volume_has_0_bytes_in_1_zones, bytes, zones).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_flags_0_X4, drSb.flags).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_flags_0_X4, drSb.flags).AppendLine(); if(drSb.disc_id > 0) { @@ -567,4 +569,6 @@ public sealed partial class AcornADFS metadata.ClusterSize = (uint)(1 << drSb.log2secsize); metadata.Type = FS_TYPE; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Acorn/Structs.cs b/Aaru.Filesystems/Acorn/Structs.cs index 3898f2f1d..b2cc3cd32 100644 --- a/Aaru.Filesystems/Acorn/Structs.cs +++ b/Aaru.Filesystems/Acorn/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; /// Implements detection of Acorn's Advanced Data Filing System (ADFS) public sealed partial class AcornADFS { +#region Nested type: BootBlock + /// Boot block, used in hard disks and ADFS-F and higher. [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BootBlock @@ -46,6 +48,40 @@ public sealed partial class AcornADFS public readonly byte checksum; } +#endregion + +#region Nested type: DirectoryEntry + + /// Directory header, common to "old" and "new" directories + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryEntry + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] + public readonly byte[] name; + public readonly uint load; + public readonly uint exec; + public readonly uint length; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] address; + public readonly byte atts; + } + +#endregion + +#region Nested type: DirectoryHeader + + /// Directory header, common to "old" and "new" directories + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryHeader + { + public readonly byte masterSequence; + public readonly uint magic; + } + +#endregion + +#region Nested type: DiscRecord + /// Disc record, used in hard disks and ADFS-E and higher. [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct DiscRecord @@ -76,65 +112,23 @@ public sealed partial class AcornADFS public readonly byte[] reserved; } - /// Free block map, sector 0, used in ADFS-S, ADFS-L, ADFS-M and ADFS-D +#endregion + +#region Nested type: NewDirectory + + /// Directory, new format [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct OldMapSector0 + readonly struct NewDirectory { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 82 * 3)] - public readonly byte[] freeStart; - public readonly byte reserved; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public readonly byte[] name; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] size; - public readonly byte checksum; + public readonly DirectoryHeader header; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 77)] + public readonly DirectoryEntry[] entries; + public readonly NewDirectoryTail tail; } - /// Free block map, sector 1, used in ADFS-S, ADFS-L, ADFS-M and ADFS-D - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct OldMapSector1 - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 82 * 3)] - public readonly byte[] freeStart; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public readonly byte[] name; - public readonly ushort discId; - public readonly byte boot; - public readonly byte freeEnd; - public readonly byte checksum; - } +#endregion - /// Free block map, sector 0, used in ADFS-E - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct NewMap - { - public readonly byte zoneChecksum; - public readonly ushort freeLink; - public readonly byte crossChecksum; - public readonly DiscRecord discRecord; - } - - /// Directory header, common to "old" and "new" directories - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryHeader - { - public readonly byte masterSequence; - public readonly uint magic; - } - - /// Directory header, common to "old" and "new" directories - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryEntry - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] - public readonly byte[] name; - public readonly uint load; - public readonly uint exec; - public readonly uint length; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] address; - public readonly byte atts; - } +#region Nested type: NewDirectoryTail /// Directory tail, new format [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -153,6 +147,38 @@ public sealed partial class AcornADFS public readonly byte checkByte; } +#endregion + +#region Nested type: NewMap + + /// Free block map, sector 0, used in ADFS-E + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct NewMap + { + public readonly byte zoneChecksum; + public readonly ushort freeLink; + public readonly byte crossChecksum; + public readonly DiscRecord discRecord; + } + +#endregion + +#region Nested type: OldDirectory + + /// Directory, old format + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct OldDirectory + { + public readonly DirectoryHeader header; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 47)] + public readonly DirectoryEntry[] entries; + public readonly OldDirectoryTail tail; + } + +#endregion + +#region Nested type: OldDirectoryTail + /// Directory tail, old format [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct OldDirectoryTail @@ -171,23 +197,41 @@ public sealed partial class AcornADFS public readonly byte checkByte; } - /// Directory, old format +#endregion + +#region Nested type: OldMapSector0 + + /// Free block map, sector 0, used in ADFS-S, ADFS-L, ADFS-M and ADFS-D [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct OldDirectory + readonly struct OldMapSector0 { - public readonly DirectoryHeader header; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 47)] - public readonly DirectoryEntry[] entries; - public readonly OldDirectoryTail tail; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 82 * 3)] + public readonly byte[] freeStart; + public readonly byte reserved; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public readonly byte[] name; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] size; + public readonly byte checksum; } - /// Directory, new format +#endregion + +#region Nested type: OldMapSector1 + + /// Free block map, sector 1, used in ADFS-S, ADFS-L, ADFS-M and ADFS-D [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct NewDirectory + readonly struct OldMapSector1 { - public readonly DirectoryHeader header; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 77)] - public readonly DirectoryEntry[] entries; - public readonly NewDirectoryTail tail; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 82 * 3)] + public readonly byte[] freeStart; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public readonly byte[] name; + public readonly ushort discId; + public readonly byte boot; + public readonly byte freeEnd; + public readonly byte checksum; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AmigaDOS/AmigaDOS.cs b/Aaru.Filesystems/AmigaDOS/AmigaDOS.cs index 68eed4342..690bc363e 100644 --- a/Aaru.Filesystems/AmigaDOS/AmigaDOS.cs +++ b/Aaru.Filesystems/AmigaDOS/AmigaDOS.cs @@ -35,11 +35,18 @@ namespace Aaru.Filesystems; /// Implements detection of Amiga Fast File System (AFFS) public sealed partial class AmigaDOSPlugin : IFilesystem { + const string MODULE_NAME = "AmigaDOS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.AmigaDOSPlugin_Name; + /// public Guid Id => new("3c882400-208c-427d-a086-9119852a1bc7"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "AmigaDOS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AmigaDOS/Helpers.cs b/Aaru.Filesystems/AmigaDOS/Helpers.cs index c3c3873c4..2cd9bad27 100644 --- a/Aaru.Filesystems/AmigaDOS/Helpers.cs +++ b/Aaru.Filesystems/AmigaDOS/Helpers.cs @@ -37,14 +37,14 @@ public sealed partial class AmigaDOSPlugin { static RootBlock MarshalRootBlock(byte[] block) { - byte[] tmp = new byte[228]; - Array.Copy(block, 0, tmp, 0, 24); + var tmp = new byte[228]; + Array.Copy(block, 0, tmp, 0, 24); Array.Copy(block, block.Length - 200, tmp, 28, 200); RootBlock root = Marshal.ByteArrayToStructureBigEndian(tmp); root.hashTable = new uint[(block.Length - 224) / 4]; - for(int i = 0; i < root.hashTable.Length; i++) - root.hashTable[i] = BigEndianBitConverter.ToUInt32(block, 24 + (i * 4)); + for(var i = 0; i < root.hashTable.Length; i++) + root.hashTable[i] = BigEndianBitConverter.ToUInt32(block, 24 + i * 4); return root; } @@ -53,7 +53,7 @@ public sealed partial class AmigaDOSPlugin { uint sum = 0; - for(int i = 0; i < data.Length; i += 4) + for(var i = 0; i < data.Length; i += 4) sum += (uint)((data[i] << 24) + (data[i + 1] << 16) + (data[i + 2] << 8) + data[i + 3]); return (uint)-sum; @@ -63,7 +63,7 @@ public sealed partial class AmigaDOSPlugin { uint sum = 0; - for(int i = 0; i < data.Length; i += 4) + for(var i = 0; i < data.Length; i += 4) { uint psum = sum; diff --git a/Aaru.Filesystems/AmigaDOS/Info.cs b/Aaru.Filesystems/AmigaDOS/Info.cs index d03f1ce7b..e7fafc46d 100644 --- a/Aaru.Filesystems/AmigaDOS/Info.cs +++ b/Aaru.Filesystems/AmigaDOS/Info.cs @@ -43,6 +43,8 @@ namespace Aaru.Filesystems; /// Implements detection of Amiga Fast File System (AFFS) public sealed partial class AmigaDOSPlugin { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -87,7 +89,7 @@ public sealed partial class AmigaDOSPlugin uint bsum = AmigaBootChecksum(sector); AaruConsole.DebugWriteLine(MODULE_NAME, "bblk.checksum = 0x{0:X8}", bblk.checksum); - AaruConsole.DebugWriteLine(MODULE_NAME, "bsum = 0x{0:X8}", bsum); + AaruConsole.DebugWriteLine(MODULE_NAME, "bsum = 0x{0:X8}", bsum); ulong bRootPtr = 0; @@ -100,10 +102,10 @@ public sealed partial class AmigaDOSPlugin ulong[] rootPtrs = { - bRootPtr + partition.Start, ((partition.End - partition.Start + 1) / 2) + partition.Start - 2, - ((partition.End - partition.Start + 1) / 2) + partition.Start - 1, - ((partition.End - partition.Start + 1) / 2) + partition.Start, - ((partition.End - partition.Start + 1) / 2) + partition.Start + 4 + bRootPtr + partition.Start, (partition.End - partition.Start + 1) / 2 + partition.Start - 2, + (partition.End - partition.Start + 1) / 2 + partition.Start - 1, + (partition.End - partition.Start + 1) / 2 + partition.Start, + (partition.End - partition.Start + 1) / 2 + partition.Start + 4 }; var rblk = new RootBlock(); @@ -129,9 +131,9 @@ public sealed partial class AmigaDOSPlugin AaruConsole.DebugWriteLine(MODULE_NAME, "rblk.hashTableSize = {0}", rblk.hashTableSize); uint blockSize = (rblk.hashTableSize + 56) * 4; - uint sectorsPerBlock = (uint)(blockSize / sector.Length); + var sectorsPerBlock = (uint)(blockSize / sector.Length); - AaruConsole.DebugWriteLine(MODULE_NAME, "blockSize = {0}", blockSize); + AaruConsole.DebugWriteLine(MODULE_NAME, "blockSize = {0}", blockSize); AaruConsole.DebugWriteLine(MODULE_NAME, "sectorsPerBlock = {0}", sectorsPerBlock); if(blockSize % sector.Length > 0) @@ -151,7 +153,7 @@ public sealed partial class AmigaDOSPlugin uint rsum = AmigaChecksum(sector); AaruConsole.DebugWriteLine(MODULE_NAME, "rblk.checksum = 0x{0:X8}", rblk.checksum); - AaruConsole.DebugWriteLine(MODULE_NAME, "rsum = 0x{0:X8}", rsum); + AaruConsole.DebugWriteLine(MODULE_NAME, "rsum = 0x{0:X8}", rsum); rblk.sec_type = BigEndianBitConverter.ToUInt32(sector, sector.Length - 4); AaruConsole.DebugWriteLine(MODULE_NAME, "rblk.sec_type = {0}", rblk.sec_type); @@ -194,16 +196,16 @@ public sealed partial class AmigaDOSPlugin ulong[] rootPtrs = { - bRootPtr + partition.Start, ((partition.End - partition.Start + 1) / 2) + partition.Start - 2, - ((partition.End - partition.Start + 1) / 2) + partition.Start - 1, - ((partition.End - partition.Start + 1) / 2) + partition.Start, - ((partition.End - partition.Start + 1) / 2) + partition.Start + 4 + bRootPtr + partition.Start, (partition.End - partition.Start + 1) / 2 + partition.Start - 2, + (partition.End - partition.Start + 1) / 2 + partition.Start - 1, + (partition.End - partition.Start + 1) / 2 + partition.Start, + (partition.End - partition.Start + 1) / 2 + partition.Start + 4 }; var rootBlk = new RootBlock(); byte[] rootBlockSector = null; - bool rootFound = false; + var rootFound = false; uint blockSize = 0; // So to handle even number of sectors @@ -227,9 +229,9 @@ public sealed partial class AmigaDOSPlugin AaruConsole.DebugWriteLine(MODULE_NAME, "rootBlk.hashTableSize = {0}", rootBlk.hashTableSize); blockSize = (rootBlk.hashTableSize + 56) * 4; - uint sectorsPerBlock = (uint)(blockSize / rootBlockSector.Length); + var sectorsPerBlock = (uint)(blockSize / rootBlockSector.Length); - AaruConsole.DebugWriteLine(MODULE_NAME, "blockSize = {0}", blockSize); + AaruConsole.DebugWriteLine(MODULE_NAME, "blockSize = {0}", blockSize); AaruConsole.DebugWriteLine(MODULE_NAME, "sectorsPerBlock = {0}", sectorsPerBlock); if(blockSize % rootBlockSector.Length > 0) @@ -249,7 +251,7 @@ public sealed partial class AmigaDOSPlugin uint rsum = AmigaChecksum(rootBlockSector); AaruConsole.DebugWriteLine(MODULE_NAME, "rootBlk.checksum = 0x{0:X8}", rootBlk.checksum); - AaruConsole.DebugWriteLine(MODULE_NAME, "rsum = 0x{0:X8}", rsum); + AaruConsole.DebugWriteLine(MODULE_NAME, "rsum = 0x{0:X8}", rsum); rootBlk.sec_type = BigEndianBitConverter.ToUInt32(rootBlockSector, rootBlockSector.Length - 4); AaruConsole.DebugWriteLine(MODULE_NAME, "rootBlk.sec_type = {0}", rootBlk.sec_type); @@ -339,8 +341,10 @@ public sealed partial class AmigaDOSPlugin if(rootBlk.bitmapExtensionBlock != 0x00000000 && rootBlk.bitmapExtensionBlock != 0xFFFFFFFF) + { sbInformation.AppendFormat(Localization.Bitmap_extension_at_block_0, rootBlk.bitmapExtensionBlock). AppendLine(); + } if((bootBlk.diskType & 0xFF) == 4 || (bootBlk.diskType & 0xFF) == 5) @@ -349,7 +353,7 @@ public sealed partial class AmigaDOSPlugin ulong blocks = (partition.End - partition.Start + 1) * imagePlugin.Info.SectorSize / blockSize; sbInformation.AppendFormat(Localization.Volume_block_size_is_0_bytes, blockSize).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_blocks, blocks).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_blocks, blocks).AppendLine(); sbInformation.AppendFormat(Localization.Volume_created_on_0, DateHandlers.AmigaToDateTime(rootBlk.cDays, rootBlk.cMins, rootBlk.cTicks)). @@ -379,4 +383,6 @@ public sealed partial class AmigaDOSPlugin // Useful as a serial metadata.VolumeSerial = $"{rootBlk.checksum:X8}"; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AmigaDOS/Structs.cs b/Aaru.Filesystems/AmigaDOS/Structs.cs index d6644c808..7ebcee66d 100644 --- a/Aaru.Filesystems/AmigaDOS/Structs.cs +++ b/Aaru.Filesystems/AmigaDOS/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; /// Implements detection of Amiga Fast File System (AFFS) public sealed partial class AmigaDOSPlugin { +#region Nested type: BootBlock + /// Boot block, first 2 sectors [StructLayout(LayoutKind.Sequential, Pack = 1)] struct BootBlock @@ -49,6 +51,10 @@ public sealed partial class AmigaDOSPlugin public byte[] bootCode; } +#endregion + +#region Nested type: RootBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct RootBlock { @@ -113,4 +119,6 @@ public sealed partial class AmigaDOSPlugin /// Offset 0x18+hashTableSize*4+196, block secondary type = ST_ROOT (1) public uint sec_type; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleCommon/Enums.cs b/Aaru.Filesystems/AppleCommon/Enums.cs index 89ebdefca..d9228e067 100644 --- a/Aaru.Filesystems/AppleCommon/Enums.cs +++ b/Aaru.Filesystems/AppleCommon/Enums.cs @@ -36,21 +36,33 @@ namespace Aaru.Filesystems; // https://developer.apple.com/legacy/library/documentation/mac/pdf/Files/File_Manager.pdf static partial class AppleCommon { +#region Nested type: ExtendedFinderFlags + [Flags] - internal enum VolumeAttributes : ushort + internal enum ExtendedFinderFlags : ushort { - HardwareLock = 0x80, Unmounted = 0x100, SparedBadBlocks = 0x200, - DoesNotNeedCache = 0x400, BootInconsistent = 0x800, ReusedIds = 0x1000, - Journaled = 0x2000, Inconsistent = 0x4000, SoftwareLock = 0x8000 + /// If set the other extended flags are ignored. + kExtendedFlagsAreInvalid = 0x8000, + /// Set if the file or folder has a badge resource. + kExtendedFlagHasCustomBadge = 0x0100, + /// Set if the object is marked as busy/incomplete. + kExtendedFlagObjectIsBusy = 0x0080, + /// Set if the file contains routing info resource. + kExtendedFlagHasRoutingInfo = 0x0004 } +#endregion + +#region Nested type: FinderFlags + [Flags] internal enum FinderFlags : ushort { /// Is on desktop. kIsOnDesk = 0x0001, /// Color mask. - kColor = 0x000E, kRequireSwitchLaunch = 0x0020, + kColor = 0x000E, + kRequireSwitchLaunch = 0x0020, /// If clear, the application needs to write to its resource fork, and therefore cannot be shared on a server. kIsShared = 0x0040, /// Extension or control panel with no INIT entries in resource fork. @@ -61,7 +73,8 @@ static partial class AppleCommon /// kHasBeenInited = 0x0100, /// PowerTalk - kAOCE = 0x200, kChanged = 0x0200, + kAOCE = 0x200, + kChanged = 0x0200, /// Has a custom icon in the resource fork. kHasCustomIcon = 0x0400, /// Is a stationery. @@ -76,21 +89,34 @@ static partial class AppleCommon kIsAlias = 0x8000 } +#endregion + +#region Nested type: FinderFolder + internal enum FinderFolder : short { - fTrash = -3, fDesktop = -2, fDisk = 0 + fTrash = -3, + fDesktop = -2, + fDisk = 0 } +#endregion + +#region Nested type: VolumeAttributes + [Flags] - internal enum ExtendedFinderFlags : ushort + internal enum VolumeAttributes : ushort { - /// If set the other extended flags are ignored. - kExtendedFlagsAreInvalid = 0x8000, - /// Set if the file or folder has a badge resource. - kExtendedFlagHasCustomBadge = 0x0100, - /// Set if the object is marked as busy/incomplete. - kExtendedFlagObjectIsBusy = 0x0080, - /// Set if the file contains routing info resource. - kExtendedFlagHasRoutingInfo = 0x0004 + HardwareLock = 0x80, + Unmounted = 0x100, + SparedBadBlocks = 0x200, + DoesNotNeedCache = 0x400, + BootInconsistent = 0x800, + ReusedIds = 0x1000, + Journaled = 0x2000, + Inconsistent = 0x4000, + SoftwareLock = 0x8000 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleCommon/Info.cs b/Aaru.Filesystems/AppleCommon/Info.cs index e495ef3c5..86bc77d68 100644 --- a/Aaru.Filesystems/AppleCommon/Info.cs +++ b/Aaru.Filesystems/AppleCommon/Info.cs @@ -58,9 +58,12 @@ static partial class AppleCommon sb.AppendLine(Localization.Boot_block_should_be_executed); if((bb.bbVersion & 0x2000) > 0) + { sb. - AppendFormat(Localization.System_heap_will_be_extended_by_0_bytes_and_a_1_fraction_of_the_available_RAM, - bb.bbSysHeapExtra, bb.bbSysHeapFract).AppendLine(); + AppendFormat( + Localization.System_heap_will_be_extended_by_0_bytes_and_a_1_fraction_of_the_available_RAM, + bb.bbSysHeapExtra, bb.bbSysHeapFract).AppendLine(); + } } } else if((bb.bbVersion & 0xFF) == 0x0D) @@ -99,10 +102,10 @@ static partial class AppleCommon sb.AppendFormat(Localization.Clipboard_filename_0, StringHandlers.PascalToString(bb.bbScrapName, encoding)). AppendLine(); - sb.AppendFormat(Localization.Maximum_opened_files_0, bb.bbCntFCBs * 4).AppendLine(); - sb.AppendFormat(Localization.Event_queue_size_0, bb.bbCntEvts).AppendLine(); - sb.AppendFormat(Localization.Heap_size_with_128KiB_of_RAM_0_bytes, bb.bb128KSHeap).AppendLine(); - sb.AppendFormat(Localization.Heap_size_with_256KiB_of_RAM_0_bytes, bb.bb256KSHeap).AppendLine(); + sb.AppendFormat(Localization.Maximum_opened_files_0, bb.bbCntFCBs * 4).AppendLine(); + sb.AppendFormat(Localization.Event_queue_size_0, bb.bbCntEvts).AppendLine(); + sb.AppendFormat(Localization.Heap_size_with_128KiB_of_RAM_0_bytes, bb.bb128KSHeap).AppendLine(); + sb.AppendFormat(Localization.Heap_size_with_256KiB_of_RAM_0_bytes, bb.bb256KSHeap).AppendLine(); sb.AppendFormat(Localization.Heap_size_with_512KiB_of_RAM_or_more_0_bytes, bb.bbSysHeapSize).AppendLine(); return sb.ToString(); diff --git a/Aaru.Filesystems/AppleCommon/Structs.cs b/Aaru.Filesystems/AppleCommon/Structs.cs index ffb3d4048..18ae92f87 100644 --- a/Aaru.Filesystems/AppleCommon/Structs.cs +++ b/Aaru.Filesystems/AppleCommon/Structs.cs @@ -36,6 +36,8 @@ namespace Aaru.Filesystems; // https://developer.apple.com/legacy/library/documentation/mac/pdf/Files/File_Manager.pdf static partial class AppleCommon { +#region Nested type: BootBlock + /// Should be sectors 0 and 1 in volume, followed by boot code [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BootBlock // Should be sectors 0 and 1 in volume @@ -87,20 +89,44 @@ static partial class AppleCommon public readonly uint bbSysHeapFract; } - internal struct Rect +#endregion + +#region Nested type: DInfo + + internal struct DInfo { - public ushort top; - public ushort left; - public ushort bottom; - public ushort right; + /// Position and dimensions of the folder's window. + public Rect frRect; + /// Flags. + public FinderFlags frFlags; + /// Folder's location in the parent folder. + public Point frLocation; + /// Finder view selected for folder. + public ushort frView; } - internal struct Point +#endregion + +#region Nested type: DXInfo + + internal struct DXInfo { - public ushort v; - public ushort h; + /// Scroll position for icon views. + public Point frScroll; + /// Directory ID chain of open folders. + public uint frOpenChain; + /// Extended flags. If high-bit is set, most significant byte is script code and least significant byte are flags. + public ExtendedFinderFlags frXFlags; + /// Resource fork ID of directory comment if high bit is clear. + public ushort frComment; + /// Put away folder ID. + public uint frPutAway; } +#endregion + +#region Nested type: FInfo + internal struct FInfo { /// The type of the file. @@ -115,6 +141,10 @@ static partial class AppleCommon public FinderFolder fdFldr; } +#endregion + +#region Nested type: FXInfo + internal struct FXInfo { /// Resource fork ID of file icon. @@ -129,29 +159,27 @@ static partial class AppleCommon public uint fdPutAway; } - internal struct DInfo +#endregion + +#region Nested type: Point + + internal struct Point { - /// Position and dimensions of the folder's window. - public Rect frRect; - /// Flags. - public FinderFlags frFlags; - /// Folder's location in the parent folder. - public Point frLocation; - /// Finder view selected for folder. - public ushort frView; + public ushort v; + public ushort h; } - internal struct DXInfo +#endregion + +#region Nested type: Rect + + internal struct Rect { - /// Scroll position for icon views. - public Point frScroll; - /// Directory ID chain of open folders. - public uint frOpenChain; - /// Extended flags. If high-bit is set, most significant byte is script code and least significant byte are flags. - public ExtendedFinderFlags frXFlags; - /// Resource fork ID of directory comment if high bit is clear. - public ushort frComment; - /// Put away folder ID. - public uint frPutAway; + public ushort top; + public ushort left; + public ushort bottom; + public ushort right; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleDOS/AppleDOS.cs b/Aaru.Filesystems/AppleDOS/AppleDOS.cs index ab1f64c18..7dd2e2020 100644 --- a/Aaru.Filesystems/AppleDOS/AppleDOS.cs +++ b/Aaru.Filesystems/AppleDOS/AppleDOS.cs @@ -53,12 +53,17 @@ public sealed partial class AppleDOS : IReadOnlyFilesystem uint _usedSectors; Vtoc _vtoc; +#region IReadOnlyFilesystem Members + /// public FileSystem Metadata { get; private set; } + /// public string Name => Localization.AppleDOS_Name; + /// public Guid Id => new("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n"); + /// public string Author => Authors.NataliaPortillo; @@ -69,14 +74,15 @@ public sealed partial class AppleDOS : IReadOnlyFilesystem /// public Dictionary Namespaces => null; +#endregion + static Dictionary GetDefaultOptions() => new() { - { - "debug", false.ToString() - } + { "debug", false.ToString() } }; - #region Caches +#region Caches + /// Caches track/sector lists Dictionary _extentCache; /// Caches files @@ -95,5 +101,6 @@ public sealed partial class AppleDOS : IReadOnlyFilesystem Dictionary _fileTypeCache; /// Caches locked files List _lockedFiles; - #endregion Caches + +#endregion Caches } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleDOS/Dir.cs b/Aaru.Filesystems/AppleDOS/Dir.cs index e7c5a3638..ee55c167e 100644 --- a/Aaru.Filesystems/AppleDOS/Dir.cs +++ b/Aaru.Filesystems/AppleDOS/Dir.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; public sealed partial class AppleDOS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber ReadLink(string path, out string dest) { @@ -62,7 +64,7 @@ public sealed partial class AppleDOS string.Compare(path, "/", StringComparison.OrdinalIgnoreCase) != 0) return ErrorNumber.NotSupported; - List contents = _catalogCache.Keys.ToList(); + var contents = _catalogCache.Keys.ToList(); if(_debug) { @@ -117,10 +119,12 @@ public sealed partial class AppleDOS return ErrorNumber.NoError; } +#endregion + ErrorNumber ReadCatalog() { - var catalogMs = new MemoryStream(); - ulong lba = (ulong)((_vtoc.catalogTrack * _sectorsPerTrack) + _vtoc.catalogSector); + var catalogMs = new MemoryStream(); + var lba = (ulong)(_vtoc.catalogTrack * _sectorsPerTrack + _vtoc.catalogSector); _totalFileEntries = 0; _catalogCache = new Dictionary(); _fileTypeCache = new Dictionary(); @@ -151,11 +155,11 @@ public sealed partial class AppleDOS _track1UsedByFiles |= entry.extentTrack == 1; _track2UsedByFiles |= entry.extentTrack == 2; - byte[] filenameB = new byte[30]; - ushort ts = (ushort)((entry.extentTrack << 8) | entry.extentSector); + var filenameB = new byte[30]; + var ts = (ushort)(entry.extentTrack << 8 | entry.extentSector); // Apple DOS has high byte set over ASCII. - for(int i = 0; i < 30; i++) + for(var i = 0; i < 30; i++) filenameB[i] = (byte)(entry.filename[i] & 0x7F); string filename = StringHandlers.SpacePaddedToString(filenameB, _encoding); @@ -171,7 +175,7 @@ public sealed partial class AppleDOS _lockedFiles.Add(filename); } - lba = (ulong)((catSector.trackOfNext * _sectorsPerTrack) + catSector.sectorOfNext); + lba = (ulong)(catSector.trackOfNext * _sectorsPerTrack + catSector.sectorOfNext); if(lba > _device.Info.Sectors) break; diff --git a/Aaru.Filesystems/AppleDOS/File.cs b/Aaru.Filesystems/AppleDOS/File.cs index d8f47a504..9ea012c73 100644 --- a/Aaru.Filesystems/AppleDOS/File.cs +++ b/Aaru.Filesystems/AppleDOS/File.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; public sealed partial class AppleDOS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -48,10 +50,7 @@ public sealed partial class AppleDOS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -67,7 +66,7 @@ public sealed partial class AppleDOS if(_lockedFiles.Contains(filename)) attributes |= FileAttributes.ReadOnly; - if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Vtoc", StringComparison.InvariantCulture) == 0)) attributes |= FileAttributes.System; @@ -82,10 +81,7 @@ public sealed partial class AppleDOS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -96,15 +92,17 @@ public sealed partial class AppleDOS if(filename.Length > 30) return ErrorNumber.NameTooLong; - if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Vtoc", StringComparison.InvariantCulture) == 0)) + { if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0) file = _catalogBlocks; else if(string.Compare(path, "$Vtoc", StringComparison.InvariantCulture) == 0) file = _vtocBlocks; else file = _bootBlocks; + } else { if(!_fileCache.TryGetValue(filename, out file)) @@ -179,10 +177,7 @@ public sealed partial class AppleDOS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -200,7 +195,7 @@ public sealed partial class AppleDOS _fileSizeCache.TryGetValue(filename, out int fileSize); GetAttributes(path, out FileAttributes attrs); - if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Vtoc", StringComparison.InvariantCulture) == 0)) { @@ -226,12 +221,11 @@ public sealed partial class AppleDOS return ErrorNumber.NoError; } +#endregion + ErrorNumber CacheFile(string path) { - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -244,7 +238,7 @@ public sealed partial class AppleDOS if(!_catalogCache.TryGetValue(filename, out ushort ts)) return ErrorNumber.NoSuchFile; - ulong lba = (ulong)((((ts & 0xFF00) >> 8) * _sectorsPerTrack) + (ts & 0xFF)); + var lba = (ulong)(((ts & 0xFF00) >> 8) * _sectorsPerTrack + (ts & 0xFF)); var fileMs = new MemoryStream(); var tsListMs = new MemoryStream(); ushort expectedBlock = 0; @@ -265,7 +259,7 @@ public sealed partial class AppleDOS if(tsSector.sectorOffset > expectedBlock) { - byte[] hole = new byte[(tsSector.sectorOffset - expectedBlock) * _vtoc.bytesPerSector]; + var hole = new byte[(tsSector.sectorOffset - expectedBlock) * _vtoc.bytesPerSector]; fileMs.Write(hole, 0, hole.Length); expectedBlock = tsSector.sectorOffset; } @@ -276,7 +270,7 @@ public sealed partial class AppleDOS _track2UsedByFiles |= entry.track == 2; _usedSectors++; - ulong blockLba = (ulong)((entry.track * _sectorsPerTrack) + entry.sector); + var blockLba = (ulong)(entry.track * _sectorsPerTrack + entry.sector); if(blockLba == 0) break; @@ -290,7 +284,7 @@ public sealed partial class AppleDOS expectedBlock++; } - lba = (ulong)((tsSector.nextListTrack * _sectorsPerTrack) + tsSector.nextListSector); + lba = (ulong)(tsSector.nextListTrack * _sectorsPerTrack + tsSector.nextListSector); } if(_fileCache.ContainsKey(filename)) diff --git a/Aaru.Filesystems/AppleDOS/Info.cs b/Aaru.Filesystems/AppleDOS/Info.cs index 569c1114c..abb828388 100644 --- a/Aaru.Filesystems/AppleDOS/Info.cs +++ b/Aaru.Filesystems/AppleDOS/Info.cs @@ -37,6 +37,8 @@ namespace Aaru.Filesystems; public sealed partial class AppleDOS { +#region IReadOnlyFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -85,13 +87,14 @@ public sealed partial class AppleDOS AppendLine(); sb.AppendFormat(Localization.File_system_initialized_by_DOS_release_0, _vtoc.dosRelease).AppendLine(); - sb.AppendFormat(Localization.Disk_volume_number_0, _vtoc.volumeNumber).AppendLine(); - sb.AppendFormat(Localization.Sectors_allocated_at_most_in_track_0, _vtoc.lastAllocatedSector).AppendLine(); - sb.AppendFormat(Localization._0_tracks_in_volume, _vtoc.tracks).AppendLine(); - sb.AppendFormat(Localization._0_sectors_per_track, _vtoc.sectorsPerTrack).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_sector, _vtoc.bytesPerSector).AppendLine(); + sb.AppendFormat(Localization.Disk_volume_number_0, _vtoc.volumeNumber).AppendLine(); + sb.AppendFormat(Localization.Sectors_allocated_at_most_in_track_0, _vtoc.lastAllocatedSector).AppendLine(); + sb.AppendFormat(Localization._0_tracks_in_volume, _vtoc.tracks).AppendLine(); + sb.AppendFormat(Localization._0_sectors_per_track, _vtoc.sectorsPerTrack).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_sector, _vtoc.bytesPerSector).AppendLine(); - sb.AppendLine(_vtoc.allocationDirection > 0 ? Localization.Track_allocation_is_forward + sb.AppendLine(_vtoc.allocationDirection > 0 + ? Localization.Track_allocation_is_forward : Localization.Track_allocation_is_reverse); information = sb.ToString(); @@ -104,4 +107,6 @@ public sealed partial class AppleDOS Type = FS_TYPE }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleDOS/Structs.cs b/Aaru.Filesystems/AppleDOS/Structs.cs index f23333ee5..f138258ca 100644 --- a/Aaru.Filesystems/AppleDOS/Structs.cs +++ b/Aaru.Filesystems/AppleDOS/Structs.cs @@ -33,6 +33,108 @@ namespace Aaru.Filesystems; public sealed partial class AppleDOS { +#region Nested type: AppleDosDirNode + + sealed class AppleDosDirNode : IDirNode + { + internal string[] _contents; + internal int _position; + + #region IDirNode Members + + /// + public string Path { get; init; } + + #endregion + } + +#endregion + +#region Nested type: AppleDosFileNode + + sealed class AppleDosFileNode : IFileNode + { + internal byte[] _cache; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: CatalogSector + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CatalogSector + { + public readonly byte unused1; + public readonly byte trackOfNext; + public readonly byte sectorOfNext; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] unused2; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] + public readonly FileEntry[] entries; + } + +#endregion + +#region Nested type: FileEntry + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct FileEntry + { + public readonly byte extentTrack; + public readonly byte extentSector; + public readonly byte typeAndFlags; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30)] + public readonly byte[] filename; + public readonly ushort length; + } + +#endregion + +#region Nested type: TrackSectorList + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct TrackSectorList + { + public readonly byte unused1; + public readonly byte nextListTrack; + public readonly byte nextListSector; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public readonly byte[] unused2; + public readonly ushort sectorOffset; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public readonly byte[] unused3; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 122)] + public readonly TrackSectorListEntry[] entries; + } + +#endregion + +#region Nested type: TrackSectorListEntry + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct TrackSectorListEntry + { + public readonly byte track; + public readonly byte sector; + } + +#endregion + +#region Nested type: Vtoc + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Vtoc { @@ -59,67 +161,5 @@ public sealed partial class AppleDOS public readonly byte[] bitmap; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CatalogSector - { - public readonly byte unused1; - public readonly byte trackOfNext; - public readonly byte sectorOfNext; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] unused2; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] - public readonly FileEntry[] entries; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct FileEntry - { - public readonly byte extentTrack; - public readonly byte extentSector; - public readonly byte typeAndFlags; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30)] - public readonly byte[] filename; - public readonly ushort length; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct TrackSectorList - { - public readonly byte unused1; - public readonly byte nextListTrack; - public readonly byte nextListSector; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public readonly byte[] unused2; - public readonly ushort sectorOffset; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public readonly byte[] unused3; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 122)] - public readonly TrackSectorListEntry[] entries; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct TrackSectorListEntry - { - public readonly byte track; - public readonly byte sector; - } - - sealed class AppleDosFileNode : IFileNode - { - internal byte[] _cache; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } - - sealed class AppleDosDirNode : IDirNode - { - internal string[] _contents; - internal int _position; - /// - public string Path { get; init; } - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleDOS/Super.cs b/Aaru.Filesystems/AppleDOS/Super.cs index 97b571500..c4e1637b5 100644 --- a/Aaru.Filesystems/AppleDOS/Super.cs +++ b/Aaru.Filesystems/AppleDOS/Super.cs @@ -41,9 +41,11 @@ namespace Aaru.Filesystems; public sealed partial class AppleDOS { +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { _device = imagePlugin; _start = partition.Start; @@ -156,4 +158,6 @@ public sealed partial class AppleDOS return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleDOS/Xattr.cs b/Aaru.Filesystems/AppleDOS/Xattr.cs index 0dab78b69..30c86f16f 100644 --- a/Aaru.Filesystems/AppleDOS/Xattr.cs +++ b/Aaru.Filesystems/AppleDOS/Xattr.cs @@ -38,6 +38,8 @@ namespace Aaru.Filesystems; public sealed partial class AppleDOS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber ListXAttr(string path, out List xattrs) { @@ -46,10 +48,7 @@ public sealed partial class AppleDOS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -61,7 +60,7 @@ public sealed partial class AppleDOS xattrs = new List(); - if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Vtoc", StringComparison.InvariantCulture) == 0)) {} else @@ -84,10 +83,7 @@ public sealed partial class AppleDOS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -97,7 +93,7 @@ public sealed partial class AppleDOS if(filename.Length > 30) return ErrorNumber.NameTooLong; - if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Vtoc", StringComparison.InvariantCulture) == 0)) return ErrorNumber.NoSuchExtendedAttribute; @@ -128,4 +124,6 @@ public sealed partial class AppleDOS return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleHFS/AppleHFS.cs b/Aaru.Filesystems/AppleHFS/AppleHFS.cs index 79280aa29..17291e3f2 100644 --- a/Aaru.Filesystems/AppleHFS/AppleHFS.cs +++ b/Aaru.Filesystems/AppleHFS/AppleHFS.cs @@ -42,10 +42,16 @@ namespace Aaru.Filesystems; /// Implements detection of the Apple Hierarchical File System (HFS) public sealed partial class AppleHFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.Name_Apple_Hierarchical_File_System; + /// public Guid Id => new("36405F8D-0D26-6ECC-0BBB-1D5225FF404F"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleHFS/Enums.cs b/Aaru.Filesystems/AppleHFS/Enums.cs index 158ab4ab2..c75272e20 100644 --- a/Aaru.Filesystems/AppleHFS/Enums.cs +++ b/Aaru.Filesystems/AppleHFS/Enums.cs @@ -34,17 +34,7 @@ namespace Aaru.Filesystems; public sealed partial class AppleHFS { - enum NodeType : sbyte - { - /// Index node - ndIndxNode = 0, - /// Header node - ndHdrNode = 1, - /// Map node - ndMapNode = 2, - /// Leaf node - ndLeafNode = -1 - } +#region Nested type: CatDataType enum CatDataType : sbyte { @@ -58,8 +48,31 @@ public sealed partial class AppleHFS cdrFThdRec = 4 } +#endregion + +#region Nested type: ForkType + enum ForkType : sbyte { - Data = 0, Resource = -1 + Data = 0, + Resource = -1 } + +#endregion + +#region Nested type: NodeType + + enum NodeType : sbyte + { + /// Index node + ndIndxNode = 0, + /// Header node + ndHdrNode = 1, + /// Map node + ndMapNode = 2, + /// Leaf node + ndLeafNode = -1 + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleHFS/Info.cs b/Aaru.Filesystems/AppleHFS/Info.cs index fc8c9da94..3abdffbca 100644 --- a/Aaru.Filesystems/AppleHFS/Info.cs +++ b/Aaru.Filesystems/AppleHFS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; // https://developer.apple.com/legacy/library/documentation/mac/pdf/Files/File_Manager.pdf public sealed partial class AppleHFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -58,10 +60,8 @@ public sealed partial class AppleHFS if(errno != ErrorNumber.NoError) return false; - foreach(int offset in new[] - { - 0, 0x200, 0x400, 0x600, 0x800, 0xA00 - }.Where(offset => mdbSector.Length >= offset + 0x7C + 2)) + foreach(int offset in new[] { 0, 0x200, 0x400, 0x600, 0x800, 0xA00 }.Where( + offset => mdbSector.Length >= offset + 0x7C + 2)) { drSigWord = BigEndianBitConverter.ToUInt16(mdbSector, offset); @@ -111,7 +111,7 @@ public sealed partial class AppleHFS ushort drSigWord; ErrorNumber errno; - bool apmFromHddOnCd = false; + var apmFromHddOnCd = false; if(imagePlugin.Info.SectorSize is 2352 or 2448 or 2048) { @@ -120,10 +120,7 @@ public sealed partial class AppleHFS if(errno != ErrorNumber.NoError) return; - foreach(int offset in new[] - { - 0, 0x200, 0x400, 0x600, 0x800, 0xA00 - }) + foreach(int offset in new[] { 0, 0x200, 0x400, 0x600, 0x800, 0xA00 }) { drSigWord = BigEndianBitConverter.ToUInt16(tmpSector, offset); @@ -174,7 +171,7 @@ public sealed partial class AppleHFS sb.AppendLine(Localization.HFS_uses_512_bytes_sector_while_device_uses_2048_bytes_sector).AppendLine(); sb.AppendLine(Localization.Master_Directory_Block); - sb.AppendFormat(Localization.Creation_date_0, DateHandlers.MacToDateTime(mdb.drCrDate)).AppendLine(); + sb.AppendFormat(Localization.Creation_date_0, DateHandlers.MacToDateTime(mdb.drCrDate)).AppendLine(); sb.AppendFormat(Localization.Last_modification_date_0, DateHandlers.MacToDateTime(mdb.drLsMod)).AppendLine(); if(mdb.drVolBkUp > 0) @@ -188,7 +185,8 @@ public sealed partial class AppleHFS if(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.HardwareLock)) sb.AppendLine(Localization.Volume_is_locked_by_hardware); - sb.AppendLine(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.Unmounted) ? Localization.Volume_was_unmonted + sb.AppendLine(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.Unmounted) + ? Localization.Volume_was_unmonted : Localization.Volume_is_mounted); if(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.SparedBadBlocks)) @@ -212,22 +210,22 @@ public sealed partial class AppleHFS if(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.SoftwareLock)) sb.AppendLine(Localization.Volume_is_locked_by_software); - sb.AppendFormat(Localization._0_files_in_root_directory, mdb.drNmFls).AppendLine(); + sb.AppendFormat(Localization._0_files_in_root_directory, mdb.drNmFls).AppendLine(); sb.AppendFormat(Localization._0_directories_in_root_directory, mdb.drNmRtDirs).AppendLine(); - sb.AppendFormat(Localization._0_files_in_volume, mdb.drFilCnt).AppendLine(); - sb.AppendFormat(Localization._0_directories_in_volume, mdb.drDirCnt).AppendLine(); - sb.AppendFormat(Localization.Volume_write_count_0, mdb.drWrCnt).AppendLine(); + sb.AppendFormat(Localization._0_files_in_volume, mdb.drFilCnt).AppendLine(); + sb.AppendFormat(Localization._0_directories_in_volume, mdb.drDirCnt).AppendLine(); + sb.AppendFormat(Localization.Volume_write_count_0, mdb.drWrCnt).AppendLine(); - sb.AppendFormat(Localization.Volume_bitmap_starting_sector_in_512_bytes_0, mdb.drVBMSt).AppendLine(); - sb.AppendFormat(Localization.Next_allocation_block_0, mdb.drAllocPtr).AppendLine(); - sb.AppendFormat(Localization._0_volume_allocation_blocks, mdb.drNmAlBlks).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_allocation_block, mdb.drAlBlkSiz).AppendLine(); - sb.AppendFormat(Localization._0_bytes_to_allocate_when_extending_a_file, mdb.drClpSiz).AppendLine(); + sb.AppendFormat(Localization.Volume_bitmap_starting_sector_in_512_bytes_0, mdb.drVBMSt).AppendLine(); + sb.AppendFormat(Localization.Next_allocation_block_0, mdb.drAllocPtr).AppendLine(); + sb.AppendFormat(Localization._0_volume_allocation_blocks, mdb.drNmAlBlks).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_allocation_block, mdb.drAlBlkSiz).AppendLine(); + sb.AppendFormat(Localization._0_bytes_to_allocate_when_extending_a_file, mdb.drClpSiz).AppendLine(); sb.AppendFormat(Localization._0_bytes_to_allocate_when_extending_a_Extents_B_Tree, mdb.drXTClpSiz).AppendLine(); sb.AppendFormat(Localization._0_bytes_to_allocate_when_extending_a_Catalog_B_Tree, mdb.drCTClpSiz).AppendLine(); - sb.AppendFormat(Localization.Sector_of_first_allocation_block_0, mdb.drAlBlSt).AppendLine(); - sb.AppendFormat(Localization.Next_unused_CNID_0, mdb.drNxtCNID).AppendLine(); - sb.AppendFormat(Localization._0_unused_allocation_blocks, mdb.drFreeBks).AppendLine(); + sb.AppendFormat(Localization.Sector_of_first_allocation_block_0, mdb.drAlBlSt).AppendLine(); + sb.AppendFormat(Localization.Next_unused_CNID_0, mdb.drNxtCNID).AppendLine(); + sb.AppendFormat(Localization._0_unused_allocation_blocks, mdb.drFreeBks).AppendLine(); sb.AppendFormat(Localization._0_bytes_in_the_Extents_B_Tree, mdb.drXTFlSize).AppendLine(); sb.AppendFormat(Localization._0_bytes_in_the_Catalog_B_Tree, mdb.drCTFlSize).AppendLine(); @@ -235,11 +233,11 @@ public sealed partial class AppleHFS sb.AppendFormat(Localization.Volume_name_0, StringHandlers.PascalToString(mdb.drVN, encoding)).AppendLine(); sb.AppendLine(Localization.Finder_info); - sb.AppendFormat(Localization.CNID_of_bootable_system_directory_0, mdb.drFndrInfo0).AppendLine(); - sb.AppendFormat(Localization.CNID_of_first_run_application_directory_0, mdb.drFndrInfo1).AppendLine(); - sb.AppendFormat(Localization.CNID_of_previously_opened_directory_0, mdb.drFndrInfo2).AppendLine(); + sb.AppendFormat(Localization.CNID_of_bootable_system_directory_0, mdb.drFndrInfo0).AppendLine(); + sb.AppendFormat(Localization.CNID_of_first_run_application_directory_0, mdb.drFndrInfo1).AppendLine(); + sb.AppendFormat(Localization.CNID_of_previously_opened_directory_0, mdb.drFndrInfo2).AppendLine(); sb.AppendFormat(Localization.CNID_of_bootable_Mac_OS_8_or_9_directory_0, mdb.drFndrInfo3).AppendLine(); - sb.AppendFormat(Localization.CNID_of_bootable_Mac_OS_X_directory_0, mdb.drFndrInfo5).AppendLine(); + sb.AppendFormat(Localization.CNID_of_bootable_Mac_OS_X_directory_0, mdb.drFndrInfo5).AppendLine(); if(mdb.drFndrInfo6 != 0 && mdb.drFndrInfo7 != 0) @@ -248,12 +246,12 @@ public sealed partial class AppleHFS if(mdb.drEmbedSigWord == AppleCommon.HFSP_MAGIC) { sb.AppendLine(Localization.Volume_wraps_a_HFS_Plus_volume); - sb.AppendFormat(Localization.Starting_block_of_the_HFS_Plus_volume_0, mdb.xdrStABNt).AppendLine(); + sb.AppendFormat(Localization.Starting_block_of_the_HFS_Plus_volume_0, mdb.xdrStABNt).AppendLine(); sb.AppendFormat(Localization.Allocations_blocks_of_the_HFS_Plus_volume_0, mdb.xdrNumABlks).AppendLine(); } else { - sb.AppendFormat(Localization._0_blocks_in_volume_cache, mdb.drVCSize).AppendLine(); + sb.AppendFormat(Localization._0_blocks_in_volume_cache, mdb.drVCSize).AppendLine(); sb.AppendFormat(Localization._0_blocks_in_volume_bitmap_cache, mdb.drVBMCSize).AppendLine(); sb.AppendFormat(Localization._0_blocks_in_volume_common_cache, mdb.drCtlCSize).AppendLine(); } @@ -278,9 +276,7 @@ public sealed partial class AppleHFS metadata = new FileSystem(); if(mdb.drVolBkUp > 0) - { metadata.BackupDate = DateHandlers.MacToDateTime(mdb.drVolBkUp); - } metadata.Bootable = bootBlockInfo != null || mdb.drFndrInfo0 != 0 || mdb.drFndrInfo3 != 0 || mdb.drFndrInfo5 != 0; @@ -289,18 +285,14 @@ public sealed partial class AppleHFS metadata.ClusterSize = mdb.drAlBlkSiz; if(mdb.drCrDate > 0) - { metadata.CreationDate = DateHandlers.MacToDateTime(mdb.drCrDate); - } metadata.Dirty = !mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.Unmounted); metadata.Files = mdb.drFilCnt; metadata.FreeClusters = mdb.drFreeBks; if(mdb.drLsMod > 0) - { metadata.ModificationDate = DateHandlers.MacToDateTime(mdb.drLsMod); - } metadata.Type = FS_TYPE; metadata.VolumeName = StringHandlers.PascalToString(mdb.drVN, encoding); @@ -309,4 +301,6 @@ public sealed partial class AppleHFS mdb.drFndrInfo7 != 0) metadata.VolumeSerial = $"{mdb.drFndrInfo6:X8}{mdb.drFndrInfo7:X8}"; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleHFS/Structs.cs b/Aaru.Filesystems/AppleHFS/Structs.cs index e823a86fb..26d062ba2 100644 --- a/Aaru.Filesystems/AppleHFS/Structs.cs +++ b/Aaru.Filesystems/AppleHFS/Structs.cs @@ -39,6 +39,229 @@ namespace Aaru.Filesystems; // https://developer.apple.com/legacy/library/documentation/mac/pdf/Files/File_Manager.pdf public sealed partial class AppleHFS { +#region Nested type: BTHdrRed + + /// B*-tree header + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct BTHdrRed + { + /// Current depth of tree. + public readonly ushort bthDepth; + /// Number of root node. + public readonly uint bthRoot; + /// Number of leaf records in tree. + public readonly uint bthNRecs; + /// Number of first leaf node. + public readonly uint bthFNode; + /// Number of last leaf node. + public readonly uint bthLNode; + /// Size of a node. + public readonly ushort bthNodeSize; + /// Maximum length of a key. + public readonly ushort bthKeyLen; + /// Total number of nodes in tree. + public readonly uint bthNNodes; + /// Number of free nodes. + public readonly uint bthFree; + /// Reserved + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 76)] + public readonly sbyte[] bthResv; + } + +#endregion + +#region Nested type: CatDataRec + + /// Catalog data record header + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CatDataRec + { + public readonly CatDataType cdrType; + public readonly sbyte cdrResvr2; + } + +#endregion + +#region Nested type: CatKeyRec + + /// Catalog key record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CatKeyRec + { + /// Key length. + public readonly sbyte ckrKeyLen; + /// Reserved. + public readonly sbyte ckrResrv1; + /// Parent directory ID. + public readonly uint ckrParID; + /// Catalog node name. Full 32 bytes in index nodes but only the needed bytes, padded to word, in leaf nodes. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] ckrCName; + } + +#endregion + +#region Nested type: CdrDirRec + + /// Directory record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CdrDirRec + { + public readonly CatDataRec dirHdr; + /// Directory flags. + public readonly ushort dirFlags; + /// Directory valence. + public readonly ushort dirVal; + /// Directory ID. + public readonly uint dirDirID; + /// Date and time of creation. + public readonly uint dirCrDat; + /// Date and time of last modification. + public readonly uint dirMdDat; + /// Date and time of last backup. + public readonly uint dirBkDat; + /// Finder information. + public readonly AppleCommon.DInfo dirUsrInfo; + /// Additional Finder information. + public readonly AppleCommon.DXInfo dirFndrInfo; + /// Reserved + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly uint[] dirResrv; + } + +#endregion + +#region Nested type: CdrFilRec + + /// File record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CdrFilRec + { + public readonly CatDataRec filHdr; + /// File flags. + public readonly sbyte filFlags; + /// File type. + public readonly sbyte filType; + /// Finder information. + public readonly AppleCommon.FInfo filUsrWds; + /// File ID. + public readonly uint filFlNum; + /// First allocation block of data fork. + public readonly ushort filStBlk; + /// Logical EOF of data fork. + public readonly uint filLgLen; + /// Physical EOF of data fork. + public readonly uint filPyLen; + /// First allocation block of resource fork. + public readonly ushort filRStBlk; + /// Logical EOF of resource fork. + public readonly uint filRLgLen; + /// Physical EOF of resource fork. + public readonly uint filRPyLen; + /// Date and time of creation. + public readonly uint filCrDat; + /// Date and time of last modification. + public readonly uint filMdDat; + /// Date and time of last backup. + public readonly uint filBkDat; + /// Additional Finder information. + public readonly AppleCommon.FXInfo filFndrInfo; + /// File clump size. + public readonly ushort filClpSize; + /// First data fork extent record. + public readonly ExtDataRec filExtRec; + /// First resource fork extent record. + public readonly ExtDataRec filRExtRec; + /// Reserved + public readonly uint filResrv; + } + +#endregion + +#region Nested type: CdrFThdRec + + /// File thread record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CdrFThdRec + { + public readonly CatDataRec fthdHdr; + /// Reserved. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public readonly uint[] fthdResrv; + /// Parent ID for this file. + public readonly uint fthdParID; + /// Name of this file. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] fthdCName; + } + +#endregion + +#region Nested type: CdrThdRec + + /// Directory thread record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CdrThdRec + { + public readonly CatDataRec thdHdr; + /// Reserved. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public readonly uint[] thdResrv; + /// Parent ID for this directory. + public readonly uint thdParID; + /// Name of this directory. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] thdCName; + } + +#endregion + +#region Nested type: ExtDataRec + + /// Extent data record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ExtDataRec + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly ExtDescriptor[] xdr; + } + +#endregion + +#region Nested type: ExtDescriptor + + /// Extent descriptor + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ExtDescriptor + { + /// First allocation block + public readonly ushort xdrStABN; + /// Number of allocation blocks + public readonly ushort xdrNumABlks; + } + +#endregion + +#region Nested type: ExtKeyRec + + /// Extent key record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ExtKeyRec + { + /// Key length. + public readonly sbyte xkrKeyLen; + /// Fork type. + public readonly ForkType xkrFkType; + /// File number. + public readonly uint xkrFNum; + /// Starting file allocation block. + public readonly ushort xkrFABN; + } + +#endregion + +#region Nested type: MasterDirectoryBlock + /// Master Directory Block, should be sector 2 in volume [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct MasterDirectoryBlock // Should be sector 2 in volume @@ -128,6 +351,10 @@ public sealed partial class AppleHFS public readonly uint drCTFlSize; } +#endregion + +#region Nested type: NodeDescriptor + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct NodeDescriptor { @@ -145,184 +372,5 @@ public sealed partial class AppleHFS public readonly ushort ndResv2; } - /// B*-tree header - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct BTHdrRed - { - /// Current depth of tree. - public readonly ushort bthDepth; - /// Number of root node. - public readonly uint bthRoot; - /// Number of leaf records in tree. - public readonly uint bthNRecs; - /// Number of first leaf node. - public readonly uint bthFNode; - /// Number of last leaf node. - public readonly uint bthLNode; - /// Size of a node. - public readonly ushort bthNodeSize; - /// Maximum length of a key. - public readonly ushort bthKeyLen; - /// Total number of nodes in tree. - public readonly uint bthNNodes; - /// Number of free nodes. - public readonly uint bthFree; - /// Reserved - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 76)] - public readonly sbyte[] bthResv; - } - - /// Catalog key record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CatKeyRec - { - /// Key length. - public readonly sbyte ckrKeyLen; - /// Reserved. - public readonly sbyte ckrResrv1; - /// Parent directory ID. - public readonly uint ckrParID; - /// Catalog node name. Full 32 bytes in index nodes but only the needed bytes, padded to word, in leaf nodes. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] ckrCName; - } - - /// Catalog data record header - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CatDataRec - { - public readonly CatDataType cdrType; - public readonly sbyte cdrResvr2; - } - - /// Directory record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CdrDirRec - { - public readonly CatDataRec dirHdr; - /// Directory flags. - public readonly ushort dirFlags; - /// Directory valence. - public readonly ushort dirVal; - /// Directory ID. - public readonly uint dirDirID; - /// Date and time of creation. - public readonly uint dirCrDat; - /// Date and time of last modification. - public readonly uint dirMdDat; - /// Date and time of last backup. - public readonly uint dirBkDat; - /// Finder information. - public readonly AppleCommon.DInfo dirUsrInfo; - /// Additional Finder information. - public readonly AppleCommon.DXInfo dirFndrInfo; - /// Reserved - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly uint[] dirResrv; - } - - /// File record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CdrFilRec - { - public readonly CatDataRec filHdr; - /// File flags. - public readonly sbyte filFlags; - /// File type. - public readonly sbyte filType; - /// Finder information. - public readonly AppleCommon.FInfo filUsrWds; - /// File ID. - public readonly uint filFlNum; - /// First allocation block of data fork. - public readonly ushort filStBlk; - /// Logical EOF of data fork. - public readonly uint filLgLen; - /// Physical EOF of data fork. - public readonly uint filPyLen; - /// First allocation block of resource fork. - public readonly ushort filRStBlk; - /// Logical EOF of resource fork. - public readonly uint filRLgLen; - /// Physical EOF of resource fork. - public readonly uint filRPyLen; - /// Date and time of creation. - public readonly uint filCrDat; - /// Date and time of last modification. - public readonly uint filMdDat; - /// Date and time of last backup. - public readonly uint filBkDat; - /// Additional Finder information. - public readonly AppleCommon.FXInfo filFndrInfo; - /// File clump size. - public readonly ushort filClpSize; - /// First data fork extent record. - public readonly ExtDataRec filExtRec; - /// First resource fork extent record. - public readonly ExtDataRec filRExtRec; - /// Reserved - public readonly uint filResrv; - } - - /// Directory thread record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CdrThdRec - { - public readonly CatDataRec thdHdr; - /// Reserved. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public readonly uint[] thdResrv; - /// Parent ID for this directory. - public readonly uint thdParID; - /// Name of this directory. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] thdCName; - } - - /// File thread record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CdrFThdRec - { - public readonly CatDataRec fthdHdr; - /// Reserved. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public readonly uint[] fthdResrv; - /// Parent ID for this file. - public readonly uint fthdParID; - /// Name of this file. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] fthdCName; - } - - /// Extent descriptor - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ExtDescriptor - { - /// First allocation block - public readonly ushort xdrStABN; - /// Number of allocation blocks - public readonly ushort xdrNumABlks; - } - - /// Extent data record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ExtDataRec - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly ExtDescriptor[] xdr; - } - - /// Extent key record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ExtKeyRec - { - /// Key length. - public readonly sbyte xkrKeyLen; - /// Fork type. - public readonly ForkType xkrFkType; - /// File number. - public readonly uint xkrFNum; - /// Starting file allocation block. - public readonly ushort xkrFABN; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleHFSPlus/AppleHFSPlus.cs b/Aaru.Filesystems/AppleHFSPlus/AppleHFSPlus.cs index b088a7c48..bea91a3e2 100644 --- a/Aaru.Filesystems/AppleHFSPlus/AppleHFSPlus.cs +++ b/Aaru.Filesystems/AppleHFSPlus/AppleHFSPlus.cs @@ -36,10 +36,16 @@ namespace Aaru.Filesystems; /// Implements detection of Apple Hierarchical File System Plus (HFS+) public sealed partial class AppleHFSPlus : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.AppleHFSPlus_Name; + /// public Guid Id => new("36405F8D-0D26-6EBE-436F-62F0586B4F08"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleHFSPlus/Info.cs b/Aaru.Filesystems/AppleHFSPlus/Info.cs index f7b9a5fa4..00c901d53 100644 --- a/Aaru.Filesystems/AppleHFSPlus/Info.cs +++ b/Aaru.Filesystems/AppleHFSPlus/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of Apple Hierarchical File System Plus (HFS+) public sealed partial class AppleHFSPlus { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -62,7 +64,7 @@ public sealed partial class AppleHFSPlus if(vhSector.Length < 0x800) return false; - ushort drSigWord = BigEndianBitConverter.ToUInt16(vhSector, 0x400); + var drSigWord = BigEndianBitConverter.ToUInt16(vhSector, 0x400); if(drSigWord == AppleCommon.HFS_MAGIC) // "BD" { @@ -71,13 +73,13 @@ public sealed partial class AppleHFSPlus if(drSigWord == AppleCommon.HFSP_MAGIC) // "H+" { // ReSharper disable once InconsistentNaming - ushort xdrStABNt = BigEndianBitConverter.ToUInt16(vhSector, 0x47E); + var xdrStABNt = BigEndianBitConverter.ToUInt16(vhSector, 0x47E); - uint drAlBlkSiz = BigEndianBitConverter.ToUInt32(vhSector, 0x414); + var drAlBlkSiz = BigEndianBitConverter.ToUInt32(vhSector, 0x414); - ushort drAlBlSt = BigEndianBitConverter.ToUInt16(vhSector, 0x41C); + var drAlBlSt = BigEndianBitConverter.ToUInt16(vhSector, 0x41C); - hfspOffset = (ulong)(((drAlBlSt * 512) + (xdrStABNt * drAlBlkSiz)) / imagePlugin.Info.SectorSize); + hfspOffset = (ulong)((drAlBlSt * 512 + xdrStABNt * drAlBlkSiz) / imagePlugin.Info.SectorSize); } else hfspOffset = 0; @@ -118,7 +120,7 @@ public sealed partial class AppleHFSPlus if(errno != ErrorNumber.NoError) return; - ushort drSigWord = BigEndianBitConverter.ToUInt16(vhSector, 0x400); + var drSigWord = BigEndianBitConverter.ToUInt16(vhSector, 0x400); if(drSigWord == AppleCommon.HFS_MAGIC) // "BD" { @@ -127,13 +129,13 @@ public sealed partial class AppleHFSPlus if(drSigWord == AppleCommon.HFSP_MAGIC) // "H+" { // ReSharper disable once InconsistentNaming - ushort xdrStABNt = BigEndianBitConverter.ToUInt16(vhSector, 0x47E); + var xdrStABNt = BigEndianBitConverter.ToUInt16(vhSector, 0x47E); - uint drAlBlkSiz = BigEndianBitConverter.ToUInt32(vhSector, 0x414); + var drAlBlkSiz = BigEndianBitConverter.ToUInt32(vhSector, 0x414); - ushort drAlBlSt = BigEndianBitConverter.ToUInt16(vhSector, 0x41C); + var drAlBlSt = BigEndianBitConverter.ToUInt16(vhSector, 0x41C); - hfspOffset = (ulong)(((drAlBlSt * 512) + (xdrStABNt * drAlBlkSiz)) / imagePlugin.Info.SectorSize); + hfspOffset = (ulong)((drAlBlSt * 512 + xdrStABNt * drAlBlkSiz) / imagePlugin.Info.SectorSize); wrapped = true; } else @@ -177,7 +179,7 @@ public sealed partial class AppleHFSPlus if(wrapped) sb.AppendLine(Localization.Volume_is_wrapped_inside_an_HFS_volume); - byte[] tmp = new byte[0x400]; + var tmp = new byte[0x400]; Array.Copy(vhSector, 0x400, tmp, 0, 0x400); vhSector = tmp; @@ -223,14 +225,18 @@ public sealed partial class AppleHFSPlus AppendLine(); if(vh.backupDate > 0) + { sb.AppendFormat(Localization.Last_backup_date_0, DateHandlers.MacToDateTime(vh.backupDate)). AppendLine(); + } else sb.AppendLine(Localization.Volume_has_never_been_backed_up); if(vh.backupDate > 0) + { sb.AppendFormat(Localization.Last_check_date_0, DateHandlers.MacToDateTime(vh.checkedDate)). AppendLine(); + } else sb.AppendLine(Localization.Volume_has_never_been_checked_up); @@ -250,11 +256,11 @@ public sealed partial class AppleHFSPlus sb.AppendFormat(Localization.Attributes_File_is_0_bytes, vh.attributesFile_logicalSize).AppendLine(); sb.AppendFormat(Localization.Startup_File_is_0_bytes, vh.startupFile_logicalSize).AppendLine(); sb.AppendLine(Localization.Finder_info); - sb.AppendFormat(Localization.CNID_of_bootable_system_directory_0, vh.drFndrInfo0).AppendLine(); - sb.AppendFormat(Localization.CNID_of_first_run_application_directory_0, vh.drFndrInfo1).AppendLine(); - sb.AppendFormat(Localization.CNID_of_previously_opened_directory_0, vh.drFndrInfo2).AppendLine(); + sb.AppendFormat(Localization.CNID_of_bootable_system_directory_0, vh.drFndrInfo0).AppendLine(); + sb.AppendFormat(Localization.CNID_of_first_run_application_directory_0, vh.drFndrInfo1).AppendLine(); + sb.AppendFormat(Localization.CNID_of_previously_opened_directory_0, vh.drFndrInfo2).AppendLine(); sb.AppendFormat(Localization.CNID_of_bootable_Mac_OS_8_or_9_directory_0, vh.drFndrInfo3).AppendLine(); - sb.AppendFormat(Localization.CNID_of_bootable_Mac_OS_X_directory_0, vh.drFndrInfo5).AppendLine(); + sb.AppendFormat(Localization.CNID_of_bootable_Mac_OS_X_directory_0, vh.drFndrInfo5).AppendLine(); if(vh.drFndrInfo6 != 0 && vh.drFndrInfo7 != 0) @@ -263,34 +269,28 @@ public sealed partial class AppleHFSPlus metadata = new FileSystem(); if(vh.backupDate > 0) - { metadata.BackupDate = DateHandlers.MacToDateTime(vh.backupDate); - } metadata.Bootable |= vh.drFndrInfo0 != 0 || vh.drFndrInfo3 != 0 || vh.drFndrInfo5 != 0; metadata.Clusters = vh.totalBlocks; metadata.ClusterSize = vh.blockSize; if(vh.createDate > 0) - { metadata.CreationDate = DateHandlers.MacToDateTime(vh.createDate); - } metadata.Dirty = (vh.attributes & 0x100) != 0x100; metadata.Files = vh.fileCount; metadata.FreeClusters = vh.freeBlocks; if(vh.modifyDate > 0) - { metadata.ModificationDate = DateHandlers.MacToDateTime(vh.modifyDate); - } metadata.Type = vh.signature switch - { - 0x482B => FS_TYPE_HFSP, - 0x4858 => FS_TYPE_HFSX, - _ => metadata.Type - }; + { + 0x482B => FS_TYPE_HFSP, + 0x4858 => FS_TYPE_HFSX, + _ => metadata.Type + }; if(vh.drFndrInfo6 != 0 && vh.drFndrInfo7 != 0) @@ -306,4 +306,6 @@ public sealed partial class AppleHFSPlus information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleHFSPlus/Structs.cs b/Aaru.Filesystems/AppleHFSPlus/Structs.cs index 5965bd604..cf4caa5eb 100644 --- a/Aaru.Filesystems/AppleHFSPlus/Structs.cs +++ b/Aaru.Filesystems/AppleHFSPlus/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of Apple Hierarchical File System Plus (HFS+) public sealed partial class AppleHFSPlus { +#region Nested type: VolumeHeader + /// HFS+ Volume Header, should be at offset 0x0400 bytes in volume with a size of 532 bytes [StructLayout(LayoutKind.Sequential, Pack = 1)] struct VolumeHeader @@ -300,4 +302,6 @@ public sealed partial class AppleHFSPlus /// 0x200 public readonly uint startupFile_extents_blockCount7; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleMFS/AppleMFS.cs b/Aaru.Filesystems/AppleMFS/AppleMFS.cs index 91dbce7c1..e2a4f9c9a 100644 --- a/Aaru.Filesystems/AppleMFS/AppleMFS.cs +++ b/Aaru.Filesystems/AppleMFS/AppleMFS.cs @@ -40,32 +40,37 @@ namespace Aaru.Filesystems; public sealed partial class AppleMFS : IReadOnlyFilesystem { const string MODULE_NAME = "Apple MFS plugin"; - bool _mounted; + byte[] _bitmapTags; + uint[] _blockMap; + byte[] _blockMapBytes; + byte[] _bootBlocks; + byte[] _bootTags; bool _debug; IMediaImage _device; - ulong _partitionStart; - Dictionary _idToFilename; - Dictionary _idToEntry; - Dictionary _filenameToId; - MasterDirectoryBlock _volMdb; - byte[] _bootBlocks; - byte[] _mdbBlocks; byte[] _directoryBlocks; - byte[] _blockMapBytes; - uint[] _blockMap; - int _sectorsPerBlock; - byte[] _bootTags; - byte[] _mdbTags; byte[] _directoryTags; - byte[] _bitmapTags; Encoding _encoding; + Dictionary _filenameToId; + Dictionary _idToEntry; + Dictionary _idToFilename; + byte[] _mdbBlocks; + byte[] _mdbTags; + bool _mounted; + ulong _partitionStart; + int _sectorsPerBlock; + MasterDirectoryBlock _volMdb; + +#region IReadOnlyFilesystem Members /// public string Name => Localization.AppleMFS_Name; + /// public FileSystem Metadata { get; private set; } + /// public Guid Id => new("36405F8D-0D26-4066-6538-5DBF5D065C3A"); + /// public string Author => Authors.NataliaPortillo; @@ -77,10 +82,10 @@ public sealed partial class AppleMFS : IReadOnlyFilesystem /// public Dictionary Namespaces => null; +#endregion + static Dictionary GetDefaultOptions() => new() { - { - "debug", false.ToString() - } + { "debug", false.ToString() } }; } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleMFS/Dir.cs b/Aaru.Filesystems/AppleMFS/Dir.cs index 57507cdff..bc97fd382 100644 --- a/Aaru.Filesystems/AppleMFS/Dir.cs +++ b/Aaru.Filesystems/AppleMFS/Dir.cs @@ -39,6 +39,8 @@ namespace Aaru.Filesystems; // Information from Inside Macintosh Volume II public sealed partial class AppleMFS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber OpenDir(string path, out IDirNode node) { @@ -51,7 +53,7 @@ public sealed partial class AppleMFS string.Compare(path, "/", StringComparison.OrdinalIgnoreCase) != 0) return ErrorNumber.NotSupported; - List contents = _idToFilename.Select(kvp => kvp.Value).ToList(); + var contents = _idToFilename.Select(kvp => kvp.Value).ToList(); if(_debug) { @@ -109,13 +111,15 @@ public sealed partial class AppleMFS return ErrorNumber.NoError; } +#endregion + bool FillDirectory() { _idToFilename = new Dictionary(); _idToEntry = new Dictionary(); _filenameToId = new Dictionary(); - int offset = 0; + var offset = 0; while(offset + 51 < _directoryBlocks.Length) { @@ -159,12 +163,12 @@ public sealed partial class AppleMFS _filenameToId.Add(lowerFilename, entry.flFlNum); - AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flFlags = {0}", entry.flFlags); - AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flTyp = {0}", entry.flTyp); - AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flFlNum = {0}", entry.flFlNum); - AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flStBlk = {0}", entry.flStBlk); - AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flLgLen = {0}", entry.flLgLen); - AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flPyLen = {0}", entry.flPyLen); + AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flFlags = {0}", entry.flFlags); + AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flTyp = {0}", entry.flTyp); + AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flFlNum = {0}", entry.flFlNum); + AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flStBlk = {0}", entry.flStBlk); + AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flLgLen = {0}", entry.flLgLen); + AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flPyLen = {0}", entry.flPyLen); AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flRStBlk = {0}", entry.flRStBlk); AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flRLgLen = {0}", entry.flRLgLen); AaruConsole.DebugWriteLine(MODULE_NAME, "entry.flRPyLen = {0}", entry.flRPyLen); diff --git a/Aaru.Filesystems/AppleMFS/File.cs b/Aaru.Filesystems/AppleMFS/File.cs index ac521decf..0cb5dde49 100644 --- a/Aaru.Filesystems/AppleMFS/File.cs +++ b/Aaru.Filesystems/AppleMFS/File.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; // Information from Inside Macintosh Volume II public sealed partial class AppleMFS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -48,10 +50,7 @@ public sealed partial class AppleMFS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -202,10 +201,7 @@ public sealed partial class AppleMFS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -213,10 +209,11 @@ public sealed partial class AppleMFS path = pathElements[0]; if(_debug) - if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || - string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || + { + if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Bitmap", StringComparison.InvariantCulture) == 0 || - string.Compare(path, "$MDB", StringComparison.InvariantCulture) == 0) + string.Compare(path, "$MDB", StringComparison.InvariantCulture) == 0) { stat = new FileEntryInfo { @@ -228,26 +225,26 @@ public sealed partial class AppleMFS if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0) { - stat.Blocks = (_directoryBlocks.Length / stat.BlockSize) + - (_directoryBlocks.Length % stat.BlockSize); + stat.Blocks = _directoryBlocks.Length / stat.BlockSize + + _directoryBlocks.Length % stat.BlockSize; stat.Length = _directoryBlocks.Length; } else if(string.Compare(path, "$Bitmap", StringComparison.InvariantCulture) == 0) { - stat.Blocks = (_blockMapBytes.Length / stat.BlockSize) + (_blockMapBytes.Length % stat.BlockSize); + stat.Blocks = _blockMapBytes.Length / stat.BlockSize + _blockMapBytes.Length % stat.BlockSize; stat.Length = _blockMapBytes.Length; } else if(string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 && _bootBlocks != null) { - stat.Blocks = (_bootBlocks.Length / stat.BlockSize) + (_bootBlocks.Length % stat.BlockSize); + stat.Blocks = _bootBlocks.Length / stat.BlockSize + _bootBlocks.Length % stat.BlockSize; stat.Length = _bootBlocks.Length; } else if(string.Compare(path, "$MDB", StringComparison.InvariantCulture) == 0) { - stat.Blocks = (_mdbBlocks.Length / stat.BlockSize) + (_mdbBlocks.Length % stat.BlockSize); + stat.Blocks = _mdbBlocks.Length / stat.BlockSize + _mdbBlocks.Length % stat.BlockSize; stat.Length = _mdbBlocks.Length; } else @@ -255,6 +252,7 @@ public sealed partial class AppleMFS return ErrorNumber.NoError; } + } if(!_filenameToId.TryGetValue(path.ToLowerInvariant(), out uint fileId)) return ErrorNumber.NoSuchFile; @@ -290,6 +288,8 @@ public sealed partial class AppleMFS return ErrorNumber.NotImplemented; } +#endregion + ErrorNumber ReadFile(string path, out byte[] buf, bool resourceFork, bool tags) { buf = null; @@ -297,10 +297,7 @@ public sealed partial class AppleMFS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -373,6 +370,7 @@ public sealed partial class AppleMFS else { if(resourceFork) + { if(ms.Length < entry.flRLgLen) buf = ms.ToArray(); else @@ -380,6 +378,7 @@ public sealed partial class AppleMFS buf = new byte[entry.flRLgLen]; Array.Copy(ms.ToArray(), 0, buf, 0, buf.Length); } + } else { if(ms.Length < entry.flLgLen) diff --git a/Aaru.Filesystems/AppleMFS/Info.cs b/Aaru.Filesystems/AppleMFS/Info.cs index 2b2732467..0f1128042 100644 --- a/Aaru.Filesystems/AppleMFS/Info.cs +++ b/Aaru.Filesystems/AppleMFS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; // Information from Inside Macintosh Volume II public sealed partial class AppleMFS { +#region IReadOnlyFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -52,7 +54,7 @@ public sealed partial class AppleMFS if(errno != ErrorNumber.NoError) return false; - ushort drSigWord = BigEndianBitConverter.ToUInt16(mdbSector, 0x000); + var drSigWord = BigEndianBitConverter.ToUInt16(mdbSector, 0x000); return drSigWord == MFS_MAGIC; } @@ -97,20 +99,21 @@ public sealed partial class AppleMFS mdb.drNxtFNum = BigEndianBitConverter.ToUInt32(mdbSector, 0x01E); mdb.drFreeBks = BigEndianBitConverter.ToUInt16(mdbSector, 0x022); mdb.drVNSiz = mdbSector[0x024]; - byte[] variableSize = new byte[mdb.drVNSiz + 1]; + var variableSize = new byte[mdb.drVNSiz + 1]; Array.Copy(mdbSector, 0x024, variableSize, 0, mdb.drVNSiz + 1); mdb.drVN = StringHandlers.PascalToString(variableSize, encoding); sb.AppendLine(Localization.AppleMFS_Name); sb.AppendLine(); sb.AppendLine(Localization.Master_Directory_Block); - sb.AppendFormat(Localization.Creation_date_0, DateHandlers.MacToDateTime(mdb.drCrDate)).AppendLine(); + sb.AppendFormat(Localization.Creation_date_0, DateHandlers.MacToDateTime(mdb.drCrDate)).AppendLine(); sb.AppendFormat(Localization.Last_backup_date_0, DateHandlers.MacToDateTime(mdb.drLsBkUp)).AppendLine(); if(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.HardwareLock)) sb.AppendLine(Localization.Volume_is_locked_by_hardware); - sb.AppendLine(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.Unmounted) ? Localization.Volume_was_unmonted + sb.AppendLine(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.Unmounted) + ? Localization.Volume_was_unmonted : Localization.Volume_is_mounted); if(mdb.drAtrb.HasFlag(AppleCommon.VolumeAttributes.SparedBadBlocks)) @@ -158,22 +161,20 @@ public sealed partial class AppleMFS metadata = new FileSystem(); if(mdb.drLsBkUp > 0) - { metadata.BackupDate = DateHandlers.MacToDateTime(mdb.drLsBkUp); - } metadata.Bootable = bootBlockInfo != null; metadata.Clusters = mdb.drNmAlBlks; metadata.ClusterSize = mdb.drAlBlkSiz; if(mdb.drCrDate > 0) - { metadata.CreationDate = DateHandlers.MacToDateTime(mdb.drCrDate); - } metadata.Files = mdb.drNmFls; metadata.FreeClusters = mdb.drFreeBks; metadata.Type = FS_TYPE; metadata.VolumeName = mdb.drVN; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleMFS/Structs.cs b/Aaru.Filesystems/AppleMFS/Structs.cs index 3d83d62f2..2326bd8ad 100644 --- a/Aaru.Filesystems/AppleMFS/Structs.cs +++ b/Aaru.Filesystems/AppleMFS/Structs.cs @@ -35,9 +35,96 @@ using Aaru.CommonTypes.Interfaces; namespace Aaru.Filesystems; // Information from Inside Macintosh Volume II -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "NotAccessedField.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class AppleMFS { +#region Nested type: AppleMfsDirNode + + sealed class AppleMfsDirNode : IDirNode + { + internal string[] _contents; + internal int _position; + + #region IDirNode Members + + /// + public string Path { get; init; } + + #endregion + } + +#endregion + +#region Nested type: AppleMfsFileNode + + sealed class AppleMfsFileNode : IFileNode + { + internal byte[] _cache; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: FileEntry + + struct FileEntry + { + /// 0x00, Entry flags + public FileFlags flFlags; + /// 0x01, Version number + public byte flTyp; + /// 0x02, FinderInfo + public AppleCommon.FInfo flUsrWds; + /// 0x12, file ID + public uint flFlNum; + /// 0x16, first allocation block of data fork + public ushort flStBlk; + /// 0x18, logical end-of-file of data fork + public uint flLgLen; + /// 0x1C, physical end-of-file of data fork + public uint flPyLen; + /// 0x20, first allocation block of resource fork + public ushort flRStBlk; + /// 0x22, logical end-of-file of resource fork + public uint flRLgLen; + /// 0x26, physical end-of-file of resource fork + public uint flRPyLen; + /// 0x2A, date and time of creation + public uint flCrDat; + /// 0x2E, date and time of last modification + public uint flMdDat; + /// 0x32, file name prefixed with length + public byte[] flNam; + } + +#endregion + +#region Nested type: FileFlags + + [Flags] + enum FileFlags : byte + { + Locked = 0x01, + Used = 0x80 + } + +#endregion + +#region Nested type: MasterDirectoryBlock + /// Master Directory Block, should be at offset 0x0400 bytes in volume struct MasterDirectoryBlock { @@ -73,58 +160,5 @@ public sealed partial class AppleMFS public string drVN; } - [Flags] - enum FileFlags : byte - { - Locked = 0x01, Used = 0x80 - } - - struct FileEntry - { - /// 0x00, Entry flags - public FileFlags flFlags; - /// 0x01, Version number - public byte flTyp; - /// 0x02, FinderInfo - public AppleCommon.FInfo flUsrWds; - /// 0x12, file ID - public uint flFlNum; - /// 0x16, first allocation block of data fork - public ushort flStBlk; - /// 0x18, logical end-of-file of data fork - public uint flLgLen; - /// 0x1C, physical end-of-file of data fork - public uint flPyLen; - /// 0x20, first allocation block of resource fork - public ushort flRStBlk; - /// 0x22, logical end-of-file of resource fork - public uint flRLgLen; - /// 0x26, physical end-of-file of resource fork - public uint flRPyLen; - /// 0x2A, date and time of creation - public uint flCrDat; - /// 0x2E, date and time of last modification - public uint flMdDat; - /// 0x32, file name prefixed with length - public byte[] flNam; - } - - sealed class AppleMfsFileNode : IFileNode - { - internal byte[] _cache; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } - - sealed class AppleMfsDirNode : IDirNode - { - internal string[] _contents; - internal int _position; - /// - public string Path { get; init; } - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleMFS/Super.cs b/Aaru.Filesystems/AppleMFS/Super.cs index e6ffffd60..481bc5644 100644 --- a/Aaru.Filesystems/AppleMFS/Super.cs +++ b/Aaru.Filesystems/AppleMFS/Super.cs @@ -43,9 +43,11 @@ public sealed partial class AppleMFS { const int BYTES_BEFORE_BLOCK_MAP = 64; +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { _device = imagePlugin; _partitionStart = partition.Start; @@ -86,7 +88,7 @@ public sealed partial class AppleMFS _volMdb.drNxtFNum = BigEndianBitConverter.ToUInt32(_mdbBlocks, 0x01E); _volMdb.drFreeBks = BigEndianBitConverter.ToUInt16(_mdbBlocks, 0x022); _volMdb.drVNSiz = _mdbBlocks[0x024]; - byte[] variableSize = new byte[_volMdb.drVNSiz + 1]; + var variableSize = new byte[_volMdb.drVNSiz + 1]; Array.Copy(_mdbBlocks, 0x024, variableSize, 0, _volMdb.drVNSiz + 1); _volMdb.drVN = StringHandlers.PascalToString(variableSize, _encoding); @@ -95,11 +97,11 @@ public sealed partial class AppleMFS if(errno != ErrorNumber.NoError) return errno; - int bytesInBlockMap = (_volMdb.drNmAlBlks * 12 / 8) + (_volMdb.drNmAlBlks * 12 % 8); - int bytesInWholeMdb = bytesInBlockMap + BYTES_BEFORE_BLOCK_MAP; + int bytesInBlockMap = _volMdb.drNmAlBlks * 12 / 8 + _volMdb.drNmAlBlks * 12 % 8; + int bytesInWholeMdb = bytesInBlockMap + BYTES_BEFORE_BLOCK_MAP; - int sectorsInWholeMdb = (bytesInWholeMdb / (int)_device.Info.SectorSize) + - (bytesInWholeMdb % (int)_device.Info.SectorSize); + int sectorsInWholeMdb = bytesInWholeMdb / (int)_device.Info.SectorSize + + bytesInWholeMdb % (int)_device.Info.SectorSize; errno = _device.ReadSectors(_partitionStart + 2, (uint)sectorsInWholeMdb, out byte[] wholeMdb); @@ -109,10 +111,10 @@ public sealed partial class AppleMFS _blockMapBytes = new byte[bytesInBlockMap]; Array.Copy(wholeMdb, BYTES_BEFORE_BLOCK_MAP, _blockMapBytes, 0, _blockMapBytes.Length); - int offset = 0; + var offset = 0; _blockMap = new uint[_volMdb.drNmAlBlks + 2 + 1]; - for(int i = 2; i < _volMdb.drNmAlBlks + 2; i += 8) + for(var i = 2; i < _volMdb.drNmAlBlks + 2; i += 8) { uint tmp1 = 0; uint tmp2 = 0; @@ -173,7 +175,7 @@ public sealed partial class AppleMFS _mounted = true; - ushort bbSig = BigEndianBitConverter.ToUInt16(_bootBlocks, 0x000); + var bbSig = BigEndianBitConverter.ToUInt16(_bootBlocks, 0x000); if(bbSig != AppleCommon.BB_MAGIC) _bootBlocks = null; @@ -181,18 +183,14 @@ public sealed partial class AppleMFS Metadata = new FileSystem(); if(_volMdb.drLsBkUp > 0) - { Metadata.BackupDate = DateHandlers.MacToDateTime(_volMdb.drLsBkUp); - } Metadata.Bootable = bbSig == AppleCommon.BB_MAGIC; Metadata.Clusters = _volMdb.drNmAlBlks; Metadata.ClusterSize = _volMdb.drAlBlkSiz; if(_volMdb.drCrDate > 0) - { Metadata.CreationDate = DateHandlers.MacToDateTime(_volMdb.drCrDate); - } Metadata.Files = _volMdb.drNmFls; Metadata.FreeClusters = _volMdb.drFreeBks; @@ -231,4 +229,6 @@ public sealed partial class AppleMFS return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AppleMFS/Xattr.cs b/Aaru.Filesystems/AppleMFS/Xattr.cs index ce2d34f78..af30a60e6 100644 --- a/Aaru.Filesystems/AppleMFS/Xattr.cs +++ b/Aaru.Filesystems/AppleMFS/Xattr.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; // Information from Inside Macintosh Volume II public sealed partial class AppleMFS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber ListXAttr(string path, out List xattrs) { @@ -49,10 +51,7 @@ public sealed partial class AppleMFS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -62,16 +61,18 @@ public sealed partial class AppleMFS xattrs = new List(); if(_debug) - if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + { + if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Bitmap", StringComparison.InvariantCulture) == 0 || - string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || - string.Compare(path, "$MDB", StringComparison.InvariantCulture) == 0) + string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || + string.Compare(path, "$MDB", StringComparison.InvariantCulture) == 0) { if(_device.Info.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag)) xattrs.Add("com.apple.macintosh.tags"); return ErrorNumber.NoError; } + } if(!_filenameToId.TryGetValue(path.ToLowerInvariant(), out uint fileId)) return ErrorNumber.NoSuchFile; @@ -105,10 +106,7 @@ public sealed partial class AppleMFS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -116,10 +114,12 @@ public sealed partial class AppleMFS path = pathElements[0]; if(_debug) - if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + { + if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Bitmap", StringComparison.InvariantCulture) == 0 || - string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || - string.Compare(path, "$MDB", StringComparison.InvariantCulture) == 0) + string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0 || + string.Compare(path, "$MDB", StringComparison.InvariantCulture) == 0) + { if(_device.Info.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag) && string.Compare(xattr, "com.apple.macintosh.tags", StringComparison.InvariantCulture) == 0) { @@ -157,6 +157,8 @@ public sealed partial class AppleMFS } else return ErrorNumber.NoSuchExtendedAttribute; + } + } ErrorNumber error; @@ -194,4 +196,6 @@ public sealed partial class AppleMFS return error; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AtheOS/AtheOS.cs b/Aaru.Filesystems/AtheOS/AtheOS.cs index 9327cba08..ef327edf3 100644 --- a/Aaru.Filesystems/AtheOS/AtheOS.cs +++ b/Aaru.Filesystems/AtheOS/AtheOS.cs @@ -37,10 +37,16 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class AtheOS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.AtheOS_Name; + /// public Guid Id => new("AAB2C4F1-DC07-49EE-A948-576CC51B58C5"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AtheOS/Info.cs b/Aaru.Filesystems/AtheOS/Info.cs index a17418e17..554b782b2 100644 --- a/Aaru.Filesystems/AtheOS/Info.cs +++ b/Aaru.Filesystems/AtheOS/Info.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class AtheOS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -60,14 +62,14 @@ public sealed partial class AtheOS if(errno != ErrorNumber.NoError) return false; - byte[] sbSector = new byte[AFS_SUPERBLOCK_SIZE]; + var sbSector = new byte[AFS_SUPERBLOCK_SIZE]; if(offset + AFS_SUPERBLOCK_SIZE > tmp.Length) return false; Array.Copy(tmp, offset, sbSector, 0, AFS_SUPERBLOCK_SIZE); - uint magic = BitConverter.ToUInt32(sbSector, 0x20); + var magic = BitConverter.ToUInt32(sbSector, 0x20); return magic == AFS_MAGIC1; } @@ -94,7 +96,7 @@ public sealed partial class AtheOS if(errno != ErrorNumber.NoError) return; - byte[] sbSector = new byte[AFS_SUPERBLOCK_SIZE]; + var sbSector = new byte[AFS_SUPERBLOCK_SIZE]; Array.Copy(tmp, offset, sbSector, 0, AFS_SUPERBLOCK_SIZE); SuperBlock afsSb = Marshal.ByteArrayToStructureLittleEndian(sbSector); @@ -104,7 +106,7 @@ public sealed partial class AtheOS if(afsSb.flags == 1) sb.AppendLine(Localization.Filesystem_is_read_only); - sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(afsSb.name, encoding)).AppendLine(); + sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(afsSb.name, encoding)).AppendLine(); sb.AppendFormat(Localization._0_bytes_per_block, afsSb.block_size).AppendLine(); sb.AppendFormat(Localization._0_blocks_in_volume_1_bytes, afsSb.num_blocks, @@ -128,19 +130,24 @@ public sealed partial class AtheOS afsSb.log_size, afsSb.log_valid_blocks).AppendLine(); sb. - AppendFormat(Localization.Root_folder_s_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, - afsSb.root_dir_start, afsSb.root_dir_ag, afsSb.root_dir_len, - afsSb.root_dir_len * afsSb.block_size).AppendLine(); + AppendFormat( + Localization. + Root_folder_s_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, + afsSb.root_dir_start, afsSb.root_dir_ag, afsSb.root_dir_len, + afsSb.root_dir_len * afsSb.block_size).AppendLine(); sb. - AppendFormat(Localization.Directory_containing_files_scheduled_for_deletion_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, - afsSb.deleted_start, afsSb.deleted_ag, afsSb.deleted_len, - afsSb.deleted_len * afsSb.block_size).AppendLine(); + AppendFormat( + Localization. + Directory_containing_files_scheduled_for_deletion_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, + afsSb.deleted_start, afsSb.deleted_ag, afsSb.deleted_len, + afsSb.deleted_len * afsSb.block_size).AppendLine(); sb. - AppendFormat(Localization.Indices_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, - afsSb.indices_start, afsSb.indices_ag, afsSb.indices_len, - afsSb.indices_len * afsSb.block_size).AppendLine(); + AppendFormat( + Localization.Indices_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, + afsSb.indices_start, afsSb.indices_ag, afsSb.indices_len, + afsSb.indices_len * afsSb.block_size).AppendLine(); sb.AppendFormat(Localization._0_blocks_for_bootloader_1_bytes, afsSb.boot_size, afsSb.boot_size * afsSb.block_size).AppendLine(); @@ -157,4 +164,6 @@ public sealed partial class AtheOS VolumeName = StringHandlers.CToString(afsSb.name, encoding) }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/AtheOS/Structs.cs b/Aaru.Filesystems/AtheOS/Structs.cs index 6dc4b4112..ddf59367f 100644 --- a/Aaru.Filesystems/AtheOS/Structs.cs +++ b/Aaru.Filesystems/AtheOS/Structs.cs @@ -36,6 +36,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class AtheOS { +#region Nested type: SuperBlock + /// Be superblock [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock @@ -102,4 +104,6 @@ public sealed partial class AtheOS /// 0x08C, Size of bootloader public readonly int boot_size; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/BFS/BFS.cs b/Aaru.Filesystems/BFS/BFS.cs index 252bc305d..733f9b8e8 100644 --- a/Aaru.Filesystems/BFS/BFS.cs +++ b/Aaru.Filesystems/BFS/BFS.cs @@ -38,10 +38,16 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class BeFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.BeFS_Name; + /// public Guid Id => new("dc8572b3-b6ad-46e4-8de9-cbe123ff6672"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/BFS/Info.cs b/Aaru.Filesystems/BFS/Info.cs index 7f8e85f4e..4b2ecad9d 100644 --- a/Aaru.Filesystems/BFS/Info.cs +++ b/Aaru.Filesystems/BFS/Info.cs @@ -43,6 +43,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class BeFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -54,8 +56,8 @@ public sealed partial class BeFS if(errno != ErrorNumber.NoError) return false; - uint magic = BitConverter.ToUInt32(sbSector, 0x20); - uint magicBe = BigEndianBitConverter.ToUInt32(sbSector, 0x20); + var magic = BitConverter.ToUInt32(sbSector, 0x20); + var magicBe = BigEndianBitConverter.ToUInt32(sbSector, 0x20); if(magic == BEFS_MAGIC1 || magicBe == BEFS_MAGIC1) @@ -138,7 +140,8 @@ public sealed partial class BeFS return; } - besb = littleEndian ? Marshal.ByteArrayToStructureLittleEndian(sbSector) + besb = littleEndian + ? Marshal.ByteArrayToStructureLittleEndian(sbSector) : Marshal.ByteArrayToStructureBigEndian(sbSector); sb.AppendLine(littleEndian ? Localization.Little_endian_BeFS : Localization.Big_endian_BeFS); @@ -152,8 +155,8 @@ public sealed partial class BeFS 1 << (int)besb.block_shift != besb.block_size) { sb.AppendLine(Localization.Superblock_seems_corrupt_following_information_may_be_incorrect); - sb.AppendFormat(Localization.Magic_one_0_Should_be_0x42465331, besb.magic1).AppendLine(); - sb.AppendFormat(Localization.Magic_two_0_Should_be_0xDD121031, besb.magic2).AppendLine(); + sb.AppendFormat(Localization.Magic_one_0_Should_be_0x42465331, besb.magic1).AppendLine(); + sb.AppendFormat(Localization.Magic_two_0_Should_be_0xDD121031, besb.magic2).AppendLine(); sb.AppendFormat(Localization.Magic_three_0_Should_be_0x15B6830E, besb.magic3).AppendLine(); sb.AppendFormat(Localization.Filesystem_endianness_0_Should_be_0x42494745, besb.fs_byte_order).AppendLine(); @@ -170,7 +173,8 @@ public sealed partial class BeFS switch(besb.flags) { case BEFS_CLEAN: - sb.AppendLine(besb.log_start == besb.log_end ? Localization.Filesystem_is_clean + sb.AppendLine(besb.log_start == besb.log_end + ? Localization.Filesystem_is_clean : Localization.Filesystem_is_dirty); break; @@ -184,7 +188,7 @@ public sealed partial class BeFS break; } - sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(besb.name, encoding)).AppendLine(); + sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(besb.name, encoding)).AppendLine(); sb.AppendFormat(Localization._0_bytes_per_block, besb.block_size).AppendLine(); sb.AppendFormat(Localization._0_blocks_in_volume_1_bytes, besb.num_blocks, besb.num_blocks * besb.block_size). @@ -208,13 +212,16 @@ public sealed partial class BeFS AppendLine(); sb. - AppendFormat(Localization.Root_folder_s_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, - besb.root_dir_start, besb.root_dir_ag, besb.root_dir_len, besb.root_dir_len * besb.block_size). + AppendFormat( + Localization. + Root_folder_s_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, + besb.root_dir_start, besb.root_dir_ag, besb.root_dir_len, besb.root_dir_len * besb.block_size). AppendLine(); sb. - AppendFormat(Localization.Indices_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, - besb.indices_start, besb.indices_ag, besb.indices_len, besb.indices_len * besb.block_size). + AppendFormat( + Localization.Indices_i_node_resides_in_block_0_of_allocation_group_1_and_runs_for_2_blocks_3_bytes, + besb.indices_start, besb.indices_ag, besb.indices_len, besb.indices_len * besb.block_size). AppendLine(); information = sb.ToString(); @@ -229,4 +236,6 @@ public sealed partial class BeFS VolumeName = StringHandlers.CToString(besb.name, encoding) }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/BFS/Structs.cs b/Aaru.Filesystems/BFS/Structs.cs index b25c63c1f..67ad5b8fb 100644 --- a/Aaru.Filesystems/BFS/Structs.cs +++ b/Aaru.Filesystems/BFS/Structs.cs @@ -37,6 +37,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class BeFS { +#region Nested type: SuperBlock + /// Be superblock [StructLayout(LayoutKind.Sequential, Pack = 1)] struct SuperBlock @@ -93,4 +95,6 @@ public sealed partial class BeFS /// 0x082, As this is part of inode_addr, this is 1 public readonly ushort indices_len; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/BTRFS/BTRFS.cs b/Aaru.Filesystems/BTRFS/BTRFS.cs index 7ca658a23..e524bff20 100644 --- a/Aaru.Filesystems/BTRFS/BTRFS.cs +++ b/Aaru.Filesystems/BTRFS/BTRFS.cs @@ -39,11 +39,18 @@ namespace Aaru.Filesystems; /// Implements detection of the b-tree filesystem (btrfs) public sealed partial class BTRFS : IFilesystem { + const string MODULE_NAME = "BTRFS Plugin"; + +#region IFilesystem Members + /// public string Name => Localization.BTRFS_Name; + /// public Guid Id => new("C904CF15-5222-446B-B7DB-02EAC5D781B3"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "BTRFS Plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/BTRFS/Info.cs b/Aaru.Filesystems/BTRFS/Info.cs index 9851c27d4..97ccbd8f7 100644 --- a/Aaru.Filesystems/BTRFS/Info.cs +++ b/Aaru.Filesystems/BTRFS/Info.cs @@ -44,6 +44,8 @@ namespace Aaru.Filesystems; /// Implements detection of the b-tree filesystem (btrfs) public sealed partial class BTRFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -72,10 +74,10 @@ public sealed partial class BTRFS return false; } - AaruConsole.DebugWriteLine(MODULE_NAME, "sbSectorOff = {0}", sbSectorOff); - AaruConsole.DebugWriteLine(MODULE_NAME, "sbSectorSize = {0}", sbSectorSize); + AaruConsole.DebugWriteLine(MODULE_NAME, "sbSectorOff = {0}", sbSectorOff); + AaruConsole.DebugWriteLine(MODULE_NAME, "sbSectorSize = {0}", sbSectorSize); AaruConsole.DebugWriteLine(MODULE_NAME, "partition.PartitionStartSector = {0}", partition.Start); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.magic = 0x{0:X16}", btrfsSb.magic); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.magic = 0x{0:X16}", btrfsSb.magic); return btrfsSb.magic == BTRFS_MAGIC; } @@ -98,39 +100,39 @@ public sealed partial class BTRFS SuperBlock btrfsSb = Marshal.ByteArrayToStructureLittleEndian(sector); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.checksum = {0}", btrfsSb.checksum); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.uuid = {0}", btrfsSb.uuid); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.pba = {0}", btrfsSb.pba); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.flags = {0}", btrfsSb.flags); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.magic = {0}", btrfsSb.magic); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.generation = {0}", btrfsSb.generation); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.root_lba = {0}", btrfsSb.root_lba); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.chunk_lba = {0}", btrfsSb.chunk_lba); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.log_lba = {0}", btrfsSb.log_lba); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.log_root_transid = {0}", btrfsSb.log_root_transid); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.total_bytes = {0}", btrfsSb.total_bytes); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.bytes_used = {0}", btrfsSb.bytes_used); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.checksum = {0}", btrfsSb.checksum); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.uuid = {0}", btrfsSb.uuid); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.pba = {0}", btrfsSb.pba); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.flags = {0}", btrfsSb.flags); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.magic = {0}", btrfsSb.magic); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.generation = {0}", btrfsSb.generation); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.root_lba = {0}", btrfsSb.root_lba); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.chunk_lba = {0}", btrfsSb.chunk_lba); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.log_lba = {0}", btrfsSb.log_lba); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.log_root_transid = {0}", btrfsSb.log_root_transid); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.total_bytes = {0}", btrfsSb.total_bytes); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.bytes_used = {0}", btrfsSb.bytes_used); AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.root_dir_objectid = {0}", btrfsSb.root_dir_objectid); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.num_devices = {0}", btrfsSb.num_devices); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.sectorsize = {0}", btrfsSb.sectorsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.nodesize = {0}", btrfsSb.nodesize); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.leafsize = {0}", btrfsSb.leafsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.stripesize = {0}", btrfsSb.stripesize); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.n = {0}", btrfsSb.n); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.num_devices = {0}", btrfsSb.num_devices); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.sectorsize = {0}", btrfsSb.sectorsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.nodesize = {0}", btrfsSb.nodesize); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.leafsize = {0}", btrfsSb.leafsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.stripesize = {0}", btrfsSb.stripesize); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.n = {0}", btrfsSb.n); AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.chunk_root_generation = {0}", btrfsSb.chunk_root_generation); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.compat_flags = 0x{0:X16}", btrfsSb.compat_flags); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.compat_flags = 0x{0:X16}", btrfsSb.compat_flags); AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.compat_ro_flags = 0x{0:X16}", btrfsSb.compat_ro_flags); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.incompat_flags = 0x{0:X16}", btrfsSb.incompat_flags); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.csum_type = {0}", btrfsSb.csum_type); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.root_level = {0}", btrfsSb.root_level); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.chunk_root_level = {0}", btrfsSb.chunk_root_level); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.log_root_level = {0}", btrfsSb.log_root_level); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.id = 0x{0:X16}", btrfsSb.dev_item.id); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.bytes = {0}", btrfsSb.dev_item.bytes); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.used = {0}", btrfsSb.dev_item.used); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.incompat_flags = 0x{0:X16}", btrfsSb.incompat_flags); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.csum_type = {0}", btrfsSb.csum_type); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.root_level = {0}", btrfsSb.root_level); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.chunk_root_level = {0}", btrfsSb.chunk_root_level); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.log_root_level = {0}", btrfsSb.log_root_level); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.id = 0x{0:X16}", btrfsSb.dev_item.id); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.bytes = {0}", btrfsSb.dev_item.bytes); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.used = {0}", btrfsSb.dev_item.used); AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.optimal_align = {0}", btrfsSb.dev_item.optimal_align); @@ -157,7 +159,7 @@ public sealed partial class BTRFS AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.device_uuid = {0}", btrfsSb.dev_item.device_uuid); AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.dev_item.uuid = {0}", btrfsSb.dev_item.uuid); - AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.label = {0}", btrfsSb.label); + AaruConsole.DebugWriteLine(MODULE_NAME, "btrfsSb.label = {0}", btrfsSb.label); sbInformation.AppendLine(Localization.B_tree_filesystem); sbInformation.AppendFormat(Localization.UUID_0, btrfsSb.uuid).AppendLine(); @@ -169,17 +171,17 @@ public sealed partial class BTRFS sbInformation.AppendFormat(Localization.Volume_has_0_bytes_spanned_in_1_devices, btrfsSb.total_bytes, btrfsSb.num_devices).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_bytes_used, btrfsSb.bytes_used).AppendLine(); - sbInformation.AppendFormat(Localization._0_bytes_sector, btrfsSb.sectorsize).AppendLine(); - sbInformation.AppendFormat(Localization._0_bytes_node, btrfsSb.nodesize).AppendLine(); - sbInformation.AppendFormat(Localization._0_bytes_leaf, btrfsSb.leafsize).AppendLine(); - sbInformation.AppendFormat(Localization._0_bytes_stripe, btrfsSb.stripesize).AppendLine(); - sbInformation.AppendFormat(Localization.Flags_0, btrfsSb.flags).AppendLine(); - sbInformation.AppendFormat(Localization.Compatible_flags_0, btrfsSb.compat_flags).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_bytes_used, btrfsSb.bytes_used).AppendLine(); + sbInformation.AppendFormat(Localization._0_bytes_sector, btrfsSb.sectorsize).AppendLine(); + sbInformation.AppendFormat(Localization._0_bytes_node, btrfsSb.nodesize).AppendLine(); + sbInformation.AppendFormat(Localization._0_bytes_leaf, btrfsSb.leafsize).AppendLine(); + sbInformation.AppendFormat(Localization._0_bytes_stripe, btrfsSb.stripesize).AppendLine(); + sbInformation.AppendFormat(Localization.Flags_0, btrfsSb.flags).AppendLine(); + sbInformation.AppendFormat(Localization.Compatible_flags_0, btrfsSb.compat_flags).AppendLine(); sbInformation.AppendFormat(Localization.Read_only_compatible_flags_0, btrfsSb.compat_ro_flags).AppendLine(); - sbInformation.AppendFormat(Localization.Incompatible_flags_0, btrfsSb.incompat_flags).AppendLine(); - sbInformation.AppendFormat(Localization.Device_UUID_0, btrfsSb.dev_item.uuid).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_label_0, btrfsSb.label).AppendLine(); + sbInformation.AppendFormat(Localization.Incompatible_flags_0, btrfsSb.incompat_flags).AppendLine(); + sbInformation.AppendFormat(Localization.Device_UUID_0, btrfsSb.dev_item.uuid).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_label_0, btrfsSb.label).AppendLine(); information = sbInformation.ToString(); @@ -193,6 +195,8 @@ public sealed partial class BTRFS Type = FS_TYPE }; - metadata.FreeClusters = metadata.Clusters - (btrfsSb.bytes_used / btrfsSb.sectorsize); + metadata.FreeClusters = metadata.Clusters - btrfsSb.bytes_used / btrfsSb.sectorsize; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/BTRFS/Structs.cs b/Aaru.Filesystems/BTRFS/Structs.cs index 9264c9001..4972d1ece 100644 --- a/Aaru.Filesystems/BTRFS/Structs.cs +++ b/Aaru.Filesystems/BTRFS/Structs.cs @@ -39,6 +39,31 @@ namespace Aaru.Filesystems; /// Implements detection of the b-tree filesystem (btrfs) public sealed partial class BTRFS { +#region Nested type: DevItem + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DevItem + { + public readonly ulong id; + public readonly ulong bytes; + public readonly ulong used; + public readonly uint optimal_align; + public readonly uint optimal_width; + public readonly uint minimal_size; + public readonly ulong type; + public readonly ulong generation; + public readonly ulong start_offset; + public readonly uint dev_group; + public readonly byte seek_speed; + public readonly byte bandwidth; + public readonly Guid device_uuid; + public readonly Guid uuid; + } + +#endregion + +#region Nested type: SuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock { @@ -81,22 +106,5 @@ public sealed partial class BTRFS public readonly byte[] unused; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DevItem - { - public readonly ulong id; - public readonly ulong bytes; - public readonly ulong used; - public readonly uint optimal_align; - public readonly uint optimal_width; - public readonly uint minimal_size; - public readonly ulong type; - public readonly ulong generation; - public readonly ulong start_offset; - public readonly uint dev_group; - public readonly byte seek_speed; - public readonly byte bandwidth; - public readonly Guid device_uuid; - public readonly Guid uuid; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CBM/CBM.cs b/Aaru.Filesystems/CBM/CBM.cs index 1fdb5ada1..f57e1fe61 100644 --- a/Aaru.Filesystems/CBM/CBM.cs +++ b/Aaru.Filesystems/CBM/CBM.cs @@ -35,10 +35,16 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem used in 8-bit Commodore microcomputers public sealed partial class CBM : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.CBM_Name; + /// public Guid Id => new("D104744E-A376-450C-BAC0-1347C93F983B"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CBM/Info.cs b/Aaru.Filesystems/CBM/Info.cs index 7938f21bd..ade10a172 100644 --- a/Aaru.Filesystems/CBM/Info.cs +++ b/Aaru.Filesystems/CBM/Info.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem used in 8-bit Commodore microcomputers public sealed partial class CBM { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -119,20 +121,16 @@ public sealed partial class CBM sbInformation.AppendFormat(Localization.Directory_starts_at_track_0_sector_1, cbmHdr.directoryTrack, cbmHdr.directorySector).AppendLine(); - sbInformation.AppendFormat(Localization.Disk_DOS_Version_0, Encoding.ASCII.GetString(new[] - { - cbmHdr.diskDosVersion - })).AppendLine(); + sbInformation.AppendFormat(Localization.Disk_DOS_Version_0, + Encoding.ASCII.GetString(new[] { cbmHdr.diskDosVersion })).AppendLine(); - sbInformation.AppendFormat(Localization.DOS_Version_0, Encoding.ASCII.GetString(new[] - { - cbmHdr.dosVersion - })).AppendLine(); + sbInformation. + AppendFormat(Localization.DOS_Version_0, Encoding.ASCII.GetString(new[] { cbmHdr.dosVersion })). + AppendLine(); - sbInformation.AppendFormat(Localization.Disk_Version_0, Encoding.ASCII.GetString(new[] - { - cbmHdr.diskVersion - })).AppendLine(); + sbInformation. + AppendFormat(Localization.Disk_Version_0, Encoding.ASCII.GetString(new[] { cbmHdr.diskVersion })). + AppendLine(); sbInformation.AppendFormat(Localization.Disk_ID_0, cbmHdr.diskId).AppendLine(); @@ -157,10 +155,9 @@ public sealed partial class CBM sbInformation.AppendFormat(Localization.Disk_DOS_type_0, Encoding.ASCII.GetString(BitConverter.GetBytes(cbmBam.dosType))).AppendLine(); - sbInformation.AppendFormat(Localization.DOS_Version_0, Encoding.ASCII.GetString(new[] - { - cbmBam.dosVersion - })).AppendLine(); + sbInformation. + AppendFormat(Localization.DOS_Version_0, Encoding.ASCII.GetString(new[] { cbmBam.dosVersion })). + AppendLine(); sbInformation.AppendFormat(Localization.Disk_ID_0, cbmBam.diskId).AppendLine(); @@ -173,4 +170,6 @@ public sealed partial class CBM information = sbInformation.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CBM/Structs.cs b/Aaru.Filesystems/CBM/Structs.cs index 7f145f9f9..d65c26645 100644 --- a/Aaru.Filesystems/CBM/Structs.cs +++ b/Aaru.Filesystems/CBM/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem used in 8-bit Commodore microcomputers public sealed partial class CBM { +#region Nested type: BAM + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BAM { @@ -77,6 +79,10 @@ public sealed partial class CBM public readonly byte[] freeCount; } +#endregion + +#region Nested type: Header + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Header { @@ -104,4 +110,6 @@ public sealed partial class CBM /// Filled with 0xA0 public readonly short fill3; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CPM/CPM.cs b/Aaru.Filesystems/CPM/CPM.cs index 072ffae3d..ba375dab5 100644 --- a/Aaru.Filesystems/CPM/CPM.cs +++ b/Aaru.Filesystems/CPM/CPM.cs @@ -43,6 +43,7 @@ namespace Aaru.Filesystems; /// Implements the CP/M filesystem public sealed partial class CPM : IReadOnlyFilesystem { + const string MODULE_NAME = "CP/M Plugin"; /// True if thinks this is a CP/M filesystem bool _cpmFound; @@ -82,12 +83,17 @@ public sealed partial class CPM : IReadOnlyFilesystem /// If thinks this is a CP/M filesystem, this is the definition for it CpmDefinition _workingDefinition; +#region IReadOnlyFilesystem Members + /// public FileSystem Metadata { get; private set; } + /// public string Name => Localization.CPM_Name; + /// public Guid Id => new("AA2B8585-41DF-4E3B-8A35-D1A935E2F8A1"); + /// public string Author => Authors.NataliaPortillo; @@ -98,5 +104,5 @@ public sealed partial class CPM : IReadOnlyFilesystem /// public Dictionary Namespaces => null; - const string MODULE_NAME = "CP/M Plugin"; +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CPM/Consts.cs b/Aaru.Filesystems/CPM/Consts.cs index 6b2babb9a..ea4cbde2c 100644 --- a/Aaru.Filesystems/CPM/Consts.cs +++ b/Aaru.Filesystems/CPM/Consts.cs @@ -39,6 +39,8 @@ public sealed partial class CPM // Do not translate const string FS_TYPE = "cpmfs"; +#region Nested type: FormatByte + /// Enumerates the format identification byte used by CP/M-86 enum FormatByte : byte { @@ -63,4 +65,6 @@ public sealed partial class CPM /// 3.5" double-density double-side 9 sectors/track k720Alt = 0x94 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CPM/Definitions.cs b/Aaru.Filesystems/CPM/Definitions.cs index 00cf798c8..30bcac224 100644 --- a/Aaru.Filesystems/CPM/Definitions.cs +++ b/Aaru.Filesystems/CPM/Definitions.cs @@ -50,8 +50,10 @@ public sealed partial class CPM { _definitions = JsonSerializer. - Deserialize(Assembly.GetExecutingAssembly().GetManifestResourceStream("Aaru.Filesystems.CPM.cpmdefs.json") ?? new MemoryStream(), - typeof(CpmDefinitions), CpmDefinitionsContext.Default) as CpmDefinitions; + Deserialize( + Assembly.GetExecutingAssembly(). + GetManifestResourceStream("Aaru.Filesystems.CPM.cpmdefs.json") ?? new MemoryStream(), + typeof(CpmDefinitions), CpmDefinitionsContext.Default) as CpmDefinitions; if(_definitions is null) return false; @@ -67,7 +69,7 @@ public sealed partial class CPM sectorIds = new int[def.sectorsPerTrack] }; - for(int i = 0; i < def.sectorsPerTrack; i++) + for(var i = 0; i < def.sectorsPerTrack; i++) def.side1.sectorIds[i] = i + 1; } @@ -82,7 +84,7 @@ public sealed partial class CPM sectorIds = new int[def.sectorsPerTrack] }; - for(int i = 0; i < def.sectorsPerTrack; i++) + for(var i = 0; i < def.sectorsPerTrack; i++) def.side2.sectorIds[i] = i + 1; } } diff --git a/Aaru.Filesystems/CPM/Dir.cs b/Aaru.Filesystems/CPM/Dir.cs index 9d3ef7ffc..2b1e38eb1 100644 --- a/Aaru.Filesystems/CPM/Dir.cs +++ b/Aaru.Filesystems/CPM/Dir.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; public sealed partial class CPM { +#region IReadOnlyFilesystem Members + /// public ErrorNumber OpenDir(string path, out IDirNode node) { @@ -96,6 +98,8 @@ public sealed partial class CPM return ErrorNumber.NoError; } +#endregion + /// /// Checks that the given directory blocks follow the CP/M filesystem directory specification Corrupted /// directories will fail. FAT directories will false positive if all files start with 0x05, and do not use full @@ -110,47 +114,56 @@ public sealed partial class CPM if(directory == null) return false; - int fileCount = 0; + var fileCount = 0; - for(int off = 0; off < directory.Length; off += 32) + for(var off = 0; off < directory.Length; off += 32) { DirectoryEntry entry = Marshal.ByteArrayToStructureLittleEndian(directory, off, 32); if((entry.statusUser & 0x7F) < 0x20) { - for(int f = 0; f < 8; f++) + for(var f = 0; f < 8; f++) + { if(entry.filename[f] < 0x20 && entry.filename[f] != 0x00) return false; + } - for(int e = 0; e < 3; e++) + for(var e = 0; e < 3; e++) + { if(entry.extension[e] < 0x20 && entry.extension[e] != 0x00) return false; + } if(!ArrayHelpers.ArrayIsNullOrWhiteSpace(entry.filename)) fileCount++; } else + { switch(entry.statusUser) { case 0x20: { - for(int f = 0; f < 8; f++) + for(var f = 0; f < 8; f++) + { if(entry.filename[f] < 0x20 && entry.filename[f] != 0x00) return false; + } - for(int e = 0; e < 3; e++) + for(var e = 0; e < 3; e++) + { if(entry.extension[e] < 0x20 && entry.extension[e] != 0x00) return false; + } _label = Encoding.ASCII.GetString(directory, off + 1, 11).Trim(); _labelCreationDate = new byte[4]; _labelUpdateDate = new byte[4]; Array.Copy(directory, off + 24, _labelCreationDate, 0, 4); - Array.Copy(directory, off + 28, _labelUpdateDate, 0, 4); + Array.Copy(directory, off + 28, _labelUpdateDate, 0, 4); break; } @@ -163,6 +176,7 @@ public sealed partial class CPM break; } + } } return fileCount > 0; diff --git a/Aaru.Filesystems/CPM/File.cs b/Aaru.Filesystems/CPM/File.cs index d496ab0af..570a1f40d 100644 --- a/Aaru.Filesystems/CPM/File.cs +++ b/Aaru.Filesystems/CPM/File.cs @@ -36,6 +36,8 @@ namespace Aaru.Filesystems; public sealed partial class CPM { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -44,10 +46,7 @@ public sealed partial class CPM if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -77,10 +76,7 @@ public sealed partial class CPM if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -156,18 +152,18 @@ public sealed partial class CPM if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; if(!string.IsNullOrEmpty(path) && string.Compare(path, "/", StringComparison.OrdinalIgnoreCase) != 0) - return _statCache.TryGetValue(pathElements[0].ToUpperInvariant(), out stat) ? ErrorNumber.NoError + { + return _statCache.TryGetValue(pathElements[0].ToUpperInvariant(), out stat) + ? ErrorNumber.NoError : ErrorNumber.NoSuchFile; + } stat = new FileEntryInfo { @@ -183,4 +179,6 @@ public sealed partial class CPM return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CPM/Info.cs b/Aaru.Filesystems/CPM/Info.cs index a0e108cd5..f064a9684 100644 --- a/Aaru.Filesystems/CPM/Info.cs +++ b/Aaru.Filesystems/CPM/Info.cs @@ -46,6 +46,8 @@ namespace Aaru.Filesystems; public sealed partial class CPM { +#region IReadOnlyFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -154,8 +156,10 @@ public sealed partial class CPM case MediaType.GENERIC_HDD: case MediaType.FlashDrive: case MediaType.MetaFloppy_Mod_I: - case MediaType.MetaFloppy_Mod_II: break; - default: return false; + case MediaType.MetaFloppy_Mod_II: + break; + default: + return false; } // This will try to identify a CP/M filesystem @@ -180,11 +184,11 @@ public sealed partial class CPM if(errno == ErrorNumber.NoError) { - int amsSbOffset = 0; + var amsSbOffset = 0; - uint sig1 = BitConverter.ToUInt32(sector, 0x2B); + var sig1 = BitConverter.ToUInt32(sector, 0x2B); uint sig2 = BitConverter.ToUInt32(sector, 0x33) & 0x00FFFFFF; - uint sig3 = BitConverter.ToUInt32(sector, 0x7C); + var sig3 = BitConverter.ToUInt32(sector, 0x7C); // PCW16 extended boot record if(sig1 == 0x4D2F5043 && @@ -197,13 +201,13 @@ public sealed partial class CPM Marshal.ByteArrayToStructureLittleEndian(sector, amsSbOffset, 16); // Check that format byte and sidedness indicate the same number of sizes - if((amsSb.format == 0 && (amsSb.sidedness & 0x02) == 0) || - (amsSb.format == 2 && (amsSb.sidedness & 0x02) == 1) || - (amsSb.format == 2 && (amsSb.sidedness & 0x02) == 2)) + if(amsSb.format == 0 && (amsSb.sidedness & 0x02) == 0 || + amsSb.format == 2 && (amsSb.sidedness & 0x02) == 1 || + amsSb.format == 2 && (amsSb.sidedness & 0x02) == 2) { // Calculate device limits - ulong sides = (ulong)(amsSb.format == 0 ? 1 : 2); - ulong sectorCount = (ulong)(amsSb.tps * amsSb.spt * (byte)sides); + var sides = (ulong)(amsSb.format == 0 ? 1 : 2); + var sectorCount = (ulong)(amsSb.tps * amsSb.spt * (byte)sides); sectorSize = (ulong)(128 << amsSb.psh); // Compare device limits from superblock to real limits @@ -221,7 +225,7 @@ public sealed partial class CPM bsh = amsSb.bsh }; - for(int i = 0; i < _dpb.bsh; i++) + for(var i = 0; i < _dpb.bsh; i++) _dpb.blm += (byte)Math.Pow(2, i); if(sectorCount >= 1440) @@ -240,11 +244,11 @@ public sealed partial class CPM _dpb.off = amsSb.off; _dpb.psh = amsSb.psh; - for(int i = 0; i < _dpb.psh; i++) + for(var i = 0; i < _dpb.psh; i++) _dpb.phm += (byte)Math.Pow(2, i); - _dpb.spt = (ushort)(amsSb.spt * (sectorSize / 128)); - uint directoryLength = (uint)(((ulong)_dpb.drm + 1) * 32 / sectorSize); + _dpb.spt = (ushort)(amsSb.spt * (sectorSize / 128)); + var directoryLength = (uint)(((ulong)_dpb.drm + 1) * 32 / sectorSize); imagePlugin.ReadSectors(firstDirectorySector + partition.Start, directoryLength, out directory); @@ -275,17 +279,17 @@ public sealed partial class CPM } }; - for(int si = 0; si < amsSb.spt; si++) + for(var si = 0; si < amsSb.spt; si++) _workingDefinition.side1.sectorIds[si] = si + 1; if(amsSb.format == 2) { _workingDefinition.order = (amsSb.sidedness & 0x02) switch - { - 1 => "SIDES", - 2 => "CYLINDERS", - _ => null - }; + { + 1 => "SIDES", + 2 => "CYLINDERS", + _ => null + }; _workingDefinition.side2 = new Side { @@ -293,7 +297,7 @@ public sealed partial class CPM sectorIds = new int[amsSb.spt] }; - for(int si = 0; si < amsSb.spt; si++) + for(var si = 0; si < amsSb.spt; si++) _workingDefinition.side2.sectorIds[si] = si + 1; } else @@ -319,7 +323,7 @@ public sealed partial class CPM ushort sum = 0; // Sum of all 16-bit words that make this sector must be 0 - for(int i = 0; i < sector.Length; i += 2) + for(var i = 0; i < sector.Length; i += 2) sum += BitConverter.ToUInt16(sector, i); // It may happen that there is a corrupted superblock @@ -331,10 +335,10 @@ public sealed partial class CPM // Calculate volume size sectorSize = (ulong)(hddSb.recordsPerSector * 128); - ulong sectorsInPartition = (ulong)(hddSb.cylinders * hddSb.heads * hddSb.sectorsPerTrack); + var sectorsInPartition = (ulong)(hddSb.cylinders * hddSb.heads * hddSb.sectorsPerTrack); - ulong startingSector = - (ulong)(((hddSb.firstCylinder * hddSb.heads) + hddSb.heads) * hddSb.sectorsPerTrack); + var startingSector = + (ulong)((hddSb.firstCylinder * hddSb.heads + hddSb.heads) * hddSb.sectorsPerTrack); // If volume size corresponds with working partition (this variant will be inside MBR partitioning) if(sectorSize == imagePlugin.Info.SectorSize && @@ -365,7 +369,7 @@ public sealed partial class CPM spt = hddSb.spt }; - uint directoryLength = (uint)(((ulong)_dpb.drm + 1) * 32 / sectorSize); + var directoryLength = (uint)(((ulong)_dpb.drm + 1) * 32 / sectorSize); imagePlugin.ReadSectors(firstDirectorySector + partition.Start, directoryLength, out directory); @@ -406,10 +410,10 @@ public sealed partial class CPM sofs = 0 }; - for(int si = 0; si < hddSb.sectorsPerTrack; si++) + for(var si = 0; si < hddSb.sectorsPerTrack; si++) _workingDefinition.side1.sectorIds[si] = si + 1; - for(int si = 0; si < hddSb.spt; si++) + for(var si = 0; si < hddSb.spt; si++) _workingDefinition.side2.sectorIds[si] = si + 1; } } @@ -429,11 +433,13 @@ public sealed partial class CPM // Check for alternate location of format ID if(sector.Last() == 0x00 || sector.Last() == 0xFF) + { if(sector[0x40] == 0x94 || sector[0x40] == 0x26) formatByte = sector[0x40]; else formatByte = sector.Last(); + } else formatByte = sector.Last(); @@ -495,7 +501,7 @@ public sealed partial class CPM sofs = 0 }; - for(int si = 0; si < 8; si++) + for(var si = 0; si < 8; si++) _workingDefinition.side1.sectorIds[si] = si + 1; } @@ -555,10 +561,10 @@ public sealed partial class CPM sofs = 0 }; - for(int si = 0; si < 8; si++) + for(var si = 0; si < 8; si++) _workingDefinition.side1.sectorIds[si] = si + 1; - for(int si = 0; si < 8; si++) + for(var si = 0; si < 8; si++) _workingDefinition.side2.sectorIds[si] = si + 1; } @@ -620,10 +626,10 @@ public sealed partial class CPM sofs = 0 }; - for(int si = 0; si < 9; si++) + for(var si = 0; si < 9; si++) _workingDefinition.side1.sectorIds[si] = si + 1; - for(int si = 0; si < 9; si++) + for(var si = 0; si < 9; si++) _workingDefinition.side2.sectorIds[si] = si + 1; } @@ -684,10 +690,10 @@ public sealed partial class CPM sofs = 0 }; - for(int si = 0; si < 9; si++) + for(var si = 0; si < 9; si++) _workingDefinition.side1.sectorIds[si] = si + 1; - for(int si = 0; si < 9; si++) + for(var si = 0; si < 9; si++) _workingDefinition.side2.sectorIds[si] = si + 1; } @@ -747,10 +753,10 @@ public sealed partial class CPM sofs = 0 }; - for(int si = 0; si < 9; si++) + for(var si = 0; si < 9; si++) _workingDefinition.side1.sectorIds[si] = si + 1; - for(int si = 0; si < 9; si++) + for(var si = 0; si < 9; si++) _workingDefinition.side2.sectorIds[si] = si + 1; } @@ -810,10 +816,10 @@ public sealed partial class CPM sofs = 0 }; - for(int si = 0; si < 15; si++) + for(var si = 0; si < 15; si++) _workingDefinition.side1.sectorIds[si] = si + 1; - for(int si = 0; si < 15; si++) + for(var si = 0; si < 15; si++) _workingDefinition.side2.sectorIds[si] = si + 1; } @@ -873,10 +879,10 @@ public sealed partial class CPM sofs = 0 }; - for(int si = 0; si < 18; si++) + for(var si = 0; si < 18; si++) _workingDefinition.side1.sectorIds[si] = si + 1; - for(int si = 0; si < 18; si++) + for(var si = 0; si < 18; si++) _workingDefinition.side2.sectorIds[si] = si + 1; } @@ -885,7 +891,7 @@ public sealed partial class CPM if(_cpmFound) { - uint directoryLength = (uint)(((ulong)_dpb.drm + 1) * 32 / imagePlugin.Info.SectorSize); + var directoryLength = (uint)(((ulong)_dpb.drm + 1) * 32 / imagePlugin.Info.SectorSize); imagePlugin.ReadSectors(firstDirectorySector86 + partition.Start, directoryLength, out directory); @@ -920,10 +926,12 @@ public sealed partial class CPM { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Trying_all_known_definitions); - foreach(CpmDefinition def in from def in _definitions.definitions let sectors = + foreach(CpmDefinition def in from def in _definitions.definitions + let sectors = (ulong)(def.cylinders * def.sides * def.sectorsPerTrack) where sectors == imagePlugin.Info.Sectors && - def.bytesPerSector == imagePlugin.Info.SectorSize select def) + def.bytesPerSector == imagePlugin.Info.SectorSize + select def) { // Definition seems to describe current disk, at least, same number of volume sectors and bytes per sector AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Trying_definition_0, def.comment); @@ -940,7 +948,7 @@ public sealed partial class CPM { _sectorMask = new int[def.side1.sectorIds.Length]; - for(int m = 0; m < _sectorMask.Length; m++) + for(var m = 0; m < _sectorMask.Length; m++) _sectorMask[m] = def.side1.sectorIds[m] - def.side1.sectorIds[0]; } else @@ -950,27 +958,31 @@ public sealed partial class CPM { _sectorMask = new int[def.side1.sectorIds.Length + def.side2.sectorIds.Length]; - for(int m = 0; m < def.side1.sectorIds.Length; m++) + for(var m = 0; m < def.side1.sectorIds.Length; m++) _sectorMask[m] = def.side1.sectorIds[m] - def.side1.sectorIds[0]; // Skip first track (first side) - for(int m = 0; m < def.side2.sectorIds.Length; m++) + for(var m = 0; m < def.side2.sectorIds.Length; m++) + { _sectorMask[m + def.side1.sectorIds.Length] = def.side2.sectorIds[m] - def.side2.sectorIds[0] + def.side1.sectorIds.Length; + } } // Head changes after whole side else if(string.Compare(def.order, "CYLINDERS", StringComparison.InvariantCultureIgnoreCase) == 0) { - for(int m = 0; m < def.side1.sectorIds.Length; m++) + for(var m = 0; m < def.side1.sectorIds.Length; m++) _sectorMask[m] = def.side1.sectorIds[m] - def.side1.sectorIds[0]; // Skip first track (first side) and first track (second side) - for(int m = 0; m < def.side1.sectorIds.Length; m++) + for(var m = 0; m < def.side1.sectorIds.Length; m++) + { _sectorMask[m + def.side1.sectorIds.Length] = def.side1.sectorIds[m] - def.side1.sectorIds[0] + def.side1.sectorIds.Length + def.side2.sectorIds.Length; + } } // TODO: Implement COLUMBIA ordering @@ -1008,12 +1020,15 @@ public sealed partial class CPM // Read the directory marked by this definition var ms = new MemoryStream(); - for(int p = 0; p < dirLen; p++) + for(var p = 0; p < dirLen; p++) { errno = imagePlugin. - ReadSector((ulong)((int)offset + (int)partition.Start + (p / _sectorMask.Length * _sectorMask.Length) + _sectorMask[p % _sectorMask.Length]), - out byte[] dirSector); + ReadSector( + (ulong)((int)offset + (int)partition.Start + + p / _sectorMask.Length * _sectorMask.Length + + _sectorMask[p % _sectorMask.Length]), + out byte[] dirSector); if(errno != ErrorNumber.NoError) break; @@ -1024,14 +1039,18 @@ public sealed partial class CPM directory = ms.ToArray(); if(def.evenOdd) + { AaruConsole.DebugWriteLine(MODULE_NAME, Localization. Definition_contains_EVEN_ODD_field_with_unknown_meaning_detection_may_be_wrong); + } // Complement of the directory bytes if needed if(def.complement) - for(int b = 0; b < directory.Length; b++) + { + for(var b = 0; b < directory.Length; b++) directory[b] = (byte)(~directory[b] & 0xFF); + } // Check the directory if(CheckDir(directory)) @@ -1160,17 +1179,21 @@ public sealed partial class CPM sb.AppendFormat(Localization.Volume_block_is_0_bytes, 128 << _dpb.bsh).AppendLine(); if(_dpb.dsm > 0) + { sb.AppendFormat(Localization.Volume_contains_0_blocks_1_bytes, _dpb.dsm, _dpb.dsm * (128 << _dpb.bsh)). AppendLine(); + } sb.AppendFormat(Localization.Volume_contains_0_directory_entries, _dpb.drm + 1).AppendLine(); if(_workingDefinition.sofs > 0) sb.AppendFormat(Localization.Volume_reserves_0_sectors_for_system, _workingDefinition.sofs).AppendLine(); else + { sb.AppendFormat(Localization.Volume_reserves_1_tracks_0_sectors_for_system, _workingDefinition.ofs * _workingDefinition.sectorsPerTrack, _workingDefinition.ofs). AppendLine(); + } if(_workingDefinition.side1.sectorIds.Length >= 2) { @@ -1187,8 +1210,10 @@ public sealed partial class CPM int interleaveSide2 = _workingDefinition.side2.sectorIds[1] - _workingDefinition.side2.sectorIds[0]; if(interleaveSide2 > 1) + { sb.AppendFormat(Localization.Side_one_uses_0_one_software_interleaving, interleaveSide2). AppendLine(); + } } switch(_workingDefinition.order) @@ -1213,11 +1238,15 @@ public sealed partial class CPM sb.AppendFormat(Localization.Device_uses_0_one_hardware_interleaving, _workingDefinition.skew).AppendLine(); if(_workingDefinition.sofs > 0) + { sb.AppendLine($"BSH {_dpb.bsh} BLM {_dpb.blm} EXM {_dpb.exm} DSM {_dpb.dsm} DRM {_dpb.drm} AL0 {_dpb.al0 :X2}H AL1 {_dpb.al1:X2}H SOFS {_workingDefinition.sofs}"); + } else + { sb.AppendLine($"BSH {_dpb.bsh} BLM {_dpb.blm} EXM {_dpb.exm} DSM {_dpb.dsm} DRM {_dpb.drm} AL0 {_dpb.al0 :X2}H AL1 {_dpb.al1:X2}H OFS {_workingDefinition.ofs}"); + } if(_label != null) sb.AppendFormat(Localization.Volume_label_0, _label).AppendLine(); @@ -1229,12 +1258,16 @@ public sealed partial class CPM sb.AppendLine(Localization.Volume_uses_third_party_timestamps); if(_labelCreationDate != null) + { sb.AppendFormat(Localization.Volume_created_on_0, DateHandlers.CpmToDateTime(_labelCreationDate)). AppendLine(); + } if(_labelUpdateDate != null) + { sb.AppendFormat(Localization.Volume_updated_on_0, DateHandlers.CpmToDateTime(_labelUpdateDate)). AppendLine(); + } metadata = new FileSystem(); metadata.Bootable |= _workingDefinition.sofs > 0 || _workingDefinition.ofs > 0; @@ -1246,18 +1279,16 @@ public sealed partial class CPM metadata.Clusters = partition.End - partition.Start; if(_labelCreationDate != null) - { metadata.CreationDate = DateHandlers.CpmToDateTime(_labelCreationDate); - } if(_labelUpdateDate != null) - { metadata.ModificationDate = DateHandlers.CpmToDateTime(_labelUpdateDate); - } metadata.Type = FS_TYPE; metadata.VolumeName = _label; information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CPM/Structs.cs b/Aaru.Filesystems/CPM/Structs.cs index 109ba4048..9e3ff4aa8 100644 --- a/Aaru.Filesystems/CPM/Structs.cs +++ b/Aaru.Filesystems/CPM/Structs.cs @@ -40,35 +40,7 @@ namespace Aaru.Filesystems; public sealed partial class CPM { - /// Most of the times this structure is hard wired or generated by CP/M, not stored on disk - [SuppressMessage("ReSharper", "InconsistentNaming")] - sealed class DiscParameterBlock - { - /// First byte of allocation bitmap - public byte al0; - /// Second byte of allocation bitmap - public byte al1; - /// Block mask - public byte blm; - /// Block shift - public byte bsh; - /// Checksum vector size - public ushort cks; - /// Directory entries - 1 - public ushort drm; - /// Blocks on disk - 1 - public ushort dsm; - /// Extent mask - public byte exm; - /// Reserved tracks - public ushort off; - /// Physical sector mask - public byte phm; - /// Physical sector shift - public byte psh; - /// Sectors per track - public ushort spt; - } +#region Nested type: AmstradSuperBlock /// Amstrad superblock, for PCW [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -108,6 +80,186 @@ public sealed partial class CPM public readonly byte fiddle; } +#endregion + +#region Nested type: CpmDirNode + + sealed class CpmDirNode : IDirNode + { + internal string[] _contents; + internal int _position; + + #region IDirNode Members + + /// + public string Path { get; init; } + + #endregion + } + +#endregion + +#region Nested type: CpmFileNode + + sealed class CpmFileNode : IFileNode + { + internal byte[] _cache; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: DateEntry + + /// CP/M 3 timestamp entry + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DateEntry + { + /// Must be 0x21 + public readonly byte signature; + /// File 1 create/access timestamp + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] date1; + /// File 1 modification timestamp + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] date2; + /// File 1 password mode + public readonly byte mode1; + public readonly byte zero1; + /// File 2 create/access timestamp + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] date3; + /// File 2 modification timestamp + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] date4; + /// File 2 password mode + public readonly byte mode2; + public readonly byte zero2; + /// File 3 create/access timestamp + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] date5; + /// File 3 modification timestamp + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] date6; + /// File 3 password mode + public readonly byte mode3; + public readonly ushort zero3; + } + +#endregion + +#region Nested type: DirectoryEntry + + /// Directory entry for <256 allocation blocks + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryEntry + { + /// User number. Bit 7 set in CP/M 1 means hidden + public readonly byte statusUser; + /// Filename and bit 7 as flags + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] filename; + /// Extension and bit 7 as flags + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] extension; + /// Low byte of extent number + public readonly byte extentCounter; + /// + /// Last record bytes. In some implementations it means how many bytes are used in the last record, in others how + /// many bytes are free. It always refer to 128 byte records even if blocks are way bigger, so it's mostly useless. + /// + public readonly byte lastRecordBytes; + /// High byte of extent number + public readonly byte extentCounterHigh; + /// How many records are used in this entry. 0x80 if all are used. + public readonly byte records; + /// Allocation blocks + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] + public readonly byte[] allocations; + } + +#endregion + +#region Nested type: DirectoryEntry16 + + /// Directory entry for >256 allocation blocks + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryEntry16 + { + /// User number. Bit 7 set in CP/M 1 means hidden + public readonly byte statusUser; + /// Filename and bit 7 as flags + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] filename; + /// Extension and bit 7 as flags + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] extension; + /// Low byte of extent number + public readonly byte extentCounter; + /// + /// Last record bytes. In some implementations it means how many bytes are used in the last record, in others how + /// many bytes are free. It always refer to 128 byte records even if blocks are way bigger, so it's mostly useless. + /// + public readonly byte lastRecordBytes; + /// High byte of extent number + public readonly byte extentCounterHigh; + /// How many records are used in this entry. 0x80 if all are used. + public readonly byte records; + /// Allocation blocks + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly ushort[] allocations; + } + +#endregion + +#region Nested type: DiscParameterBlock + + /// Most of the times this structure is hard wired or generated by CP/M, not stored on disk + [SuppressMessage("ReSharper", "InconsistentNaming")] + sealed class DiscParameterBlock + { + /// First byte of allocation bitmap + public byte al0; + /// Second byte of allocation bitmap + public byte al1; + /// Block mask + public byte blm; + /// Block shift + public byte bsh; + /// Checksum vector size + public ushort cks; + /// Directory entries - 1 + public ushort drm; + /// Blocks on disk - 1 + public ushort dsm; + /// Extent mask + public byte exm; + /// Reserved tracks + public ushort off; + /// Physical sector mask + public byte phm; + /// Physical sector shift + public byte psh; + /// Sectors per track + public ushort spt; + } + +#endregion + +#region Nested type: HardDiskSuperBlock + /// Superblock found on CP/M-86 hard disk volumes [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct HardDiskSuperBlock @@ -187,6 +339,10 @@ public sealed partial class CPM public readonly ushort firstSub; } +#endregion + +#region Nested type: LabelEntry + /// Volume label entry [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct LabelEntry @@ -216,40 +372,9 @@ public sealed partial class CPM public readonly byte[] mtime; } - /// CP/M 3 timestamp entry - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DateEntry - { - /// Must be 0x21 - public readonly byte signature; - /// File 1 create/access timestamp - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] date1; - /// File 1 modification timestamp - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] date2; - /// File 1 password mode - public readonly byte mode1; - public readonly byte zero1; - /// File 2 create/access timestamp - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] date3; - /// File 2 modification timestamp - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] date4; - /// File 2 password mode - public readonly byte mode2; - public readonly byte zero2; - /// File 3 create/access timestamp - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] date5; - /// File 3 modification timestamp - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] date6; - /// File 3 password mode - public readonly byte mode3; - public readonly ushort zero3; - } +#endregion + +#region Nested type: PasswordEntry /// Password entry [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -276,6 +401,10 @@ public sealed partial class CPM public readonly byte[] reserved2; } +#endregion + +#region Nested type: TrdPartyDateEntry + /// Timestamp for Z80DOS or DOS+ [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct TrdPartyDateEntry @@ -312,78 +441,5 @@ public sealed partial class CPM public readonly byte[] access3; } - /// Directory entry for <256 allocation blocks - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryEntry - { - /// User number. Bit 7 set in CP/M 1 means hidden - public readonly byte statusUser; - /// Filename and bit 7 as flags - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] filename; - /// Extension and bit 7 as flags - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] extension; - /// Low byte of extent number - public readonly byte extentCounter; - /// - /// Last record bytes. In some implementations it means how many bytes are used in the last record, in others how - /// many bytes are free. It always refer to 128 byte records even if blocks are way bigger, so it's mostly useless. - /// - public readonly byte lastRecordBytes; - /// High byte of extent number - public readonly byte extentCounterHigh; - /// How many records are used in this entry. 0x80 if all are used. - public readonly byte records; - /// Allocation blocks - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] - public readonly byte[] allocations; - } - - /// Directory entry for >256 allocation blocks - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryEntry16 - { - /// User number. Bit 7 set in CP/M 1 means hidden - public readonly byte statusUser; - /// Filename and bit 7 as flags - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] filename; - /// Extension and bit 7 as flags - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] extension; - /// Low byte of extent number - public readonly byte extentCounter; - /// - /// Last record bytes. In some implementations it means how many bytes are used in the last record, in others how - /// many bytes are free. It always refer to 128 byte records even if blocks are way bigger, so it's mostly useless. - /// - public readonly byte lastRecordBytes; - /// High byte of extent number - public readonly byte extentCounterHigh; - /// How many records are used in this entry. 0x80 if all are used. - public readonly byte records; - /// Allocation blocks - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly ushort[] allocations; - } - - sealed class CpmFileNode : IFileNode - { - internal byte[] _cache; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } - - sealed class CpmDirNode : IDirNode - { - internal string[] _contents; - internal int _position; - /// - public string Path { get; init; } - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CPM/Super.cs b/Aaru.Filesystems/CPM/Super.cs index ec16a0cf6..9a462e390 100644 --- a/Aaru.Filesystems/CPM/Super.cs +++ b/Aaru.Filesystems/CPM/Super.cs @@ -51,9 +51,11 @@ namespace Aaru.Filesystems; public sealed partial class CPM { +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { _device = imagePlugin; _encoding = encoding ?? Encoding.GetEncoding("IBM437"); @@ -70,7 +72,7 @@ public sealed partial class CPM { _sectorMask = new int[_workingDefinition.side1.sectorIds.Length]; - for(int m = 0; m < _sectorMask.Length; m++) + for(var m = 0; m < _sectorMask.Length; m++) _sectorMask[m] = _workingDefinition.side1.sectorIds[m] - _workingDefinition.side1.sectorIds[0]; } else @@ -81,28 +83,32 @@ public sealed partial class CPM _sectorMask = new int[_workingDefinition.side1.sectorIds.Length + _workingDefinition.side2.sectorIds.Length]; - for(int m = 0; m < _workingDefinition.side1.sectorIds.Length; m++) + for(var m = 0; m < _workingDefinition.side1.sectorIds.Length; m++) _sectorMask[m] = _workingDefinition.side1.sectorIds[m] - _workingDefinition.side1.sectorIds[0]; // Skip first track (first side) - for(int m = 0; m < _workingDefinition.side2.sectorIds.Length; m++) + for(var m = 0; m < _workingDefinition.side2.sectorIds.Length; m++) + { _sectorMask[m + _workingDefinition.side1.sectorIds.Length] = _workingDefinition.side2.sectorIds[m] - _workingDefinition.side2.sectorIds[0] + _workingDefinition.side1.sectorIds.Length; + } } // Head changes after whole side else if(string.Compare(_workingDefinition.order, "CYLINDERS", StringComparison.InvariantCultureIgnoreCase) == 0) { - for(int m = 0; m < _workingDefinition.side1.sectorIds.Length; m++) + for(var m = 0; m < _workingDefinition.side1.sectorIds.Length; m++) _sectorMask[m] = _workingDefinition.side1.sectorIds[m] - _workingDefinition.side1.sectorIds[0]; // Skip first track (first side) and first track (second side) - for(int m = 0; m < _workingDefinition.side1.sectorIds.Length; m++) + for(var m = 0; m < _workingDefinition.side1.sectorIds.Length; m++) + { _sectorMask[m + _workingDefinition.side1.sectorIds.Length] = _workingDefinition.side1.sectorIds[m] - _workingDefinition.side1.sectorIds[0] + _workingDefinition.side1.sectorIds.Length + _workingDefinition.side2.sectorIds.Length; + } // TODO: Implement CYLINDERS ordering AaruConsole.DebugWriteLine(MODULE_NAME, Localization.CYLINDERS_ordering_not_yet_implemented); @@ -148,18 +154,22 @@ public sealed partial class CPM { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Deinterleaving_whole_volume); - for(int p = 0; p <= (int)(partition.End - partition.Start); p++) + for(var p = 0; p <= (int)(partition.End - partition.Start); p++) { ErrorNumber errno = - _device.ReadSector((ulong)((int)partition.Start + (p / _sectorMask.Length * _sectorMask.Length) + _sectorMask[p % _sectorMask.Length]), - out byte[] readSector); + _device.ReadSector( + (ulong)((int)partition.Start + p / _sectorMask.Length * _sectorMask.Length + + _sectorMask[p % _sectorMask.Length]), + out byte[] readSector); if(errno != ErrorNumber.NoError) return errno; if(_workingDefinition.complement) - for(int b = 0; b < readSector.Length; b++) + { + for(var b = 0; b < readSector.Length; b++) readSector[b] = (byte)(~readSector[b] & 0xFF); + } deinterleavedSectors.Add((ulong)p, readSector); } @@ -168,7 +178,7 @@ public sealed partial class CPM int blockSize = 128 << _dpb.bsh; var blockMs = new MemoryStream(); ulong blockNo = 0; - int sectorsPerBlock = 0; + var sectorsPerBlock = 0; Dictionary allocationBlocks = new(); AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Creating_allocation_blocks); @@ -180,12 +190,14 @@ public sealed partial class CPM // May it happen? Just in case, CP/M blocks are smaller than physical sectors if(sector.Length > blockSize) - for(int i = 0; i < sector.Length / blockSize; i++) + { + for(var i = 0; i < sector.Length / blockSize; i++) { - byte[] tmp = new byte[blockSize]; + var tmp = new byte[blockSize]; Array.Copy(sector, blockSize * i, tmp, 0, blockSize); allocationBlocks.Add(blockNo++, tmp); } + } // CP/M blocks are larger than physical sectors else if(sector.Length < blockSize) @@ -219,7 +231,7 @@ public sealed partial class CPM // Read the whole directory blocks var dirMs = new MemoryStream(); - for(int d = 0; d < dirSectors; d++) + for(var d = 0; d < dirSectors; d++) { deinterleavedSectors.TryGetValue((ulong)(d + dirOff), out byte[] sector); dirMs.Write(sector, 0, sector.Length); @@ -230,7 +242,7 @@ public sealed partial class CPM if(directory == null) return ErrorNumber.InvalidArgument; - int dirCnt = 0; + var dirCnt = 0; string file1 = null; string file2 = null; string file3 = null; @@ -239,7 +251,7 @@ public sealed partial class CPM _statCache = new Dictionary(); _cpmStat = new FileSystemInfo(); - bool atime = false; + var atime = false; _dirList = new List(); _labelCreationDate = null; _labelUpdateDate = null; @@ -248,8 +260,9 @@ public sealed partial class CPM AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Traversing_directory); // For each directory entry - for(int dOff = 0; dOff < directory.Length; dOff += 32) + for(var dOff = 0; dOff < directory.Length; dOff += 32) + { switch(directory[dOff] & 0x7F) { // Describes a file (does not support PDOS entries with user >= 16, because they're identical to password entries @@ -265,15 +278,15 @@ public sealed partial class CPM //bool backed = (entry.filename[3] & 0x80) == 0x80 || (entry.extension[3] & 0x80) == 0x80; int user = entry.statusUser & 0x0F; - bool validEntry = true; + var validEntry = true; - for(int i = 0; i < 8; i++) + for(var i = 0; i < 8; i++) { entry.filename[i] &= 0x7F; validEntry &= entry.filename[i] >= 0x20; } - for(int i = 0; i < 3; i++) + for(var i = 0; i < 3; i++) { entry.extension[i] &= 0x7F; validEntry &= entry.extension[i] >= 0x20; @@ -294,16 +307,18 @@ public sealed partial class CPM filename = filename.Replace('/', '\u2215'); - int entryNo = ((32 * entry.extentCounter) + entry.extentCounterHigh) / (_dpb.exm + 1); + int entryNo = (32 * entry.extentCounter + entry.extentCounterHigh) / (_dpb.exm + 1); // Do we have a stat for the file already? if(_statCache.TryGetValue(filename, out FileEntryInfo fInfo)) _statCache.Remove(filename); else + { fInfo = new FileEntryInfo { Attributes = new FileAttributes() }; + } // And any extent? if(fileExtents.TryGetValue(filename, out Dictionary> extentBlocks)) @@ -378,15 +393,15 @@ public sealed partial class CPM //bool backed = (entry.filename[3] & 0x80) == 0x80 || (entry.extension[3] & 0x80) == 0x80; int user = entry.statusUser & 0x0F; - bool validEntry = true; + var validEntry = true; - for(int i = 0; i < 8; i++) + for(var i = 0; i < 8; i++) { entry.filename[i] &= 0x7F; validEntry &= entry.filename[i] >= 0x20; } - for(int i = 0; i < 3; i++) + for(var i = 0; i < 3; i++) { entry.extension[i] &= 0x7F; validEntry &= entry.extension[i] >= 0x20; @@ -407,16 +422,18 @@ public sealed partial class CPM filename = filename.Replace('/', '\u2215'); - int entryNo = ((32 * entry.extentCounterHigh) + entry.extentCounter) / (_dpb.exm + 1); + int entryNo = (32 * entry.extentCounterHigh + entry.extentCounter) / (_dpb.exm + 1); // Do we have a stat for the file already? if(_statCache.TryGetValue(filename, out FileEntryInfo fInfo)) _statCache.Remove(filename); else + { fInfo = new FileEntryInfo { Attributes = new FileAttributes() }; + } // And any extent? if(fileExtents.TryGetValue(filename, out Dictionary> extentBlocks)) @@ -487,10 +504,10 @@ public sealed partial class CPM int user = entry.userNumber & 0x0F; - for(int i = 0; i < 8; i++) + for(var i = 0; i < 8; i++) entry.filename[i] &= 0x7F; - for(int i = 0; i < 3; i++) + for(var i = 0; i < 3; i++) entry.extension[i] &= 0x7F; string filename = Encoding.ASCII.GetString(entry.filename).Trim(); @@ -510,7 +527,7 @@ public sealed partial class CPM _passwordCache.Remove(filename); // Copy whole password entry - byte[] tmp = new byte[32]; + var tmp = new byte[32]; Array.Copy(directory, dOff, tmp, 0, 32); _passwordCache.Add(filename, tmp); @@ -552,7 +569,7 @@ public sealed partial class CPM _labelCreationDate = new byte[4]; _labelUpdateDate = new byte[4]; Array.Copy(directory, dOff + 24, _labelCreationDate, 0, 4); - Array.Copy(directory, dOff + 28, _labelUpdateDate, 0, 4); + Array.Copy(directory, dOff + 28, _labelUpdateDate, 0, 4); // Count entries 3 by 3 for timestamps switch(dirCnt % 3) @@ -659,7 +676,7 @@ public sealed partial class CPM else fInfo = new FileEntryInfo(); - byte[] ctime = new byte[4]; + var ctime = new byte[4]; ctime[0] = trdPartyDateEntry.create1[0]; ctime[1] = trdPartyDateEntry.create1[1]; @@ -677,7 +694,7 @@ public sealed partial class CPM else fInfo = new FileEntryInfo(); - byte[] ctime = new byte[4]; + var ctime = new byte[4]; ctime[0] = trdPartyDateEntry.create2[0]; ctime[1] = trdPartyDateEntry.create2[1]; @@ -695,7 +712,7 @@ public sealed partial class CPM else fInfo = new FileEntryInfo(); - byte[] ctime = new byte[4]; + var ctime = new byte[4]; ctime[0] = trdPartyDateEntry.create3[0]; ctime[1] = trdPartyDateEntry.create3[1]; @@ -717,6 +734,7 @@ public sealed partial class CPM break; } + } // Cache all files. As CP/M maximum volume size is 8 Mib // this should not be a problem @@ -734,7 +752,8 @@ public sealed partial class CPM fInfo.Blocks = 0; if(fileExtents.TryGetValue(filename, out Dictionary> extents)) - for(int ex = 0; ex < extents.Count; ex++) + { + for(var ex = 0; ex < extents.Count; ex++) { if(!extents.TryGetValue(ex, out List alBlks)) continue; @@ -746,6 +765,7 @@ public sealed partial class CPM fInfo.Blocks++; } } + } // If you insist to call CP/M "extent based" fInfo.Attributes |= FileAttributes.Extents; @@ -762,16 +782,18 @@ public sealed partial class CPM // For each stored password, store a decoded version of it if(_passwordCache.Count > 0) + { foreach(KeyValuePair kvp in _passwordCache) { - byte[] tmp = new byte[8]; + var tmp = new byte[8]; Array.Copy(kvp.Value, 16, tmp, 0, 8); - for(int t = 0; t < 8; t++) + for(var t = 0; t < 8; t++) tmp[t] ^= kvp.Value[13]; _decodedPasswordCache.Add(kvp.Key, tmp); } + } // Generate statfs. _cpmStat.Blocks = (ulong)(_dpb.dsm + 1); @@ -792,14 +814,10 @@ public sealed partial class CPM }; if(_labelCreationDate != null) - { Metadata.CreationDate = DateHandlers.CpmToDateTime(_labelCreationDate); - } if(_labelUpdateDate != null) - { Metadata.ModificationDate = DateHandlers.CpmToDateTime(_labelUpdateDate); - } if(!string.IsNullOrEmpty(_label)) Metadata.VolumeName = _label; @@ -839,4 +857,6 @@ public sealed partial class CPM return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CPM/Xattr.cs b/Aaru.Filesystems/CPM/Xattr.cs index 7fb157bf1..8a4f76c34 100644 --- a/Aaru.Filesystems/CPM/Xattr.cs +++ b/Aaru.Filesystems/CPM/Xattr.cs @@ -38,16 +38,15 @@ namespace Aaru.Filesystems; public sealed partial class CPM { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetXattr(string path, string xattr, ref byte[] buf) { if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -56,13 +55,16 @@ public sealed partial class CPM return ErrorNumber.NoSuchFile; if(string.Compare(xattr, "com.caldera.cpm.password", StringComparison.InvariantCulture) == 0) + { if(!_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf)) return ErrorNumber.NoError; + } if(string.Compare(xattr, "com.caldera.cpm.password.text", StringComparison.InvariantCulture) != 0) return ErrorNumber.NoSuchExtendedAttribute; - return !_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf) ? ErrorNumber.NoError + return !_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf) + ? ErrorNumber.NoError : ErrorNumber.NoSuchExtendedAttribute; } @@ -74,10 +76,7 @@ public sealed partial class CPM if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -95,4 +94,6 @@ public sealed partial class CPM return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/CPM/cpmdefs.json b/Aaru.Filesystems/CPM/cpmdefs.json index 024b65549..1adaf0465 100644 --- a/Aaru.Filesystems/CPM/cpmdefs.json +++ b/Aaru.Filesystems/CPM/cpmdefs.json @@ -1,25 +1,25 @@ { - "creation": "2016-08-24T02:44:59.045767Z", + "creation": "2016-08-24T02:44:59.045767Z", "definitions": [ { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "Generic CP/M - SSSD 8\u0022 - 128 x 26", - "complement": false, - "cylinders": 77, - "drm": 63, - "dsm": 242, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "A1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "Generic CP/M - SSSD 8\u0022 - 128 x 26", + "complement": false, + "cylinders": 77, + "drm": 63, + "dsm": 242, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "A1", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -48,31 +48,31 @@ 16, 22 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "ABC-80 - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ABC1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "ABC-80 - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ABC1", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 8, @@ -91,32 +91,32 @@ 3, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 255, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "A. B. Dick Magna III - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 255, - "dsm": 255, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ABD1", - "ofs": 4, - "order": "SIDES", + "al0": 255, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "A. B. Dick Magna III - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 255, + "dsm": 255, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ABD1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -135,9 +135,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 17, 18, @@ -156,31 +156,31 @@ 31, 32 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Actrix (Access Matrix) - SSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ACT1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Actrix (Access Matrix) - SSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ACT1", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -192,32 +192,32 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Actrix (Access Matrix) - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ACT2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Actrix (Access Matrix) - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ACT2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -229,9 +229,9 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -243,31 +243,31 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Adler Textriter - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 31, - "dsm": 159, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ADL1", - "ofs": 0, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Adler Textriter - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 31, + "dsm": 159, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ADL1", + "ofs": 0, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -286,145 +286,145 @@ 11, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Advanced Digital Super 6 - SSDD 48 tpi 5.25\u0022 - 1024 x 4", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 77, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ADV1", - "ofs": 1, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Advanced Digital Super 6 - SSDD 48 tpi 5.25\u0022 - 1024 x 4", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 77, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ADV1", + "ofs": 1, "sectorsPerTrack": 4, - "side1": { + "side1": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Advanced Digital Super 6 - DSDD 48 tpi 5.25\u0022 - 1024 x 4", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ADV2", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Advanced Digital Super 6 - DSDD 48 tpi 5.25\u0022 - 1024 x 4", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ADV2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 4, - "side1": { + "side1": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Advanced Digital Super 6 - DSDD 96 tpi 5.25\u0022 - 1024 x 4", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 300, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ADV3", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Advanced Digital Super 6 - DSDD 96 tpi 5.25\u0022 - 1024 x 4", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 300, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ADV3", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 4, - "side1": { + "side1": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Advanced Digital Super 8 - DSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 608, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ADV4", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Advanced Digital Super 8 - DSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 608, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ADV4", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -435,9 +435,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -448,73 +448,73 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Advanced Digital TurboDOS 312K - DSDD 48 tpi 5.25\u0022 - 1024 x 4", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ADV5", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Advanced Digital TurboDOS 312K - DSDD 48 tpi 5.25\u0022 - 1024 x 4", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ADV5", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 4, - "side1": { + "side1": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Advanced Digital TurboDOS 366K - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 182, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ADV6", - "ofs": 6, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Advanced Digital TurboDOS 366K - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 182, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ADV6", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -522,9 +522,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -532,32 +532,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Advanced Controls - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 385, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ADV7", - "ofs": 6, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Advanced Controls - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 385, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ADV7", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -565,9 +565,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -575,32 +575,32 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Allen-Bradley Advisor\u002B - DSDD 3.5\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 318, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ALL1", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Allen-Bradley Advisor\u002B - DSDD 3.5\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 318, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ALL1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -611,9 +611,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -624,31 +624,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 1 + "sides": 2, + "skew": 0, + "sofs": 1 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Alspa - SSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 300, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ALS1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Alspa - SSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 300, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ALS1", + "ofs": 2, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -659,31 +659,31 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "Altos - SSSD 8\u0022 - 128 x 26", - "complement": false, - "cylinders": 77, - "drm": 63, - "dsm": 242, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "ALT1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "Altos - SSSD 8\u0022 - 128 x 26", + "complement": false, + "cylinders": 77, + "drm": 63, + "dsm": 242, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "ALT1", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -702,32 +702,32 @@ 8, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 128, - "comment": "Altos - DSSD 8\u0022 - 128 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 122, - "encoding": "FM", - "evenOdd": false, - "exm": 3, - "label": "ALT2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 128, + "comment": "Altos - DSSD 8\u0022 - 128 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 122, + "encoding": "FM", + "evenOdd": false, + "exm": 3, + "label": "ALT2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -756,9 +756,9 @@ 16, 22 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 7, @@ -787,31 +787,31 @@ 16, 22 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Altos - SSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 139, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "ALT3", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Altos - SSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 139, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "ALT3", + "ofs": 2, "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -829,32 +829,32 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Altos - DSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 284, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ALT4", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Altos - DSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 284, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ALT4", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -872,9 +872,9 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -892,32 +892,32 @@ 14, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Altos Series 5 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 176, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "ALT5", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Altos Series 5 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 176, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "ALT5", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -929,9 +929,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -943,31 +943,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amigo - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMI1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amigo - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMI1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -980,32 +980,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Amigo - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 195, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMI2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Amigo - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 195, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMI2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1018,9 +1018,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -1033,31 +1033,31 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Ampro - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 94, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "AMP1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Ampro - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 94, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "AMP1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1070,32 +1070,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Ampro - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "AMP2", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Ampro - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "AMP2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 17, 18, @@ -1108,9 +1108,9 @@ 25, 26 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 17, 18, @@ -1123,31 +1123,31 @@ 25, 26 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Ampro - SSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "AMP3", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Ampro - SSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "AMP3", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1155,32 +1155,32 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Ampro - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMP4", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Ampro - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMP4", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 17, 18, @@ -1188,9 +1188,9 @@ 20, 21 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 17, 18, @@ -1198,31 +1198,31 @@ 20, 21 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amstrad PCW 8256 - SSDD 48 tpi 3.00\u0022", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 175, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS0", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amstrad PCW 8256 - SSDD 48 tpi 3.00\u0022", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 175, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS0", + "ofs": 1, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1234,32 +1234,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Amstrad PCW 8256 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 356, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS1", - "ofs": 1, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Amstrad PCW 8256 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 356, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS1", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1271,9 +1271,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -1285,31 +1285,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amstrad CPC464 - SSDD 48 tpi 5.25\u0022/3\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 171, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS2", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amstrad CPC464 - SSDD 48 tpi 5.25\u0022/3\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 171, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS2", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 65, 66, @@ -1321,31 +1321,31 @@ 72, 73 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad CPC464 - SSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 87, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "AMS3", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad CPC464 - SSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 87, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "AMS3", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 65, 66, @@ -1357,32 +1357,32 @@ 72, 73 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Amstrad PCW 8512 - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 255, - "dsm": 356, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS5", - "ofs": 1, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Amstrad PCW 8512 - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 255, + "dsm": 356, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS5", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1394,9 +1394,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -1408,32 +1408,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Amstrad CPC 6128 - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 175, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "AMS7", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Amstrad CPC 6128 - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 175, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "AMS7", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 65, 66, @@ -1445,9 +1445,9 @@ 72, 73 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 65, 66, @@ -1459,32 +1459,32 @@ 72, 73 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad CPC 6128 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 175, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "AMS8", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad CPC 6128 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 175, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "AMS8", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 65, 66, @@ -1496,9 +1496,9 @@ 72, 73 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 65, 66, @@ -1510,31 +1510,31 @@ 72, 73 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amstrad CPC 6128 Side 1 - SSDD 3.5\u0022 / 3\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 180, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS9", - "ofs": 0, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amstrad CPC 6128 Side 1 - SSDD 3.5\u0022 / 3\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 180, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS9", + "ofs": 0, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 193, 194, @@ -1546,31 +1546,31 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amstrad CPC 6128 Side 2 - SSDD 3.5\u0022 / 3\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 180, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMSA", - "ofs": 80, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amstrad CPC 6128 Side 2 - SSDD 3.5\u0022 / 3\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 180, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMSA", + "ofs": 80, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 193, 194, @@ -1582,9 +1582,9 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 193, 194, @@ -1596,32 +1596,32 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad PCW w/DU49, Moonstone XFORMAT - DSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 198, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "AMSB", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad PCW w/DU49, Moonstone XFORMAT - DSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 198, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "AMSB", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1634,9 +1634,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -1649,32 +1649,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad CPC 6128 Vortex - DSDD 3.5\u0022/96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 178, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "AMSC", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad CPC 6128 Vortex - DSDD 3.5\u0022/96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 178, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "AMSC", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1686,9 +1686,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -1700,31 +1700,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Archive I - SSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ARC1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Archive I - SSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ARC1", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -1732,32 +1732,32 @@ 5, 3 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 248, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Archive II \u0026 III - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 319, - "dsm": 394, - "encoding": "MFM", - "evenOdd": true, - "exm": 0, - "label": "ARC2", - "ofs": 2, - "order": "SIDES", + "al0": 248, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Archive II \u0026 III - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 319, + "dsm": 394, + "encoding": "MFM", + "evenOdd": true, + "exm": 0, + "label": "ARC2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -1765,9 +1765,9 @@ 5, 3 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -1775,31 +1775,31 @@ 5, 3 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Arisia - SSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 147, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ARI1", - "ofs": 2, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Arisia - SSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 147, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ARI1", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1820,32 +1820,32 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Associate - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 195, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ASO1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Associate - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 195, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ASO1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1858,9 +1858,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 12, @@ -1873,32 +1873,32 @@ 19, 20 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Aster CT-80 - DSDD 96 tpi 5.25\u0022 - 1024 x 5, 3:1", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AST1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Aster CT-80 - DSDD 96 tpi 5.25\u0022 - 1024 x 5, 3:1", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AST1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -1906,9 +1906,9 @@ 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -1916,31 +1916,31 @@ 3, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 1024, - "comment": "ATR-8000 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ATR1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 1024, + "comment": "ATR-8000 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ATR1", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1948,32 +1948,32 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "ATR-8000 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ATR2", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "ATR-8000 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ATR2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -1981,9 +1981,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -1991,32 +1991,32 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "ATR-8000 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ATR3", - "ofs": 2, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "ATR-8000 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ATR3", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -2024,9 +2024,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -2034,32 +2034,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "ATT-7700 - DSDD 3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 316, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ATT1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "ATT-7700 - DSDD 3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 316, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ATT1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -2078,9 +2078,9 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 17, 19, @@ -2099,32 +2099,32 @@ 30, 32 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Avatar - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 191, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "AVA1", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Avatar - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 191, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "AVA1", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -2137,9 +2137,9 @@ 4, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -2152,32 +2152,32 @@ 4, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Barudan - DSDD 3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "BAR1", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Barudan - DSDD 3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "BAR1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -2196,9 +2196,9 @@ 11, 14 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -2217,32 +2217,32 @@ 11, 14 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Beehive - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BEE1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Beehive - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BEE1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -2255,9 +2255,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -2270,32 +2270,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Beehive Microbee - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BEE2", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Beehive Microbee - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BEE2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 2, 5, @@ -2308,9 +2308,9 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 2, 5, @@ -2323,31 +2323,31 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Beehive Microbee - SSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BEE3", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Beehive Microbee - SSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BEE3", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 2, 5, @@ -2360,32 +2360,32 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Microbee Systems - DSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "BEE4", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Microbee Systems - DSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "BEE4", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 22, 25, @@ -2398,9 +2398,9 @@ 26, 29 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 22, 25, @@ -2413,32 +2413,32 @@ 26, 29 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Microbee Dreamdisk format - DSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 391, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "BEE5", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Microbee Dreamdisk format - DSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 391, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "BEE5", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 2, 5, @@ -2451,9 +2451,9 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 2, 5, @@ -2466,32 +2466,32 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Computer Bell - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 192, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BEL1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Computer Bell - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 192, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BEL1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -2504,9 +2504,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -2519,31 +2519,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Big Board (512 bytes/sector) - SSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 280, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "BIG1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Big Board (512 bytes/sector) - SSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 280, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "BIG1", + "ofs": 2, "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -2561,32 +2561,32 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Big Board (512 bytes/sector) - DSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 569, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "BIG2", - "ofs": 2, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Big Board (512 bytes/sector) - DSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 569, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "BIG2", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -2604,9 +2604,9 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -2624,53 +2624,53 @@ 14, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Big Board SWP 1024 bytes/sector - SSDD 8\u0022 - 1024 x 9", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 336, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "BIG4", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Big Board SWP 1024 bytes/sector - SSDD 8\u0022 - 1024 x 9", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 336, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "BIG4", + "ofs": 2, "sectorsPerTrack": 9, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Bitelex - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 95, - "dsm": 131, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "BIT1", - "ofs": 2, + "al0": 224, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Bitelex - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 95, + "dsm": 131, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "BIT1", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -2689,32 +2689,32 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "BMC IF800 Model 20 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 191, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "BMC1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "BMC IF800 Model 20 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 191, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "BMC1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -2727,9 +2727,9 @@ 9, 15 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 7, @@ -2742,31 +2742,31 @@ 9, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Bondwell 12 - SSDD 48 tpi 5.25\u0022 - 256 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 84, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BON1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Bondwell 12 - SSDD 48 tpi 5.25\u0022 - 256 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 84, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BON1", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -2787,32 +2787,32 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Bondwell 14 - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BON2", - "ofs": 2, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Bondwell 14 - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BON2", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -2833,9 +2833,9 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -2856,31 +2856,31 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Bondwell 2 - SSDD 3.5\u0022 - 256 x 18", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BON3", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Bondwell 2 - SSDD 3.5\u0022 - 256 x 18", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BON3", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -2901,32 +2901,32 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "BOSS TurboDOS - DSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 616, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "BOS1", - "ofs": 0, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "BOSS TurboDOS - DSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 616, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "BOS1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -2937,9 +2937,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -2950,32 +2950,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "BTI Systems - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 175, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BTI1", - "ofs": 2, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "BTI Systems - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 175, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BTI1", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -2987,9 +2987,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -3001,32 +3001,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Burr-Brown - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "BUR1", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Burr-Brown - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "BUR1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 10, @@ -3047,9 +3047,9 @@ 9, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 10, @@ -3070,32 +3070,32 @@ 9, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Cal-PC - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CAL1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Cal-PC - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CAL1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -3103,9 +3103,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -3113,73 +3113,73 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Cashcom 100 - DSDD 96 tpi 5.25\u0022 - 1024 x 4", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 303, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CAS1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Cashcom 100 - DSDD 96 tpi 5.25\u0022 - 1024 x 4", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 303, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CAS1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 4, - "side1": { + "side1": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Commodore Business Machines 1581 drive - DSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 397, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CBM1", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Commodore Business Machines 1581 drive - DSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 397, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CBM1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -3192,9 +3192,9 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -3207,32 +3207,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "CCS (256 bytes/sector) - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 165, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CCS1", - "ofs": 6, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "CCS (256 bytes/sector) - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 165, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CCS1", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -3253,9 +3253,9 @@ 12, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -3276,32 +3276,32 @@ 12, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CCS (512 bytes/sector) - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 184, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CCS2", - "ofs": 6, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CCS (512 bytes/sector) - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 184, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CCS2", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -3314,9 +3314,9 @@ 5, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -3329,32 +3329,32 @@ 5, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "CCS (1024 bytes/sector) - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 184, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CCS3", - "ofs": 6, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "CCS (1024 bytes/sector) - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 184, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CCS3", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -3362,9 +3362,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -3372,32 +3372,32 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 63, - "bsh": 6, - "bytesPerSector": 1024, - "comment": "CCS 8 - DSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 149, - "encoding": "MFM", - "evenOdd": false, - "exm": 7, - "label": "CCS4", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 63, + "bsh": 6, + "bytesPerSector": 1024, + "comment": "CCS 8 - DSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 149, + "encoding": "MFM", + "evenOdd": false, + "exm": 7, + "label": "CCS4", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -3408,9 +3408,9 @@ 3, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -3421,31 +3421,31 @@ 3, 6 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "CCS 2442 - SSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 139, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "CCS5", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "CCS 2442 - SSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 139, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "CCS5", + "ofs": 2, "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -3463,32 +3463,32 @@ 8, 12 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "CCS (1024 bytes alternate) - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 184, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CCS6", - "ofs": 6, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "CCS (1024 bytes alternate) - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 184, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CCS6", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -3496,9 +3496,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -3506,32 +3506,32 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CDC-110 Viking - DSDD 8\u0022 - 512 x 16", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 608, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CDC1", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CDC-110 Viking - DSDD 8\u0022 - 512 x 16", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 608, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CDC1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 0, 4, @@ -3550,9 +3550,9 @@ 11, 15 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 4, @@ -3571,32 +3571,32 @@ 11, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "CDI-5000 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CDI1", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "CDI-5000 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CDI1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -3604,9 +3604,9 @@ 5, 3 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -3614,31 +3614,31 @@ 5, 3 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "COLEX 850 - SSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CLX1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "COLEX 850 - SSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CLX1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -3651,32 +3651,32 @@ 4, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "COLEX 850 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 389, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CLX2", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "COLEX 850 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 389, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CLX2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -3689,9 +3689,9 @@ 4, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 15, @@ -3704,32 +3704,32 @@ 14, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "CMC Supersystem 2 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 391, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CMC1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "CMC Supersystem 2 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 391, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CMC1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -3737,9 +3737,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -3747,32 +3747,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Coin - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 392, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COI1", - "ofs": 3, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Coin - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 392, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COI1", + "ofs": 3, + "order": "EAGLE", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -3780,9 +3780,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -3790,31 +3790,31 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Coleco ADAM, 40 track - SSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 146, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COL1", - "ofs": 0, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Coleco ADAM, 40 track - SSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 146, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COL1", + "ofs": 0, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -3825,32 +3825,32 @@ 7, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 26 + "sides": 1, + "skew": 0, + "sofs": 26 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Coleco ADAM, 254K - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 255, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COL2", - "ofs": 0, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Coleco ADAM, 254K - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 255, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COL2", + "ofs": 0, + "order": "EAGLE", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -3861,9 +3861,9 @@ 7, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 6, @@ -3874,32 +3874,32 @@ 7, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 26 + "sides": 2, + "skew": 0, + "sofs": 26 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Coleco ADAM, 320K - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 152, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "COL3", - "ofs": 0, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Coleco ADAM, 320K - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 152, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "COL3", + "ofs": 0, + "order": "EAGLE", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -3910,9 +3910,9 @@ 7, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 6, @@ -3923,32 +3923,32 @@ 7, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 26 + "sides": 2, + "skew": 0, + "sofs": 26 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Coleco ADAM, 720K - DSDD 3.5\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 354, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COL4", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Coleco ADAM, 720K - DSDD 3.5\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 354, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COL4", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -3960,9 +3960,9 @@ 2, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -3974,32 +3974,32 @@ 2, 6 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 26 + "sides": 2, + "skew": 0, + "sofs": 26 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Coleco ADAM, 360K - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "COL5", - "ofs": 0, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Coleco ADAM, 360K - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "COL5", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -4011,9 +4011,9 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -4025,32 +4025,32 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 4 + "sides": 2, + "skew": 0, + "sofs": 4 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Coleco ADAM, E\u0026T PROM 720K - DSDD 3.5\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 354, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COL6", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Coleco ADAM, E\u0026T PROM 720K - DSDD 3.5\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 354, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COL6", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -4062,9 +4062,9 @@ 2, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -4076,32 +4076,32 @@ 2, 6 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 26 + "sides": 2, + "skew": 0, + "sofs": 26 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Coleco ADAM, 720K - DSDD 3.5\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 358, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COL7", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Coleco ADAM, 720K - DSDD 3.5\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 358, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COL7", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -4113,9 +4113,9 @@ 2, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -4127,32 +4127,32 @@ 2, 6 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 4 + "sides": 2, + "skew": 0, + "sofs": 4 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Coleco ADAM, 1.44M - DSHD 3.5\u0022 - 512 x 18", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 712, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COL8", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Coleco ADAM, 1.44M - DSHD 3.5\u0022 - 512 x 18", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 712, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COL8", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 15, 2, @@ -4173,9 +4173,9 @@ 7, 11 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -4196,32 +4196,32 @@ 12, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Coleco Adam TDOS - DSDD 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 255, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COL9", - "ofs": 0, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Coleco Adam TDOS - DSDD 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 255, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COL9", + "ofs": 0, + "order": "EAGLE", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -4232,9 +4232,9 @@ 7, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 6, @@ -4245,32 +4245,32 @@ 7, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 26 + "sides": 2, + "skew": 0, + "sofs": 26 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Columbia Commander 964 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 190, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "COLA", - "ofs": 2, - "order": "COLUMBIA", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Columbia Commander 964 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 190, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "COLA", + "ofs": 2, + "order": "COLUMBIA", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -4283,9 +4283,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -4298,32 +4298,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Columbia 1600 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 197, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "COLB", - "ofs": 2, - "order": "COLUMBIA", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Columbia 1600 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 197, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "COLB", + "ofs": 2, + "order": "COLUMBIA", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -4336,9 +4336,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -4351,31 +4351,31 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Columbia M64 - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 40, - "drm": 127, - "dsm": 190, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COLC", - "ofs": 2, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Columbia M64 - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 40, + "drm": 127, + "dsm": 190, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COLC", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -4388,32 +4388,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Compis - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 317, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COM1", - "ofs": 1, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Compis - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 317, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COM1", + "ofs": 1, + "order": "CYLINDERS", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -4424,9 +4424,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -4437,31 +4437,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Compugraphic MCS-5 - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COM2", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Compugraphic MCS-5 - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COM2", + "ofs": 1, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -4480,32 +4480,32 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Compustar Model 30 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 35, - "drm": 63, - "dsm": 169, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "COM3", - "ofs": 2, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Compustar Model 30 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 35, + "drm": 63, + "dsm": 169, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "COM3", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -4518,9 +4518,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -4533,32 +4533,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Compupro (Viasyn) - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 389, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COM7", - "ofs": 4, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Compupro (Viasyn) - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 389, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COM7", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -4566,9 +4566,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -4576,31 +4576,31 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Compupro (Viasyn) 8/16 - SSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 299, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COM8", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Compupro (Viasyn) 8/16 - SSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 299, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COM8", + "ofs": 2, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -4611,32 +4611,32 @@ 3, 6 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Compupro (Viasyn) 8/16 - DSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 599, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COM9", - "ofs": 4, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Compupro (Viasyn) 8/16 - DSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 599, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COM9", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -4647,9 +4647,9 @@ 3, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -4660,31 +4660,31 @@ 3, 6 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Compupro (Viasyn) - SSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 280, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COMA", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Compupro (Viasyn) - SSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 280, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COMA", + "ofs": 2, "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -4702,31 +4702,31 @@ 8, 12 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Compupro (Viasyn) - SSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 242, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COMB", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Compupro (Viasyn) - SSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 242, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COMB", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 10, @@ -4745,31 +4745,31 @@ 23, 6 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Compupro (Viasyn) 256 bytes/sector - DSHD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 487, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "COME", - "ofs": 4, + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Compupro (Viasyn) 256 bytes/sector - DSHD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 487, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "COME", + "ofs": 4, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 10, @@ -4788,9 +4788,9 @@ 23, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 10, @@ -4809,32 +4809,32 @@ 23, 6 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CPT Phoenix CP/M - DSDD 3.5\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 355, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CPT1", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CPT Phoenix CP/M - DSDD 3.5\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 355, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CPT1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -4846,9 +4846,9 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -4860,31 +4860,31 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "Cromemco CDOS - SSSD 48 tpi 5.25\u0022 - 128 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 82, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "CRO1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "Cromemco CDOS - SSSD 48 tpi 5.25\u0022 - 128 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 82, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "CRO1", + "ofs": 3, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -4905,32 +4905,32 @@ 9, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 18, - "comment": "Cromemco CDOS - DSSD 48 tpi 5.25\u0022 - 128 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 172, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "CRO2", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 18, + "comment": "Cromemco CDOS - DSSD 48 tpi 5.25\u0022 - 128 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 172, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "CRO2", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 128, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -4951,9 +4951,9 @@ 9, 14 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 6, @@ -4974,31 +4974,31 @@ 9, 14 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Cromemco CDOS - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CRO3", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Cromemco CDOS - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CRO3", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -5011,32 +5011,32 @@ 4, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Cromemco CDOS - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CRO4", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Cromemco CDOS - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CRO4", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -5049,9 +5049,9 @@ 4, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -5064,32 +5064,32 @@ 4, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Cromemco CDOS - DSDD 8\u0022 - 512 x 16", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 608, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "CRO5", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Cromemco CDOS - DSDD 8\u0022 - 512 x 16", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 608, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "CRO5", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 12, @@ -5108,9 +5108,9 @@ 11, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 12, @@ -5129,31 +5129,31 @@ 11, 6 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Cromemco CP/M - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 94, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CRO6", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Cromemco CP/M - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 94, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CRO6", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -5166,32 +5166,32 @@ 5, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Cromemco CP/M - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CRO7", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Cromemco CP/M - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CRO7", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -5204,9 +5204,9 @@ 5, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -5219,32 +5219,32 @@ 5, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Cykey - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 153, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "CYK1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Cykey - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 153, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "CYK1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -5263,9 +5263,9 @@ 12, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -5284,32 +5284,32 @@ 12, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Datavue DV80 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 94, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "DAT1", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Datavue DV80 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 94, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "DAT1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 129, 130, @@ -5322,9 +5322,9 @@ 137, 138 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 129, 130, @@ -5337,32 +5337,32 @@ 137, 138 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Datavue DV80 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "DAT2", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Datavue DV80 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "DAT2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 193, 194, @@ -5375,9 +5375,9 @@ 201, 202 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 193, 194, @@ -5390,32 +5390,32 @@ 201, 202 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Davidge - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 384, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DAV1", - "ofs": 6, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Davidge - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 384, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DAV1", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -5423,9 +5423,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -5433,31 +5433,31 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "DEC DECMate II - SSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 195, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "DEC1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "DEC DECMate II - SSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 195, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "DEC1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -5470,31 +5470,31 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "DEC VT-180 - SSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DEC3", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "DEC VT-180 - SSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DEC3", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -5506,32 +5506,32 @@ 6, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Dictaphone 6000 CP/M - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 352, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DIC1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Dictaphone 6000 CP/M - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 352, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DIC1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -5543,9 +5543,9 @@ 6, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -5557,32 +5557,32 @@ 6, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 248, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Dictaphone 6000 CP/M - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 319, - "dsm": 345, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DIC2", - "ofs": 6, - "order": "SIDES", + "al0": 248, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Dictaphone 6000 CP/M - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 319, + "dsm": 345, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DIC2", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -5594,9 +5594,9 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -5608,32 +5608,32 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Digilog 2500 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 35, - "drm": 63, - "dsm": 166, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "DIG1", - "ofs": 3, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Digilog 2500 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 35, + "drm": 63, + "dsm": 166, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "DIG1", + "ofs": 3, + "order": "EAGLE", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -5641,9 +5641,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -5651,32 +5651,32 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Digilog 1500 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 392, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DIG2", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Digilog 1500 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 392, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DIG2", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -5684,9 +5684,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -5694,31 +5694,31 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 248, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Digitech 500 series - SSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 319, - "dsm": 199, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "DIG3", - "ofs": 0, + "al0": 248, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Digitech 500 series - SSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 319, + "dsm": 199, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "DIG3", + "ofs": 0, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -5731,32 +5731,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 248, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Digitech 500 series - DSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 319, - "dsm": 398, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DIG4", - "ofs": 0, - "order": "SIDES", + "al0": 248, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Digitech 500 series - DSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 319, + "dsm": 398, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DIG4", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -5769,9 +5769,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -5784,31 +5784,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Digital Group, TVC-80 FDC - SSDD 8\u0022 - 1024 x 9", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 342, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DIG5", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Digital Group, TVC-80 FDC - SSDD 8\u0022 - 1024 x 9", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 342, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DIG5", + "ofs": 1, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -5820,32 +5820,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Dimension 68000 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 195, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "DIM1", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Dimension 68000 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 195, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "DIM1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -5858,9 +5858,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -5873,32 +5873,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Direct 1025 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 152, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DIR1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Direct 1025 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 152, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DIR1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -5917,9 +5917,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -5938,32 +5938,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Discovery - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 313, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DIS1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Discovery - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 313, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DIS1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -5974,9 +5974,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -5987,32 +5987,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Duet CP/M - DSDD 96tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 355, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DUE1", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Duet CP/M - DSDD 96tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 355, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DUE1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -6024,9 +6024,9 @@ 6, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -6038,31 +6038,31 @@ 6, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Eagle I, II - SSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 191, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "EAG1", - "ofs": 2, + "al0": 224, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Eagle I, II - SSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 191, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "EAG1", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -6070,32 +6070,32 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Eagle III, IV, V - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 191, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "EAG2", - "ofs": 2, - "order": "EAGLE", + "al0": 224, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Eagle III, IV, V - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 191, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "EAG2", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -6103,9 +6103,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -6113,78 +6113,78 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Electroglas/Xynetics - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 158, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ELE1", - "ofs": 1, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Electroglas/Xynetics - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 158, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ELE1", + "ofs": 1, + "order": "EAGLE", "sectorsPerTrack": 8, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Electroglas/Xynetics - DSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 397, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ELE2", - "ofs": 1, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Electroglas/Xynetics - DSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 397, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ELE2", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Epson QX-10 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "EPS1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Epson QX-10 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "EPS1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6197,9 +6197,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6212,32 +6212,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Epson QX-10 (256 bytes/sector) - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 139, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "EPS2", - "ofs": 8, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Epson QX-10 (256 bytes/sector) - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 139, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "EPS2", + "ofs": 8, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6256,9 +6256,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6277,32 +6277,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Epson PX-10/8 - DSDD 3.5\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 139, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "EPS3", - "ofs": 8, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Epson PX-10/8 - DSDD 3.5\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 139, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "EPS3", + "ofs": 8, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6313,9 +6313,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6326,32 +6326,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Epson QX-16 640K - DSDD 3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 304, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "EPS4", - "ofs": 8, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Epson QX-16 640K - DSDD 3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 304, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "EPS4", + "ofs": 8, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6370,9 +6370,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6391,32 +6391,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 252, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Epson QX-16 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 389, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "EPS5", - "ofs": 4, - "order": "SIDES", + "al0": 252, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Epson QX-16 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 389, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "EPS5", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6429,9 +6429,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6444,31 +6444,31 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Ericsson DTC - SSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 77, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "ERI1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Ericsson DTC - SSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 77, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "ERI1", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6487,32 +6487,32 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Ericsson DTC - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 157, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "ERI2", - "ofs": 2, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Ericsson DTC - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 157, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "ERI2", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6531,9 +6531,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6552,32 +6552,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Ericsson Step One - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "ERI3", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Ericsson Step One - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "ERI3", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6589,9 +6589,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6603,32 +6603,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Estimation Inc. EST101 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "EST1", - "ofs": 2, - "order": "EAGLE", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Estimation Inc. EST101 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "EST1", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6641,9 +6641,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6656,32 +6656,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 63, - "bsh": 6, - "bytesPerSector": 1024, - "comment": "Everett/Charles Kryterion 165 - DSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "EVE1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 63, + "bsh": 6, + "bytesPerSector": 1024, + "comment": "Everett/Charles Kryterion 165 - DSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "EVE1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6692,9 +6692,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6705,32 +6705,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Eureka A4 - DSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 399, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "EUR1", - "ofs": 0, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Eureka A4 - DSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 399, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "EUR1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 2, 5, @@ -6743,9 +6743,9 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 2, 5, @@ -6758,31 +6758,31 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Exidy Sorcerer - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 76, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "EXI1", - "ofs": 0, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Exidy Sorcerer - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 76, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "EXI1", + "ofs": 0, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -6801,31 +6801,31 @@ 7, 12 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 33 + "sides": 1, + "skew": 0, + "sofs": 33 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "EXO - SSDD 8\u0022 - 512 x 16", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 149, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "EXO1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "EXO - SSDD 8\u0022 - 512 x 16", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 149, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "EXO1", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6844,32 +6844,32 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "EXO - DSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 303, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "EXO2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "EXO - DSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 303, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "EXO2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -6887,9 +6887,9 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -6907,32 +6907,32 @@ 14, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Florida Graphics - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 295, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "FLO1", - "ofs": 12, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Florida Graphics - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 295, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "FLO1", + "ofs": 12, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -6951,9 +6951,9 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -6972,32 +6972,32 @@ 14, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Formula 1 - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 172, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "FOR1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Formula 1 - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 172, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "FOR1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7018,9 +7018,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7041,32 +7041,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Fujitsu Micro 8 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "FUJ2", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Fujitsu Micro 8 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "FUJ2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7085,9 +7085,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7106,32 +7106,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Future FX-20 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 95, - "dsm": 196, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "FUT1", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Future FX-20 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 95, + "dsm": 196, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "FUT1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7144,9 +7144,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7159,32 +7159,32 @@ 9, 10 ], - "sideId": 4 + "sideId": 4 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Gemini Galaxy - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 196, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "GEM1", - "ofs": 2, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Gemini Galaxy - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 196, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "GEM1", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -7197,9 +7197,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -7212,32 +7212,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Globe 101 - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 319, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "GLO1", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Globe 101 - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 319, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "GLO1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7248,9 +7248,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7261,32 +7261,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 5, - "sofs": 13 + "sides": 2, + "skew": 5, + "sofs": 13 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Gnat System 10 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 35, - "drm": 127, - "dsm": 169, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "GNA1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Gnat System 10 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 35, + "drm": 127, + "dsm": 169, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "GNA1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7299,9 +7299,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 12, @@ -7314,31 +7314,31 @@ 19, 20 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Graco OM-5000 - DSHD 5.25\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 248, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "GRA1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Graco OM-5000 - DSHD 5.25\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 248, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "GRA1", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7357,9 +7357,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7378,32 +7378,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Hagiwara HPU 801 CP/M 68K - DSDD 3.5\u0022 Special - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 486, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "HAG1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Hagiwara HPU 801 CP/M 68K - DSDD 3.5\u0022 Special - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 486, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "HAG1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7432,9 +7432,9 @@ 25, 26 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7463,32 +7463,32 @@ 25, 26 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Hazeltine - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 379, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "HAZ1", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Hazeltine - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 379, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "HAZ1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7501,9 +7501,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7516,32 +7516,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "HCL System 2 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 388, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "HCL1", - "ofs": 4, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "HCL System 2 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 388, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "HCL1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7549,9 +7549,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7559,31 +7559,31 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Heath H89, Magnolia CP/M - SSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 95, - "dsm": 82, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "HEA1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Heath H89, Magnolia CP/M - SSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 95, + "dsm": 82, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "HEA1", + "ofs": 3, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7595,32 +7595,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 4, - "sofs": 0 + "sides": 1, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Heath H89, Magnolia CP/M - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 95, - "dsm": 172, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "HEA2", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Heath H89, Magnolia CP/M - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 95, + "dsm": 172, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "HEA2", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7632,9 +7632,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7646,32 +7646,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Heath H89, Magnolia CP/M - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "HEA3", - "ofs": 3, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Heath H89, Magnolia CP/M - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "HEA3", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7683,9 +7683,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7697,32 +7697,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Heurikon MLZ-91A - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 315, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "HEU1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Heurikon MLZ-91A - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 315, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "HEU1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7741,9 +7741,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7762,32 +7762,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Hewlett-Packard HP86/87/120/125 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 251, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "HEW1", - "ofs": 3, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Hewlett-Packard HP86/87/120/125 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 251, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "HEW1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -7806,9 +7806,9 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -7827,31 +7827,31 @@ 14, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Hewlett Packard HP 125 - SSSD 8\u0022 - 256 x 16", - "complement": false, - "cylinders": 66, - "drm": 127, - "dsm": 251, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "HEW2", - "ofs": 3, + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Hewlett Packard HP 125 - SSSD 8\u0022 - 256 x 16", + "complement": false, + "cylinders": 66, + "drm": 127, + "dsm": 251, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "HEW2", + "ofs": 3, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -7870,31 +7870,31 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 6, - "sofs": 0 + "sides": 1, + "skew": 6, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Hewlett Packard HP 125 - SSDD 3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 66, - "drm": 127, - "dsm": 251, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "HEW3", - "ofs": 3, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Hewlett Packard HP 125 - SSDD 3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 66, + "drm": 127, + "dsm": 251, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "HEW3", + "ofs": 3, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -7913,32 +7913,32 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 6, - "sofs": 0 + "sides": 1, + "skew": 6, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Hitachi HPC-6000 CP/M 68K - DSHD 1.2M 3.5\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 242, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "HIT1", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Hitachi HPC-6000 CP/M 68K - DSHD 1.2M 3.5\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 242, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "HIT1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -7967,9 +7967,9 @@ 25, 26 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -7998,32 +7998,32 @@ 25, 26 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Hitachi R-1500 CP/M 68K - DSHD 1.2M 5.25\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 494, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "HIT2", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Hitachi R-1500 CP/M 68K - DSHD 1.2M 5.25\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 494, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "HIT2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8052,9 +8052,9 @@ 25, 26 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8083,32 +8083,32 @@ 25, 26 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Strippit Houdaille Fab/V - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "HOU1", - "ofs": 1, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Strippit Houdaille Fab/V - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "HOU1", + "ofs": 1, + "order": "CYLINDERS", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8119,9 +8119,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8132,31 +8132,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "IBM PC, CP/M-86 - SSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "IBM1", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "IBM PC, CP/M-86 - SSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "IBM1", + "ofs": 1, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8167,32 +8167,32 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "IBM PC, CP/M-86 - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 157, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "IBM2", - "ofs": 1, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "IBM PC, CP/M-86 - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 157, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "IBM2", + "ofs": 1, + "order": "CYLINDERS", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8203,9 +8203,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8216,32 +8216,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "IBS Ultraframe Turbo DOS - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 397, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "IBS1", - "ofs": 0, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "IBS Ultraframe Turbo DOS - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 397, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "IBS1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8249,9 +8249,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8259,32 +8259,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "IBEX 7300 - DSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 246, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "IBX1", - "ofs": 2, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "IBEX 7300 - DSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 246, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "IBX1", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8303,9 +8303,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8324,32 +8324,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "IBEX 7301 - DSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 242, - "encoding": "MFM", - "evenOdd": false, - "exm": 2, - "label": "IBX2", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "IBEX 7301 - DSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 242, + "encoding": "MFM", + "evenOdd": false, + "exm": 2, + "label": "IBX2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -8378,9 +8378,9 @@ 16, 22 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 7, @@ -8409,32 +8409,32 @@ 16, 22 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "ICL DRS 20 - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 158, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "ICL1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "ICL DRS 20 - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 158, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "ICL1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -8453,9 +8453,9 @@ 7, 12 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 6, @@ -8474,32 +8474,32 @@ 7, 12 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "ICL DRS 300 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 350, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ICL2", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "ICL DRS 300 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 350, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ICL2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8511,9 +8511,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8525,32 +8525,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "ICL Model 35/36 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 391, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ICL3", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "ICL Model 35/36 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 391, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ICL3", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8563,9 +8563,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8578,31 +8578,31 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 36 + "sides": 2, + "skew": 0, + "sofs": 36 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "IMS 5000 - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 147, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "IMS1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "IMS 5000 - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 147, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "IMS1", + "ofs": 3, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 9, @@ -8621,32 +8621,32 @@ 8, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "IMS 5000 TurboDOS - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 390, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "IMS2", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "IMS 5000 TurboDOS - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 390, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "IMS2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8654,9 +8654,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8664,31 +8664,31 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "IMS 5000 TurboDOS - SSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 191, - "dsm": 308, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "IMS3", - "ofs": 0, + "al0": 224, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "IMS 5000 TurboDOS - SSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 191, + "dsm": 308, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "IMS3", + "ofs": 0, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8699,32 +8699,32 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "IMS 5000 CP/M - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 395, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "IMS4", - "ofs": 2, - "order": "CYLINDERS", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "IMS 5000 CP/M - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 395, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "IMS4", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8732,9 +8732,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8742,32 +8742,32 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Intel iPDS 100 - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 307, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "INT1", - "ofs": 6, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Intel iPDS 100 - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 307, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "INT1", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8786,9 +8786,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8807,31 +8807,31 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 1024, - "comment": "Intuit - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 190, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "INT2", - "ofs": 2, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 1024, + "comment": "Intuit - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 190, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "INT2", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -8839,32 +8839,32 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Insight Enterprises - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "INS1", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Insight Enterprises - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "INS1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8883,9 +8883,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -8904,31 +8904,31 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Ithaca Intersystems - SSDD 96 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ITH1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Ithaca Intersystems - SSDD 96 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ITH1", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -8949,31 +8949,31 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Ithaca Intersystems - SSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 191, - "dsm": 284, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ITH2", - "ofs": 1, + "al0": 224, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Ithaca Intersystems - SSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 191, + "dsm": 284, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ITH2", + "ofs": 1, "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -8991,32 +8991,32 @@ 8, 12 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Ithaca Intersystems - DSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 284, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ITH3", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Ithaca Intersystems - DSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 284, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ITH3", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -9034,9 +9034,9 @@ 8, 12 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -9054,32 +9054,32 @@ 8, 12 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "ITT 3030 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 35, - "drm": 63, - "dsm": 247, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ITT1", - "ofs": 4, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "ITT 3030 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 35, + "drm": 63, + "dsm": 247, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ITT1", + "ofs": 4, + "order": "CYLINDERS", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -9098,9 +9098,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -9119,32 +9119,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "ITT 3030 - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 70, - "drm": 127, - "dsm": 270, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ITT2", - "ofs": 4, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "ITT 3030 - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 70, + "drm": 127, + "dsm": 270, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ITT2", + "ofs": 4, + "order": "CYLINDERS", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -9163,9 +9163,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -9184,32 +9184,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Sel ITT 3030 - 70 Tracks 560 kB - 256 x 16", - "complement": false, - "cylinders": 70, - "drm": 127, - "dsm": 271, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ITT3030", - "ofs": 4, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Sel ITT 3030 - 70 Tracks 560 kB - 256 x 16", + "complement": false, + "cylinders": 70, + "drm": 127, + "dsm": 271, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ITT3030", + "ofs": 4, + "order": "EAGLE", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -9228,9 +9228,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -9249,31 +9249,31 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Jonos - SSDD 3.5\u0022 - 512 x 9", - "complement": false, - "cylinders": 70, - "drm": 63, - "dsm": 152, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "JON1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Jonos - SSDD 3.5\u0022 - 512 x 9", + "complement": false, + "cylinders": 70, + "drm": 63, + "dsm": 152, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "JON1", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -9285,31 +9285,31 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Kaypro II/2 - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "KAY1", - "ofs": 1, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Kaypro II/2 - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "KAY1", + "ofs": 1, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -9322,32 +9322,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 4, - "sofs": 0 + "sides": 1, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Kaypro 2X/4/10 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 196, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "KAY2", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Kaypro 2X/4/10 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 196, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "KAY2", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -9360,9 +9360,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 10, 11, @@ -9375,32 +9375,32 @@ 18, 19 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Kaypro 2X/4/10 (Alternate) - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 196, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "KAY3", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Kaypro 2X/4/10 (Alternate) - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 196, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "KAY3", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -9413,9 +9413,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 10, 11, @@ -9428,32 +9428,32 @@ 18, 19 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Kaypro, Pro-8 ROM - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 95, - "dsm": 196, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "KAY4", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Kaypro, Pro-8 ROM - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 95, + "dsm": 196, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "KAY4", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -9466,9 +9466,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 20, 21, @@ -9481,32 +9481,32 @@ 28, 29 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Kaypro Advent TurboROM - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 255, - "dsm": 195, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "KAY5", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Kaypro Advent TurboROM - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 255, + "dsm": 195, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "KAY5", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -9514,9 +9514,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 12, @@ -9524,31 +9524,31 @@ 14, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 1024, - "comment": "Kaypro Advent TurboROM - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 31, - "dsm": 185, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "KAY6", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 1024, + "comment": "Kaypro Advent TurboROM - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 31, + "dsm": 185, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "KAY6", + "ofs": 3, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -9556,32 +9556,32 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Kaypro Advent TurboROM - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 395, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "KAY7", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Kaypro Advent TurboROM - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 395, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "KAY7", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -9589,9 +9589,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 21, 22, @@ -9599,32 +9599,32 @@ 24, 25 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Kontron - DSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 489, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "KON1", - "ofs": 3, - "order": "CYLINDERS", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Kontron - DSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 489, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "KON1", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -9653,9 +9653,9 @@ 23, 26 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -9684,32 +9684,32 @@ 23, 26 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "Kontron/Zeiss - DSDD 96 tpi 5.25\u0022 - 128 x 16", - "complement": false, - "cylinders": 35, - "drm": 63, - "dsm": 106, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "KON2", - "ofs": 17, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "Kontron/Zeiss - DSDD 96 tpi 5.25\u0022 - 128 x 16", + "complement": false, + "cylinders": 35, + "drm": 63, + "dsm": 106, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "KON2", + "ofs": 17, + "order": "CYLINDERS", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -9728,9 +9728,9 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -9749,32 +9749,32 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Kontron Transient Recorder- DSDD 96 tpi 5.25\u0022/3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 299, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "KON3", - "ofs": 4, - "order": "EAGLE", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Kontron Transient Recorder- DSDD 96 tpi 5.25\u0022/3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 299, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "KON3", + "ofs": 4, + "order": "EAGLE", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -9793,9 +9793,9 @@ 11, 14 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -9814,31 +9814,31 @@ 11, 14 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Lanier LTD READ-ONLY - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 318, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "LAN1", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Lanier LTD READ-ONLY - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 318, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "LAN1", + "ofs": 1, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -9849,9 +9849,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -9862,31 +9862,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Lexoriter - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 159, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "LEX2", - "ofs": 0, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Lexoriter - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 159, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "LEX2", + "ofs": 0, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -9905,9 +9905,9 @@ 11, 14 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -9926,31 +9926,31 @@ 11, 14 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Lobo Max-80 - SSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 165, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "LOB1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Lobo Max-80 - SSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 165, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "LOB1", + "ofs": 3, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -9971,32 +9971,32 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Lobo Max-80 (256) - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 172, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "LOB2", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Lobo Max-80 (256) - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 172, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "LOB2", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -10017,9 +10017,9 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -10040,32 +10040,32 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Lobo Max-80 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 191, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "LOB3", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Lobo Max-80 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 191, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "LOB3", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -10078,9 +10078,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -10093,32 +10093,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Lobo Max-80 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 391, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "LOB4", - "ofs": 3, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Lobo Max-80 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 391, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "LOB4", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -10131,9 +10131,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -10146,31 +10146,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Lobo CP/M 2.2 - SSHD 8\u0022 - 256 x 30", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 280, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "LOB5", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Lobo CP/M 2.2 - SSHD 8\u0022 - 256 x 30", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 280, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "LOB5", + "ofs": 2, "sectorsPerTrack": 30, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -10193,31 +10193,31 @@ 18, 19 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "LNW 2 - SSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 82, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "LNW1", - "ofs": 3, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "LNW 2 - SSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 82, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "LNW1", + "ofs": 3, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -10238,32 +10238,32 @@ 9, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Lockheed-Martin Wire Harness Tester - DSDD 3.5\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "LOC1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Lockheed-Martin Wire Harness Tester - DSDD 3.5\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "LOC1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -10271,9 +10271,9 @@ 5, 3 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -10281,31 +10281,31 @@ 5, 3 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Macsym 150 - SSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MAC1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Macsym 150 - SSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MAC1", + "ofs": 2, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -10316,32 +10316,32 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "MAI Basic Four - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 312, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "MAI1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "MAI Basic Four - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 312, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "MAI1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -10360,9 +10360,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -10381,32 +10381,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Marconi Midata 510 - DSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 197, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "MAR1", - "ofs": 2, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Marconi Midata 510 - DSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 197, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "MAR1", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -10419,9 +10419,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -10434,32 +10434,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Memotech MaxBP - DSDD 3.5\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 191, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "MEM1", - "ofs": 2, - "order": "SIDES", + "al0": 224, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Memotech MaxBP - DSDD 3.5\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 191, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "MEM1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -10467,9 +10467,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -10477,32 +10477,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Memotech FDX - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 156, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MEM2", - "ofs": 0, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Memotech FDX - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 156, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MEM2", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -10521,9 +10521,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -10542,32 +10542,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 26 + "sides": 2, + "skew": 3, + "sofs": 26 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Micro Source M6000 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MIC6", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Micro Source M6000 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MIC6", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -10580,9 +10580,9 @@ 4, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 15, @@ -10595,32 +10595,32 @@ 14, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Michels and Kleberhoff CP/M 3 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 80, - "drm": 127, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "MIC7", - "ofs": 2, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Michels and Kleberhoff CP/M 3 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 80, + "drm": 127, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "MIC7", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -10633,9 +10633,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -10648,32 +10648,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Michels and Kleberhoff CP/M 3 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 35, - "drm": 63, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MIC8", - "ofs": 2, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Michels and Kleberhoff CP/M 3 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 35, + "drm": 63, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MIC8", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -10686,9 +10686,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -10701,32 +10701,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "MicroMint SB180 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 200, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MM7", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "MicroMint SB180 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 200, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MM7", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 27, 28, @@ -10739,9 +10739,9 @@ 35, 36 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 27, 28, @@ -10754,55 +10754,55 @@ 35, 36 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Molecular Series 9 - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MOL1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Molecular Series 9 - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MOL1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 9, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Molecular/Durango Poppy 54 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 389, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "MOL2", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Molecular/Durango Poppy 54 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 389, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "MOL2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 128, 129, @@ -10815,9 +10815,9 @@ 136, 137 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 138, 139, @@ -10830,31 +10830,31 @@ 146, 147 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Molecular - SSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 249, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MOL3", - "ofs": 0, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Molecular - SSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 249, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MOL3", + "ofs": 0, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -10873,31 +10873,31 @@ 8, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Monroe 8800 Series - SSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 153, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MON1", - "ofs": 3, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Monroe 8800 Series - SSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 153, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MON1", + "ofs": 3, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -10916,32 +10916,32 @@ 12, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Monroe System 2000 - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 315, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "MON2", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Monroe System 2000 - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 315, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "MON2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -10952,9 +10952,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -10965,31 +10965,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Morrow MD2 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 94, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MOR1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Morrow MD2 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 94, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MOR1", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -10997,32 +10997,32 @@ 5, 3 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Morrow MD3, 5, 11, 16, 34 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 191, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MOR2", - "ofs": 2, - "order": "SIDES", + "al0": 224, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Morrow MD3, 5, 11, 16, 34 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 191, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MOR2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -11030,9 +11030,9 @@ 5, 3 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -11040,73 +11040,73 @@ 5, 3 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Morrow TurboDOS - DSDD 48 tpi 5.25\u0022 - 1024 x 4", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "MOR6", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Morrow TurboDOS - DSDD 48 tpi 5.25\u0022 - 1024 x 4", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "MOR6", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 4, - "side1": { + "side1": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, 3, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Morrow MD3...CP/M Plus - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MOR7", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Morrow MD3...CP/M Plus - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MOR7", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -11114,9 +11114,9 @@ 5, 3 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -11124,31 +11124,31 @@ 5, 3 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Morrow 5/11/34 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 92, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "MOR8", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Morrow 5/11/34 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 92, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "MOR8", + "ofs": 3, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -11156,32 +11156,32 @@ 5, 3 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "MOS 80 - DSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 251, - "dsm": 244, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "MOS1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "MOS 80 - DSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 251, + "dsm": 244, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "MOS1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 10, @@ -11200,9 +11200,9 @@ 23, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 10, @@ -11221,32 +11221,32 @@ 23, 6 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Multitech MIC-540 - DSDD 96 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 356, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "MUL1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Multitech MIC-540 - DSDD 96 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 356, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "MUL1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11267,9 +11267,9 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11290,31 +11290,31 @@ 17, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "MUPD/MDISK, Side I - SSSD 96 tpi 5.25\u0022 - 256 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 96, - "encoding": "FM", - "evenOdd": false, - "exm": 1, - "label": "MUP1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "MUPD/MDISK, Side I - SSSD 96 tpi 5.25\u0022 - 256 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 96, + "encoding": "FM", + "evenOdd": false, + "exm": 1, + "label": "MUP1", + "ofs": 3, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 2, @@ -11327,32 +11327,32 @@ 7, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "MUPD/MDISK, Side II - SSSD 96 tpi 5.25\u0022 - 256 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 96, - "encoding": "FM", - "evenOdd": false, - "exm": 1, - "label": "MUP2", - "ofs": 83, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "MUPD/MDISK, Side II - SSSD 96 tpi 5.25\u0022 - 256 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 96, + "encoding": "FM", + "evenOdd": false, + "exm": 1, + "label": "MUP2", + "ofs": 83, + "order": "EAGLE", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 2, @@ -11365,9 +11365,9 @@ 7, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 2, @@ -11380,32 +11380,32 @@ 7, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "MSD Systems PSC-1 POS - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 158, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "MSD1", - "ofs": 1, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "MSD Systems PSC-1 POS - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 158, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "MSD1", + "ofs": 1, + "order": "CYLINDERS", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11416,9 +11416,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11429,31 +11429,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "NCHQ System II - SSSD 48tpi 5.25\u0022 - 128 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 84, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "NCH1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "NCHQ System II - SSSD 48tpi 5.25\u0022 - 128 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 84, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "NCH1", + "ofs": 3, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -11474,32 +11474,32 @@ 16, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "NCR Decision Mate V - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 153, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "NCR1", - "ofs": 3, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "NCR Decision Mate V - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 153, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "NCR1", + "ofs": 3, + "order": "EAGLE", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11510,9 +11510,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11523,32 +11523,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "NCR FirstStep - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 275, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "NCR2", - "ofs": 6, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "NCR FirstStep - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 275, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "NCR2", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -11567,9 +11567,9 @@ 6, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -11588,32 +11588,32 @@ 6, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "NEC PC-8801A - DSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 242, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "NEC2", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "NEC PC-8801A - DSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 242, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "NEC2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11642,9 +11642,9 @@ 25, 26 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11673,32 +11673,32 @@ 25, 26 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 6, - "sofs": 0 + "sides": 2, + "skew": 6, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "NEC PC-8801A - DSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 280, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "NEC3", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "NEC PC-8801A - DSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 280, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "NEC3", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11716,9 +11716,9 @@ 14, 15 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11736,32 +11736,32 @@ 14, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 6, - "sofs": 0 + "sides": 2, + "skew": 6, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "NEC PC-8801A - DSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 599, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "NEC4", - "ofs": 4, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "NEC PC-8801A - DSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 599, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "NEC4", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11772,9 +11772,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11785,31 +11785,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "NEC PC-8001A - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "NEC5", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "NEC PC-8001A - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "NEC5", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11828,32 +11828,32 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "NEC PC-8001B - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "NEC6", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "NEC PC-8001B - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "NEC6", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11872,9 +11872,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11893,32 +11893,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "NEC PC 8801A - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "NEC8", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "NEC PC 8801A - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "NEC8", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11929,9 +11929,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11942,31 +11942,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "NEC PC 8801A - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "NEC9", - "ofs": 4, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "NEC PC 8801A - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "NEC9", + "ofs": 4, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -11974,9 +11974,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -11984,31 +11984,31 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "NEC PC 8500/8431A, Starlet - DSDD 3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "NECA", - "ofs": 4, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "NEC PC 8500/8431A, Starlet - DSDD 3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "NECA", + "ofs": 4, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12027,31 +12027,31 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "NEC APC CP/M-86 - DSHD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 494, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "NECC", - "ofs": 2, + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "NEC APC CP/M-86 - DSHD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 494, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "NECC", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -12080,9 +12080,9 @@ 21, 24 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -12111,31 +12111,31 @@ 21, 24 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "NEC APC TurboDOS - SSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 224, - "dsm": 308, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "NECD", - "ofs": 0, + "al0": 224, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "NEC APC TurboDOS - SSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 224, + "dsm": 308, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "NECD", + "ofs": 0, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12146,31 +12146,31 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "New Brain - SSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 97, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "NEW1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "New Brain - SSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 97, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "NEW1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12183,32 +12183,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Niat - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 157, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "NIA1", - "ofs": 2, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Niat - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 157, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "NIA1", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -12227,9 +12227,9 @@ 12, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -12248,32 +12248,32 @@ 12, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Nixdorf 8810/30 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 384, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "NIX1", - "ofs": 6, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Nixdorf 8810/30 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 384, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "NIX1", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12286,9 +12286,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -12301,32 +12301,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Norsonic 830/836 - DSDD 3.5\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 199, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "NOR1", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Norsonic 830/836 - DSDD 3.5\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 199, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "NOR1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12334,9 +12334,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -12344,32 +12344,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Numeridex 7000 - DSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 248, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "NUM1", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Numeridex 7000 - DSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 248, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "NUM1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -12388,9 +12388,9 @@ 8, 14 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 28, 34, @@ -12406,31 +12406,31 @@ 42, 48 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 1024, - "comment": "Octagon 8/16 - SSDD 8\u0022 - 1024 x 9", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 167, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OCT1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 1024, + "comment": "Octagon 8/16 - SSDD 8\u0022 - 1024 x 9", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 167, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OCT1", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -12442,31 +12442,31 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "OEM Screen Typist - SSDD 3.5\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 94, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OEM1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "OEM Screen Typist - SSDD 3.5\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 94, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OEM1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -12479,31 +12479,31 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Olivetti ETV300 - SSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OLI1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Olivetti ETV300 - SSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OLI1", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -12524,32 +12524,32 @@ 16, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Olivetti M20 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 255, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OLI2", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Olivetti M20 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 255, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OLI2", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12568,9 +12568,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -12589,32 +12589,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Olivetti 250, CWP1 - SSDD 3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 157, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OLI3", - "ofs": 1, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Olivetti 250, CWP1 - SSDD 3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 157, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OLI3", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -12633,32 +12633,32 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Olivetti ETV 1010, CP/M 86 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 198, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OLI5", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Olivetti ETV 1010, CP/M 86 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 198, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OLI5", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -12671,9 +12671,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -12686,31 +12686,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Olivetti ETV 112 - SSDD 3.5\u0022 - 256 x 18", - "complement": false, - "cylinders": 80, - "drm": 191, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OLI6", - "ofs": 2, + "al0": 224, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Olivetti ETV 112 - SSDD 3.5\u0022 - 256 x 18", + "complement": false, + "cylinders": 80, + "drm": 191, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OLI6", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -12731,32 +12731,32 @@ 16, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Olympia EX-100 - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OLY1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Olympia EX-100 - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OLY1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12768,9 +12768,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -12782,31 +12782,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Olympia ETX II - SSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OLY2", - "ofs": 2, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Olympia ETX II - SSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OLY2", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12818,32 +12818,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Olympia Olytext 20 - DSDD 3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 312, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OLY3", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Olympia Olytext 20 - DSDD 3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 312, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OLY3", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12862,9 +12862,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -12883,31 +12883,31 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Osborne 1 - SSSD 48 tpi 5.25\u0022 - 256 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 45, - "encoding": "FM", - "evenOdd": false, - "exm": 1, - "label": "OSB1", - "ofs": 3, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Osborne 1 - SSSD 48 tpi 5.25\u0022 - 256 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 45, + "encoding": "FM", + "evenOdd": false, + "exm": 1, + "label": "OSB1", + "ofs": 3, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -12920,31 +12920,31 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 1024, - "comment": "Osborne 1 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 184, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OSB2", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 1024, + "comment": "Osborne 1 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 184, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OSB2", + "ofs": 3, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12952,32 +12952,32 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Osborne G2 System - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OSB4", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Osborne G2 System - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OSB4", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -12985,9 +12985,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 6, 7, @@ -12995,32 +12995,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Osborne G2 System - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 389, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OSB5", - "ofs": 4, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Osborne G2 System - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 389, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OSB5", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -13028,9 +13028,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 6, 7, @@ -13038,32 +13038,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Osborne 1 \u002B Osmosis - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 384, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OSB6", - "ofs": 6, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Osborne 1 \u002B Osmosis - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 384, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OSB6", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13076,9 +13076,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -13091,32 +13091,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Osborne Nuevo - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OSB7", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Osborne Nuevo - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OSB7", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13124,9 +13124,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 6, 8, @@ -13134,32 +13134,32 @@ 7, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Osborne Vixen - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OSB8", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Osborne Vixen - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OSB8", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13167,9 +13167,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -13177,32 +13177,32 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 248, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Osborne Executive w/Z3 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 395, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OSB9", - "ofs": 2, - "order": "SIDES", + "al0": 248, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Osborne Executive w/Z3 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 395, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OSB9", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13210,9 +13210,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -13220,32 +13220,32 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 248, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Osborne Executive Dig. Arts - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OSBA", - "ofs": 2, - "order": "SIDES", + "al0": 248, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Osborne Executive Dig. Arts - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OSBA", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13253,9 +13253,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -13263,32 +13263,32 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Osborne Nuevo 2.1 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OSBB", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Osborne Nuevo 2.1 - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OSBB", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -13296,9 +13296,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -13306,32 +13306,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "OSM Zeus 4 - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 311, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OSM1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "OSM Zeus 4 - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 311, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OSM1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -13342,9 +13342,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -13355,32 +13355,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Otrona Attache - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 181, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "OTR1", - "ofs": 3, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Otrona Attache - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 181, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "OTR1", + "ofs": 3, + "order": "EAGLE", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -13393,9 +13393,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -13408,32 +13408,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Otrona Attache - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 386, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "OTR2", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Otrona Attache - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 386, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "OTR2", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -13446,9 +13446,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -13461,31 +13461,31 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "Potter \u0026 Brumfield - SSSD 48 tpi 5.25\u0022 - 128 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 83, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "PB1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "Potter \u0026 Brumfield - SSSD 48 tpi 5.25\u0022 - 128 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 83, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "PB1", + "ofs": 3, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -13506,32 +13506,32 @@ 12, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Pegasus Data Logger - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PEG1", - "ofs": 6, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Pegasus Data Logger - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PEG1", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -13543,9 +13543,9 @@ 6, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -13557,32 +13557,32 @@ 6, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 120, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "People\u0027s World Computer - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 398, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PEO1", - "ofs": 0, - "order": "CYLINDERS", + "al0": 120, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "People\u0027s World Computer - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 398, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PEO1", + "ofs": 0, + "order": "CYLINDERS", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -13590,9 +13590,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -13600,32 +13600,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "People\u0027s World Computer Boot - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 397, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PEO2", - "ofs": 0, - "order": "CYLINDERS", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "People\u0027s World Computer Boot - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 397, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PEO2", + "ofs": 0, + "order": "CYLINDERS", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -13633,9 +13633,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -13643,32 +13643,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Pericom - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 395, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PER1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Pericom - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 395, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PER1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13676,9 +13676,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -13686,31 +13686,31 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Philips PC-2010 - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PHI1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Philips PC-2010 - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PHI1", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13729,32 +13729,32 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Philips PC-2012 - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 157, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "PHI2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Philips PC-2012 - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 157, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "PHI2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13773,9 +13773,9 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -13794,31 +13794,31 @@ 14, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Philips PC-3000 - 3004 - SSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 147, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "PHI3", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Philips PC-3000 - 3004 - SSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 147, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "PHI3", + "ofs": 3, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -13837,32 +13837,32 @@ 11, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Physical Acoutstics - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 173, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "PHY1", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Physical Acoutstics - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 173, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "PHY1", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -13883,9 +13883,9 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -13906,32 +13906,32 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Pied Piper - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 391, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PIE1", - "ofs": 3, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Pied Piper - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 391, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PIE1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -13944,9 +13944,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -13959,32 +13959,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Proglas 770K - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 388, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PRO1", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Proglas 770K - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 388, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PRO1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -13997,9 +13997,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -14012,31 +14012,31 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Pulsar LBB - SSHD 8\u0022 - 512 x 17", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 317, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PUL1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Pulsar LBB - SSHD 8\u0022 - 512 x 17", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 317, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PUL1", + "ofs": 2, "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -14056,31 +14056,31 @@ 12, 15 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "Research Machines Limited 380Z - 128 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 74, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "RML1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "Research Machines Limited 380Z - 128 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 74, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "RML1", + "ofs": 3, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -14099,32 +14099,32 @@ 11, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Royal Alphatronic - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ROY1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Royal Alphatronic - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ROY1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -14143,9 +14143,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -14164,32 +14164,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Sage IV - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SAG1", - "ofs": 2, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Sage IV - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SAG1", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -14200,9 +14200,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -14213,32 +14213,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Sage IV - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 315, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SAG2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Sage IV - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 315, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SAG2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -14249,9 +14249,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -14262,32 +14262,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Sanyo MBC-1000, MBC-1150 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SAN1", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Sanyo MBC-1000, MBC-1150 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SAN1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -14306,9 +14306,9 @@ 11, 14 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -14327,31 +14327,31 @@ 11, 14 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Sanyo MBC-2000 - SSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 152, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SAN3", - "ofs": 4, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Sanyo MBC-2000 - SSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 152, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SAN3", + "ofs": 4, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -14370,32 +14370,32 @@ 7, 12 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "Sanyo MBC-3000 - DSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 237, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "SAN4", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "Sanyo MBC-3000 - DSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 237, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "SAN4", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -14414,9 +14414,9 @@ 8, 14 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 7, @@ -14435,31 +14435,31 @@ 8, 14 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Sanco 8001 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SAN5", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Sanco 8001 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SAN5", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -14467,9 +14467,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -14477,31 +14477,31 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Schneider CPC 6128 Side 1 - DSDD 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 180, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SCH1", - "ofs": 0, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Schneider CPC 6128 Side 1 - DSDD 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 180, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SCH1", + "ofs": 0, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 193, 194, @@ -14513,31 +14513,31 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Schneider CPC 6128 Side 2 - DSDD 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 180, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SCH2", - "ofs": 40, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Schneider CPC 6128 Side 2 - DSDD 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 180, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SCH2", + "ofs": 40, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 193, 194, @@ -14549,9 +14549,9 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 193, 194, @@ -14563,31 +14563,31 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "S.D. Systems 40 track - SSDD 3.5\u0022 - 256 x 18", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 84, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SDS1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "S.D. Systems 40 track - SSDD 3.5\u0022 - 256 x 18", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 84, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SDS1", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -14608,54 +14608,54 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 256, - "comment": "S.D. Systems 80 track - DSDD 3.5\u0022 - 256 x 18", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SDS2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 256, + "comment": "S.D. Systems 80 track - DSDD 3.5\u0022 - 256 x 18", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SDS2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 18, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "S.D. Systems 80 track - SSDD 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 175, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SDS3", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "S.D. Systems 80 track - SSDD 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 175, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SDS3", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -14676,31 +14676,31 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "S.D. Systems - SSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 240, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SDS4", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "S.D. Systems - SSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 240, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SDS4", + "ofs": 3, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -14723,32 +14723,32 @@ 22, 26 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 1, - "sofs": 0 + "sides": 1, + "skew": 1, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Seiko - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 315, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SEI1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Seiko - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 315, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SEI1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -14767,9 +14767,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -14788,32 +14788,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "SemiDisk DT42 - DSHD 96 tpi 5.25\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 562, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SEM3", - "ofs": 4, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "SemiDisk DT42 - DSHD 96 tpi 5.25\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 562, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SEM3", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -14831,9 +14831,9 @@ 12, 15 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -14851,32 +14851,32 @@ 12, 15 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Sharp MZ-80 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 40, - "drm": 127, - "dsm": 169, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SHA1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Sharp MZ-80 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 40, + "drm": 127, + "dsm": 169, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SHA1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -14889,9 +14889,9 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -14904,32 +14904,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Sharp MZ-80B - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 40, - "drm": 127, - "dsm": 195, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SHA2", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Sharp MZ-80B - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 40, + "drm": 127, + "dsm": 195, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SHA2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 11, 12, @@ -14942,9 +14942,9 @@ 19, 20 ], - "sideId": 1 + "sideId": 1 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -14957,32 +14957,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Sharp 3500/5500 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SHA3", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Sharp 3500/5500 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SHA3", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -15001,9 +15001,9 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -15022,32 +15022,32 @@ 14, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Sharp 5600 - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 312, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SHA4", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Sharp 5600 - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 312, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SHA4", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -15066,9 +15066,9 @@ 14, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -15087,55 +15087,55 @@ 14, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Sharp MZ 3541 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SHA5", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Sharp MZ 3541 - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SHA5", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Shelton SIG/NET 2 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 40, - "drm": 63, - "dsm": 195, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SHL2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Shelton SIG/NET 2 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 40, + "drm": 63, + "dsm": 195, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SHL2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -15148,9 +15148,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -15163,32 +15163,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Shelton SIG/NET 2 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 80, - "drm": 255, - "dsm": 395, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SHL3", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Shelton SIG/NET 2 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 80, + "drm": 255, + "dsm": 395, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SHL3", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -15201,9 +15201,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -15216,32 +15216,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Siemens PG-685 DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 350, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SIE1", - "ofs": 4, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Siemens PG-685 DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 350, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SIE1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15253,9 +15253,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -15267,32 +15267,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Siemens PG-675 DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SIE2", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Siemens PG-675 DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SIE2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15304,9 +15304,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -15318,32 +15318,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Silver-Reed WP System - DSDD 3.5\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SIL1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Silver-Reed WP System - DSDD 3.5\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SIL1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -15351,9 +15351,9 @@ 2, 4 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -15361,31 +15361,31 @@ 2, 4 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Smart Aleck - SSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SMA1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Smart Aleck - SSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SMA1", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15406,32 +15406,32 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 1024, - "comment": "Sorbus TurboDOS - 5.25\u0022 DSHD (or 8\u0022 DSDD) - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 308, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SOR1", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 1024, + "comment": "Sorbus TurboDOS - 5.25\u0022 DSHD (or 8\u0022 DSDD) - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 308, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SOR1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15442,9 +15442,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -15455,31 +15455,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Sony SMC-70 - SSDD 3.5\u0022 - 256 x 16", - "complement": false, - "cylinders": 70, - "drm": 127, - "dsm": 135, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SON1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Sony SMC-70 - SSDD 3.5\u0022 - 256 x 16", + "complement": false, + "cylinders": 70, + "drm": 127, + "dsm": 135, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SON1", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -15498,31 +15498,31 @@ 11, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Spectravideo 318/328 - SSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 156, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SPE1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Spectravideo 318/328 - SSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 156, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SPE1", + "ofs": 3, "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15542,32 +15542,32 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Spectravideo SV-328 - DSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 162, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SPE2", - "ofs": 3, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Spectravideo SV-328 - DSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 162, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SPE2", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15587,9 +15587,9 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -15609,32 +15609,32 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 252, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Sperry UTS 30, UTS 5000 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 383, - "dsm": 354, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SPE2", - "ofs": 2, - "order": "SIDES", + "al0": 252, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Sperry UTS 30, UTS 5000 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 383, + "dsm": 354, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SPE2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15646,9 +15646,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -15660,31 +15660,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Spectravideo - SSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 157, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SPE3", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Spectravideo - SSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 157, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SPE3", + "ofs": 3, "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15704,32 +15704,32 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Spectravideo - DSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 163, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SPE4", - "ofs": 3, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Spectravideo - DSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 163, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SPE4", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15749,9 +15749,9 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -15771,32 +15771,32 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Spectravideo - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 197, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SPE5", - "ofs": 1, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Spectravideo - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 197, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SPE5", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -15809,9 +15809,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -15824,31 +15824,31 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Spectravideo - SSDD 3.5\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 163, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SPE6", - "ofs": 3, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Spectravideo - SSDD 3.5\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 163, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SPE6", + "ofs": 3, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -15860,31 +15860,31 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Superbrain JR - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 35, - "drm": 63, - "dsm": 81, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SUP1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Superbrain JR - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 35, + "drm": 63, + "dsm": 81, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SUP1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -15897,31 +15897,31 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Superbrain 40 track - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 40, - "drm": 63, - "dsm": 94, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SUP2", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Superbrain 40 track - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 40, + "drm": 63, + "dsm": 94, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SUP2", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -15934,32 +15934,32 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Superbrain QD - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 35, - "drm": 63, - "dsm": 169, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SUP3", - "ofs": 2, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Superbrain QD - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 35, + "drm": 63, + "dsm": 169, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SUP3", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -15972,9 +15972,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -15987,32 +15987,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Superbrain II - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": true, - "cylinders": 80, - "drm": 127, - "dsm": 196, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "SUP4", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Superbrain II - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": true, + "cylinders": 80, + "drm": 127, + "dsm": 196, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "SUP4", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -16025,9 +16025,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -16040,31 +16040,31 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "Superbrain - SSDD 48 tpi 5.25\u0022 - 128 x 30", - "complement": true, - "cylinders": 40, - "drm": 63, - "dsm": 142, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SUP5", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "Superbrain - SSDD 48 tpi 5.25\u0022 - 128 x 30", + "complement": true, + "cylinders": 40, + "drm": 63, + "dsm": 142, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SUP5", + "ofs": 2, "sectorsPerTrack": 30, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -16087,32 +16087,32 @@ 26, 29 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 1024, - "comment": "System Group 2800 - DSDD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 303, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SYS1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 1024, + "comment": "System Group 2800 - DSDD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 303, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SYS1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16123,9 +16123,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16136,32 +16136,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Tarbell - DSDD 8\u0022 - 512 x 15", - "complement": false, - "cylinders": 77, - "drm": 169, - "dsm": 303, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TAR1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Tarbell - DSDD 8\u0022 - 512 x 15", + "complement": false, + "cylinders": 77, + "drm": 169, + "dsm": 303, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TAR1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 15, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16179,9 +16179,9 @@ 13, 14 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16199,32 +16199,32 @@ 13, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Tatung TPC2000 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 354, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TAT1", - "ofs": 2, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Tatung TPC2000 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 354, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TAT1", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -16236,9 +16236,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -16250,32 +16250,32 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 248, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Techron TEF 10 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 319, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TEC1", - "ofs": 2, - "order": "SIDES", + "al0": 248, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Techron TEF 10 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 319, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TEC1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -16288,9 +16288,9 @@ 5, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -16303,32 +16303,32 @@ 5, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 255, - "al1": 240, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Techron TEF 12 - DSHD 96 tpi 5.25\u0022 - 512 x 17", - "complement": false, - "cylinders": 80, - "drm": 767, - "dsm": 670, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TEC2", - "ofs": 4, - "order": "SIDES", + "al0": 255, + "al1": 240, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Techron TEF 12 - DSHD 96 tpi 5.25\u0022 - 512 x 17", + "complement": false, + "cylinders": 80, + "drm": 767, + "dsm": 670, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TEC2", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16348,9 +16348,9 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16370,32 +16370,32 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Tektronix 4170 - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 153, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TEK1", - "ofs": 1, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Tektronix 4170 - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 153, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TEK1", + "ofs": 1, + "order": "CYLINDERS", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16406,9 +16406,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16419,31 +16419,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Teletek - SSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 242, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TEL1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Teletek - SSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 242, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TEL1", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -16462,32 +16462,32 @@ 8, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Teletek Systemaster - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 172, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TEL2", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Teletek Systemaster - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 172, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TEL2", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -16508,9 +16508,9 @@ 12, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 7, @@ -16531,32 +16531,32 @@ 12, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Teletek Systemaster - DSDD 96 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 353, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TEL3", - "ofs": 3, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Teletek Systemaster - DSDD 96 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 353, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TEL3", + "ofs": 3, + "order": "EAGLE", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -16577,9 +16577,9 @@ 12, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 7, @@ -16600,32 +16600,32 @@ 12, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "TeleVideo 8nn/TPC-1 CP/M - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TEL4", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "TeleVideo 8nn/TPC-1 CP/M - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TEL4", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16646,9 +16646,9 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16669,32 +16669,32 @@ 17, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 6, - "sofs": 0 + "sides": 2, + "skew": 6, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "TeleVideo 1603 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 354, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TEL5", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "TeleVideo 1603 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 354, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TEL5", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16706,9 +16706,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16720,32 +16720,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "TeleVideo 806 TurboDOS - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 200, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TEL6", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "TeleVideo 806 TurboDOS - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 200, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TEL6", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16753,9 +16753,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16763,32 +16763,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "TeleVideo 8nn TurboDOS - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TEL7", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "TeleVideo 8nn TurboDOS - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TEL7", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16809,9 +16809,9 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16832,32 +16832,32 @@ 17, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 6, - "sofs": 0 + "sides": 2, + "skew": 6, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Timex/Sinclair 2068\u002BAERCO FD-68 RP/M - DSDD 48 tpi 5.25\u0022 -1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TIM1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Timex/Sinclair 2068\u002BAERCO FD-68 RP/M - DSDD 48 tpi 5.25\u0022 -1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TIM1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16865,9 +16865,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16875,32 +16875,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 63, - "bsh": 6, - "bytesPerSector": 1024, - "comment": "Tokyo Electron 80W - DSHD 3.5\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 160, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "TOK1", - "ofs": 0, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 63, + "bsh": 6, + "bytesPerSector": 1024, + "comment": "Tokyo Electron 80W - DSHD 3.5\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 160, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "TOK1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -16911,9 +16911,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -16924,32 +16924,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Toshiba T100, T200 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 255, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TOS1", - "ofs": 6, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Toshiba T100, T200 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 255, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TOS1", + "ofs": 6, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -16968,9 +16968,9 @@ 12, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 5, @@ -16989,32 +16989,32 @@ 12, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Toshiba 300 - DSDD 96 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 318, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TOS2", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Toshiba 300 - DSDD 96 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 318, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TOS2", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17025,9 +17025,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -17038,32 +17038,32 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Toshiba T-250 - DSHD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 63, - "dsm": 487, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TOS3", - "ofs": 4, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Toshiba T-250 - DSHD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 63, + "dsm": 487, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TOS3", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -17092,9 +17092,9 @@ 21, 24 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -17123,31 +17123,31 @@ 21, 24 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Transtec - SSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TRA1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Transtec - SSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TRA1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17160,31 +17160,31 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "TRS-80 Model 1, Omikron CP/M - SSSD 48 tpi 5.25\u0022 - 128 x 18", - "complement": false, - "cylinders": 35, - "drm": 63, - "dsm": 71, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "TRS1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "TRS-80 Model 1, Omikron CP/M - SSSD 48 tpi 5.25\u0022 - 128 x 18", + "complement": false, + "cylinders": 35, + "drm": 63, + "dsm": 71, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "TRS1", + "ofs": 3, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -17205,31 +17205,31 @@ 12, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "TRS-80 Model 1, Bigmem CP/M - SSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 63, - "dsm": 243, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TRS2", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "TRS-80 Model 1, Bigmem CP/M - SSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 63, + "dsm": 243, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TRS2", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 7, @@ -17248,31 +17248,31 @@ 8, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "TRS-80 Model 1, ColorPower II - SSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TRS3", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "TRS-80 Model 1, ColorPower II - SSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TRS3", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17293,31 +17293,31 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "TRS-80, Pickles \u0026 Trout CP/M - SSDD 8\u0022 - 512 x 16", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 299, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TRS6", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "TRS-80, Pickles \u0026 Trout CP/M - SSDD 8\u0022 - 512 x 16", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 299, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TRS6", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17336,32 +17336,32 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 4, - "sofs": 0 + "sides": 1, + "skew": 4, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "TRS-80, Holmes CP/M - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 190, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TRS7", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "TRS-80, Holmes CP/M - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 190, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TRS7", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -17374,9 +17374,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 10, 11, @@ -17389,31 +17389,31 @@ 18, 19 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "TRS-80, MM CP/M - SSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 94, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TRS8", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "TRS-80, MM CP/M - SSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 94, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TRS8", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17426,31 +17426,31 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "TRS-80 Model 4, 4P; MT CP/M - SSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 84, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TRS9", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "TRS-80 Model 4, 4P; MT CP/M - SSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 84, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TRS9", + "ofs": 2, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -17471,32 +17471,32 @@ 16, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "TRS-80 Model 4, 4P; MT CP/M - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TRSA", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "TRS-80 Model 4, 4P; MT CP/M - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TRSA", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -17517,9 +17517,9 @@ 16, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -17540,31 +17540,31 @@ 16, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "TRS-80 Model 4, 4P - SSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TRSB", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "TRS-80 Model 4, 4P - SSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TRSB", + "ofs": 1, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17575,32 +17575,32 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 4, - "sofs": 0 + "sides": 1, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "TRS-80 Model 4P-Montezuma800K - DSDD 96tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 399, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TRSD", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "TRS-80 Model 4P-Montezuma800K - DSDD 96tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 399, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TRSD", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -17613,9 +17613,9 @@ 8, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -17628,32 +17628,32 @@ 8, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "TRS-80 II/12/16 Aton CP/M - DSHD 8\u0022 - 1024 x 8", - "complement": false, - "cylinders": 77, - "drm": 191, - "dsm": 608, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TRSF", - "ofs": 2, - "order": "SIDES", + "al0": 224, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "TRS-80 II/12/16 Aton CP/M - DSHD 8\u0022 - 1024 x 8", + "complement": false, + "cylinders": 77, + "drm": 191, + "dsm": 608, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TRSF", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 4, @@ -17664,9 +17664,9 @@ 3, 6 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 4, @@ -17677,32 +17677,32 @@ 3, 6 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "TRS-80 II/12/16 Pickles \u0026 Trout - DSHD 8\u0022 - 512 x 16", - "complement": false, - "cylinders": 77, - "drm": 191, - "dsm": 608, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "TRSG", - "ofs": 2, - "order": "CYLINDERS", + "al0": 224, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "TRS-80 II/12/16 Pickles \u0026 Trout - DSHD 8\u0022 - 512 x 16", + "complement": false, + "cylinders": 77, + "drm": 191, + "dsm": 608, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "TRSG", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17721,9 +17721,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -17742,32 +17742,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 4, - "sofs": 0 + "sides": 2, + "skew": 4, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "TRS-80 Model 4, Montezuma - DSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "TRSH", - "ofs": 2, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "TRS-80 Model 4, Montezuma - DSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "TRSH", + "ofs": 2, + "order": "EAGLE", "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -17788,9 +17788,9 @@ 16, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 3, @@ -17811,32 +17811,32 @@ 16, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "U-Micro 1000 - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 395, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "UMI1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "U-Micro 1000 - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 395, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "UMI1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17849,9 +17849,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -17864,32 +17864,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 96, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Varian Spectra AA/20, DS-15 - DSDD 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 317, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "VAR1", - "ofs": 0, - "order": "EAGLE", + "al0": 96, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Varian Spectra AA/20, DS-15 - DSDD 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 317, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "VAR1", + "ofs": 0, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17901,9 +17901,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -17915,54 +17915,54 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 2 + "sides": 2, + "skew": 0, + "sofs": 2 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Vector 4 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 356, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "VEC1", - "ofs": 1, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Vector 4 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 356, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "VEC1", + "ofs": 1, + "order": "EAGLE", "sectorsPerTrack": 9, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Visual 1050 - SSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "VIS1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Visual 1050 - SSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "VIS1", + "ofs": 2, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -17975,32 +17975,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Wangwriter - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "WAN1", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Wangwriter - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "WAN1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18019,9 +18019,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -18040,31 +18040,31 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 1024, - "comment": "Wave Mate Bullet - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 189, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "WAV1", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 1024, + "comment": "Wave Mate Bullet - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 189, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "WAV1", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18072,32 +18072,32 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Wave Mate Bullet - DSDD 96 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 394, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "WAV2", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Wave Mate Bullet - DSDD 96 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 394, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "WAV2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18105,9 +18105,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -18115,32 +18115,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Wave Mate Bullet - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "WAV3", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Wave Mate Bullet - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "WAV3", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18148,9 +18148,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -18158,31 +18158,31 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Wave Mate Bullet - SSHD 8\u0022 - 1024 x 9", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 336, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "WAV4", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Wave Mate Bullet - SSHD 8\u0022 - 1024 x 9", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 336, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "WAV4", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18194,32 +18194,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Xerox - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XER1", - "ofs": 2, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Xerox - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XER1", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18232,9 +18232,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -18247,31 +18247,31 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 128, - "comment": "Xerox 820 - SSSD 48 tpi 5.25\u0022 - 128 x 18", - "complement": false, - "cylinders": 40, - "drm": 31, - "dsm": 83, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "XER2", - "ofs": 3, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 128, + "comment": "Xerox 820 - SSSD 48 tpi 5.25\u0022 - 128 x 18", + "complement": false, + "cylinders": 40, + "drm": 31, + "dsm": 83, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "XER2", + "ofs": 3, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -18292,31 +18292,31 @@ 9, 14 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Xerox 820 II - SSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 156, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "XER3", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Xerox 820 II - SSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 156, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "XER3", + "ofs": 3, "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18336,32 +18336,32 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Xerox 820-II, 16/8 - DSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 162, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XER4", - "ofs": 3, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Xerox 820-II, 16/8 - DSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 162, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XER4", + "ofs": 3, + "order": "EAGLE", "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18381,9 +18381,9 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -18403,31 +18403,31 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Xerox 16/8 - SSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 242, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XER5", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Xerox 16/8 - SSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 242, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XER5", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18446,54 +18446,54 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "XEROX 16/8 - DSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 162, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XER7", - "ofs": 2, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "XEROX 16/8 - DSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 162, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XER7", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 9, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Xerox 820, S/W Publishers DD - SSDD 48 tpi 5.25\u0022 - 256 x 18", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 166, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "XER8", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Xerox 820, S/W Publishers DD - SSDD 48 tpi 5.25\u0022 - 256 x 18", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 166, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "XER8", + "ofs": 3, "sectorsPerTrack": 18, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18514,167 +18514,167 @@ 17, 18 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Xerox 3700 Laser Printer - DSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 162, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XER9", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Xerox 3700 Laser Printer - DSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 162, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XER9", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 17, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Xerox 16/8, 820 II - SSDD 48 tpi 5.25\u0022", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 156, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "XERB", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Xerox 16/8, 820 II - SSDD 48 tpi 5.25\u0022", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 156, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "XERB", + "ofs": 3, "sectorsPerTrack": 17, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Xerox 16/8 - SSDD 48 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "XERC", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Xerox 16/8 - SSDD 48 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "XERC", + "ofs": 2, "sectorsPerTrack": 9, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Xerox 16/8 Special - SSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "XERD", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Xerox 16/8 Special - SSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "XERD", + "ofs": 2, "sectorsPerTrack": 8, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Xerox 16/8, 820-II - DSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 162, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XERE", - "ofs": 3, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Xerox 16/8, 820-II - DSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 162, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XERE", + "ofs": 3, + "order": "EAGLE", "sectorsPerTrack": 17, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Xerox 16/8 Special - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XERF", - "ofs": 2, - "order": "CYLINDERS", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Xerox 16/8 Special - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XERF", + "ofs": 2, + "order": "CYLINDERS", "sectorsPerTrack": 8, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Xerox 3700 Laser Printer - DSDD 48 tpi 5.25\u0022 - 256 x 17", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 162, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XERG", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Xerox 3700 Laser Printer - DSDD 48 tpi 5.25\u0022 - 256 x 17", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 162, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XERG", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 17, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18694,9 +18694,9 @@ 16, 17 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -18716,32 +18716,32 @@ 16, 17 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Xor 5 - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 191, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XOR1", - "ofs": 3, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Xor 5 - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 191, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XOR1", + "ofs": 3, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 6, @@ -18754,9 +18754,9 @@ 5, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 6, @@ -18769,32 +18769,32 @@ 5, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "XYZ - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "XYZ1", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "XYZ - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "XYZ1", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 5, @@ -18807,9 +18807,9 @@ 4, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 15, @@ -18822,32 +18822,32 @@ 14, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Zeiss Video Analysis System - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 299, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZEI1", - "ofs": 4, - "order": "CYLINDERS", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Zeiss Video Analysis System - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 299, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZEI1", + "ofs": 4, + "order": "CYLINDERS", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18866,9 +18866,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -18887,31 +18887,31 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Zenith Z-37 Disk - SSSD 48 tpi 5.25\u0022 - 256 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 91, - "encoding": "FM", - "evenOdd": false, - "exm": 0, - "label": "ZEN1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Zenith Z-37 Disk - SSSD 48 tpi 5.25\u0022 - 256 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 91, + "encoding": "FM", + "evenOdd": false, + "exm": 0, + "label": "ZEN1", + "ofs": 3, "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18924,32 +18924,32 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Zenith Z-37 Disk - DSDD 96 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 315, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZEN2", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Zenith Z-37 Disk - DSDD 96 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 315, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZEN2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -18968,9 +18968,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -18989,32 +18989,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Zenith Z89, Heath H89 - DSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 255, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZEN3", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Zenith Z89, Heath H89 - DSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 255, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZEN3", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19033,9 +19033,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -19054,31 +19054,31 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Zenith Z90 - SSDD 48 tpi 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZEN5", - "ofs": 2, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Zenith Z90 - SSDD 48 tpi 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZEN5", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19097,31 +19097,31 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Zenith Z-100 - SSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 151, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZEN7", - "ofs": 2, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Zenith Z-100 - SSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 151, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZEN7", + "ofs": 2, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19132,32 +19132,32 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Zenith Z-100 - DSDD 48 tpi 5.25\u0022 - 512 x 8", - "complement": false, - "cylinders": 40, - "drm": 255, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ZEN8", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Zenith Z-100 - DSDD 48 tpi 5.25\u0022 - 512 x 8", + "complement": false, + "cylinders": 40, + "drm": 255, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ZEN8", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19168,9 +19168,9 @@ 7, 8 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -19181,31 +19181,31 @@ 7, 8 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Zenith Z-100 - SSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 127, - "dsm": 242, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ZENA", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Zenith Z-100 - SSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 127, + "dsm": 242, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ZENA", + "ofs": 2, "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 10, @@ -19224,32 +19224,32 @@ 23, 6 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Zenith Z-37 Disk - DSDD 96 (Half drive) 5.25\u0022 - 256 x 16", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZENB", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Zenith Z-37 Disk - DSDD 96 (Half drive) 5.25\u0022 - 256 x 16", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZENB", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19268,9 +19268,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -19289,32 +19289,32 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "Zenith/Heath H-89 Ext Density - DSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 255, - "dsm": 195, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZENC", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "Zenith/Heath H-89 Ext Density - DSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 255, + "dsm": 195, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZENC", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19322,9 +19322,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -19332,32 +19332,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Zenith Z-100, Heath H-47 - DSDD 8\u0022 - 256 x 26", - "complement": false, - "cylinders": 77, - "drm": 255, - "dsm": 497, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZENE", - "ofs": 2, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Zenith Z-100, Heath H-47 - DSDD 8\u0022 - 256 x 26", + "complement": false, + "cylinders": 77, + "drm": 255, + "dsm": 497, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZENE", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 26, - "side1": { + "side1": { "sectorIds": [ 1, 10, @@ -19386,9 +19386,9 @@ 9, 18 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 10, @@ -19417,31 +19417,31 @@ 9, 18 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 1024, - "comment": "Zenith Z-37 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 190, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZENF", - "ofs": 2, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 1024, + "comment": "Zenith Z-37 - SSDD 48 tpi 5.25\u0022 - 1024 x 5", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 190, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZENF", + "ofs": 2, "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19449,31 +19449,31 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "HIGH", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Zenith/Heath H89/H90 Magnolia 7736 - SSHD 8\u0022 - 512 x 16", - "complement": false, - "cylinders": 77, - "drm": 191, - "dsm": 299, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZENH", - "ofs": 2, + "al0": 224, + "al1": 0, + "bitrate": "HIGH", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Zenith/Heath H89/H90 Magnolia 7736 - SSHD 8\u0022 - 512 x 16", + "complement": false, + "cylinders": 77, + "drm": 191, + "dsm": 299, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZENH", + "ofs": 2, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19492,32 +19492,32 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Zorba - DSDD 48 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ZOR1", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Zorba - DSDD 48 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ZOR1", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19530,9 +19530,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 12, @@ -19545,32 +19545,32 @@ 19, 20 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Zorba - DSDD 96 tpi 5.25\u0022 - 512 x 10", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "ZOR2", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Zorba - DSDD 96 tpi 5.25\u0022 - 512 x 10", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "ZOR2", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19583,9 +19583,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 12, @@ -19598,31 +19598,31 @@ 19, 20 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "PIC-DISK SSDD 96tpi 3.5\u0022", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 194, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "PIC1", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "PIC-DISK SSDD 96tpi 3.5\u0022", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 194, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "PIC1", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 3, @@ -19634,32 +19634,32 @@ 6, 8 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 1, - "sofs": 0 + "sides": 1, + "skew": 1, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "SAM COUPE Pro-DOS - DSDD 160 tpi 3.5\u0022", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 356, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "A2", - "ofs": 1, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "SAM COUPE Pro-DOS - DSDD 160 tpi 3.5\u0022", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 356, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "A2", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -19671,9 +19671,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -19685,32 +19685,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Acorn CPM", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 200, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "ACPM", - "ofs": 3, - "order": "CYLINDERS", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Acorn CPM", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 200, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "ACPM", + "ofs": 3, + "order": "CYLINDERS", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 0, 1, @@ -19723,9 +19723,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0, 1, @@ -19738,717 +19738,717 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC 178K Data 40trk 9sct 64dir 1Kpb Side 2", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DA1B", - "ofs": 40, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC 178K Data 40trk 9sct 64dir 1Kpb Side 2", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DA1B", + "ofs": 40, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC 187K Data 42trk 9sct 64dir 1Kpb Side 2", - "complement": false, - "cylinders": 42, - "drm": 63, - "dsm": 188, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DA2B", - "ofs": 42, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC 187K Data 42trk 9sct 64dir 1Kpb Side 2", + "complement": false, + "cylinders": 42, + "drm": 63, + "dsm": 188, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DA2B", + "ofs": 42, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CPC-B360 358K Data 80trk 9sct 64dir 2Kpb Side 1", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "DA4A", - "ofs": 0, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CPC-B360 358K Data 80trk 9sct 64dir 2Kpb Side 1", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "DA4A", + "ofs": 0, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CPC-B360 358K Data 80trk 9sct 64dir 2Kpb Side 2", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "DA4B", - "ofs": 80, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CPC-B360 358K Data 80trk 9sct 64dir 2Kpb Side 2", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "DA4B", + "ofs": 80, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CPC 356K Data 40trk 9sct 128dir 2Kpb Two Sides", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "DAT5", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CPC 356K Data 40trk 9sct 128dir 2Kpb Two Sides", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "DAT5", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "DOBBERTIN 716K Data 80trk 9sct 128dir 4Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "DDOB", - "ofs": 0, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "DOBBERTIN 716K Data 80trk 9sct 128dir 4Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "DDOB", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 0 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 0 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC-STD 169K System 40trk 9sct 64dir 1Kpb Side 1", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SY1A", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC-STD 169K System 40trk 9sct 64dir 1Kpb Side 1", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SY1A", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC 169K System 40trk 9sct 64dir 1Kpb Side 2", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SY1B", - "ofs": 42, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC 169K System 40trk 9sct 64dir 1Kpb Side 2", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SY1B", + "ofs": 42, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC 178K System 42trk 9sct 64dir 1Kpb Side 1", - "complement": false, - "cylinders": 42, - "drm": 63, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SY2A", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC 178K System 42trk 9sct 64dir 1Kpb Side 1", + "complement": false, + "cylinders": 42, + "drm": 63, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SY2A", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC 178K System 42trk 9sct 64dir 1Kpb Side 2", - "complement": false, - "cylinders": 42, - "drm": 63, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SY2B", - "ofs": 44, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC 178K System 42trk 9sct 64dir 1Kpb Side 2", + "complement": false, + "cylinders": 42, + "drm": 63, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SY2B", + "ofs": 44, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC 253K System 60trk 9sct 64dir 1Kpb Side 1", - "complement": false, - "cylinders": 60, - "drm": 63, - "dsm": 254, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SY3A", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC 253K System 60trk 9sct 64dir 1Kpb Side 1", + "complement": false, + "cylinders": 60, + "drm": 63, + "dsm": 254, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SY3A", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC 253K System 60trk 9sct 64dir 1Kpb Side 2", - "complement": false, - "cylinders": 60, - "drm": 63, - "dsm": 254, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SY3B", - "ofs": 62, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC 253K System 60trk 9sct 64dir 1Kpb Side 2", + "complement": false, + "cylinders": 60, + "drm": 63, + "dsm": 254, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SY3B", + "ofs": 62, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CPC-B360 348K System 80trk 9sct 64dir 2Kpb Side 1", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SY4A", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CPC-B360 348K System 80trk 9sct 64dir 2Kpb Side 1", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SY4A", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CPC-B360 348K System 80trk 9sct 64dir 2Kpb Side 2", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SY4B", - "ofs": 82, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CPC-B360 348K System 80trk 9sct 64dir 2Kpb Side 2", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SY4B", + "ofs": 82, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "CPC 346K System 40trk 9sct 128dir 2Kpb Two Sides", - "complement": false, - "cylinders": 40, - "drm": 127, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "SYS5", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "CPC 346K System 40trk 9sct 128dir 2Kpb Two Sides", + "complement": false, + "cylinders": 40, + "drm": 127, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "SYS5", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 41 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "CPC 344K System 80trk 9sct 128dir 4Kpb Side 1", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 86, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "SY6A", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "CPC 344K System 80trk 9sct 128dir 4Kpb Side 1", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 86, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "SY6A", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "CPC 344K System 80trk 9sct 128dir 4Kpb Side 2", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 86, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "SY6B", - "ofs": 82, - "order": "EAGLE", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "CPC 344K System 80trk 9sct 128dir 4Kpb Side 2", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 86, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "SY6B", + "ofs": 82, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 5, - "sofs": 0 + "sides": 2, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "DOBBERTIN 704K System 80trk 9sct 128dir 4Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "SDOB", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "DOBBERTIN 704K System 80trk 9sct 128dir 4Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "SDOB", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 41 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "ReadBIG 706K System 80trk 9sct 128dir 2Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 354, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "SBIG", - "ofs": 2, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "ReadBIG 706K System 80trk 9sct 128dir 2Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 354, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "SBIG", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 41 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 41 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC-STD 154K Ibm-Cpm86 40trk 8sct 64dir 1Kpb Side 1", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "IB1A", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC-STD 154K Ibm-Cpm86 40trk 8sct 64dir 1Kpb Side 1", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "IB1A", + "ofs": 1, "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "CPC 154K Ibm-Cpm86 40trk 8sct 64dir 1Kpb Side 2", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 155, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "IB1B", - "ofs": 41, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "CPC 154K Ibm-Cpm86 40trk 8sct 64dir 1Kpb Side 2", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 155, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "IB1B", + "ofs": 41, + "order": "EAGLE", "sectorsPerTrack": 8, - "side1": { + "side1": { "sectorIds": [ 1 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "PCW-STD 173K Format 40trk 9sct 64dir 1Kpb Side 1", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PC1A", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "PCW-STD 173K Format 40trk 9sct 64dir 1Kpb Side 1", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PC1A", + "ofs": 1, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -20460,32 +20460,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "PCW 173K Format 40trk 9sct 64dir 1Kpb Side 2", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PC1B", - "ofs": 41, - "order": "EAGLE", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "PCW 173K Format 40trk 9sct 64dir 1Kpb Side 2", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PC1B", + "ofs": 41, + "order": "EAGLE", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -20497,9 +20497,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -20511,32 +20511,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "PCW 346K Format 40trk 9sct 256dir 2Kpb Two Sides", - "complement": false, - "cylinders": 40, - "drm": 255, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "PCW2", - "ofs": 1, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "PCW 346K Format 40trk 9sct 256dir 2Kpb Two Sides", + "complement": false, + "cylinders": 40, + "drm": 255, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "PCW2", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -20548,9 +20548,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -20562,29 +20562,29 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "PCW 706K Format 80trk 9sct 256dir 2Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 356, - "evenOdd": false, - "exm": 0, - "label": "PCW3", - "ofs": 1, + "al0": 240, + "al1": 0, + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "PCW 706K Format 80trk 9sct 256dir 2Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 356, + "evenOdd": false, + "exm": 0, + "label": "PCW3", + "ofs": 1, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -20596,9 +20596,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -20610,32 +20610,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "PCW 784K Format 80trk 10sct 256dir 4Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 197, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "DXT3", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "PCW 784K Format 80trk 10sct 256dir 4Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 197, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "DXT3", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -20648,9 +20648,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -20663,67 +20663,67 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "DiskPara3 796K Format 80trk 10sct 128dir 2Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 399, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DXT4", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "DiskPara3 796K Format 80trk 10sct 128dir 2Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 399, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DXT4", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "DiskPara 824K Format 83trk 10sct 192dir 2Kpb Two Sides", - "complement": false, - "cylinders": 83, - "drm": 191, - "dsm": 414, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "DXT5", - "ofs": 0, - "order": "SIDES", + "al0": 224, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "DiskPara 824K Format 83trk 10sct 192dir 2Kpb Two Sides", + "complement": false, + "cylinders": 83, + "drm": 191, + "dsm": 414, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "DXT5", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -20736,9 +20736,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11, 12, @@ -20751,206 +20751,206 @@ 19, 20 ], - "sideId": 0 + "sideId": 0 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "VORTEX 704K Format 80trk 9sct 128dir 4Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "VRTX", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "VORTEX 704K Format 80trk 9sct 128dir 4Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "VRTX", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "RAMDOS-D1 716K Format 80trk 9sct 128dir 2Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 359, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "RDD1", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "RAMDOS-D1 716K Format 80trk 9sct 128dir 2Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 359, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "RDD1", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "RAMDOS-D10 796K Format 80trk 10sct 128dir 2Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 399, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "RD10", - "ofs": 0, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "RAMDOS-D10 796K Format 80trk 10sct 128dir 2Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 399, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "RD10", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 11 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 11 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "RAMDOS-D2 712K Format 80trk 9sct 256dir 2Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 359, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "RDD2", - "ofs": 0, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "RAMDOS-D2 712K Format 80trk 9sct 256dir 2Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 359, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "RDD2", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 21 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 21 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "RAMDOS-D20 792K Format 80trk 10sct 256dir 2Kpb Two Sides", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 399, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "RD20", - "ofs": 0, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "RAMDOS-D20 792K Format 80trk 10sct 256dir 2Kpb Two Sides", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 399, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "RD20", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 31 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 31 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amstrad ZX Spectrum \u002B3 - SSDD 64dir 1Kpb 180K - 173K user free", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZX0", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amstrad ZX Spectrum \u002B3 - SSDD 64dir 1Kpb 180K - 173K user free", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZX0", + "ofs": 1, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -20962,32 +20962,32 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 3, - "sofs": 0 + "sides": 1, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Amstrad ZX Spectrum \u002B3 - DSDD 128dir 2Kpb 720K - 710K user free", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 356, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "ZX3", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Amstrad ZX Spectrum \u002B3 - DSDD 128dir 2Kpb 720K - 710K user free", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 356, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "ZX3", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -20999,9 +20999,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21013,32 +21013,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 3, - "sofs": 0 + "sides": 2, + "skew": 3, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Altos Series 5 - DSDD 96 tpi 5.25\u0022 - 512 x 9", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "ALT6", - "ofs": 64, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Altos Series 5 - DSDD 96 tpi 5.25\u0022 - 512 x 9", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "ALT6", + "ofs": 64, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21050,9 +21050,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21064,32 +21064,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "PC1715 SCP (80*2* 5,1024 4 OFS 4k DIR) 5.25\u0022", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 389, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "A780", - "ofs": 4, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "PC1715 SCP (80*2* 5,1024 4 OFS 4k DIR) 5.25\u0022", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 389, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "A780", + "ofs": 4, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21097,9 +21097,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21107,32 +21107,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 224, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 1024, - "comment": "PC1715 CPA (80*2* 5,1024 0 OFS 6k DIR) 5.25\u0022", - "complement": false, - "cylinders": 80, - "drm": 191, - "dsm": 399, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "A800", - "ofs": 0, - "order": "SIDES", + "al0": 224, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 1024, + "comment": "PC1715 CPA (80*2* 5,1024 0 OFS 6k DIR) 5.25\u0022", + "complement": false, + "cylinders": 80, + "drm": 191, + "dsm": 399, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "A800", + "ofs": 0, + "order": "SIDES", "sectorsPerTrack": 5, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21140,9 +21140,9 @@ 4, 5 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21150,32 +21150,32 @@ 4, 5 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Amstrad PCW8256 - DSDD 48 tpi 5.25\u0022", - "complement": false, - "cylinders": 40, - "drm": 255, - "dsm": 356, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS1", - "ofs": 1, - "order": "SIDES", + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Amstrad PCW8256 - DSDD 48 tpi 5.25\u0022", + "complement": false, + "cylinders": 40, + "drm": 255, + "dsm": 356, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS1", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21187,9 +21187,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21201,31 +21201,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amstrad PCW8256 - SSDD 48 tpi 3\u0022 (JOYCE-SYSTEM)", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS3", - "ofs": 1, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amstrad PCW8256 - SSDD 48 tpi 3\u0022 (JOYCE-SYSTEM)", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS3", + "ofs": 1, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21237,31 +21237,31 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amstrad CPC System - SSDD 48 tpi 3\u0022 or 5.25\u0022", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 170, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS4", - "ofs": 2, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amstrad CPC System - SSDD 48 tpi 3\u0022 or 5.25\u0022", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 170, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS4", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 65, 66, @@ -21273,31 +21273,31 @@ 72, 73 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Amstrad CPC-Data - SSDD 48 tpi 3\u0022 or 5.25\u0022", - "complement": false, - "cylinders": 40, - "drm": 63, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS5", - "ofs": 0, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Amstrad CPC-Data - SSDD 48 tpi 3\u0022 or 5.25\u0022", + "complement": false, + "cylinders": 40, + "drm": 63, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS5", + "ofs": 0, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 193, 194, @@ -21309,31 +21309,31 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 5, - "sofs": 0 + "sides": 1, + "skew": 5, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 512, - "comment": "Amstrad B360K - SSDD 96 tpi 5.25\u0022 SKEW 2", - "complement": false, - "cylinders": 80, - "drm": 63, - "dsm": 174, - "encoding": "MFM", - "evenOdd": false, - "exm": 1, - "label": "AMS6", - "ofs": 2, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 512, + "comment": "Amstrad B360K - SSDD 96 tpi 5.25\u0022 SKEW 2", + "complement": false, + "cylinders": 80, + "drm": 63, + "dsm": 174, + "encoding": "MFM", + "evenOdd": false, + "exm": 1, + "label": "AMS6", + "ofs": 2, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 65, 66, @@ -21345,32 +21345,32 @@ 72, 73 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad VORTEX - DSDD 96 tpi 5.25\u0022", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "AMS7", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad VORTEX - DSDD 96 tpi 5.25\u0022", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "AMS7", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21382,9 +21382,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21396,32 +21396,32 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad CPC System DSDD 96tpi 5.25\u0022 - DOBBERTIN -", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 176, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "AMS8", - "ofs": 2, - "order": "SIDES", + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad CPC System DSDD 96tpi 5.25\u0022 - DOBBERTIN -", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 176, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "AMS8", + "ofs": 2, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 65, 66, @@ -21433,9 +21433,9 @@ 72, 73 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 65, 66, @@ -21447,31 +21447,31 @@ 72, 73 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 128, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad DOBBERTIN DATA DSDD 96 tpi 5.25\u0022 Skew 5", - "complement": false, - "cylinders": 80, - "drm": 127, - "dsm": 179, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "AMS9", - "ofs": 0, + "al0": 128, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad DOBBERTIN DATA DSDD 96 tpi 5.25\u0022 Skew 5", + "complement": false, + "cylinders": 80, + "drm": 127, + "dsm": 179, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "AMS9", + "ofs": 0, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 193, 194, @@ -21483,9 +21483,9 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 193, 194, @@ -21497,32 +21497,32 @@ 200, 201 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad PCW8256 - DSDD 96 tpi 5.25\u0022 10 x 512 788K", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 197, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "AMSA", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad PCW8256 - DSDD 96 tpi 5.25\u0022 10 x 512 788K", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 197, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "AMSA", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21535,9 +21535,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21550,32 +21550,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad PCW Joyce - SF2DD (824 kb - 256 entries)", - "complement": false, - "cylinders": 84, - "drm": 255, - "dsm": 208, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "SF2D", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad PCW Joyce - SF2DD (824 kb - 256 entries)", + "complement": false, + "cylinders": 84, + "drm": 255, + "dsm": 208, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "SF2D", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 10, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21588,9 +21588,9 @@ 9, 10 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21603,32 +21603,32 @@ 9, 10 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 31, - "bsh": 5, - "bytesPerSector": 512, - "comment": "Amstrad PCW Joyce - 168 Track DD (740 kb - 256 entries)", - "complement": false, - "cylinders": 84, - "drm": 255, - "dsm": 187, - "encoding": "MFM", - "evenOdd": false, - "exm": 3, - "label": "168D", - "ofs": 1, - "order": "SIDES", + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 31, + "bsh": 5, + "bytesPerSector": 512, + "comment": "Amstrad PCW Joyce - 168 Track DD (740 kb - 256 entries)", + "complement": false, + "cylinders": 84, + "drm": 255, + "dsm": 187, + "encoding": "MFM", + "evenOdd": false, + "exm": 3, + "label": "168D", + "ofs": 1, + "order": "SIDES", "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21640,9 +21640,9 @@ 8, 9 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21654,31 +21654,31 @@ 8, 9 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 2, - "sofs": 0 + "sides": 2, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 512, - "comment": "Extended CPC 3\u0022 43-track", - "complement": false, - "cylinders": 43, - "drm": 63, - "dsm": 193, - "encoding": "MFM", - "evenOdd": false, - "exm": 0, - "label": "AMS7", - "ofs": 0, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 512, + "comment": "Extended CPC 3\u0022 43-track", + "complement": false, + "cylinders": 43, + "drm": 63, + "dsm": 193, + "encoding": "MFM", + "evenOdd": false, + "exm": 0, + "label": "AMS7", + "ofs": 0, "sectorsPerTrack": 9, - "side1": { + "side1": { "sectorIds": [ 193, 194, @@ -21690,31 +21690,31 @@ 200, 201 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 2, - "sofs": 0 + "sides": 1, + "skew": 2, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Apple // CPM card 13-sector", - "complement": false, - "cylinders": 35, - "drm": 47, - "dsm": 103, - "encoding": "GCR", - "evenOdd": false, - "exm": 0, - "label": "APL1", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Apple // CPM card 13-sector", + "complement": false, + "cylinders": 35, + "drm": 47, + "dsm": 103, + "encoding": "GCR", + "evenOdd": false, + "exm": 0, + "label": "APL1", + "ofs": 3, "sectorsPerTrack": 13, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21730,31 +21730,31 @@ 12, 13 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 192, - "al1": 0, - "bitrate": "LOW", - "blm": 7, - "bsh": 3, - "bytesPerSector": 256, - "comment": "Apple // CPM card 16-sector", - "complement": false, - "cylinders": 35, - "drm": 63, - "dsm": 127, - "encoding": "GCR", - "evenOdd": false, - "exm": 0, - "label": "APL2", - "ofs": 3, + "al0": 192, + "al1": 0, + "bitrate": "LOW", + "blm": 7, + "bsh": 3, + "bytesPerSector": 256, + "comment": "Apple // CPM card 16-sector", + "complement": false, + "cylinders": 35, + "drm": 63, + "dsm": 127, + "encoding": "GCR", + "evenOdd": false, + "exm": 0, + "label": "APL2", + "ofs": 3, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21773,31 +21773,31 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "sides": 1, - "skew": 0, - "sofs": 0 + "sides": 1, + "skew": 0, + "sofs": 0 }, { - "al0": 240, - "al1": 0, - "bitrate": "LOW", - "blm": 15, - "bsh": 4, - "bytesPerSector": 256, - "comment": "Apple // CPM card special", - "complement": false, - "cylinders": 80, - "drm": 255, - "dsm": 313, - "encoding": "GCR", - "evenOdd": false, - "exm": 0, - "label": "APL3", - "ofs": 3, + "al0": 240, + "al1": 0, + "bitrate": "LOW", + "blm": 15, + "bsh": 4, + "bytesPerSector": 256, + "comment": "Apple // CPM card special", + "complement": false, + "cylinders": 80, + "drm": 255, + "dsm": 313, + "encoding": "GCR", + "evenOdd": false, + "exm": 0, + "label": "APL3", + "ofs": 3, "sectorsPerTrack": 16, - "side1": { + "side1": { "sectorIds": [ 1, 2, @@ -21816,9 +21816,9 @@ 15, 16 ], - "sideId": 0 + "sideId": 0 }, - "side2": { + "side2": { "sectorIds": [ 1, 2, @@ -21837,11 +21837,11 @@ 15, 16 ], - "sideId": 1 + "sideId": 1 }, - "sides": 2, - "skew": 0, - "sofs": 0 + "sides": 2, + "skew": 0, + "sofs": 0 } ] } \ No newline at end of file diff --git a/Aaru.Filesystems/Cram/Cram.cs b/Aaru.Filesystems/Cram/Cram.cs index 55ed53833..ae084d27a 100644 --- a/Aaru.Filesystems/Cram/Cram.cs +++ b/Aaru.Filesystems/Cram/Cram.cs @@ -39,10 +39,16 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Cram : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.Cram_Name; + /// public Guid Id => new("F8F6E46F-7A2A-48E3-9C0A-46AF4DC29E09"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Cram/Enums.cs b/Aaru.Filesystems/Cram/Enums.cs index 3b5cc1fdd..ec03d0c28 100644 --- a/Aaru.Filesystems/Cram/Enums.cs +++ b/Aaru.Filesystems/Cram/Enums.cs @@ -37,9 +37,16 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Cram { +#region Nested type: CramCompression + enum CramCompression : ushort { - Zlib = 1, Lzma = 2, Lzo = 3, - Xz = 4, Lz4 = 5 + Zlib = 1, + Lzma = 2, + Lzo = 3, + Xz = 4, + Lz4 = 5 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Cram/Info.cs b/Aaru.Filesystems/Cram/Info.cs index 35e384454..5c69a36c9 100644 --- a/Aaru.Filesystems/Cram/Info.cs +++ b/Aaru.Filesystems/Cram/Info.cs @@ -44,6 +44,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Cram { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -55,7 +57,7 @@ public sealed partial class Cram if(errno != ErrorNumber.NoError) return false; - uint magic = BitConverter.ToUInt32(sector, 0x00); + var magic = BitConverter.ToUInt32(sector, 0x00); return magic is CRAM_MAGIC or CRAM_CIGAM; } @@ -72,10 +74,10 @@ public sealed partial class Cram if(errno != ErrorNumber.NoError) return; - uint magic = BitConverter.ToUInt32(sector, 0x00); + var magic = BitConverter.ToUInt32(sector, 0x00); - var crSb = new SuperBlock(); - bool littleEndian = true; + var crSb = new SuperBlock(); + var littleEndian = true; switch(magic) { @@ -99,9 +101,9 @@ public sealed partial class Cram sbInformation.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(crSb.name, encoding)). AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_bytes, crSb.size).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_bytes, crSb.size).AppendLine(); sbInformation.AppendFormat(Localization.Volume_has_0_blocks, crSb.blocks).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_files, crSb.files).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_files, crSb.files).AppendLine(); information = sbInformation.ToString(); @@ -114,4 +116,6 @@ public sealed partial class Cram FreeClusters = 0 }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Cram/Structs.cs b/Aaru.Filesystems/Cram/Structs.cs index 04ab69a1c..4c469c5c1 100644 --- a/Aaru.Filesystems/Cram/Structs.cs +++ b/Aaru.Filesystems/Cram/Structs.cs @@ -38,6 +38,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Cram { +#region Nested type: SuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock { @@ -54,4 +56,6 @@ public sealed partial class Cram [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public readonly byte[] name; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ECMA67/ECMA67.cs b/Aaru.Filesystems/ECMA67/ECMA67.cs index 372c4d4fb..113dad0d2 100644 --- a/Aaru.Filesystems/ECMA67/ECMA67.cs +++ b/Aaru.Filesystems/ECMA67/ECMA67.cs @@ -39,10 +39,16 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem described in ECMA-67 public sealed partial class ECMA67 : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.ECMA67_Name; + /// public Guid Id => new("62A2D44A-CBC1-4377-B4B6-28C5C92034A1"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ECMA67/Info.cs b/Aaru.Filesystems/ECMA67/Info.cs index eeae2c03b..8e720c5cc 100644 --- a/Aaru.Filesystems/ECMA67/Info.cs +++ b/Aaru.Filesystems/ECMA67/Info.cs @@ -44,6 +44,8 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem described in ECMA-67 public sealed partial class ECMA67 { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -98,4 +100,6 @@ public sealed partial class ECMA67 information = sbInformation.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ECMA67/Structs.cs b/Aaru.Filesystems/ECMA67/Structs.cs index 2805ccde0..8b60bab57 100644 --- a/Aaru.Filesystems/ECMA67/Structs.cs +++ b/Aaru.Filesystems/ECMA67/Structs.cs @@ -38,6 +38,8 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem described in ECMA-67 public sealed partial class ECMA67 { +#region Nested type: VolumeLabel + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct VolumeLabel { @@ -64,4 +66,6 @@ public sealed partial class ECMA67 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)] public readonly byte[] reserved5; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/EFS/EFS.cs b/Aaru.Filesystems/EFS/EFS.cs index aa4cf7110..eb5a04d03 100644 --- a/Aaru.Filesystems/EFS/EFS.cs +++ b/Aaru.Filesystems/EFS/EFS.cs @@ -35,11 +35,18 @@ namespace Aaru.Filesystems; /// Implements identification for the SGI Extent FileSystem public sealed partial class EFS : IFilesystem { + const string MODULE_NAME = "EFS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.EFS_Name; + /// public Guid Id => new("52A43F90-9AF3-4391-ADFE-65598DEEABAB"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "EFS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/EFS/Info.cs b/Aaru.Filesystems/EFS/Info.cs index f3229b035..021677a41 100644 --- a/Aaru.Filesystems/EFS/Info.cs +++ b/Aaru.Filesystems/EFS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements identification for the SGI Extent FileSystem public sealed partial class EFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -50,7 +52,7 @@ public sealed partial class EFS // Misaligned if(imagePlugin.Info.MetadataMediaType == MetadataMediaType.OpticalDisc) { - uint sbSize = (uint)((Marshal.SizeOf() + 0x200) / imagePlugin.Info.SectorSize); + var sbSize = (uint)((Marshal.SizeOf() + 0x200) / imagePlugin.Info.SectorSize); if((Marshal.SizeOf() + 0x200) % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -63,7 +65,7 @@ public sealed partial class EFS if(sector.Length < Marshal.SizeOf()) return false; - byte[] sbpiece = new byte[Marshal.SizeOf()]; + var sbpiece = new byte[Marshal.SizeOf()]; Array.Copy(sector, 0x200, sbpiece, 0, Marshal.SizeOf()); @@ -77,7 +79,7 @@ public sealed partial class EFS } else { - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -118,7 +120,7 @@ public sealed partial class EFS // Misaligned if(imagePlugin.Info.MetadataMediaType == MetadataMediaType.OpticalDisc) { - uint sbSize = (uint)((Marshal.SizeOf() + 0x400) / imagePlugin.Info.SectorSize); + var sbSize = (uint)((Marshal.SizeOf() + 0x400) / imagePlugin.Info.SectorSize); if((Marshal.SizeOf() + 0x400) % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -131,7 +133,7 @@ public sealed partial class EFS if(sector.Length < Marshal.SizeOf()) return; - byte[] sbpiece = new byte[Marshal.SizeOf()]; + var sbpiece = new byte[Marshal.SizeOf()]; Array.Copy(sector, 0x200, sbpiece, 0, Marshal.SizeOf()); @@ -142,7 +144,7 @@ public sealed partial class EFS } else { - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -214,4 +216,6 @@ public sealed partial class EFS CreationDate = DateHandlers.UnixToDateTime(efsSb.sb_time) }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/EFS/Structs.cs b/Aaru.Filesystems/EFS/Structs.cs index 70de67fcc..efadd499a 100644 --- a/Aaru.Filesystems/EFS/Structs.cs +++ b/Aaru.Filesystems/EFS/Structs.cs @@ -35,7 +35,10 @@ namespace Aaru.Filesystems; /// Implements identification for the SGI Extent FileSystem public sealed partial class EFS { - [StructLayout(LayoutKind.Sequential, Pack = 1), SuppressMessage("ReSharper", "InconsistentNaming")] +#region Nested type: Superblock + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + [SuppressMessage("ReSharper", "InconsistentNaming")] readonly struct Superblock { /* 0: fs size incl. bb 0 (in bb) */ @@ -84,4 +87,6 @@ public sealed partial class EFS /* 88: checksum (all above) */ public readonly uint sb_checksum; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/F2FS/Consts.cs b/Aaru.Filesystems/F2FS/Consts.cs index d95f22724..afcdf19b6 100644 --- a/Aaru.Filesystems/F2FS/Consts.cs +++ b/Aaru.Filesystems/F2FS/Consts.cs @@ -35,6 +35,7 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class F2FS { + const string FS_TYPE = "f2fs"; // ReSharper disable InconsistentNaming const uint F2FS_MAGIC = 0xF2F52010; const uint F2FS_SUPER_OFFSET = 1024; @@ -43,6 +44,4 @@ public sealed partial class F2FS const uint F2FS_BLOCK_SIZE = 4096; // ReSharper restore InconsistentNaming - - const string FS_TYPE = "f2fs"; } \ No newline at end of file diff --git a/Aaru.Filesystems/F2FS/F2FS.cs b/Aaru.Filesystems/F2FS/F2FS.cs index fa7548a1a..7c43d7edb 100644 --- a/Aaru.Filesystems/F2FS/F2FS.cs +++ b/Aaru.Filesystems/F2FS/F2FS.cs @@ -37,10 +37,16 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class F2FS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.F2FS_Name; + /// public Guid Id => new("82B0920F-5F0D-4063-9F57-ADE0AE02ECE5"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/F2FS/Info.cs b/Aaru.Filesystems/F2FS/Info.cs index 4b21e9286..97ac5a442 100644 --- a/Aaru.Filesystems/F2FS/Info.cs +++ b/Aaru.Filesystems/F2FS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class F2FS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -52,7 +54,7 @@ public sealed partial class F2FS if(sbAddr == 0) sbAddr = 1; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -88,7 +90,7 @@ public sealed partial class F2FS if(sbAddr == 0) sbAddr = 1; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -110,20 +112,20 @@ public sealed partial class F2FS var sb = new StringBuilder(); sb.AppendLine(Localization.F2FS_filesystem); - sb.AppendFormat(Localization.Version_0_1, f2fsSb.major_ver, f2fsSb.minor_ver).AppendLine(); + sb.AppendFormat(Localization.Version_0_1, f2fsSb.major_ver, f2fsSb.minor_ver).AppendLine(); sb.AppendFormat(Localization._0_bytes_per_sector, 1 << (int)f2fsSb.log_sectorsize).AppendLine(); sb.AppendFormat(Localization._0_sectors_1_bytes_per_block, 1 << (int)f2fsSb.log_sectors_per_block, 1 << (int)f2fsSb.log_blocksize).AppendLine(); - sb.AppendFormat(Localization._0_blocks_per_segment, f2fsSb.log_blocks_per_seg).AppendLine(); - sb.AppendFormat(Localization._0_blocks_in_volume, f2fsSb.block_count).AppendLine(); - sb.AppendFormat(Localization._0_segments_per_section, f2fsSb.segs_per_sec).AppendLine(); - sb.AppendFormat(Localization._0_sections_per_zone, f2fsSb.secs_per_zone).AppendLine(); - sb.AppendFormat(Localization._0_sections, f2fsSb.section_count).AppendLine(); - sb.AppendFormat(Localization._0_segments, f2fsSb.segment_count).AppendLine(); + sb.AppendFormat(Localization._0_blocks_per_segment, f2fsSb.log_blocks_per_seg).AppendLine(); + sb.AppendFormat(Localization._0_blocks_in_volume, f2fsSb.block_count).AppendLine(); + sb.AppendFormat(Localization._0_segments_per_section, f2fsSb.segs_per_sec).AppendLine(); + sb.AppendFormat(Localization._0_sections_per_zone, f2fsSb.secs_per_zone).AppendLine(); + sb.AppendFormat(Localization._0_sections, f2fsSb.section_count).AppendLine(); + sb.AppendFormat(Localization._0_segments, f2fsSb.segment_count).AppendLine(); sb.AppendFormat(Localization.Root_directory_resides_on_inode_0, f2fsSb.root_ino).AppendLine(); - sb.AppendFormat(Localization.Volume_UUID_0, f2fsSb.uuid).AppendLine(); + sb.AppendFormat(Localization.Volume_UUID_0, f2fsSb.uuid).AppendLine(); sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(f2fsSb.volume_name, Encoding.Unicode, true)).AppendLine(); @@ -147,4 +149,6 @@ public sealed partial class F2FS VolumeSerial = f2fsSb.uuid.ToString() }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/F2FS/Structs.cs b/Aaru.Filesystems/F2FS/Structs.cs index 2e09de738..a418de559 100644 --- a/Aaru.Filesystems/F2FS/Structs.cs +++ b/Aaru.Filesystems/F2FS/Structs.cs @@ -37,7 +37,10 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class F2FS { - [StructLayout(LayoutKind.Sequential, Pack = 1), SuppressMessage("ReSharper", "InconsistentNaming")] +#region Nested type: Superblock + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + [SuppressMessage("ReSharper", "InconsistentNaming")] readonly struct Superblock { public readonly uint magic; @@ -99,4 +102,6 @@ public sealed partial class F2FS [MarshalAs(UnmanagedType.ByValArray, SizeConst = 871)] public readonly byte[] reserved; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FAT/BPB.cs b/Aaru.Filesystems/FAT/BPB.cs index 5bd2bed0d..ef35542ec 100644 --- a/Aaru.Filesystems/FAT/BPB.cs +++ b/Aaru.Filesystems/FAT/BPB.cs @@ -55,8 +55,9 @@ public sealed partial class FAT ulong expectedClusters = humanBpb.bpc > 0 ? partition.Size / humanBpb.bpc : 0; // Check clusters for Human68k are correct - bool humanClustersCorrect = humanBpb.clusters == 0 ? humanBpb.big_clusters == expectedClusters - : humanBpb.clusters == expectedClusters; + bool humanClustersCorrect = humanBpb.clusters == 0 + ? humanBpb.big_clusters == expectedClusters + : humanBpb.clusters == expectedClusters; // Check OEM for Human68k is correct bool humanOemCorrect = bpbSector[2] >= 0x20 && bpbSector[3] >= 0x20 && bpbSector[4] >= 0x20 && @@ -70,8 +71,8 @@ public sealed partial class FAT bool humanBranchCorrect = bpbSector[0] == 0x60 && bpbSector[1] >= 0x1C && bpbSector[1] < 0xFE; AaruConsole.DebugWriteLine(MODULE_NAME, "humanClustersCorrect = {0}", humanClustersCorrect); - AaruConsole.DebugWriteLine(MODULE_NAME, "humanOemCorrect = {0}", humanOemCorrect); - AaruConsole.DebugWriteLine(MODULE_NAME, "humanBranchCorrect = {0}", humanBranchCorrect); + AaruConsole.DebugWriteLine(MODULE_NAME, "humanOemCorrect = {0}", humanOemCorrect); + AaruConsole.DebugWriteLine(MODULE_NAME, "humanBranchCorrect = {0}", humanBranchCorrect); // If all Human68k checks are correct, it is a Human68k FAT16 bool useHumanBpb = humanClustersCorrect && humanOemCorrect && humanBranchCorrect && expectedClusters > 0; @@ -105,18 +106,18 @@ public sealed partial class FAT var ebpb = new BiosParameterBlockEbpb(); var apricotBpb = new ApricotLabel(); - bool useAtariBpb = false; - bool useMsxBpb = false; - bool useDos2Bpb = false; - bool useDos3Bpb = false; - bool useDos32Bpb = false; - bool useDos33Bpb = false; - bool userShortExtendedBpb = false; - bool useExtendedBpb = false; - bool useShortFat32 = false; - bool useLongFat32 = false; - bool useApricotBpb = false; - bool useDecRainbowBpb = false; + var useAtariBpb = false; + var useMsxBpb = false; + var useDos2Bpb = false; + var useDos3Bpb = false; + var useDos32Bpb = false; + var useDos33Bpb = false; + var userShortExtendedBpb = false; + var useExtendedBpb = false; + var useShortFat32 = false; + var useLongFat32 = false; + var useApricotBpb = false; + var useDecRainbowBpb = false; if(imagePlugin.Info.SectorSize >= 256) { @@ -232,6 +233,7 @@ public sealed partial class FAT if(ebpb.sectors == 0) { if(ebpb.big_sectors <= partition.End - partition.Start + 1) + { if(ebpb.signature == 0x29 || andosOemCorrect) { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Using_DOS_4_0_BPB); @@ -244,8 +246,10 @@ public sealed partial class FAT userShortExtendedBpb = true; minBootNearJump = 0x29; } + } } else if(ebpb.sectors <= partition.End - partition.Start + 1) + { if(ebpb.signature == 0x29 || andosOemCorrect) { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Using_DOS_4_0_BPB); @@ -258,12 +262,14 @@ public sealed partial class FAT userShortExtendedBpb = true; minBootNearJump = 0x29; } + } } else if(bitsInBpsDos33 == 1 && correctSpcDos33 && dos33Bpb.rsectors < partition.End - partition.Start && dos33Bpb.fats_no <= 2 && dos33Bpb is { root_ent: > 0, spfat: > 0 }) + { if(dos33Bpb.sectors == 0 && dos33Bpb.hsectors <= partition.Start && dos33Bpb.big_sectors > 0 && @@ -277,9 +283,10 @@ public sealed partial class FAT dos33Bpb.hsectors <= partition.Start && dos33Bpb.sectors > 0 && dos33Bpb.sectors <= partition.End - partition.Start + 1) + { if(atariBpb.jump[0] == 0x60 || - (atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && - Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT ") || + atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && + Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT " || partition.Type is "GEM" or "BGM") { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Using_Atari_BPB); @@ -291,6 +298,7 @@ public sealed partial class FAT useDos33Bpb = true; minBootNearJump = 0x22; } + } else { if(dos32Bpb.hsectors <= partition.Start && @@ -302,9 +310,10 @@ public sealed partial class FAT } else if(dos30Bpb.sptrk is > 0 and < 64 && dos30Bpb.heads is > 0 and < 256) + { if(atariBpb.jump[0] == 0x60 || - (atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && - Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT ")) + atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && + Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT ") { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Using_Atari_BPB); useAtariBpb = true; @@ -315,11 +324,12 @@ public sealed partial class FAT useDos3Bpb = true; minBootNearJump = 0x1C; } + } else { if(atariBpb.jump[0] == 0x60 || - (atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && - Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT ")) + atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && + Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT ") { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Using_Atari_BPB); useAtariBpb = true; @@ -332,6 +342,7 @@ public sealed partial class FAT } } } + } } // DEC Rainbow, lacks a BPB but has a very concrete structure... @@ -361,30 +372,29 @@ public sealed partial class FAT // Volume is software interleaved 2:1 var rootMs = new MemoryStream(); - foreach(ulong rootSector in new ulong[] - { - 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20 - }) + foreach(ulong rootSector in new ulong[] { 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20 }) { imagePlugin.ReadSector(rootSector, out byte[] tmp); rootMs.Write(tmp, 0, tmp.Length); } byte[] rootDir = rootMs.ToArray(); - bool validRootDir = true; + var validRootDir = true; // Iterate all root directory - for(int e = 0; e < 96 * 32; e += 32) + for(var e = 0; e < 96 * 32; e += 32) { - for(int c = 0; c < 11; c++) - if((rootDir[c + e] < 0x20 && rootDir[c + e] != 0x00 && rootDir[c + e] != 0x05) || - rootDir[c + e] == 0xFF || + for(var c = 0; c < 11; c++) + { + if(rootDir[c + e] < 0x20 && rootDir[c + e] != 0x00 && rootDir[c + e] != 0x05 || + rootDir[c + e] == 0xFF || rootDir[c + e] == 0x2E) { validRootDir = false; break; } + } if(!validRootDir) break; @@ -603,8 +613,8 @@ public sealed partial class FAT } // This assumes a bootable sector will jump somewhere or disable interrupts in x86 code - bootable |= bpbSector[0] == 0xFA || (bpbSector[0] == 0xEB && bpbSector[1] <= 0x7F) || - (bpbSector[0] == 0xE9 && BitConverter.ToUInt16(bpbSector, 1) <= 0x1FC); + bootable |= bpbSector[0] == 0xFA || bpbSector[0] == 0xEB && bpbSector[1] <= 0x7F || + bpbSector[0] == 0xE9 && BitConverter.ToUInt16(bpbSector, 1) <= 0x1FC; fakeBpb.boot_code = bpbSector; @@ -786,9 +796,11 @@ public sealed partial class FAT if(apricotBpb.bootLocation > 0 && apricotBpb.bootLocation + apricotBpb.bootSize < imagePlugin.Info.Sectors) + { imagePlugin.ReadSectors(apricotBpb.bootLocation, (uint)(apricotBpb.sectorSize * apricotBpb.bootSize) / imagePlugin.Info.SectorSize, out fakeBpb.boot_code); + } return BpbKind.Apricot; } diff --git a/Aaru.Filesystems/FAT/Consts.cs b/Aaru.Filesystems/FAT/Consts.cs index 7a8ccdec5..758a5cdab 100644 --- a/Aaru.Filesystems/FAT/Consts.cs +++ b/Aaru.Filesystems/FAT/Consts.cs @@ -77,6 +77,11 @@ public sealed partial class FAT const ushort EAT_ASN1 = 0xFFDD; const string FAT32_EA_TAIL = " EA. SF"; + const string FS_TYPE_FAT_PLUS = "fatplus"; + const string FS_TYPE_FAT32 = "fat32"; + const string FS_TYPE_FAT16 = "fat16"; + const string FS_TYPE_FAT12 = "fat12"; + readonly (string hash, string name)[] _knownBootHashes = { ("b639b4d5b25f63560e3b34a3a0feb732aa65486f", "Amstrad MS-DOS 3.20 (8-sector floppy)"), @@ -170,35 +175,31 @@ public sealed partial class FAT ("91e2b47c3cb46611249e4daa283a68ba21ba596a", "Human68k 2.00") }; - [Flags] - enum FatAttributes : byte - { - ReadOnly = 0x01, Hidden = 0x02, System = 0x04, - VolumeLabel = 0x08, Subdirectory = 0x10, Archive = 0x20, - Device = 0x40, Reserved = 0x80, LFN = 0x0F - } +#region Nested type: BpbKind enum BpbKind { - None, Hardcoded, Atari, - Msx, Dos2, Dos3, - Dos32, Dos33, ShortExtended, - Extended, ShortFat32, LongFat32, - Andos, Apricot, DecRainbow, + None, + Hardcoded, + Atari, + Msx, + Dos2, + Dos3, + Dos32, + Dos33, + ShortExtended, + Extended, + ShortFat32, + LongFat32, + Andos, + Apricot, + DecRainbow, Human } - enum Namespace - { - Dos, Nt, Lfn, - Os2, Ecs, Human - } +#endregion - [Flags] - enum EaFlags : uint - { - Normal = 0, Critical = 1 - } +#region Nested type: CaseInfo [Flags] enum CaseInfo : byte @@ -206,7 +207,8 @@ public sealed partial class FAT /// FASTFAT.SYS indicator that basename is lowercase LowerCaseBasename = 0x08, /// FASTFAT.SYS indicator that extension is lowercase - LowerCaseExtension = 0x10, AllLowerCase = 0x18, + LowerCaseExtension = 0x10, + AllLowerCase = 0x18, /// FAT32.IFS < 0.97 indicator for normal EAs present NormalEaOld = 0xEA, /// FAT32.IFS < 0.97 indicator for critical EAs present @@ -217,8 +219,48 @@ public sealed partial class FAT CriticalEa = 0x80 } - const string FS_TYPE_FAT_PLUS = "fatplus"; - const string FS_TYPE_FAT32 = "fat32"; - const string FS_TYPE_FAT16 = "fat16"; - const string FS_TYPE_FAT12 = "fat12"; +#endregion + +#region Nested type: EaFlags + + [Flags] + enum EaFlags : uint + { + Normal = 0, + Critical = 1 + } + +#endregion + +#region Nested type: FatAttributes + + [Flags] + enum FatAttributes : byte + { + ReadOnly = 0x01, + Hidden = 0x02, + System = 0x04, + VolumeLabel = 0x08, + Subdirectory = 0x10, + Archive = 0x20, + Device = 0x40, + Reserved = 0x80, + LFN = 0x0F + } + +#endregion + +#region Nested type: Namespace + + enum Namespace + { + Dos, + Nt, + Lfn, + Os2, + Ecs, + Human + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FAT/Dir.cs b/Aaru.Filesystems/FAT/Dir.cs index d3b25fa7d..7a9e96c41 100644 --- a/Aaru.Filesystems/FAT/Dir.cs +++ b/Aaru.Filesystems/FAT/Dir.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; public sealed partial class FAT { +#region IReadOnlyFilesystem Members + /// /// Solves a symbolic link. /// Link path. @@ -72,7 +74,8 @@ public sealed partial class FAT return ErrorNumber.NoError; } - string cutPath = path.StartsWith("/", StringComparison.Ordinal) ? path[1..].ToLower(_cultureInfo) + string cutPath = path.StartsWith("/", StringComparison.Ordinal) + ? path[1..].ToLower(_cultureInfo) : path.ToLower(_cultureInfo); if(_directoryCache.TryGetValue(cutPath, out Dictionary currentDirectory)) @@ -87,10 +90,7 @@ public sealed partial class FAT return ErrorNumber.NoError; } - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); KeyValuePair entry = _rootDirectoryCache.FirstOrDefault(t => t.Key.ToLower(_cultureInfo) == pieces[0]); @@ -105,7 +105,7 @@ public sealed partial class FAT currentDirectory = _rootDirectoryCache; - for(int p = 0; p < pieces.Length; p++) + for(var p = 0; p < pieces.Length; p++) { entry = currentDirectory.FirstOrDefault(t => t.Key.ToLower(_cultureInfo) == pieces[p]); @@ -144,11 +144,11 @@ public sealed partial class FAT if(clusters is null) return ErrorNumber.InvalidArgument; - byte[] directoryBuffer = new byte[_bytesPerCluster * clusters.Length]; + var directoryBuffer = new byte[_bytesPerCluster * clusters.Length]; - for(int i = 0; i < clusters.Length; i++) + for(var i = 0; i < clusters.Length; i++) { - ErrorNumber errno = _image.ReadSectors(_firstClusterSector + (clusters[i] * _sectorsPerCluster), + ErrorNumber errno = _image.ReadSectors(_firstClusterSector + clusters[i] * _sectorsPerCluster, _sectorsPerCluster, out byte[] buffer); if(errno != ErrorNumber.NoError) @@ -161,7 +161,7 @@ public sealed partial class FAT byte[] lastLfnName = null; byte lastLfnChecksum = 0; - for(int pos = 0; pos < directoryBuffer.Length; pos += Marshal.SizeOf()) + for(var pos = 0; pos < directoryBuffer.Length; pos += Marshal.SizeOf()) { DirectoryEntry dirent = Marshal.ByteArrayToStructureLittleEndian(directoryBuffer, pos, @@ -199,9 +199,9 @@ public sealed partial class FAT lfnSequence--; - Array.Copy(lfnEntry.name1, 0, lastLfnName, lfnSequence * 26, 10); - Array.Copy(lfnEntry.name2, 0, lastLfnName, (lfnSequence * 26) + 10, 12); - Array.Copy(lfnEntry.name3, 0, lastLfnName, (lfnSequence * 26) + 22, 4); + Array.Copy(lfnEntry.name1, 0, lastLfnName, lfnSequence * 26, 10); + Array.Copy(lfnEntry.name2, 0, lastLfnName, lfnSequence * 26 + 10, 12); + Array.Copy(lfnEntry.name3, 0, lastLfnName, lfnSequence * 26 + 22, 4); continue; } @@ -267,7 +267,7 @@ public sealed partial class FAT name = ":{EMPTYNAME}:"; // Try to create a unique filename with an extension from 000 to 999 - for(int uniq = 0; uniq < 1000; uniq++) + for(var uniq = 0; uniq < 1000; uniq++) { extension = $"{uniq:D03}"; @@ -302,7 +302,7 @@ public sealed partial class FAT completeEntry.HumanDirent = humanEntry; - name = StringHandlers.CToString(humanEntry.name1, _encoding).TrimEnd(); + name = StringHandlers.CToString(humanEntry.name1, _encoding).TrimEnd(); extension = StringHandlers.CToString(humanEntry.extension, _encoding).TrimEnd(); string name2 = StringHandlers.CToString(humanEntry.name2, _encoding).TrimEnd(); @@ -329,7 +329,7 @@ public sealed partial class FAT _namespace is Namespace.Os2 or Namespace.Ecs && !_fat32) { - List> filesWithEas = + var filesWithEas = currentDirectory.Where(t => t.Value.Dirent.ea_handle != 0).ToList(); foreach(KeyValuePair fileWithEa in filesWithEas) @@ -345,12 +345,12 @@ public sealed partial class FAT if(BitConverter.ToUInt16(longnameEa, 0) != EAT_ASCII) continue; - ushort longnameSize = BitConverter.ToUInt16(longnameEa, 2); + var longnameSize = BitConverter.ToUInt16(longnameEa, 2); if(longnameSize + 4 > longnameEa.Length) continue; - byte[] longnameBytes = new byte[longnameSize]; + var longnameBytes = new byte[longnameSize]; Array.Copy(longnameEa, 4, longnameBytes, 0, longnameSize); @@ -371,7 +371,7 @@ public sealed partial class FAT // Check FAT32.IFS EAs if(_fat32 || _debug) { - List> fat32EaSidecars = + var fat32EaSidecars = currentDirectory.Where(t => t.Key.EndsWith(FAT32_EA_TAIL, true, _cultureInfo)).ToList(); foreach(KeyValuePair sidecar in fat32EaSidecars) @@ -383,11 +383,13 @@ public sealed partial class FAT // If not in debug mode we will consider the lack of EA bitflags to mean the EAs are corrupted or not real if(!_debug) + { if(!fileWithEa.Dirent.caseinfo.HasFlag(CaseInfo.NormalEaOld) && !fileWithEa.Dirent.caseinfo.HasFlag(CaseInfo.CriticalEa) && !fileWithEa.Dirent.caseinfo.HasFlag(CaseInfo.NormalEa) && !fileWithEa.Dirent.caseinfo.HasFlag(CaseInfo.CriticalEa)) continue; + } fileWithEa.Fat32Ea = sidecar.Value.Dirent; @@ -432,14 +434,14 @@ public sealed partial class FAT CompleteDirectoryEntry entry = mynode._entries[mynode._position]; filename = _namespace switch - { - Namespace.Ecs when entry.Longname is not null => entry.Longname, - Namespace.Ecs when entry.Longname is null && entry.Lfn is not null => entry.Lfn, - Namespace.Lfn when entry.Lfn is not null => entry.Lfn, - Namespace.Human when entry.HumanName is not null => entry.HumanName, - Namespace.Os2 when entry.Longname is not null => entry.Longname, - _ => entry.Shortname - }; + { + Namespace.Ecs when entry.Longname is not null => entry.Longname, + Namespace.Ecs when entry.Longname is null && entry.Lfn is not null => entry.Lfn, + Namespace.Lfn when entry.Lfn is not null => entry.Lfn, + Namespace.Human when entry.HumanName is not null => entry.HumanName, + Namespace.Os2 when entry.Longname is not null => entry.Longname, + _ => entry.Shortname + }; mynode._position++; @@ -457,4 +459,6 @@ public sealed partial class FAT return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FAT/FAT.cs b/Aaru.Filesystems/FAT/FAT.cs index 441136de8..ecbb31ca1 100644 --- a/Aaru.Filesystems/FAT/FAT.cs +++ b/Aaru.Filesystems/FAT/FAT.cs @@ -42,18 +42,22 @@ namespace Aaru.Filesystems; /// Implements the File Allocation Table, aka FAT, filesystem (FAT12, FAT16 and FAT32 variants). public sealed partial class FAT : IReadOnlyFilesystem { + const string MODULE_NAME = "FAT plugin"; uint _bytesPerCluster; byte[] _cachedEaData; CultureInfo _cultureInfo; bool _debug; Dictionary> _directoryCache; DirectoryEntry _eaDirEntry; + Encoding _encoding; bool _fat12; bool _fat16; bool _fat32; ushort[] _fatEntries; + uint _fatEntriesPerSector; ulong _fatFirstSector; ulong _firstClusterSector; + IMediaImage _image; bool _mounted; Namespace _namespace; uint _reservedSectors; @@ -62,16 +66,18 @@ public sealed partial class FAT : IReadOnlyFilesystem uint _sectorsPerFat; FileSystemInfo _statfs; bool _useFirstFat; - Encoding _encoding; - uint _fatEntriesPerSector; - IMediaImage _image; + +#region IReadOnlyFilesystem Members /// public FileSystem Metadata { get; private set; } + /// public string Name => Localization.FAT_Name; + /// public Guid Id => new("33513B2C-0D26-0D2D-32C3-79D8611158E0"); + /// public string Author => Authors.NataliaPortillo; @@ -82,29 +88,17 @@ public sealed partial class FAT : IReadOnlyFilesystem /// public Dictionary Namespaces => new() { - { - "dos", Localization.DOS_8_3_all_uppercase - }, - { - "nt", Localization.Windows_NT_8_3_mixed_case - }, - { - "os2", Localization.OS2_LONGNAME_extended_attribute - }, - { - "ecs", Localization.Use_LFN_when_available_with_fallback_to_LONGNAME_default - }, - { - "lfn", Localization.Long_file_names - } + { "dos", Localization.DOS_8_3_all_uppercase }, + { "nt", Localization.Windows_NT_8_3_mixed_case }, + { "os2", Localization.OS2_LONGNAME_extended_attribute }, + { "ecs", Localization.Use_LFN_when_available_with_fallback_to_LONGNAME_default }, + { "lfn", Localization.Long_file_names } }; +#endregion + static Dictionary GetDefaultOptions() => new() { - { - "debug", false.ToString() - } + { "debug", false.ToString() } }; - - const string MODULE_NAME = "FAT plugin"; } \ No newline at end of file diff --git a/Aaru.Filesystems/FAT/File.cs b/Aaru.Filesystems/FAT/File.cs index 7c3e9c79f..e30191cc6 100644 --- a/Aaru.Filesystems/FAT/File.cs +++ b/Aaru.Filesystems/FAT/File.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; public sealed partial class FAT { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -134,13 +136,13 @@ public sealed partial class FAT var ms = new MemoryStream(); - for(int i = 0; i < sizeInClusters; i++) + for(var i = 0; i < sizeInClusters; i++) { if(i + firstCluster >= mynode._clusters.Length) return ErrorNumber.InvalidArgument; ErrorNumber errno = - _image.ReadSectors(_firstClusterSector + (mynode._clusters[i + firstCluster] * _sectorsPerCluster), + _image.ReadSectors(_firstClusterSector + mynode._clusters[i + firstCluster] * _sectorsPerCluster, _sectorsPerCluster, out byte[] buf); if(errno != ErrorNumber.NoError) @@ -202,10 +204,13 @@ public sealed partial class FAT { stat.Attributes |= FileAttributes.Directory; - if((_fat32 && entry.ea_handle << 16 > 0) || + if(_fat32 && entry.ea_handle << 16 > 0 || entry.start_cluster > 0) - stat.Blocks = _fat32 ? GetClusters((uint)((entry.ea_handle << 16) + entry.start_cluster))?.Length ?? 0 - : GetClusters(entry.start_cluster)?.Length ?? 0; + { + stat.Blocks = _fat32 + ? GetClusters((uint)((entry.ea_handle << 16) + entry.start_cluster))?.Length ?? 0 + : GetClusters(entry.start_cluster)?.Length ?? 0; + } stat.Length = stat.Blocks * stat.BlockSize; } @@ -228,6 +233,8 @@ public sealed partial class FAT return ErrorNumber.NoError; } +#endregion + uint[] GetClusters(uint startCluster) { if(startCluster == 0) @@ -240,9 +247,9 @@ public sealed partial class FAT uint nextCluster = startCluster; - ulong nextSector = (nextCluster / _fatEntriesPerSector) + _fatFirstSector + (_useFirstFat ? 0 : _sectorsPerFat); + ulong nextSector = nextCluster / _fatEntriesPerSector + _fatFirstSector + (_useFirstFat ? 0 : _sectorsPerFat); - int nextEntry = (int)(nextCluster % _fatEntriesPerSector); + var nextEntry = (int)(nextCluster % _fatEntriesPerSector); ulong currentSector = nextSector; ErrorNumber errno = _image.ReadSector(currentSector, out byte[] fatData); @@ -251,6 +258,7 @@ public sealed partial class FAT return null; if(_fat32) + { while((nextCluster & FAT32_MASK) > 0 && (nextCluster & FAT32_MASK) <= FAT32_RESERVED) { @@ -268,12 +276,14 @@ public sealed partial class FAT nextCluster = BitConverter.ToUInt32(fatData, nextEntry * 4); - nextSector = (nextCluster / _fatEntriesPerSector) + _fatFirstSector + + nextSector = nextCluster / _fatEntriesPerSector + _fatFirstSector + (_useFirstFat ? 0 : _sectorsPerFat); nextEntry = (int)(nextCluster % _fatEntriesPerSector); } + } else if(_fat16) + { while(nextCluster is > 0 and <= FAT16_RESERVED) { if(nextCluster >= _fatEntries.Length) @@ -282,7 +292,9 @@ public sealed partial class FAT clusters.Add(nextCluster); nextCluster = _fatEntries[nextCluster]; } + } else + { while(nextCluster is > 0 and <= FAT12_RESERVED) { if(nextCluster >= _fatEntries.Length) @@ -291,6 +303,7 @@ public sealed partial class FAT clusters.Add(nextCluster); nextCluster = _fatEntries[nextCluster]; } + } return clusters.ToArray(); } @@ -301,15 +314,12 @@ public sealed partial class FAT string cutPath = path.StartsWith('/') ? path[1..].ToLower(_cultureInfo) : path.ToLower(_cultureInfo); - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pieces.Length == 0) return ErrorNumber.InvalidArgument; - string parentPath = string.Join("/", pieces, 0, pieces.Length - 1); + var parentPath = string.Join("/", pieces, 0, pieces.Length - 1); if(!_directoryCache.TryGetValue(parentPath, out _)) { @@ -343,10 +353,10 @@ public sealed partial class FAT { byte sum = 0; - for(int i = 0; i < 8; i++) + for(var i = 0; i < 8; i++) sum = (byte)(((sum & 1) << 7) + (sum >> 1) + name[i]); - for(int i = 0; i < 3; i++) + for(var i = 0; i < 3; i++) sum = (byte)(((sum & 1) << 7) + (sum >> 1) + extension[i]); return sum; diff --git a/Aaru.Filesystems/FAT/Info.cs b/Aaru.Filesystems/FAT/Info.cs index 9fdcfe3cc..038323ac1 100644 --- a/Aaru.Filesystems/FAT/Info.cs +++ b/Aaru.Filesystems/FAT/Info.cs @@ -45,6 +45,8 @@ namespace Aaru.Filesystems; public sealed partial class FAT { +#region IReadOnlyFilesystem Members + /// [SuppressMessage("ReSharper", "JoinDeclarationAndInitializer")] public bool Identify(IMediaImage imagePlugin, Partition partition) @@ -64,11 +66,11 @@ public sealed partial class FAT byte bpbSignature; byte fat32Signature; ulong hugeSectors; - byte[] fat32Id = new byte[8]; - byte[] msxId = new byte[6]; + var fat32Id = new byte[8]; + var msxId = new byte[6]; byte fatId; - byte[] dosOem = new byte[8]; - byte[] atariOem = new byte[6]; + var dosOem = new byte[8]; + var atariOem = new byte[6]; ushort bootable = 0; uint sectorsPerBpb = imagePlugin.Info.SectorSize < 512 ? 512 / imagePlugin.Info.SectorSize : 1; @@ -87,14 +89,15 @@ public sealed partial class FAT ulong expectedClusters = humanBpb.bpc > 0 ? partition.Size / humanBpb.bpc : 0; - AaruConsole.DebugWriteLine(MODULE_NAME, "Human bpc = {0}", humanBpb.bpc); - AaruConsole.DebugWriteLine(MODULE_NAME, "Human clusters = {0}", humanBpb.clusters); - AaruConsole.DebugWriteLine(MODULE_NAME, "Human big_clusters = {0}", humanBpb.big_clusters); + AaruConsole.DebugWriteLine(MODULE_NAME, "Human bpc = {0}", humanBpb.bpc); + AaruConsole.DebugWriteLine(MODULE_NAME, "Human clusters = {0}", humanBpb.clusters); + AaruConsole.DebugWriteLine(MODULE_NAME, "Human big_clusters = {0}", humanBpb.big_clusters); AaruConsole.DebugWriteLine(MODULE_NAME, "Human expected clusters = {0}", expectedClusters); // Check clusters for Human68k are correct - bool humanClustersCorrect = humanBpb.clusters == 0 ? humanBpb.big_clusters == expectedClusters - : humanBpb.clusters == expectedClusters; + bool humanClustersCorrect = humanBpb.clusters == 0 + ? humanBpb.big_clusters == expectedClusters + : humanBpb.clusters == expectedClusters; // Check OEM for Human68k is correct bool humanOemCorrect = bpbSector[2] >= 0x20 && bpbSector[3] >= 0x20 && bpbSector[4] >= 0x20 && @@ -108,8 +111,8 @@ public sealed partial class FAT bool humanBranchCorrect = bpbSector[0] == 0x60 && bpbSector[1] >= 0x20 && bpbSector[1] < 0xFE; AaruConsole.DebugWriteLine(MODULE_NAME, "humanClustersCorrect = {0}", humanClustersCorrect); - AaruConsole.DebugWriteLine(MODULE_NAME, "humanOemCorrect = {0}", humanOemCorrect); - AaruConsole.DebugWriteLine(MODULE_NAME, "humanBranchCorrect = {0}", humanBranchCorrect); + AaruConsole.DebugWriteLine(MODULE_NAME, "humanOemCorrect = {0}", humanOemCorrect); + AaruConsole.DebugWriteLine(MODULE_NAME, "humanBranchCorrect = {0}", humanBranchCorrect); // If all Human68k checks are correct, it is a Human68k FAT16 if(humanClustersCorrect && @@ -119,7 +122,7 @@ public sealed partial class FAT return true; Array.Copy(bpbSector, 0x02, atariOem, 0, 6); - Array.Copy(bpbSector, 0x03, dosOem, 0, 8); + Array.Copy(bpbSector, 0x03, dosOem, 0, 8); bps = BitConverter.ToUInt16(bpbSector, 0x00B); spc = bpbSector[0x00D]; reservedSecs = BitConverter.ToUInt16(bpbSector, 0x00E); @@ -152,49 +155,49 @@ public sealed partial class FAT string oemString = Encoding.ASCII.GetString(dosOem); - AaruConsole.DebugWriteLine(MODULE_NAME, "atari_oem_correct = {0}", atariOemCorrect); - AaruConsole.DebugWriteLine(MODULE_NAME, "dos_oem_correct = {0}", dosOemCorrect); - AaruConsole.DebugWriteLine(MODULE_NAME, "bps = {0}", bps); - AaruConsole.DebugWriteLine(MODULE_NAME, "bits in bps = {0}", bitsInBps); - AaruConsole.DebugWriteLine(MODULE_NAME, "spc = {0}", spc); - AaruConsole.DebugWriteLine(MODULE_NAME, "correct_spc = {0}", correctSpc); - AaruConsole.DebugWriteLine(MODULE_NAME, "reserved_secs = {0}", reservedSecs); - AaruConsole.DebugWriteLine(MODULE_NAME, "fats_no = {0}", numberOfFats); - AaruConsole.DebugWriteLine(MODULE_NAME, "root_entries = {0}", rootEntries); - AaruConsole.DebugWriteLine(MODULE_NAME, "sectors = {0}", sectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "atari_oem_correct = {0}", atariOemCorrect); + AaruConsole.DebugWriteLine(MODULE_NAME, "dos_oem_correct = {0}", dosOemCorrect); + AaruConsole.DebugWriteLine(MODULE_NAME, "bps = {0}", bps); + AaruConsole.DebugWriteLine(MODULE_NAME, "bits in bps = {0}", bitsInBps); + AaruConsole.DebugWriteLine(MODULE_NAME, "spc = {0}", spc); + AaruConsole.DebugWriteLine(MODULE_NAME, "correct_spc = {0}", correctSpc); + AaruConsole.DebugWriteLine(MODULE_NAME, "reserved_secs = {0}", reservedSecs); + AaruConsole.DebugWriteLine(MODULE_NAME, "fats_no = {0}", numberOfFats); + AaruConsole.DebugWriteLine(MODULE_NAME, "root_entries = {0}", rootEntries); + AaruConsole.DebugWriteLine(MODULE_NAME, "sectors = {0}", sectors); AaruConsole.DebugWriteLine(MODULE_NAME, "media_descriptor = 0x{0:X2}", mediaDescriptor); - AaruConsole.DebugWriteLine(MODULE_NAME, "fat_sectors = {0}", fatSectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "msx_id = \"{0}\"", msxString); - AaruConsole.DebugWriteLine(MODULE_NAME, "big_sectors = {0}", bigSectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb_signature = 0x{0:X2}", bpbSignature); - AaruConsole.DebugWriteLine(MODULE_NAME, "fat32_signature = 0x{0:X2}", fat32Signature); - AaruConsole.DebugWriteLine(MODULE_NAME, "fat32_id = \"{0}\"", fat32String); - AaruConsole.DebugWriteLine(MODULE_NAME, "huge_sectors = {0}", hugeSectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "fat_id = 0x{0:X2}", fatId); + AaruConsole.DebugWriteLine(MODULE_NAME, "fat_sectors = {0}", fatSectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "msx_id = \"{0}\"", msxString); + AaruConsole.DebugWriteLine(MODULE_NAME, "big_sectors = {0}", bigSectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb_signature = 0x{0:X2}", bpbSignature); + AaruConsole.DebugWriteLine(MODULE_NAME, "fat32_signature = 0x{0:X2}", fat32Signature); + AaruConsole.DebugWriteLine(MODULE_NAME, "fat32_id = \"{0}\"", fat32String); + AaruConsole.DebugWriteLine(MODULE_NAME, "huge_sectors = {0}", hugeSectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "fat_id = 0x{0:X2}", fatId); - ushort apricotBps = BitConverter.ToUInt16(bpbSector, 0x50); - byte apricotSpc = bpbSector[0x52]; - ushort apricotReservedSecs = BitConverter.ToUInt16(bpbSector, 0x53); - byte apricotFatsNo = bpbSector[0x55]; - ushort apricotRootEntries = BitConverter.ToUInt16(bpbSector, 0x56); - ushort apricotSectors = BitConverter.ToUInt16(bpbSector, 0x58); - byte apricotMediaDescriptor = bpbSector[0x5A]; - ushort apricotFatSectors = BitConverter.ToUInt16(bpbSector, 0x5B); + var apricotBps = BitConverter.ToUInt16(bpbSector, 0x50); + byte apricotSpc = bpbSector[0x52]; + var apricotReservedSecs = BitConverter.ToUInt16(bpbSector, 0x53); + byte apricotFatsNo = bpbSector[0x55]; + var apricotRootEntries = BitConverter.ToUInt16(bpbSector, 0x56); + var apricotSectors = BitConverter.ToUInt16(bpbSector, 0x58); + byte apricotMediaDescriptor = bpbSector[0x5A]; + var apricotFatSectors = BitConverter.ToUInt16(bpbSector, 0x5B); bool apricotCorrectSpc = apricotSpc is 1 or 2 or 4 or 8 or 16 or 32 or 64; int bitsInApricotBps = CountBits.Count(apricotBps); byte apricotPartitions = bpbSector[0x0C]; - AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_bps = {0}", apricotBps); - AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_spc = {0}", apricotSpc); - AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_correct_spc = {0}", apricotCorrectSpc); - AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_reserved_secs = {0}", apricotReservedSecs); - AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_fats_no = {0}", apricotFatsNo); - AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_root_entries = {0}", apricotRootEntries); - AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_sectors = {0}", apricotSectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_bps = {0}", apricotBps); + AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_spc = {0}", apricotSpc); + AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_correct_spc = {0}", apricotCorrectSpc); + AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_reserved_secs = {0}", apricotReservedSecs); + AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_fats_no = {0}", apricotFatsNo); + AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_root_entries = {0}", apricotRootEntries); + AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_sectors = {0}", apricotSectors); AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_media_descriptor = 0x{0:X2}", apricotMediaDescriptor); - AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_fat_sectors = {0}", apricotFatSectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "apricot_fat_sectors = {0}", apricotFatSectors); // This is to support FAT partitions on hybrid ISO/USB images if(imagePlugin.Info.MetadataMediaType == MetadataMediaType.OpticalDisc) @@ -207,13 +210,16 @@ public sealed partial class FAT switch(oemString) { // exFAT - case "EXFAT ": return false; + case "EXFAT ": + return false; // NTFS - case "NTFS " when bootable == 0xAA55 && numberOfFats == 0 && fatSectors == 0: return false; + case "NTFS " when bootable == 0xAA55 && numberOfFats == 0 && fatSectors == 0: + return false; // QNX4 - case "FQNX4FS ": return false; + case "FQNX4FS ": + return false; } // HPFS @@ -225,8 +231,8 @@ public sealed partial class FAT if(errno != ErrorNumber.NoError) return false; - uint hpfsMagic1 = BitConverter.ToUInt32(hpfsSbSector, 0x000); - uint hpfsMagic2 = BitConverter.ToUInt32(hpfsSbSector, 0x004); + var hpfsMagic1 = BitConverter.ToUInt32(hpfsSbSector, 0x000); + var hpfsMagic2 = BitConverter.ToUInt32(hpfsSbSector, 0x004); if(hpfsMagic1 == 0xF995E849 && hpfsMagic2 == 0xFA53E9C5) @@ -237,31 +243,36 @@ public sealed partial class FAT { // FAT32 for sure case 1 when correctSpc && numberOfFats <= 2 && fatSectors == 0 && fat32Signature == 0x29 && - fat32String == "FAT32 ": return true; + fat32String == "FAT32 ": + return true; // short FAT32 case 1 when correctSpc && numberOfFats <= 2 && fatSectors == 0 && fat32Signature == 0x28: - return sectors == 0 ? bigSectors == 0 - ? hugeSectors <= partition.End - partition.Start + 1 - : bigSectors <= partition.End - partition.Start + 1 + return sectors == 0 + ? bigSectors == 0 + ? hugeSectors <= partition.End - partition.Start + 1 + : bigSectors <= partition.End - partition.Start + 1 : sectors <= partition.End - partition.Start + 1; // MSX-DOS FAT12 case 1 when correctSpc && numberOfFats <= 2 && rootEntries > 0 && sectors <= partition.End - partition.Start + 1 && fatSectors > 0 && - msxString == "VOL_ID": return true; + msxString == "VOL_ID": + return true; // EBPB case 1 when correctSpc && numberOfFats <= 2 && rootEntries > 0 && fatSectors > 0 && bpbSignature is 0x28 or 0x29: - return sectors == 0 ? bigSectors <= partition.End - partition.Start + 1 - : sectors <= partition.End - partition.Start + 1; + return sectors == 0 + ? bigSectors <= partition.End - partition.Start + 1 + : sectors <= partition.End - partition.Start + 1; // BPB case 1 when correctSpc && reservedSecs < partition.End - partition.Start && numberOfFats <= 2 && rootEntries > 0 && fatSectors > 0: - return sectors == 0 ? bigSectors <= partition.End - partition.Start + 1 - : sectors <= partition.End - partition.Start + 1; + return sectors == 0 + ? bigSectors <= partition.End - partition.Start + 1 + : sectors <= partition.End - partition.Start + 1; } // Apricot BPB @@ -302,10 +313,7 @@ public sealed partial class FAT // Volume is software interleaved 2:1 var rootMs = new MemoryStream(); - foreach(ulong rootSector in new ulong[] - { - 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20 - }) + foreach(ulong rootSector in new ulong[] { 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20 }) { errno = imagePlugin.ReadSector(rootSector, out byte[] tmp); @@ -316,20 +324,22 @@ public sealed partial class FAT } byte[] rootDir = rootMs.ToArray(); - bool validRootDir = true; + var validRootDir = true; // Iterate all root directory - for(int e = 0; e < 96 * 32; e += 32) + for(var e = 0; e < 96 * 32; e += 32) { - for(int c = 0; c < 11; c++) - if((rootDir[c + e] < 0x20 && rootDir[c + e] != 0x00 && rootDir[c + e] != 0x05) || - rootDir[c + e] == 0xFF || + for(var c = 0; c < 11; c++) + { + if(rootDir[c + e] < 0x20 && rootDir[c + e] != 0x00 && rootDir[c + e] != 0x05 || + rootDir[c + e] == 0xFF || rootDir[c + e] == 0x2E) { validRootDir = false; break; } + } if(!validRootDir) break; @@ -343,9 +353,9 @@ public sealed partial class FAT return true; } - byte fat2 = fatSector[1]; - byte fat3 = fatSector[2]; - ushort fatCluster2 = (ushort)(((fat2 << 8) + fat3) & 0xFFF); + byte fat2 = fatSector[1]; + byte fat3 = fatSector[2]; + var fatCluster2 = (ushort)((fat2 << 8) + fat3 & 0xFFF); AaruConsole.DebugWriteLine(MODULE_NAME, "1st fat cluster 1 = {0:X3}", fatCluster2); @@ -374,15 +384,15 @@ public sealed partial class FAT break; case 0xFE: fat2SectorNo = imagePlugin.Info.Sectors switch - { - 320 when imagePlugin.Info.SectorSize == 512 => 2, - 2002 when imagePlugin.Info.SectorSize == 128 => 7, - 1232 when imagePlugin.Info.SectorSize == 1024 => 3, - 616 when imagePlugin.Info.SectorSize == 1024 => 2, - 720 when imagePlugin.Info.SectorSize == 128 => 5, - 640 when imagePlugin.Info.SectorSize == 512 => 2, - _ => fat2SectorNo - }; + { + 320 when imagePlugin.Info.SectorSize == 512 => 2, + 2002 when imagePlugin.Info.SectorSize == 128 => 7, + 1232 when imagePlugin.Info.SectorSize == 1024 => 3, + 616 when imagePlugin.Info.SectorSize == 1024 => 2, + 720 when imagePlugin.Info.SectorSize == 128 => 5, + 640 when imagePlugin.Info.SectorSize == 512 => 2, + _ => fat2SectorNo + }; break; case 0xFF: @@ -412,7 +422,7 @@ public sealed partial class FAT fat2 = fat2Sector[1]; fat3 = fat2Sector[2]; - fatCluster2 = (ushort)(((fat2 << 8) + fat3) & 0xFFF); + fatCluster2 = (ushort)((fat2 << 8) + fat3 & 0xFFF); if(fatCluster2 < 0xFF0) return false; @@ -441,9 +451,9 @@ public sealed partial class FAT out HumanParameterBlock humanBpb, out AtariParameterBlock atariBpb, out byte minBootNearJump, out bool andosOemCorrect, out bool bootable); - bool isFat12 = false; - bool isFat16 = false; - bool isFat32 = false; + var isFat12 = false; + var isFat16 = false; + var isFat32 = false; ulong rootDirectorySector = 0; string extraInfo = null; string bootChk = null; @@ -496,17 +506,19 @@ public sealed partial class FAT } if(fat32Bpb.oem_name != null) + { if(fat32Bpb.oem_name[5] == 0x49 && fat32Bpb.oem_name[6] == 0x48 && fat32Bpb.oem_name[7] == 0x43) sb.AppendLine(Localization.Volume_has_been_modified_by_Windows_9x_Me_Volume_Tracker); else metadata.SystemIdentifier = StringHandlers.CToString(fat32Bpb.oem_name); + } if(!string.IsNullOrEmpty(metadata.SystemIdentifier)) sb.AppendFormat(Localization.OEM_name_0, metadata.SystemIdentifier.Trim()).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_sector, fat32Bpb.bps).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_sector, fat32Bpb.bps).AppendLine(); sb.AppendFormat(Localization._0_sectors_per_cluster, fat32Bpb.spc).AppendLine(); metadata.ClusterSize = (uint)(fat32Bpb.bps * fat32Bpb.spc); sb.AppendFormat(Localization._0_sectors_reserved_between_BPB_and_FAT, fat32Bpb.rsectors).AppendLine(); @@ -533,19 +545,19 @@ public sealed partial class FAT metadata.Clusters = (ulong)(fat32Bpb.sectors / fat32Bpb.spc); } - sb.AppendFormat(Localization._0_clusters_on_volume, metadata.Clusters).AppendLine(); - sb.AppendFormat(Localization.Media_descriptor_0, fat32Bpb.media).AppendLine(); - sb.AppendFormat(Localization._0_sectors_per_FAT, fat32Bpb.big_spfat).AppendLine(); - sb.AppendFormat(Localization._0_sectors_per_track, fat32Bpb.sptrk).AppendLine(); - sb.AppendFormat(Localization._0_heads, fat32Bpb.heads).AppendLine(); + sb.AppendFormat(Localization._0_clusters_on_volume, metadata.Clusters).AppendLine(); + sb.AppendFormat(Localization.Media_descriptor_0, fat32Bpb.media).AppendLine(); + sb.AppendFormat(Localization._0_sectors_per_FAT, fat32Bpb.big_spfat).AppendLine(); + sb.AppendFormat(Localization._0_sectors_per_track, fat32Bpb.sptrk).AppendLine(); + sb.AppendFormat(Localization._0_heads, fat32Bpb.heads).AppendLine(); sb.AppendFormat(Localization._0_hidden_sectors_before_BPB, fat32Bpb.hsectors).AppendLine(); - sb.AppendFormat(Localization.Cluster_of_root_directory_0, fat32Bpb.root_cluster).AppendLine(); + sb.AppendFormat(Localization.Cluster_of_root_directory_0, fat32Bpb.root_cluster).AppendLine(); sb.AppendFormat(Localization.Sector_of_FSINFO_structure_0, fat32Bpb.fsinfo_sector).AppendLine(); sb.AppendFormat(Localization.Sector_of_backup_FAT32_parameter_block_0, fat32Bpb.backup_sector). AppendLine(); - sb.AppendFormat(Localization.Drive_number_0, fat32Bpb.drive_no).AppendLine(); + sb.AppendFormat(Localization.Drive_number_0, fat32Bpb.drive_no).AppendLine(); sb.AppendFormat(Localization.Volume_Serial_Number_0, fat32Bpb.serial_no).AppendLine(); metadata.VolumeSerial = $"{fat32Bpb.serial_no:X8}"; @@ -562,8 +574,10 @@ public sealed partial class FAT } if((fat32Bpb.mirror_flags & 0x80) == 0x80) + { sb.AppendFormat(Localization.FATs_are_out_of_sync_FAT_0_is_in_use, fat32Bpb.mirror_flags & 0xF). AppendLine(); + } else sb.AppendLine(Localization.All_copies_of_FAT_are_the_same); @@ -588,16 +602,16 @@ public sealed partial class FAT // Check that jumps to a correct boot code position and has boot signature set. // This will mean that the volume will boot, even if just to say "this is not bootable change disk"...... metadata.Bootable = - (fat32Bpb.jump[0] == 0xEB && fat32Bpb.jump[1] >= minBootNearJump && fat32Bpb.jump[1] < 0x80) || - (fat32Bpb.jump[0] == 0xE9 && fat32Bpb.jump.Length >= 3 && - BitConverter.ToUInt16(fat32Bpb.jump, 1) >= minBootNearJump && - BitConverter.ToUInt16(fat32Bpb.jump, 1) <= 0x1FC); + fat32Bpb.jump[0] == 0xEB && fat32Bpb.jump[1] >= minBootNearJump && fat32Bpb.jump[1] < 0x80 || + fat32Bpb.jump[0] == 0xE9 && fat32Bpb.jump.Length >= 3 && + BitConverter.ToUInt16(fat32Bpb.jump, 1) >= minBootNearJump && + BitConverter.ToUInt16(fat32Bpb.jump, 1) <= 0x1FC; sectorsPerRealSector = fat32Bpb.bps / imagePlugin.Info.SectorSize; // First root directory sector rootDirectorySector = - (ulong)(((fat32Bpb.root_cluster - 2) * fat32Bpb.spc) + (fat32Bpb.big_spfat * fat32Bpb.fats_no) + + (ulong)((fat32Bpb.root_cluster - 2) * fat32Bpb.spc + fat32Bpb.big_spfat * fat32Bpb.fats_no + fat32Bpb.rsectors) * sectorsPerRealSector; sectorsForRootDirectory = 1; @@ -633,7 +647,7 @@ public sealed partial class FAT { ushort sum = 0; - for(int i = 0; i < bpbSector.Length; i += 2) + for(var i = 0; i < bpbSector.Length; i += 2) sum += BigEndianBitConverter.ToUInt16(bpbSector, i); // TODO: Check this @@ -653,7 +667,7 @@ public sealed partial class FAT if(atariBpb.ldmode == 0) { - byte[] tmp = new byte[8]; + var tmp = new byte[8]; Array.Copy(atariBpb.fname, 0, tmp, 0, 8); string fname = Encoding.ASCII.GetString(tmp).Trim(); tmp = new byte[3]; @@ -669,9 +683,11 @@ public sealed partial class FAT atariSb.AppendFormat(Localization.Boot_program_resides_in_file_0, filename).AppendLine(); } else + { atariSb.AppendFormat(Localization.Boot_program_starts_in_sector_0_and_is_1_sectors_long_2_bytes, atariBpb.ssect, atariBpb.sectcnt, atariBpb.sectcnt * atariBpb.bps). AppendLine(); + } extraInfo = atariSb.ToString(); } @@ -705,15 +721,21 @@ public sealed partial class FAT if(bpbKind != BpbKind.Human) { - int reservedSectors = fakeBpb.rsectors + (fakeBpb.fats_no * fakeBpb.spfat) + - (fakeBpb.root_ent * 32 / fakeBpb.bps); + int reservedSectors = fakeBpb.rsectors + fakeBpb.fats_no * fakeBpb.spfat + + fakeBpb.root_ent * 32 / fakeBpb.bps; if(fakeBpb.sectors == 0) - clusters = (ulong)(fakeBpb.spc == 0 ? fakeBpb.big_sectors - reservedSectors + { + clusters = (ulong)(fakeBpb.spc == 0 + ? fakeBpb.big_sectors - reservedSectors : (fakeBpb.big_sectors - reservedSectors) / fakeBpb.spc); + } else - clusters = (ulong)(fakeBpb.spc == 0 ? fakeBpb.sectors - reservedSectors + { + clusters = (ulong)(fakeBpb.spc == 0 + ? fakeBpb.sectors - reservedSectors : (fakeBpb.sectors - reservedSectors) / fakeBpb.spc); + } } else clusters = humanBpb.clusters == 0 ? humanBpb.big_clusters : humanBpb.clusters; @@ -727,20 +749,20 @@ public sealed partial class FAT if(clusters < 4089) { // The first 2 FAT entries do not count as allocation clusters in FAT12 and FAT16 - ushort[] fat12 = new ushort[clusters + 2]; + var fat12 = new ushort[clusters + 2]; _reservedSectors = fakeBpb.rsectors; sectorsPerRealSector = fakeBpb.bps / imagePlugin.Info.SectorSize; - _fatFirstSector = partition.Start + (_reservedSectors * sectorsPerRealSector); + _fatFirstSector = partition.Start + _reservedSectors * sectorsPerRealSector; errno = imagePlugin.ReadSectors(_fatFirstSector, fakeBpb.spfat, out byte[] fatBytes); if(errno != ErrorNumber.NoError) return; - int pos = 0; + var pos = 0; - for(int i = 0; i + 3 < fatBytes.Length && pos < fat12.Length; i += 3) + for(var i = 0; i + 3 < fatBytes.Length && pos < fat12.Length; i += 3) { fat12[pos++] = (ushort)(((fatBytes[i + 1] & 0xF) << 8) + fatBytes[i + 0]); @@ -808,11 +830,11 @@ public sealed partial class FAT else if(isFat16) { sb.AppendLine(bpbKind switch - { - BpbKind.Atari => Localization.Atari_FAT16, - BpbKind.Human => Localization.Human68k_FAT16, - _ => Localization.Microsoft_FAT16 - }); + { + BpbKind.Atari => Localization.Atari_FAT16, + BpbKind.Human => Localization.Human68k_FAT16, + _ => Localization.Microsoft_FAT16 + }); metadata.Type = FS_TYPE_FAT16; } @@ -824,8 +846,10 @@ public sealed partial class FAT atariBpb.serial_no[2] == 0x43) sb.AppendLine(Localization.Volume_has_been_modified_by_Windows_9x_Me_Volume_Tracker); else + { metadata.VolumeSerial = $"{atariBpb.serial_no[0]:X2}{atariBpb.serial_no[1]:X2}{atariBpb.serial_no[2] :X2}"; + } metadata.SystemIdentifier = StringHandlers.CToString(atariBpb.oem_name); @@ -839,30 +863,45 @@ public sealed partial class FAT fakeBpb.oem_name[7] == 0x43) sb.AppendLine(Localization.Volume_has_been_modified_by_Windows_9x_Me_Volume_Tracker); else + { metadata.SystemIdentifier = fakeBpb.oem_name[0] switch - { - // Later versions of Windows create a DOS 3 BPB without OEM name on 8 sectors/track floppies - // OEM ID should be ASCII, otherwise ignore it - >= 0x20 and <= 0x7F when fakeBpb.oem_name[1] >= 0x20 && fakeBpb.oem_name[1] <= 0x7F && - fakeBpb.oem_name[2] >= 0x20 && fakeBpb.oem_name[2] <= 0x7F && - fakeBpb.oem_name[3] >= 0x20 && fakeBpb.oem_name[3] <= 0x7F && - fakeBpb.oem_name[4] >= 0x20 && fakeBpb.oem_name[4] <= 0x7F && - fakeBpb.oem_name[5] >= 0x20 && fakeBpb.oem_name[5] <= 0x7F && - fakeBpb.oem_name[6] >= 0x20 && fakeBpb.oem_name[6] <= 0x7F && - fakeBpb.oem_name[7] >= 0x20 && - fakeBpb.oem_name[7] <= 0x7F => - StringHandlers.CToString(fakeBpb.oem_name), - < 0x20 when fakeBpb.oem_name[1] >= 0x20 && fakeBpb.oem_name[1] <= 0x7F && - fakeBpb.oem_name[2] >= 0x20 && fakeBpb.oem_name[2] <= 0x7F && - fakeBpb.oem_name[3] >= 0x20 && fakeBpb.oem_name[3] <= 0x7F && - fakeBpb.oem_name[4] >= 0x20 && fakeBpb.oem_name[4] <= 0x7F && - fakeBpb.oem_name[5] >= 0x20 && fakeBpb.oem_name[5] <= 0x7F && - fakeBpb.oem_name[6] >= 0x20 && fakeBpb.oem_name[6] <= 0x7F && - fakeBpb.oem_name[7] >= 0x20 && - fakeBpb.oem_name[7] <= 0x7F => StringHandlers.CToString(fakeBpb.oem_name, encoding, - start: 1), - _ => metadata.SystemIdentifier - }; + { + // Later versions of Windows create a DOS 3 BPB without OEM name on 8 sectors/track floppies + // OEM ID should be ASCII, otherwise ignore it + >= 0x20 and <= 0x7F when fakeBpb.oem_name[1] >= 0x20 && + fakeBpb.oem_name[1] <= 0x7F && + fakeBpb.oem_name[2] >= 0x20 && + fakeBpb.oem_name[2] <= 0x7F && + fakeBpb.oem_name[3] >= 0x20 && + fakeBpb.oem_name[3] <= 0x7F && + fakeBpb.oem_name[4] >= 0x20 && + fakeBpb.oem_name[4] <= 0x7F && + fakeBpb.oem_name[5] >= 0x20 && + fakeBpb.oem_name[5] <= 0x7F && + fakeBpb.oem_name[6] >= 0x20 && + fakeBpb.oem_name[6] <= 0x7F && + fakeBpb.oem_name[7] >= 0x20 && + fakeBpb.oem_name[7] <= 0x7F => + StringHandlers.CToString(fakeBpb.oem_name), + < 0x20 when fakeBpb.oem_name[1] >= 0x20 && + fakeBpb.oem_name[1] <= 0x7F && + fakeBpb.oem_name[2] >= 0x20 && + fakeBpb.oem_name[2] <= 0x7F && + fakeBpb.oem_name[3] >= 0x20 && + fakeBpb.oem_name[3] <= 0x7F && + fakeBpb.oem_name[4] >= 0x20 && + fakeBpb.oem_name[4] <= 0x7F && + fakeBpb.oem_name[5] >= 0x20 && + fakeBpb.oem_name[5] <= 0x7F && + fakeBpb.oem_name[6] >= 0x20 && + fakeBpb.oem_name[6] <= 0x7F && + fakeBpb.oem_name[7] >= 0x20 && + fakeBpb.oem_name[7] <= 0x7F => StringHandlers.CToString( + fakeBpb.oem_name, encoding, + start: 1), + _ => metadata.SystemIdentifier + }; + } if(fakeBpb.signature is 0x28 or 0x29) metadata.VolumeSerial = $"{fakeBpb.serial_no:X8}"; @@ -874,24 +913,32 @@ public sealed partial class FAT sb.AppendFormat(Localization._0_bytes_per_sector, fakeBpb.bps).AppendLine(); if(bpbKind != BpbKind.Human) + { if(fakeBpb.sectors == 0) + { sb.AppendFormat(Localization._0_sectors_on_volume_1_bytes, fakeBpb.big_sectors, fakeBpb.big_sectors * fakeBpb.bps).AppendLine(); + } else + { sb.AppendFormat(Localization._0_sectors_on_volume_1_bytes, fakeBpb.sectors, fakeBpb.sectors * fakeBpb.bps).AppendLine(); + } + } else + { sb.AppendFormat(Localization._0_sectors_on_volume_1_bytes, clusters * humanBpb.bpc / imagePlugin.Info.SectorSize, clusters * humanBpb.bpc). AppendLine(); + } metadata.Clusters = clusters; sb.AppendFormat(Localization._0_sectors_per_cluster, fakeBpb.spc).AppendLine(); - sb.AppendFormat(Localization._0_clusters_on_volume, metadata.Clusters).AppendLine(); + sb.AppendFormat(Localization._0_clusters_on_volume, metadata.Clusters).AppendLine(); metadata.ClusterSize = (uint)(fakeBpb.bps * fakeBpb.spc); sb.AppendFormat(Localization._0_sectors_reserved_between_BPB_and_FAT, fakeBpb.rsectors).AppendLine(); - sb.AppendFormat(Localization._0_FATs, fakeBpb.fats_no).AppendLine(); - sb.AppendFormat(Localization._0_entries_in_root_directory, fakeBpb.root_ent).AppendLine(); + sb.AppendFormat(Localization._0_FATs, fakeBpb.fats_no).AppendLine(); + sb.AppendFormat(Localization._0_entries_in_root_directory, fakeBpb.root_ent).AppendLine(); if(fakeBpb.media > 0) sb.AppendFormat(Localization.Media_descriptor_0, fakeBpb.media).AppendLine(); @@ -902,7 +949,7 @@ public sealed partial class FAT fakeBpb.heads is > 0 and < 256) { sb.AppendFormat(Localization._0_sectors_per_track, fakeBpb.sptrk).AppendLine(); - sb.AppendFormat(Localization._0_heads, fakeBpb.heads).AppendLine(); + sb.AppendFormat(Localization._0_heads, fakeBpb.heads).AppendLine(); } if(fakeBpb.hsectors <= partition.Start) @@ -950,16 +997,18 @@ public sealed partial class FAT // This will mean that the volume will boot, even if just to say "this is not bootable change disk"...... if(metadata.Bootable == false && fakeBpb.jump != null) + { metadata.Bootable |= - (fakeBpb.jump[0] == 0xEB && fakeBpb.jump[1] >= minBootNearJump && fakeBpb.jump[1] < 0x80) || - (fakeBpb.jump[0] == 0xE9 && fakeBpb.jump.Length >= 3 && - BitConverter.ToUInt16(fakeBpb.jump, 1) >= minBootNearJump && - BitConverter.ToUInt16(fakeBpb.jump, 1) <= 0x1FC); + fakeBpb.jump[0] == 0xEB && fakeBpb.jump[1] >= minBootNearJump && fakeBpb.jump[1] < 0x80 || + fakeBpb.jump[0] == 0xE9 && fakeBpb.jump.Length >= 3 && + BitConverter.ToUInt16(fakeBpb.jump, 1) >= minBootNearJump && + BitConverter.ToUInt16(fakeBpb.jump, 1) <= 0x1FC; + } sectorsPerRealSector = fakeBpb.bps / imagePlugin.Info.SectorSize; // First root directory sector - rootDirectorySector = (ulong)((fakeBpb.spfat * fakeBpb.fats_no) + fakeBpb.rsectors) * sectorsPerRealSector; + rootDirectorySector = (ulong)(fakeBpb.spfat * fakeBpb.fats_no + fakeBpb.rsectors) * sectorsPerRealSector; sectorsForRootDirectory = (uint)(fakeBpb.root_ent * 32 / imagePlugin.Info.SectorSize); } @@ -980,10 +1029,7 @@ public sealed partial class FAT { var rootMs = new MemoryStream(); - foreach(ulong rootSector in new ulong[] - { - 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20 - }) + foreach(ulong rootSector in new ulong[] { 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20 }) { errno = imagePlugin.ReadSector(rootSector, out byte[] tmp); @@ -996,7 +1042,7 @@ public sealed partial class FAT rootDirectory = rootMs.ToArray(); } - for(int i = 0; i < rootDirectory.Length; i += 32) + for(var i = 0; i < rootDirectory.Length; i += 32) { // Not a correct entry if(rootDirectory[i] < DIRENT_MIN && @@ -1015,8 +1061,8 @@ public sealed partial class FAT DirectoryEntry entry = Marshal.ByteArrayToStructureLittleEndian(rootDirectory, i, 32); - byte[] fullname = new byte[11]; - Array.Copy(entry.filename, 0, fullname, 0, 8); + var fullname = new byte[11]; + Array.Copy(entry.filename, 0, fullname, 0, 8); Array.Copy(entry.extension, 0, fullname, 8, 3); string volname = encoding.GetString(fullname).Trim(); @@ -1040,8 +1086,10 @@ public sealed partial class FAT } if(entry.adate > 0) + { sb.AppendFormat(Localization.Volume_last_accessed_on_0_d, DateHandlers.DosToDateTime(entry.adate, 0)).AppendLine(); + } break; } @@ -1057,8 +1105,8 @@ public sealed partial class FAT // Intel short jump case 0xEB when bpbSector[1] < 0x80: { - int sigSize = bpbSector[510] == 0x55 && bpbSector[511] == 0xAA ? 2 : 0; - byte[] bootCode = new byte[512 - sigSize - bpbSector[1] - 2]; + int sigSize = bpbSector[510] == 0x55 && bpbSector[511] == 0xAA ? 2 : 0; + var bootCode = new byte[512 - sigSize - bpbSector[1] - 2]; Array.Copy(bpbSector, bpbSector[1] + 2, bootCode, 0, bootCode.Length); Sha1Context.Data(bootCode, out _); @@ -1068,8 +1116,8 @@ public sealed partial class FAT // Intel big jump case 0xE9 when BitConverter.ToUInt16(bpbSector, 1) < 0x1FC: { - int sigSize = bpbSector[510] == 0x55 && bpbSector[511] == 0xAA ? 2 : 0; - byte[] bootCode = new byte[512 - sigSize - BitConverter.ToUInt16(bpbSector, 1) - 3]; + int sigSize = bpbSector[510] == 0x55 && bpbSector[511] == 0xAA ? 2 : 0; + var bootCode = new byte[512 - sigSize - BitConverter.ToUInt16(bpbSector, 1) - 3]; Array.Copy(bpbSector, BitConverter.ToUInt16(bpbSector, 1) + 3, bootCode, 0, bootCode.Length); Sha1Context.Data(bootCode, out _); @@ -1089,4 +1137,6 @@ public sealed partial class FAT information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FAT/Structs.cs b/Aaru.Filesystems/FAT/Structs.cs index 8deeedca9..f3451e147 100644 --- a/Aaru.Filesystems/FAT/Structs.cs +++ b/Aaru.Filesystems/FAT/Structs.cs @@ -39,521 +39,7 @@ public sealed partial class FAT { const int UMSDOS_MAXNAME = 220; - /// BIOS Parameter Block as used by Atari ST GEMDOS on FAT12 volumes. - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct AtariParameterBlock - { - /// 68000 BRA.S jump or x86 loop - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public readonly byte[] jump; - /// OEM Name, 6 bytes, space-padded, "Loader" for Atari ST boot loader - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] - public readonly byte[] oem_name; - /// Volume serial number - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] serial_no; - /// Bytes per sector - public readonly ushort bps; - /// Sectors per cluster - public readonly byte spc; - /// Reserved sectors between BPB and FAT (inclusive) - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory - public readonly ushort root_ent; - /// Sectors in volume - public ushort sectors; - /// Media descriptor, unused by GEMDOS - public readonly byte media; - /// Sectors per FAT - public readonly ushort spfat; - /// Sectors per track - public readonly ushort sptrk; - /// Heads - public readonly ushort heads; - /// Hidden sectors before BPB, unused by GEMDOS - public readonly ushort hsectors; - /// Word to be loaded in the cmdload system variable. Big-endian. - public readonly ushort execflag; - /// - /// Word indicating load mode. If zero, file named is located and loaded. It not, sectors - /// specified in and are loaded. Big endian. - /// - public readonly ushort ldmode; - /// Starting sector of boot code. - public readonly ushort ssect; - /// Count of sectors of boot code. - public readonly ushort sectcnt; - /// Address where boot code should be loaded. - public readonly ushort ldaaddr; - /// Padding. - public readonly ushort padding; - /// Address where FAT and root directory sectors must be loaded. - public readonly ushort fatbuf; - /// Unknown. - public readonly ushort unknown; - /// Filename to be loaded for booting. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] - public readonly byte[] fname; - /// Reserved - public readonly ushort reserved; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 455)] - public readonly byte[] boot_code; - /// Big endian word to make big endian sum of all sector words be equal to 0x1234 if disk is bootable. - public readonly ushort checksum; - } - - /// BIOS Parameter Block as used by MSX-DOS 2. - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct MsxParameterBlock - { - /// x86 loop - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] oem_name; - /// Bytes per sector - public readonly ushort bps; - /// Sectors per cluster - public readonly byte spc; - /// Reserved sectors between BPB and FAT (inclusive) - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory - public readonly ushort root_ent; - /// Sectors in volume - public ushort sectors; - /// Media descriptor - public readonly byte media; - /// Sectors per FAT - public readonly ushort spfat; - /// Sectors per track - public readonly ushort sptrk; - /// Heads - public readonly ushort heads; - /// Hidden sectors before BPB - public readonly ushort hsectors; - /// Jump for MSX-DOS 1 boot code - public readonly ushort msxdos_jmp; - /// Set to "VOL_ID" by MSX-DOS 2 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] - public readonly byte[] vol_id; - /// Bigger than 0 if there are deleted files (MSX-DOS 2) - public readonly byte undelete_flag; - /// Volume serial number (MSX-DOS 2) - public readonly uint serial_no; - /// Reserved (MSX-DOS 2) - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public readonly byte[] reserved; - /// Jump for MSX-DOS 2 boot code (MSX-DOS 2) - public readonly ushort msxdos2_jmp; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 460)] - public readonly byte[] boot_code; - /// Always 0x55 0xAA. - public readonly ushort boot_signature; - } - - /// DOS 2.0 BIOS Parameter Block. - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct BiosParameterBlock2 - { - /// x86 jump - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] oem_name; - /// Bytes per sector - public readonly ushort bps; - /// Sectors per cluster - public readonly byte spc; - /// Reserved sectors between BPB and FAT - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory - public readonly ushort root_ent; - /// Sectors in volume - public ushort sectors; - /// Media descriptor - public readonly byte media; - /// Sectors per FAT - public readonly ushort spfat; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 486)] - public readonly byte[] boot_code; - /// 0x55 0xAA if bootable. - public readonly ushort boot_signature; - } - - /// DOS 3.0 BIOS Parameter Block. - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct BiosParameterBlock30 - { - /// x86 jump - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] oem_name; - /// Bytes per sector - public readonly ushort bps; - /// Sectors per cluster - public readonly byte spc; - /// Reserved sectors between BPB and FAT - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory - public readonly ushort root_ent; - /// Sectors in volume - public ushort sectors; - /// Media descriptor - public readonly byte media; - /// Sectors per FAT - public readonly ushort spfat; - /// Sectors per track - public readonly ushort sptrk; - /// Heads - public readonly ushort heads; - /// Hidden sectors before BPB - public readonly ushort hsectors; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 480)] - public readonly byte[] boot_code; - /// Always 0x55 0xAA. - public readonly ushort boot_signature; - } - - /// DOS 3.2 BIOS Parameter Block. - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct BiosParameterBlock32 - { - /// x86 jump - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] oem_name; - /// Bytes per sector - public readonly ushort bps; - /// Sectors per cluster - public readonly byte spc; - /// Reserved sectors between BPB and FAT - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory - public readonly ushort root_ent; - /// Sectors in volume - public ushort sectors; - /// Media descriptor - public readonly byte media; - /// Sectors per FAT - public readonly ushort spfat; - /// Sectors per track - public readonly ushort sptrk; - /// Heads - public readonly ushort heads; - /// Hidden sectors before BPB - public readonly ushort hsectors; - /// Total sectors including hidden ones - public readonly ushort total_sectors; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 478)] - public readonly byte[] boot_code; - /// Always 0x55 0xAA. - public readonly ushort boot_signature; - } - - /// DOS 3.31 BIOS Parameter Block. - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct BiosParameterBlock33 - { - /// x86 jump - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] oem_name; - /// Bytes per sector - public readonly ushort bps; - /// Sectors per cluster - public readonly byte spc; - /// Reserved sectors between BPB and FAT - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory - public readonly ushort root_ent; - /// Sectors in volume - public ushort sectors; - /// Media descriptor - public readonly byte media; - /// Sectors per FAT - public readonly ushort spfat; - /// Sectors per track - public readonly ushort sptrk; - /// Heads - public readonly ushort heads; - /// Hidden sectors before BPB - public readonly uint hsectors; - /// Sectors in volume if > 65535 - public uint big_sectors; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 474)] - public readonly byte[] boot_code; - /// Always 0x55 0xAA. - public readonly ushort boot_signature; - } - - /// DOS 3.4 BIOS Parameter Block. - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct BiosParameterBlockShortEbpb - { - /// x86 jump - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] oem_name; - /// Bytes per sector - public readonly ushort bps; - /// Sectors per cluster - public readonly byte spc; - /// Reserved sectors between BPB and FAT - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory - public readonly ushort root_ent; - /// Sectors in volume - public ushort sectors; - /// Media descriptor - public readonly byte media; - /// Sectors per FAT - public readonly ushort spfat; - /// Sectors per track - public readonly ushort sptrk; - /// Heads - public readonly ushort heads; - /// Hidden sectors before BPB - public readonly uint hsectors; - /// Sectors in volume if > 65535 - public uint big_sectors; - /// Drive number - public readonly byte drive_no; - /// Volume flags - public readonly byte flags; - /// EPB signature, 0x28 - public readonly byte signature; - /// Volume serial number - public readonly uint serial_no; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 467)] - public readonly byte[] boot_code; - /// Always 0x55 0xAA. - public readonly ushort boot_signature; - } - - /// DOS 4.0 or higher BIOS Parameter Block. - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct BiosParameterBlockEbpb - { - /// x86 jump - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public byte[] oem_name; - /// Bytes per sector - public ushort bps; - /// Sectors per cluster - public byte spc; - /// Reserved sectors between BPB and FAT - public ushort rsectors; - /// Number of FATs - public byte fats_no; - /// Number of entries on root directory - public ushort root_ent; - /// Sectors in volume - public ushort sectors; - /// Media descriptor - public byte media; - /// Sectors per FAT - public ushort spfat; - /// Sectors per track - public ushort sptrk; - /// Heads - public ushort heads; - /// Hidden sectors before BPB - public uint hsectors; - /// Sectors in volume if > 65535 - public uint big_sectors; - /// Drive number - public byte drive_no; - /// Volume flags - public byte flags; - /// EPB signature, 0x29 - public byte signature; - /// Volume serial number - public uint serial_no; - /// Volume label, 11 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] - public readonly byte[] volume_label; - /// Filesystem type, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] fs_type; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 448)] - public byte[] boot_code; - /// Always 0x55 0xAA. - public ushort boot_signature; - } - - /// FAT32 Parameter Block - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct Fat32ParameterBlockShort - { - /// x86 jump - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] oem_name; - /// Bytes per sector - public readonly ushort bps; - /// Sectors per cluster - public readonly byte spc; - /// Reserved sectors between BPB and FAT - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory, set to 0 - public readonly ushort root_ent; - /// Sectors in volume, set to 0 - public ushort sectors; - /// Media descriptor - public readonly byte media; - /// Sectors per FAT, set to 0 - public readonly ushort spfat; - /// Sectors per track - public readonly ushort sptrk; - /// Heads - public readonly ushort heads; - /// Hidden sectors before BPB - public readonly uint hsectors; - /// Sectors in volume - public uint big_sectors; - /// Sectors per FAT - public readonly uint big_spfat; - /// FAT flags - public readonly ushort mirror_flags; - /// FAT32 version - public readonly ushort version; - /// Cluster of root directory - public readonly uint root_cluster; - /// Sector of FSINFO structure - public readonly ushort fsinfo_sector; - /// Sector of FAT32PB backup - public readonly ushort backup_sector; - /// Reserved - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] - public readonly byte[] reserved; - /// Drive number - public readonly byte drive_no; - /// Volume flags - public readonly byte flags; - /// Signature, should be 0x28 - public readonly byte signature; - /// Volume serial number - public readonly uint serial_no; - /// Volume label, 11 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] - public readonly byte[] reserved2; - /// Sectors in volume if equals 0 - public ulong huge_sectors; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 420)] - public readonly byte[] boot_code; - /// Always 0x55 0xAA. - public readonly ushort boot_signature; - } - - /// FAT32 Parameter Block - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct Fat32ParameterBlock - { - /// x86 jump - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] jump; - /// OEM Name, 8 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] oem_name; - /// Bytes per sector - public ushort bps; - /// Sectors per cluster - public byte spc; - /// Reserved sectors between BPB and FAT - public readonly ushort rsectors; - /// Number of FATs - public readonly byte fats_no; - /// Number of entries on root directory, set to 0 - public readonly ushort root_ent; - /// Sectors in volume, set to 0 - public ushort sectors; - /// Media descriptor - public readonly byte media; - /// Sectors per FAT, set to 0 - public readonly ushort spfat; - /// Sectors per track - public ushort sptrk; - /// Heads - public readonly ushort heads; - /// Hidden sectors before BPB - public uint hsectors; - /// Sectors in volume - public uint big_sectors; - /// Sectors per FAT - public uint big_spfat; - /// FAT flags - public readonly ushort mirror_flags; - /// FAT32 version - public readonly ushort version; - /// Cluster of root directory - public readonly uint root_cluster; - /// Sector of FSINFO structure - public readonly ushort fsinfo_sector; - /// Sector of FAT32PB backup - public readonly ushort backup_sector; - /// Reserved - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] - public readonly byte[] reserved; - /// Drive number - public readonly byte drive_no; - /// Volume flags - public readonly byte flags; - /// Signature, should be 0x29 - public readonly byte signature; - /// Volume serial number - public readonly uint serial_no; - /// Volume label, 11 bytes, space-padded - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] - public readonly byte[] volume_label; - /// Filesystem type, 8 bytes, space-padded, must be "FAT32 " - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] fs_type; - /// Boot code. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 419)] - public readonly byte[] boot_code; - /// Always 0x55 0xAA. - public readonly ushort boot_signature; - } +#region Nested type: ApricotLabel /// Apricot Label. [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -766,6 +252,10 @@ public sealed partial class FAT public readonly bool cpmDoubleSided; } +#endregion + +#region Nested type: ApricotParameterBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct ApricotParameterBlock { @@ -791,6 +281,622 @@ public sealed partial class FAT public readonly ushort startSector; } +#endregion + +#region Nested type: AtariParameterBlock + + /// BIOS Parameter Block as used by Atari ST GEMDOS on FAT12 volumes. + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct AtariParameterBlock + { + /// 68000 BRA.S jump or x86 loop + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public readonly byte[] jump; + /// OEM Name, 6 bytes, space-padded, "Loader" for Atari ST boot loader + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] + public readonly byte[] oem_name; + /// Volume serial number + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] serial_no; + /// Bytes per sector + public readonly ushort bps; + /// Sectors per cluster + public readonly byte spc; + /// Reserved sectors between BPB and FAT (inclusive) + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory + public readonly ushort root_ent; + /// Sectors in volume + public ushort sectors; + /// Media descriptor, unused by GEMDOS + public readonly byte media; + /// Sectors per FAT + public readonly ushort spfat; + /// Sectors per track + public readonly ushort sptrk; + /// Heads + public readonly ushort heads; + /// Hidden sectors before BPB, unused by GEMDOS + public readonly ushort hsectors; + /// Word to be loaded in the cmdload system variable. Big-endian. + public readonly ushort execflag; + /// + /// Word indicating load mode. If zero, file named is located and loaded. It not, sectors + /// specified in and are loaded. Big endian. + /// + public readonly ushort ldmode; + /// Starting sector of boot code. + public readonly ushort ssect; + /// Count of sectors of boot code. + public readonly ushort sectcnt; + /// Address where boot code should be loaded. + public readonly ushort ldaaddr; + /// Padding. + public readonly ushort padding; + /// Address where FAT and root directory sectors must be loaded. + public readonly ushort fatbuf; + /// Unknown. + public readonly ushort unknown; + /// Filename to be loaded for booting. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] + public readonly byte[] fname; + /// Reserved + public readonly ushort reserved; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 455)] + public readonly byte[] boot_code; + /// Big endian word to make big endian sum of all sector words be equal to 0x1234 if disk is bootable. + public readonly ushort checksum; + } + +#endregion + +#region Nested type: BiosParameterBlock2 + + /// DOS 2.0 BIOS Parameter Block. + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct BiosParameterBlock2 + { + /// x86 jump + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] oem_name; + /// Bytes per sector + public readonly ushort bps; + /// Sectors per cluster + public readonly byte spc; + /// Reserved sectors between BPB and FAT + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory + public readonly ushort root_ent; + /// Sectors in volume + public ushort sectors; + /// Media descriptor + public readonly byte media; + /// Sectors per FAT + public readonly ushort spfat; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 486)] + public readonly byte[] boot_code; + /// 0x55 0xAA if bootable. + public readonly ushort boot_signature; + } + +#endregion + +#region Nested type: BiosParameterBlock30 + + /// DOS 3.0 BIOS Parameter Block. + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct BiosParameterBlock30 + { + /// x86 jump + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] oem_name; + /// Bytes per sector + public readonly ushort bps; + /// Sectors per cluster + public readonly byte spc; + /// Reserved sectors between BPB and FAT + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory + public readonly ushort root_ent; + /// Sectors in volume + public ushort sectors; + /// Media descriptor + public readonly byte media; + /// Sectors per FAT + public readonly ushort spfat; + /// Sectors per track + public readonly ushort sptrk; + /// Heads + public readonly ushort heads; + /// Hidden sectors before BPB + public readonly ushort hsectors; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 480)] + public readonly byte[] boot_code; + /// Always 0x55 0xAA. + public readonly ushort boot_signature; + } + +#endregion + +#region Nested type: BiosParameterBlock32 + + /// DOS 3.2 BIOS Parameter Block. + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct BiosParameterBlock32 + { + /// x86 jump + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] oem_name; + /// Bytes per sector + public readonly ushort bps; + /// Sectors per cluster + public readonly byte spc; + /// Reserved sectors between BPB and FAT + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory + public readonly ushort root_ent; + /// Sectors in volume + public ushort sectors; + /// Media descriptor + public readonly byte media; + /// Sectors per FAT + public readonly ushort spfat; + /// Sectors per track + public readonly ushort sptrk; + /// Heads + public readonly ushort heads; + /// Hidden sectors before BPB + public readonly ushort hsectors; + /// Total sectors including hidden ones + public readonly ushort total_sectors; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 478)] + public readonly byte[] boot_code; + /// Always 0x55 0xAA. + public readonly ushort boot_signature; + } + +#endregion + +#region Nested type: BiosParameterBlock33 + + /// DOS 3.31 BIOS Parameter Block. + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct BiosParameterBlock33 + { + /// x86 jump + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] oem_name; + /// Bytes per sector + public readonly ushort bps; + /// Sectors per cluster + public readonly byte spc; + /// Reserved sectors between BPB and FAT + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory + public readonly ushort root_ent; + /// Sectors in volume + public ushort sectors; + /// Media descriptor + public readonly byte media; + /// Sectors per FAT + public readonly ushort spfat; + /// Sectors per track + public readonly ushort sptrk; + /// Heads + public readonly ushort heads; + /// Hidden sectors before BPB + public readonly uint hsectors; + /// Sectors in volume if > 65535 + public uint big_sectors; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 474)] + public readonly byte[] boot_code; + /// Always 0x55 0xAA. + public readonly ushort boot_signature; + } + +#endregion + +#region Nested type: BiosParameterBlockEbpb + + /// DOS 4.0 or higher BIOS Parameter Block. + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct BiosParameterBlockEbpb + { + /// x86 jump + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public byte[] oem_name; + /// Bytes per sector + public ushort bps; + /// Sectors per cluster + public byte spc; + /// Reserved sectors between BPB and FAT + public ushort rsectors; + /// Number of FATs + public byte fats_no; + /// Number of entries on root directory + public ushort root_ent; + /// Sectors in volume + public ushort sectors; + /// Media descriptor + public byte media; + /// Sectors per FAT + public ushort spfat; + /// Sectors per track + public ushort sptrk; + /// Heads + public ushort heads; + /// Hidden sectors before BPB + public uint hsectors; + /// Sectors in volume if > 65535 + public uint big_sectors; + /// Drive number + public byte drive_no; + /// Volume flags + public byte flags; + /// EPB signature, 0x29 + public byte signature; + /// Volume serial number + public uint serial_no; + /// Volume label, 11 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] + public readonly byte[] volume_label; + /// Filesystem type, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] fs_type; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 448)] + public byte[] boot_code; + /// Always 0x55 0xAA. + public ushort boot_signature; + } + +#endregion + +#region Nested type: BiosParameterBlockShortEbpb + + /// DOS 3.4 BIOS Parameter Block. + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct BiosParameterBlockShortEbpb + { + /// x86 jump + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] oem_name; + /// Bytes per sector + public readonly ushort bps; + /// Sectors per cluster + public readonly byte spc; + /// Reserved sectors between BPB and FAT + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory + public readonly ushort root_ent; + /// Sectors in volume + public ushort sectors; + /// Media descriptor + public readonly byte media; + /// Sectors per FAT + public readonly ushort spfat; + /// Sectors per track + public readonly ushort sptrk; + /// Heads + public readonly ushort heads; + /// Hidden sectors before BPB + public readonly uint hsectors; + /// Sectors in volume if > 65535 + public uint big_sectors; + /// Drive number + public readonly byte drive_no; + /// Volume flags + public readonly byte flags; + /// EPB signature, 0x28 + public readonly byte signature; + /// Volume serial number + public readonly uint serial_no; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 467)] + public readonly byte[] boot_code; + /// Always 0x55 0xAA. + public readonly ushort boot_signature; + } + +#endregion + +#region Nested type: CompleteDirectoryEntry + + sealed class CompleteDirectoryEntry + { + public DirectoryEntry Dirent; + public DirectoryEntry Fat32Ea; + public HumanDirectoryEntry HumanDirent; + public string HumanName; + public string Lfn; + public UmsdosDirectoryEntry LinuxDirent; + public string LinuxName; + public string Longname; + public string Shortname; + + public override string ToString() + { + // This ensures UMSDOS takes preference when present + if(!string.IsNullOrEmpty(LinuxName)) + return LinuxName; + + // This ensures LFN takes preference when eCS is in use + if(!string.IsNullOrEmpty(Lfn)) + return Lfn; + + // This ensures Humans takes preference when present + if(!string.IsNullOrEmpty(HumanName)) + return HumanName; + + return !string.IsNullOrEmpty(Longname) ? Longname : Shortname; + } + } + +#endregion + +#region Nested type: DirectoryEntry + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryEntry + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] filename; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] extension; + public readonly FatAttributes attributes; + public readonly CaseInfo caseinfo; + public readonly byte ctime_ms; + public readonly ushort ctime; + public readonly ushort cdate; + public readonly ushort adate; + public readonly ushort ea_handle; + public readonly ushort mtime; + public readonly ushort mdate; + public readonly ushort start_cluster; + public readonly uint size; + } + +#endregion + +#region Nested type: EaHeader + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct EaHeader + { + public readonly ushort magic; + public readonly ushort cluster; + public readonly EaFlags flags; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + public readonly byte[] filename; + public readonly uint unknown; + public readonly ushort zero; + } + +#endregion + +#region Nested type: Fat32ParameterBlock + + /// FAT32 Parameter Block + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct Fat32ParameterBlock + { + /// x86 jump + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] oem_name; + /// Bytes per sector + public ushort bps; + /// Sectors per cluster + public byte spc; + /// Reserved sectors between BPB and FAT + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory, set to 0 + public readonly ushort root_ent; + /// Sectors in volume, set to 0 + public ushort sectors; + /// Media descriptor + public readonly byte media; + /// Sectors per FAT, set to 0 + public readonly ushort spfat; + /// Sectors per track + public ushort sptrk; + /// Heads + public readonly ushort heads; + /// Hidden sectors before BPB + public uint hsectors; + /// Sectors in volume + public uint big_sectors; + /// Sectors per FAT + public uint big_spfat; + /// FAT flags + public readonly ushort mirror_flags; + /// FAT32 version + public readonly ushort version; + /// Cluster of root directory + public readonly uint root_cluster; + /// Sector of FSINFO structure + public readonly ushort fsinfo_sector; + /// Sector of FAT32PB backup + public readonly ushort backup_sector; + /// Reserved + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + public readonly byte[] reserved; + /// Drive number + public readonly byte drive_no; + /// Volume flags + public readonly byte flags; + /// Signature, should be 0x29 + public readonly byte signature; + /// Volume serial number + public readonly uint serial_no; + /// Volume label, 11 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] + public readonly byte[] volume_label; + /// Filesystem type, 8 bytes, space-padded, must be "FAT32 " + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] fs_type; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 419)] + public readonly byte[] boot_code; + /// Always 0x55 0xAA. + public readonly ushort boot_signature; + } + +#endregion + +#region Nested type: Fat32ParameterBlockShort + + /// FAT32 Parameter Block + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct Fat32ParameterBlockShort + { + /// x86 jump + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] oem_name; + /// Bytes per sector + public readonly ushort bps; + /// Sectors per cluster + public readonly byte spc; + /// Reserved sectors between BPB and FAT + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory, set to 0 + public readonly ushort root_ent; + /// Sectors in volume, set to 0 + public ushort sectors; + /// Media descriptor + public readonly byte media; + /// Sectors per FAT, set to 0 + public readonly ushort spfat; + /// Sectors per track + public readonly ushort sptrk; + /// Heads + public readonly ushort heads; + /// Hidden sectors before BPB + public readonly uint hsectors; + /// Sectors in volume + public uint big_sectors; + /// Sectors per FAT + public readonly uint big_spfat; + /// FAT flags + public readonly ushort mirror_flags; + /// FAT32 version + public readonly ushort version; + /// Cluster of root directory + public readonly uint root_cluster; + /// Sector of FSINFO structure + public readonly ushort fsinfo_sector; + /// Sector of FAT32PB backup + public readonly ushort backup_sector; + /// Reserved + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + public readonly byte[] reserved; + /// Drive number + public readonly byte drive_no; + /// Volume flags + public readonly byte flags; + /// Signature, should be 0x28 + public readonly byte signature; + /// Volume serial number + public readonly uint serial_no; + /// Volume label, 11 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] + public readonly byte[] reserved2; + /// Sectors in volume if equals 0 + public ulong huge_sectors; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 420)] + public readonly byte[] boot_code; + /// Always 0x55 0xAA. + public readonly ushort boot_signature; + } + +#endregion + +#region Nested type: FatDirNode + + sealed class FatDirNode : IDirNode + { + internal CompleteDirectoryEntry[] _entries; + internal int _position; + + #region IDirNode Members + + /// + public string Path { get; init; } + + #endregion + } + +#endregion + +#region Nested type: FatFileNode + + sealed class FatFileNode : IFileNode + { + internal uint[] _clusters; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: FsInfoSector + /// FAT32 FS Information Sector [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct FsInfoSector @@ -813,6 +919,30 @@ public sealed partial class FAT public readonly uint signature3; } +#endregion + +#region Nested type: HumanDirectoryEntry + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct HumanDirectoryEntry + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] name1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] extension; + public readonly FatAttributes attributes; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] + public readonly byte[] name2; + public readonly ushort mtime; + public readonly ushort mdate; + public readonly ushort start_cluster; + public readonly uint size; + } + +#endregion + +#region Nested type: HumanParameterBlock + /// Human68k Parameter Block, big endian, 512 bytes even on 256 bytes/sector. [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct HumanParameterBlock @@ -846,41 +976,9 @@ public sealed partial class FAT public readonly byte[] boot_code; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryEntry - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] filename; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] extension; - public readonly FatAttributes attributes; - public readonly CaseInfo caseinfo; - public readonly byte ctime_ms; - public readonly ushort ctime; - public readonly ushort cdate; - public readonly ushort adate; - public readonly ushort ea_handle; - public readonly ushort mtime; - public readonly ushort mdate; - public readonly ushort start_cluster; - public readonly uint size; - } +#endregion - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct HumanDirectoryEntry - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] name1; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] extension; - public readonly FatAttributes attributes; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] - public readonly byte[] name2; - public readonly ushort mtime; - public readonly ushort mdate; - public readonly ushort start_cluster; - public readonly uint size; - } +#region Nested type: LfnEntry [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct LfnEntry @@ -898,18 +996,67 @@ public sealed partial class FAT public readonly byte[] name3; } +#endregion + +#region Nested type: MsxParameterBlock + + /// BIOS Parameter Block as used by MSX-DOS 2. [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct EaHeader + struct MsxParameterBlock { - public readonly ushort magic; - public readonly ushort cluster; - public readonly EaFlags flags; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] - public readonly byte[] filename; - public readonly uint unknown; - public readonly ushort zero; + /// x86 loop + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] jump; + /// OEM Name, 8 bytes, space-padded + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] oem_name; + /// Bytes per sector + public readonly ushort bps; + /// Sectors per cluster + public readonly byte spc; + /// Reserved sectors between BPB and FAT (inclusive) + public readonly ushort rsectors; + /// Number of FATs + public readonly byte fats_no; + /// Number of entries on root directory + public readonly ushort root_ent; + /// Sectors in volume + public ushort sectors; + /// Media descriptor + public readonly byte media; + /// Sectors per FAT + public readonly ushort spfat; + /// Sectors per track + public readonly ushort sptrk; + /// Heads + public readonly ushort heads; + /// Hidden sectors before BPB + public readonly ushort hsectors; + /// Jump for MSX-DOS 1 boot code + public readonly ushort msxdos_jmp; + /// Set to "VOL_ID" by MSX-DOS 2 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] + public readonly byte[] vol_id; + /// Bigger than 0 if there are deleted files (MSX-DOS 2) + public readonly byte undelete_flag; + /// Volume serial number (MSX-DOS 2) + public readonly uint serial_no; + /// Reserved (MSX-DOS 2) + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public readonly byte[] reserved; + /// Jump for MSX-DOS 2 boot code (MSX-DOS 2) + public readonly ushort msxdos2_jmp; + /// Boot code. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 460)] + public readonly byte[] boot_code; + /// Always 0x55 0xAA. + public readonly ushort boot_signature; } +#endregion + +#region Nested type: UmsdosDirectoryEntry + /// This structure is 256 bytes large, depending on the name, only part of it is written to disk [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct UmsdosDirectoryEntry @@ -946,6 +1093,10 @@ public sealed partial class FAT public readonly byte[] name; } +#endregion + +#region Nested type: UmsdosFlags + [SuppressMessage("ReSharper", "InconsistentNaming")] enum UmsdosFlags : byte { @@ -955,52 +1106,5 @@ public sealed partial class FAT UMSDOS_HLINK = 2 } - sealed class CompleteDirectoryEntry - { - public DirectoryEntry Dirent; - public DirectoryEntry Fat32Ea; - public HumanDirectoryEntry HumanDirent; - public string HumanName; - public string Lfn; - public UmsdosDirectoryEntry LinuxDirent; - public string LinuxName; - public string Longname; - public string Shortname; - - public override string ToString() - { - // This ensures UMSDOS takes preference when present - if(!string.IsNullOrEmpty(LinuxName)) - return LinuxName; - - // This ensures LFN takes preference when eCS is in use - if(!string.IsNullOrEmpty(Lfn)) - return Lfn; - - // This ensures Humans takes preference when present - if(!string.IsNullOrEmpty(HumanName)) - return HumanName; - - return !string.IsNullOrEmpty(Longname) ? Longname : Shortname; - } - } - - sealed class FatFileNode : IFileNode - { - internal uint[] _clusters; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } - - sealed class FatDirNode : IDirNode - { - internal CompleteDirectoryEntry[] _entries; - internal int _position; - /// - public string Path { get; init; } - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FAT/Super.cs b/Aaru.Filesystems/FAT/Super.cs index a156df706..f6f2e477e 100644 --- a/Aaru.Filesystems/FAT/Super.cs +++ b/Aaru.Filesystems/FAT/Super.cs @@ -47,9 +47,11 @@ namespace Aaru.Filesystems; public sealed partial class FAT { +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { Metadata = new FileSystem(); @@ -87,7 +89,8 @@ public sealed partial class FAT _namespace = Namespace.Human; break; - default: return ErrorNumber.InvalidArgument; + default: + return ErrorNumber.InvalidArgument; } AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Reading_BPB); @@ -125,7 +128,8 @@ public sealed partial class FAT uint sectorsForRootDirectory = 0; uint rootDirectoryCluster = 0; - _encoding = encoding ?? (bpbKind == BpbKind.Human ? Encoding.GetEncoding("shift_jis") + _encoding = encoding ?? (bpbKind == BpbKind.Human + ? Encoding.GetEncoding("shift_jis") : Encoding.GetEncoding("IBM437")); switch(bpbKind) @@ -186,8 +190,10 @@ public sealed partial class FAT }; if((fat32Bpb.flags & 0xF8) == 0x00) + { if((fat32Bpb.flags & 0x01) == 0x01) Metadata.Dirty = true; + } if((fat32Bpb.mirror_flags & 0x80) == 0x80) _useFirstFat = (fat32Bpb.mirror_flags & 0xF) != 1; @@ -201,18 +207,18 @@ public sealed partial class FAT // Check that jumps to a correct boot code position and has boot signature set. // This will mean that the volume will boot, even if just to say "this is not bootable change disk"...... Metadata.Bootable = - (fat32Bpb.jump[0] == 0xEB && fat32Bpb.jump[1] >= minBootNearJump && fat32Bpb.jump[1] < 0x80) || - (fat32Bpb.jump[0] == 0xE9 && fat32Bpb.jump.Length >= 3 && - BitConverter.ToUInt16(fat32Bpb.jump, 1) >= minBootNearJump && - BitConverter.ToUInt16(fat32Bpb.jump, 1) <= 0x1FC); + fat32Bpb.jump[0] == 0xEB && fat32Bpb.jump[1] >= minBootNearJump && fat32Bpb.jump[1] < 0x80 || + fat32Bpb.jump[0] == 0xE9 && fat32Bpb.jump.Length >= 3 && + BitConverter.ToUInt16(fat32Bpb.jump, 1) >= minBootNearJump && + BitConverter.ToUInt16(fat32Bpb.jump, 1) <= 0x1FC; sectorsPerRealSector = fat32Bpb.bps / imagePlugin.Info.SectorSize; _sectorsPerCluster *= sectorsPerRealSector; // First root directory sector _firstClusterSector = - ((ulong)((fat32Bpb.big_spfat * fat32Bpb.fats_no) + fat32Bpb.rsectors) * sectorsPerRealSector) - - (2 * _sectorsPerCluster); + (ulong)(fat32Bpb.big_spfat * fat32Bpb.fats_no + fat32Bpb.rsectors) * sectorsPerRealSector - + 2 * _sectorsPerCluster; if(fat32Bpb.fsinfo_sector + partition.Start <= partition.End) { @@ -224,10 +230,8 @@ public sealed partial class FAT FsInfoSector fsInfo = Marshal.ByteArrayToStructureLittleEndian(fsinfoSector); if(fsInfo is { signature1: FSINFO_SIGNATURE1, signature2 : FSINFO_SIGNATURE2 } - and { signature3 : FSINFO_SIGNATURE3, free_clusters: < 0xFFFFFFFF }) - { + and { signature3: FSINFO_SIGNATURE3, free_clusters: < 0xFFFFFFFF }) Metadata.FreeClusters = fsInfo.free_clusters; - } } break; @@ -238,7 +242,7 @@ public sealed partial class FAT { ushort sum = 0; - for(int i = 0; i < bpbSector.Length; i += 2) + for(var i = 0; i < bpbSector.Length; i += 2) sum += BigEndianBitConverter.ToUInt16(bpbSector, i); // TODO: Check this @@ -290,15 +294,21 @@ public sealed partial class FAT if(bpbKind != BpbKind.Human) { - int reservedSectors = fakeBpb.rsectors + (fakeBpb.fats_no * fakeBpb.spfat) + - (fakeBpb.root_ent * 32 / fakeBpb.bps); + int reservedSectors = fakeBpb.rsectors + fakeBpb.fats_no * fakeBpb.spfat + + fakeBpb.root_ent * 32 / fakeBpb.bps; if(fakeBpb.sectors == 0) - clusters = (ulong)(fakeBpb.spc == 0 ? fakeBpb.big_sectors - reservedSectors + { + clusters = (ulong)(fakeBpb.spc == 0 + ? fakeBpb.big_sectors - reservedSectors : (fakeBpb.big_sectors - reservedSectors) / fakeBpb.spc); + } else - clusters = (ulong)(fakeBpb.spc == 0 ? fakeBpb.sectors - reservedSectors + { + clusters = (ulong)(fakeBpb.spc == 0 + ? fakeBpb.sectors - reservedSectors : (fakeBpb.sectors - reservedSectors) / fakeBpb.spc); + } } else clusters = humanBpb.clusters == 0 ? humanBpb.big_clusters : humanBpb.clusters; @@ -311,20 +321,20 @@ public sealed partial class FAT { if(clusters < 4089) { - ushort[] fat12 = new ushort[clusters + 1]; + var fat12 = new ushort[clusters + 1]; _reservedSectors = fakeBpb.rsectors; sectorsPerRealSector = fakeBpb.bps / imagePlugin.Info.SectorSize; - _fatFirstSector = partition.Start + (_reservedSectors * sectorsPerRealSector); + _fatFirstSector = partition.Start + _reservedSectors * sectorsPerRealSector; errno = imagePlugin.ReadSectors(_fatFirstSector, fakeBpb.spfat, out byte[] fatBytes); if(errno != ErrorNumber.NoError) return errno; - int pos = 0; + var pos = 0; - for(int i = 0; i + 3 < fatBytes.Length && pos < fat12.Length; i += 3) + for(var i = 0; i + 3 < fatBytes.Length && pos < fat12.Length; i += 3) { fat12[pos++] = (ushort)(((fatBytes[i + 1] & 0xF) << 8) + fatBytes[i + 0]); @@ -400,30 +410,45 @@ public sealed partial class FAT if(fakeBpb.oem_name[5] != 0x49 || fakeBpb.oem_name[6] != 0x48 || fakeBpb.oem_name[7] != 0x43) + { Metadata.SystemIdentifier = fakeBpb.oem_name[0] switch - { - // Later versions of Windows create a DOS 3 BPB without OEM name on 8 sectors/track floppies - // OEM ID should be ASCII, otherwise ignore it - >= 0x20 and <= 0x7F when fakeBpb.oem_name[1] >= 0x20 && fakeBpb.oem_name[1] <= 0x7F && - fakeBpb.oem_name[2] >= 0x20 && fakeBpb.oem_name[2] <= 0x7F && - fakeBpb.oem_name[3] >= 0x20 && fakeBpb.oem_name[3] <= 0x7F && - fakeBpb.oem_name[4] >= 0x20 && fakeBpb.oem_name[4] <= 0x7F && - fakeBpb.oem_name[5] >= 0x20 && fakeBpb.oem_name[5] <= 0x7F && - fakeBpb.oem_name[6] >= 0x20 && fakeBpb.oem_name[6] <= 0x7F && - fakeBpb.oem_name[7] >= 0x20 && - fakeBpb.oem_name[7] <= 0x7F => - StringHandlers.CToString(fakeBpb.oem_name), - < 0x20 when fakeBpb.oem_name[1] >= 0x20 && fakeBpb.oem_name[1] <= 0x7F && - fakeBpb.oem_name[2] >= 0x20 && fakeBpb.oem_name[2] <= 0x7F && - fakeBpb.oem_name[3] >= 0x20 && fakeBpb.oem_name[3] <= 0x7F && - fakeBpb.oem_name[4] >= 0x20 && fakeBpb.oem_name[4] <= 0x7F && - fakeBpb.oem_name[5] >= 0x20 && fakeBpb.oem_name[5] <= 0x7F && - fakeBpb.oem_name[6] >= 0x20 && fakeBpb.oem_name[6] <= 0x7F && - fakeBpb.oem_name[7] >= 0x20 && - fakeBpb.oem_name[7] <= 0x7F => StringHandlers.CToString(fakeBpb.oem_name, _encoding, - start: 1), - _ => Metadata.SystemIdentifier - }; + { + // Later versions of Windows create a DOS 3 BPB without OEM name on 8 sectors/track floppies + // OEM ID should be ASCII, otherwise ignore it + >= 0x20 and <= 0x7F when fakeBpb.oem_name[1] >= 0x20 && + fakeBpb.oem_name[1] <= 0x7F && + fakeBpb.oem_name[2] >= 0x20 && + fakeBpb.oem_name[2] <= 0x7F && + fakeBpb.oem_name[3] >= 0x20 && + fakeBpb.oem_name[3] <= 0x7F && + fakeBpb.oem_name[4] >= 0x20 && + fakeBpb.oem_name[4] <= 0x7F && + fakeBpb.oem_name[5] >= 0x20 && + fakeBpb.oem_name[5] <= 0x7F && + fakeBpb.oem_name[6] >= 0x20 && + fakeBpb.oem_name[6] <= 0x7F && + fakeBpb.oem_name[7] >= 0x20 && + fakeBpb.oem_name[7] <= 0x7F => + StringHandlers.CToString(fakeBpb.oem_name), + < 0x20 when fakeBpb.oem_name[1] >= 0x20 && + fakeBpb.oem_name[1] <= 0x7F && + fakeBpb.oem_name[2] >= 0x20 && + fakeBpb.oem_name[2] <= 0x7F && + fakeBpb.oem_name[3] >= 0x20 && + fakeBpb.oem_name[3] <= 0x7F && + fakeBpb.oem_name[4] >= 0x20 && + fakeBpb.oem_name[4] <= 0x7F && + fakeBpb.oem_name[5] >= 0x20 && + fakeBpb.oem_name[5] <= 0x7F && + fakeBpb.oem_name[6] >= 0x20 && + fakeBpb.oem_name[6] <= 0x7F && + fakeBpb.oem_name[7] >= 0x20 && + fakeBpb.oem_name[7] <= 0x7F => StringHandlers.CToString( + fakeBpb.oem_name, _encoding, + start: 1), + _ => Metadata.SystemIdentifier + }; + } if(fakeBpb.signature is 0x28 or 0x29) { @@ -446,8 +471,10 @@ public sealed partial class FAT if(fakeBpb.signature is 0x28 or 0x29 || andosOemCorrect) { if((fakeBpb.flags & 0xF8) == 0x00) + { if((fakeBpb.flags & 0x01) == 0x01) Metadata.Dirty = true; + } if(fakeBpb.signature == 0x29 || andosOemCorrect) { @@ -464,14 +491,16 @@ public sealed partial class FAT // This will mean that the volume will boot, even if just to say "this is not bootable change disk"...... if(Metadata.Bootable == false && fakeBpb.jump != null) + { Metadata.Bootable |= - (fakeBpb.jump[0] == 0xEB && fakeBpb.jump[1] >= minBootNearJump && fakeBpb.jump[1] < 0x80) || - (fakeBpb.jump[0] == 0xE9 && fakeBpb.jump.Length >= 3 && - BitConverter.ToUInt16(fakeBpb.jump, 1) >= minBootNearJump && - BitConverter.ToUInt16(fakeBpb.jump, 1) <= 0x1FC); + fakeBpb.jump[0] == 0xEB && fakeBpb.jump[1] >= minBootNearJump && fakeBpb.jump[1] < 0x80 || + fakeBpb.jump[0] == 0xE9 && fakeBpb.jump.Length >= 3 && + BitConverter.ToUInt16(fakeBpb.jump, 1) >= minBootNearJump && + BitConverter.ToUInt16(fakeBpb.jump, 1) <= 0x1FC; + } // First root directory sector - firstRootSector = ((ulong)((fakeBpb.spfat * fakeBpb.fats_no) + fakeBpb.rsectors) * sectorsPerRealSector) + + firstRootSector = (ulong)(fakeBpb.spfat * fakeBpb.fats_no + fakeBpb.rsectors) * sectorsPerRealSector + partition.Start; sectorsForRootDirectory = (uint)(fakeBpb.root_ent * 32 / imagePlugin.Info.SectorSize); @@ -491,14 +520,14 @@ public sealed partial class FAT else _fatEntriesPerSector = imagePlugin.Info.SectorSize * 2 / 3; - _fatFirstSector = partition.Start + (_reservedSectors * sectorsPerRealSector); + _fatFirstSector = partition.Start + _reservedSectors * sectorsPerRealSector; _rootDirectoryCache = new Dictionary(); byte[] rootDirectory; if(!_fat32) { - _firstClusterSector = firstRootSector + sectorsForRootDirectory - (_sectorsPerCluster * 2); + _firstClusterSector = firstRootSector + sectorsForRootDirectory - _sectorsPerCluster * 2; errno = imagePlugin.ReadSectors(firstRootSector, sectorsForRootDirectory, out rootDirectory); if(errno != ErrorNumber.NoError) @@ -508,10 +537,7 @@ public sealed partial class FAT { var rootMs = new MemoryStream(); - foreach(ulong rootSector in new ulong[] - { - 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20 - }) + foreach(ulong rootSector in new ulong[] { 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20 }) { errno = imagePlugin.ReadSector(rootSector, out byte[] tmp); @@ -534,7 +560,7 @@ public sealed partial class FAT foreach(uint cluster in rootDirectoryClusters) { - errno = imagePlugin.ReadSectors(_firstClusterSector + (cluster * _sectorsPerCluster), + errno = imagePlugin.ReadSectors(_firstClusterSector + cluster * _sectorsPerCluster, _sectorsPerCluster, out byte[] buffer); if(errno != ErrorNumber.NoError) @@ -556,7 +582,7 @@ public sealed partial class FAT byte[] lastLfnName = null; byte lastLfnChecksum = 0; - for(int i = 0; i < rootDirectory.Length; i += Marshal.SizeOf()) + for(var i = 0; i < rootDirectory.Length; i += Marshal.SizeOf()) { DirectoryEntry entry = Marshal.ByteArrayToStructureLittleEndian(rootDirectory, i, @@ -593,9 +619,9 @@ public sealed partial class FAT lfnSequence--; - Array.Copy(lfnEntry.name1, 0, lastLfnName, lfnSequence * 26, 10); - Array.Copy(lfnEntry.name2, 0, lastLfnName, (lfnSequence * 26) + 10, 12); - Array.Copy(lfnEntry.name3, 0, lastLfnName, (lfnSequence * 26) + 22, 4); + Array.Copy(lfnEntry.name1, 0, lastLfnName, lfnSequence * 26, 10); + Array.Copy(lfnEntry.name2, 0, lastLfnName, lfnSequence * 26 + 10, 12); + Array.Copy(lfnEntry.name3, 0, lastLfnName, lfnSequence * 26 + 22, 4); continue; } @@ -621,14 +647,17 @@ public sealed partial class FAT if(entry.attributes.HasFlag(FatAttributes.VolumeLabel)) { - byte[] fullname = new byte[11]; - Array.Copy(entry.filename, 0, fullname, 0, 8); + var fullname = new byte[11]; + Array.Copy(entry.filename, 0, fullname, 0, 8); Array.Copy(entry.extension, 0, fullname, 8, 3); string volname = _encoding.GetString(fullname).Trim(); if(!string.IsNullOrEmpty(volname)) + { Metadata.VolumeName = entry.caseinfo.HasFlag(CaseInfo.AllLowerCase) && _namespace == Namespace.Nt - ? volname.ToLower() : volname; + ? volname.ToLower() + : volname; + } Metadata.VolumeName = Metadata.VolumeName?.Replace("\0", ""); @@ -641,9 +670,7 @@ public sealed partial class FAT } if(entry is { mtime: > 0, mdate: > 0 }) - { Metadata.ModificationDate = DateHandlers.DosToDateTime(entry.mdate, entry.mtime); - } continue; } @@ -701,7 +728,7 @@ public sealed partial class FAT name = ":{EMPTYNAME}:"; // Try to create a unique filename with an extension from 000 to 999 - for(int uniq = 0; uniq < 1000; uniq++) + for(var uniq = 0; uniq < 1000; uniq++) { extension = $"{uniq:D03}"; @@ -727,7 +754,7 @@ public sealed partial class FAT completeEntry.HumanDirent = humanEntry; - name = StringHandlers.CToString(humanEntry.name1, _encoding).TrimEnd(); + name = StringHandlers.CToString(humanEntry.name1, _encoding).TrimEnd(); extension = StringHandlers.CToString(humanEntry.extension, _encoding).TrimEnd(); string name2 = StringHandlers.CToString(humanEntry.name2, _encoding).TrimEnd(); @@ -776,10 +803,10 @@ public sealed partial class FAT _bytesPerCluster = _sectorsPerCluster * imagePlugin.Info.SectorSize; // The first 2 FAT entries do not count as allocation clusters in FAT12 and FAT16 - ushort[] firstFatEntries = new ushort[_statfs.Blocks + 2]; - ushort[] secondFatEntries = new ushort[_statfs.Blocks + 2]; - bool firstFatValid = true; - bool secondFatValid = true; + var firstFatEntries = new ushort[_statfs.Blocks + 2]; + var secondFatEntries = new ushort[_statfs.Blocks + 2]; + var firstFatValid = true; + var secondFatValid = true; if(_fat12) { @@ -790,9 +817,9 @@ public sealed partial class FAT if(errno != ErrorNumber.NoError) return errno; - int pos = 0; + var pos = 0; - for(int i = 0; i + 3 < fatBytes.Length && pos < firstFatEntries.Length; i += 3) + for(var i = 0; i + 3 < fatBytes.Length && pos < firstFatEntries.Length; i += 3) { firstFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF) << 8) + fatBytes[i + 0]); @@ -811,7 +838,7 @@ public sealed partial class FAT pos = 0; - for(int i = 0; i + 3 < fatBytes.Length && pos < secondFatEntries.Length; i += 3) + for(var i = 0; i + 3 < fatBytes.Length && pos < secondFatEntries.Length; i += 3) { secondFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF) << 8) + fatBytes[i + 0]); @@ -876,7 +903,7 @@ public sealed partial class FAT if(_eaDirEntry.start_cluster != 0) { CacheEaData(); - ushort eamagic = BitConverter.ToUInt16(_cachedEaData, 0); + var eamagic = BitConverter.ToUInt16(_cachedEaData, 0); if(eamagic != EADATA_MAGIC) { @@ -894,7 +921,7 @@ public sealed partial class FAT _namespace is Namespace.Os2 or Namespace.Ecs && !_fat32) { - List> rootFilesWithEas = + var rootFilesWithEas = _rootDirectoryCache.Where(t => t.Value.Dirent.ea_handle != 0).ToList(); foreach(KeyValuePair fileWithEa in rootFilesWithEas) @@ -910,12 +937,12 @@ public sealed partial class FAT if(BitConverter.ToUInt16(longnameEa, 0) != EAT_ASCII) continue; - ushort longnameSize = BitConverter.ToUInt16(longnameEa, 2); + var longnameSize = BitConverter.ToUInt16(longnameEa, 2); if(longnameSize + 4 > longnameEa.Length) continue; - byte[] longnameBytes = new byte[longnameSize]; + var longnameBytes = new byte[longnameSize]; Array.Copy(longnameEa, 4, longnameBytes, 0, longnameSize); @@ -936,7 +963,7 @@ public sealed partial class FAT // Check FAT32.IFS EAs if(_fat32 || _debug) { - List> fat32EaSidecars = + var fat32EaSidecars = _rootDirectoryCache.Where(t => t.Key.EndsWith(FAT32_EA_TAIL, true, _cultureInfo)).ToList(); foreach(KeyValuePair sidecar in fat32EaSidecars) @@ -948,11 +975,13 @@ public sealed partial class FAT // If not in debug mode we will consider the lack of EA bitflags to mean the EAs are corrupted or not real if(!_debug) + { if(!fileWithEa.Dirent.caseinfo.HasFlag(CaseInfo.NormalEaOld) && !fileWithEa.Dirent.caseinfo.HasFlag(CaseInfo.CriticalEa) && !fileWithEa.Dirent.caseinfo.HasFlag(CaseInfo.NormalEa) && !fileWithEa.Dirent.caseinfo.HasFlag(CaseInfo.CriticalEa)) continue; + } fileWithEa.Fat32Ea = sidecar.Value.Dirent; @@ -993,4 +1022,6 @@ public sealed partial class FAT return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FAT/Xattr.cs b/Aaru.Filesystems/FAT/Xattr.cs index 7ee8cd118..e78eaad03 100644 --- a/Aaru.Filesystems/FAT/Xattr.cs +++ b/Aaru.Filesystems/FAT/Xattr.cs @@ -40,6 +40,8 @@ public sealed partial class FAT { Dictionary> _eaCache; +#region IReadOnlyFilesystem Members + /// public ErrorNumber ListXAttr(string path, out List xattrs) { @@ -124,6 +126,8 @@ public sealed partial class FAT return ErrorNumber.NoError; } +#endregion + Dictionary GetEas(DirectoryEntry entryFat32Ea) { var eaMs = new MemoryStream(); @@ -131,7 +135,7 @@ public sealed partial class FAT foreach(uint cluster in rootDirectoryClusters) { - ErrorNumber errno = _image.ReadSectors(_firstClusterSector + (cluster * _sectorsPerCluster), + ErrorNumber errno = _image.ReadSectors(_firstClusterSector + cluster * _sectorsPerCluster, _sectorsPerCluster, out byte[] buffer); if(errno != ErrorNumber.NoError) @@ -141,8 +145,8 @@ public sealed partial class FAT } byte[] full = eaMs.ToArray(); - ushort size = BitConverter.ToUInt16(full, 0); - byte[] eas = new byte[size]; + var size = BitConverter.ToUInt16(full, 0); + var eas = new byte[size]; Array.Copy(full, 0, eas, 0, size); eaMs.Close(); @@ -155,11 +159,11 @@ public sealed partial class FAT int aIndex = eaHandle >> 7; // First 0x20 bytes are the magic number and unused words - ushort a = BitConverter.ToUInt16(_cachedEaData, (aIndex * 2) + 0x20); + var a = BitConverter.ToUInt16(_cachedEaData, aIndex * 2 + 0x20); - ushort b = BitConverter.ToUInt16(_cachedEaData, (eaHandle * 2) + 0x200); + var b = BitConverter.ToUInt16(_cachedEaData, eaHandle * 2 + 0x200); - uint eaCluster = (uint)(a + b); + var eaCluster = (uint)(a + b); if(b == EA_UNUSED) return null; @@ -171,10 +175,10 @@ public sealed partial class FAT if(header.magic != 0x4145) return null; - uint eaLen = BitConverter.ToUInt32(_cachedEaData, - (int)(eaCluster * _bytesPerCluster) + Marshal.SizeOf()); + var eaLen = BitConverter.ToUInt32(_cachedEaData, + (int)(eaCluster * _bytesPerCluster) + Marshal.SizeOf()); - byte[] eaData = new byte[eaLen]; + var eaData = new byte[eaLen]; Array.Copy(_cachedEaData, (int)(eaCluster * _bytesPerCluster) + Marshal.SizeOf(), eaData, 0, eaLen); @@ -192,19 +196,19 @@ public sealed partial class FAT if(_debug) eas.Add("com.microsoft.os2.fea", eaData); - int pos = 4; + var pos = 4; while(pos < eaData.Length) { pos++; // Skip fEA - byte cbName = eaData[pos++]; - ushort cbValue = BitConverter.ToUInt16(eaData, pos); + byte cbName = eaData[pos++]; + var cbValue = BitConverter.ToUInt16(eaData, pos); pos += 2; string name = Encoding.ASCII.GetString(eaData, pos, cbName); pos += cbName; pos++; - byte[] data = new byte[cbValue]; + var data = new byte[cbValue]; Array.Copy(eaData, pos, data, 0, cbValue); pos += cbValue; @@ -234,7 +238,7 @@ public sealed partial class FAT foreach(uint cluster in GetClusters(_eaDirEntry.start_cluster)) { - ErrorNumber errno = _image.ReadSectors(_firstClusterSector + (cluster * _sectorsPerCluster), + ErrorNumber errno = _image.ReadSectors(_firstClusterSector + cluster * _sectorsPerCluster, _sectorsPerCluster, out byte[] buffer); if(errno != ErrorNumber.NoError) diff --git a/Aaru.Filesystems/FATX/Consts.cs b/Aaru.Filesystems/FATX/Consts.cs index fffe52c3d..af5a96d9b 100644 --- a/Aaru.Filesystems/FATX/Consts.cs +++ b/Aaru.Filesystems/FATX/Consts.cs @@ -58,10 +58,17 @@ public sealed partial class XboxFatPlugin // Do not translate const string FS_TYPE = "fatx"; +#region Nested type: Attributes + [Flags] enum Attributes : byte { - ReadOnly = 0x01, Hidden = 0x02, System = 0x04, - Directory = 0x10, Archive = 0x20 + ReadOnly = 0x01, + Hidden = 0x02, + System = 0x04, + Directory = 0x10, + Archive = 0x20 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FATX/Dir.cs b/Aaru.Filesystems/FATX/Dir.cs index 2d3e863fc..a30d4436a 100644 --- a/Aaru.Filesystems/FATX/Dir.cs +++ b/Aaru.Filesystems/FATX/Dir.cs @@ -37,6 +37,8 @@ namespace Aaru.Filesystems; public sealed partial class XboxFatPlugin { +#region IReadOnlyFilesystem Members + /// public ErrorNumber OpenDir(string path, out IDirNode node) { @@ -72,10 +74,7 @@ public sealed partial class XboxFatPlugin return ErrorNumber.NoError; } - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); KeyValuePair entry = _rootDirectory.FirstOrDefault(t => t.Key.ToLower(_cultureInfo) == pieces[0]); @@ -90,7 +89,7 @@ public sealed partial class XboxFatPlugin currentDirectory = _rootDirectory; - for(int p = 0; p < pieces.Length; p++) + for(var p = 0; p < pieces.Length; p++) { entry = currentDirectory.FirstOrDefault(t => t.Key.ToLower(_cultureInfo) == pieces[p]); @@ -111,12 +110,12 @@ public sealed partial class XboxFatPlugin if(clusters is null) return ErrorNumber.InvalidArgument; - byte[] directoryBuffer = new byte[_bytesPerCluster * clusters.Length]; + var directoryBuffer = new byte[_bytesPerCluster * clusters.Length]; - for(int i = 0; i < clusters.Length; i++) + for(var i = 0; i < clusters.Length; i++) { ErrorNumber errno = - _imagePlugin.ReadSectors(_firstClusterSector + ((clusters[i] - 1) * _sectorsPerCluster), + _imagePlugin.ReadSectors(_firstClusterSector + (clusters[i] - 1) * _sectorsPerCluster, _sectorsPerCluster, out byte[] buffer); if(errno != ErrorNumber.NoError) @@ -127,7 +126,7 @@ public sealed partial class XboxFatPlugin currentDirectory = new Dictionary(); - int pos = 0; + var pos = 0; while(pos < directoryBuffer.Length) { @@ -202,4 +201,6 @@ public sealed partial class XboxFatPlugin return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FATX/FATX.cs b/Aaru.Filesystems/FATX/FATX.cs index 3ef50089e..fbc3bf6d0 100644 --- a/Aaru.Filesystems/FATX/FATX.cs +++ b/Aaru.Filesystems/FATX/FATX.cs @@ -41,6 +41,7 @@ namespace Aaru.Filesystems; /// Implements the Xbox File Allocation Table (FATX or XTAF) filesystem. public sealed partial class XboxFatPlugin : IReadOnlyFilesystem { + const string MODULE_NAME = "Xbox FAT plugin"; uint _bytesPerCluster; CultureInfo _cultureInfo; bool _debug; @@ -58,12 +59,17 @@ public sealed partial class XboxFatPlugin : IReadOnlyFilesystem FileSystemInfo _statfs; Superblock _superblock; +#region IReadOnlyFilesystem Members + /// public FileSystem Metadata { get; private set; } + /// public string Name => Localization.XboxFatPlugin_Name; + /// public Guid Id => new("ED27A721-4A17-4649-89FD-33633B46E228"); + /// public string Author => Authors.NataliaPortillo; @@ -93,12 +99,10 @@ public sealed partial class XboxFatPlugin : IReadOnlyFilesystem /// public Dictionary Namespaces => null; +#endregion + static Dictionary GetDefaultOptions() => new() { - { - "debug", false.ToString() - } + { "debug", false.ToString() } }; - - const string MODULE_NAME = "Xbox FAT plugin"; } \ No newline at end of file diff --git a/Aaru.Filesystems/FATX/File.cs b/Aaru.Filesystems/FATX/File.cs index a52450edf..3d85b7d8d 100644 --- a/Aaru.Filesystems/FATX/File.cs +++ b/Aaru.Filesystems/FATX/File.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; public sealed partial class XboxFatPlugin { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -131,14 +133,14 @@ public sealed partial class XboxFatPlugin var ms = new MemoryStream(); - for(int i = 0; i < sizeInClusters; i++) + for(var i = 0; i < sizeInClusters; i++) { if(i + firstCluster >= mynode._clusters.Length) return ErrorNumber.InvalidArgument; ErrorNumber errno = _imagePlugin. - ReadSectors(_firstClusterSector + ((mynode._clusters[i + firstCluster] - 1) * _sectorsPerCluster), + ReadSectors(_firstClusterSector + (mynode._clusters[i + firstCluster] - 1) * _sectorsPerCluster, _sectorsPerCluster, out byte[] buf); if(errno != ErrorNumber.NoError) @@ -226,6 +228,8 @@ public sealed partial class XboxFatPlugin return ErrorNumber.NoError; } +#endregion + uint[] GetClusters(uint startCluster) { if(startCluster == 0) @@ -244,18 +248,22 @@ public sealed partial class XboxFatPlugin uint nextCluster = startCluster; if(_fat16 is null) + { while((nextCluster & FAT32_MASK) > 0 && (nextCluster & FAT32_MASK) <= FAT32_RESERVED) { clusters.Add(nextCluster); nextCluster = _fat32[nextCluster]; } + } else + { while(nextCluster is > 0 and <= FAT16_RESERVED) { clusters.Add(nextCluster); nextCluster = _fat16[nextCluster]; } + } return clusters.ToArray(); } @@ -266,15 +274,12 @@ public sealed partial class XboxFatPlugin string cutPath = path.StartsWith('/') ? path[1..].ToLower(_cultureInfo) : path.ToLower(_cultureInfo); - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pieces.Length == 0) return ErrorNumber.InvalidArgument; - string parentPath = string.Join("/", pieces, 0, pieces.Length - 1); + var parentPath = string.Join("/", pieces, 0, pieces.Length - 1); ErrorNumber err = OpenDir(parentPath, out IDirNode node); diff --git a/Aaru.Filesystems/FATX/Info.cs b/Aaru.Filesystems/FATX/Info.cs index dada9c6ad..4a7c72710 100644 --- a/Aaru.Filesystems/FATX/Info.cs +++ b/Aaru.Filesystems/FATX/Info.cs @@ -37,6 +37,8 @@ namespace Aaru.Filesystems; public sealed partial class XboxFatPlugin { +#region IReadOnlyFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -63,7 +65,7 @@ public sealed partial class XboxFatPlugin if(imagePlugin.Info.SectorSize < 512) return; - bool bigEndian = true; + var bigEndian = true; ErrorNumber errno = imagePlugin.ReadSector(partition.Start, out byte[] sector); @@ -99,7 +101,7 @@ public sealed partial class XboxFatPlugin string volumeLabel = StringHandlers.CToString(fatxSb.volumeLabel, bigEndian ? Encoding.BigEndianUnicode : Encoding.Unicode, true); - sb.AppendFormat(Localization.Volume_label_0, volumeLabel).AppendLine(); + sb.AppendFormat(Localization.Volume_label_0, volumeLabel).AppendLine(); sb.AppendFormat(Localization.Volume_serial_0_X8, fatxSb.id).AppendLine(); information = sb.ToString(); @@ -115,4 +117,6 @@ public sealed partial class XboxFatPlugin metadata.Clusters = (partition.End - partition.Start + 1) * imagePlugin.Info.SectorSize / metadata.ClusterSize; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FATX/Structs.cs b/Aaru.Filesystems/FATX/Structs.cs index e97d089ca..7edb8aaa3 100644 --- a/Aaru.Filesystems/FATX/Structs.cs +++ b/Aaru.Filesystems/FATX/Structs.cs @@ -33,18 +33,7 @@ namespace Aaru.Filesystems; public sealed partial class XboxFatPlugin { - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct Superblock - { - public readonly uint magic; - public readonly uint id; - public readonly uint sectorsPerCluster; - public readonly uint rootDirectoryCluster; - - // TODO: Undetermined size - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] volumeLabel; - } +#region Nested type: DirectoryEntry [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct DirectoryEntry @@ -63,22 +52,61 @@ public sealed partial class XboxFatPlugin public readonly ushort creationDate; } - sealed class FatxFileNode : IFileNode - { - internal uint[] _clusters; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } +#endregion + +#region Nested type: FatxDirNode sealed class FatxDirNode : IDirNode { internal DirectoryEntry[] _entries; internal int _position; + + #region IDirNode Members + /// public string Path { get; init; } + + #endregion } + +#endregion + +#region Nested type: FatxFileNode + + sealed class FatxFileNode : IFileNode + { + internal uint[] _clusters; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: Superblock + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct Superblock + { + public readonly uint magic; + public readonly uint id; + public readonly uint sectorsPerCluster; + public readonly uint rootDirectoryCluster; + + // TODO: Undetermined size + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] volumeLabel; + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FATX/Super.cs b/Aaru.Filesystems/FATX/Super.cs index 6300e587a..647f8e09b 100644 --- a/Aaru.Filesystems/FATX/Super.cs +++ b/Aaru.Filesystems/FATX/Super.cs @@ -44,9 +44,11 @@ namespace Aaru.Filesystems; public sealed partial class XboxFatPlugin { +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { _encoding = Encoding.GetEncoding("iso-8859-15"); _littleEndian = true; @@ -78,7 +80,8 @@ public sealed partial class XboxFatPlugin return ErrorNumber.InvalidArgument; AaruConsole.DebugWriteLine(MODULE_NAME, - _littleEndian ? Localization.Filesystem_is_little_endian + _littleEndian + ? Localization.Filesystem_is_little_endian : Localization.Filesystem_is_big_endian); int logicalSectorsPerPhysicalSectors = partition.Offset == 0 && _littleEndian ? 8 : 1; @@ -117,16 +120,16 @@ public sealed partial class XboxFatPlugin FreeBlocks = 0 // Requires traversing the FAT }; - AaruConsole.DebugWriteLine(MODULE_NAME, "XmlFsType.ClusterSize: {0}", Metadata.ClusterSize); - AaruConsole.DebugWriteLine(MODULE_NAME, "XmlFsType.VolumeName: {0}", Metadata.VolumeName); + AaruConsole.DebugWriteLine(MODULE_NAME, "XmlFsType.ClusterSize: {0}", Metadata.ClusterSize); + AaruConsole.DebugWriteLine(MODULE_NAME, "XmlFsType.VolumeName: {0}", Metadata.VolumeName); AaruConsole.DebugWriteLine(MODULE_NAME, "XmlFsType.VolumeSerial: {0}", Metadata.VolumeSerial); - AaruConsole.DebugWriteLine(MODULE_NAME, "stat.Blocks: {0}", _statfs.Blocks); - AaruConsole.DebugWriteLine(MODULE_NAME, "stat.FilenameLength: {0}", _statfs.FilenameLength); - AaruConsole.DebugWriteLine(MODULE_NAME, "stat.Id: {0}", _statfs.Id.Serial32); - AaruConsole.DebugWriteLine(MODULE_NAME, "stat.Type: {0}", _statfs.Type); + AaruConsole.DebugWriteLine(MODULE_NAME, "stat.Blocks: {0}", _statfs.Blocks); + AaruConsole.DebugWriteLine(MODULE_NAME, "stat.FilenameLength: {0}", _statfs.FilenameLength); + AaruConsole.DebugWriteLine(MODULE_NAME, "stat.Id: {0}", _statfs.Id.Serial32); + AaruConsole.DebugWriteLine(MODULE_NAME, "stat.Type: {0}", _statfs.Type); byte[] buffer; - _fatStartSector = (FAT_START / imagePlugin.Info.SectorSize) + partition.Start; + _fatStartSector = FAT_START / imagePlugin.Info.SectorSize + partition.Start; uint fatSize; AaruConsole.DebugWriteLine(MODULE_NAME, "fatStartSector: {0}", _fatStartSector); @@ -158,8 +161,10 @@ public sealed partial class XboxFatPlugin _fat32 = MemoryMarshal.Cast(buffer).ToArray(); if(!_littleEndian) - for(int i = 0; i < _fat32.Length; i++) + { + for(var i = 0; i < _fat32.Length; i++) _fat32[i] = Swapping.Swap(_fat32[i]); + } AaruConsole.DebugWriteLine(MODULE_NAME, "fat32[0] == FATX32_ID = {0}", _fat32[0] == FATX32_ID); @@ -193,8 +198,10 @@ public sealed partial class XboxFatPlugin _fat16 = MemoryMarshal.Cast(buffer).ToArray(); if(!_littleEndian) - for(int i = 0; i < _fat16.Length; i++) + { + for(var i = 0; i < _fat16.Length; i++) _fat16[i] = Swapping.Swap(_fat16[i]); + } AaruConsole.DebugWriteLine(MODULE_NAME, "fat16[0] == FATX16_ID = {0}", _fat16[0] == FATX16_ID); @@ -207,8 +214,8 @@ public sealed partial class XboxFatPlugin _firstClusterSector = _fatStartSector + fatSize; _bytesPerCluster = _sectorsPerCluster * imagePlugin.Info.SectorSize; - AaruConsole.DebugWriteLine(MODULE_NAME, "sectorsPerCluster = {0}", _sectorsPerCluster); - AaruConsole.DebugWriteLine(MODULE_NAME, "bytesPerCluster = {0}", _bytesPerCluster); + AaruConsole.DebugWriteLine(MODULE_NAME, "sectorsPerCluster = {0}", _sectorsPerCluster); + AaruConsole.DebugWriteLine(MODULE_NAME, "bytesPerCluster = {0}", _bytesPerCluster); AaruConsole.DebugWriteLine(MODULE_NAME, "firstClusterSector = {0}", _firstClusterSector); uint[] rootDirectoryClusters = GetClusters(_superblock.rootDirectoryCluster); @@ -216,13 +223,13 @@ public sealed partial class XboxFatPlugin if(rootDirectoryClusters is null) return ErrorNumber.InvalidArgument; - byte[] rootDirectoryBuffer = new byte[_bytesPerCluster * rootDirectoryClusters.Length]; + var rootDirectoryBuffer = new byte[_bytesPerCluster * rootDirectoryClusters.Length]; AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Reading_root_directory); - for(int i = 0; i < rootDirectoryClusters.Length; i++) + for(var i = 0; i < rootDirectoryClusters.Length; i++) { - errno = imagePlugin.ReadSectors(_firstClusterSector + ((rootDirectoryClusters[i] - 1) * _sectorsPerCluster), + errno = imagePlugin.ReadSectors(_firstClusterSector + (rootDirectoryClusters[i] - 1) * _sectorsPerCluster, _sectorsPerCluster, out buffer); if(errno != ErrorNumber.NoError) @@ -233,7 +240,7 @@ public sealed partial class XboxFatPlugin _rootDirectory = new Dictionary(); - int pos = 0; + var pos = 0; while(pos < rootDirectoryBuffer.Length) { @@ -289,4 +296,6 @@ public sealed partial class XboxFatPlugin return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FFS/Consts.cs b/Aaru.Filesystems/FFS/Consts.cs index 913c8c5ae..a13e004b3 100644 --- a/Aaru.Filesystems/FFS/Consts.cs +++ b/Aaru.Filesystems/FFS/Consts.cs @@ -27,8 +27,8 @@ // ****************************************************************************/ using System.Diagnostics.CodeAnalysis; -using time_t = System.Int32; -using ufs_daddr_t = System.Int32; +using time_t = int; +using ufs_daddr_t = int; namespace Aaru.Filesystems; diff --git a/Aaru.Filesystems/FFS/FFS.cs b/Aaru.Filesystems/FFS/FFS.cs index 94a3bc0f2..be4444e94 100644 --- a/Aaru.Filesystems/FFS/FFS.cs +++ b/Aaru.Filesystems/FFS/FFS.cs @@ -29,8 +29,8 @@ using System; using System.Diagnostics.CodeAnalysis; using Aaru.CommonTypes.Interfaces; -using time_t = System.Int32; -using ufs_daddr_t = System.Int32; +using time_t = int; +using ufs_daddr_t = int; namespace Aaru.Filesystems; @@ -40,11 +40,18 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "InconsistentNaming")] public sealed partial class FFSPlugin : IFilesystem { + const string MODULE_NAME = "FFS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.FFSPlugin_Name; + /// public Guid Id => new("CC90D342-05DB-48A8-988C-C1FE000034A3"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "FFS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FFS/Info.cs b/Aaru.Filesystems/FFS/Info.cs index 28dd69898..5e7641a72 100644 --- a/Aaru.Filesystems/FFS/Info.cs +++ b/Aaru.Filesystems/FFS/Info.cs @@ -36,8 +36,8 @@ using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Helpers; using Partition = Aaru.CommonTypes.Partition; -using time_t = System.Int32; -using ufs_daddr_t = System.Int32; +using time_t = int; +using ufs_daddr_t = int; namespace Aaru.Filesystems; @@ -47,6 +47,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "InconsistentNaming")] public sealed partial class FFSPlugin { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -77,10 +79,10 @@ public sealed partial class FFSPlugin if(errno != ErrorNumber.NoError) continue; - uint magic = BitConverter.ToUInt32(ufsSbSectors, 0x055C); + var magic = BitConverter.ToUInt32(ufsSbSectors, 0x055C); if(magic is UFS_MAGIC or UFS_CIGAM or UFS_MAGIC_BW or UFS_CIGAM_BW or UFS2_MAGIC or UFS2_CIGAM - or UFS_BAD_MAGIC or UFS_BAD_CIGAM) + or UFS_BAD_MAGIC or UFS_BAD_CIGAM) return true; } @@ -104,13 +106,13 @@ public sealed partial class FFSPlugin uint sb_size_in_sectors; byte[] ufs_sb_sectors; ulong sb_offset = partition.Start; - bool fs_type_42bsd = false; - bool fs_type_43bsd = false; - bool fs_type_44bsd = false; - bool fs_type_ufs = false; - bool fs_type_ufs2 = false; - bool fs_type_sun = false; - bool fs_type_sun86 = false; + var fs_type_42bsd = false; + var fs_type_43bsd = false; + var fs_type_44bsd = false; + var fs_type_ufs = false; + var fs_type_ufs2 = false; + var fs_type_sun = false; + var fs_type_sun86 = false; if(imagePlugin.Info.SectorSize is 2336 or 2352 or 2448) sb_size_in_sectors = block_size / 2048; @@ -136,7 +138,7 @@ public sealed partial class FFSPlugin magic = BitConverter.ToUInt32(ufs_sb_sectors, 0x055C); if(magic is UFS_MAGIC or UFS_CIGAM or UFS_MAGIC_BW or UFS_CIGAM_BW or UFS2_MAGIC or UFS2_CIGAM - or UFS_BAD_MAGIC or UFS_BAD_CIGAM) + or UFS_BAD_MAGIC or UFS_BAD_CIGAM) { sb_offset = partition.Start + loc; @@ -211,10 +213,10 @@ public sealed partial class FFSPlugin SuperBlock bs_sfu = Marshal.ByteArrayToStructureBigEndian(ufs_sb_sectors); - if((bs_sfu.fs_magic == UFS_MAGIC && sb.fs_magic == UFS_CIGAM) || - (bs_sfu.fs_magic == UFS_MAGIC_BW && sb.fs_magic == UFS_CIGAM_BW) || - (bs_sfu.fs_magic == UFS2_MAGIC && sb.fs_magic == UFS2_CIGAM) || - (bs_sfu.fs_magic == UFS_BAD_MAGIC && sb.fs_magic == UFS_BAD_CIGAM)) + if(bs_sfu.fs_magic == UFS_MAGIC && sb.fs_magic == UFS_CIGAM || + bs_sfu.fs_magic == UFS_MAGIC_BW && sb.fs_magic == UFS_CIGAM_BW || + bs_sfu.fs_magic == UFS2_MAGIC && sb.fs_magic == UFS2_CIGAM || + bs_sfu.fs_magic == UFS_BAD_MAGIC && sb.fs_magic == UFS_BAD_CIGAM) { sb = bs_sfu; sb.fs_old_cstotal.cs_nbfree = Swapping.Swap(sb.fs_old_cstotal.cs_nbfree); @@ -231,45 +233,45 @@ public sealed partial class FFSPlugin sb.fs_cstotal.cs_spare[2] = Swapping.Swap(sb.fs_cstotal.cs_spare[2]); } - AaruConsole.DebugWriteLine(MODULE_NAME, "sb offset: 0x{0:X8}", sb_offset); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_rlink: 0x{0:X8}", sb.fs_rlink); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_sblkno: 0x{0:X8}", sb.fs_sblkno); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_cblkno: 0x{0:X8}", sb.fs_cblkno); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_iblkno: 0x{0:X8}", sb.fs_iblkno); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_dblkno: 0x{0:X8}", sb.fs_dblkno); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_size: 0x{0:X8}", sb.fs_size); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_dsize: 0x{0:X8}", sb.fs_dsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_ncg: 0x{0:X8}", sb.fs_ncg); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_bsize: 0x{0:X8}", sb.fs_bsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fsize: 0x{0:X8}", sb.fs_fsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_frag: 0x{0:X8}", sb.fs_frag); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_minfree: 0x{0:X8}", sb.fs_minfree); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_bmask: 0x{0:X8}", sb.fs_bmask); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fmask: 0x{0:X8}", sb.fs_fmask); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_bshift: 0x{0:X8}", sb.fs_bshift); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fshift: 0x{0:X8}", sb.fs_fshift); + AaruConsole.DebugWriteLine(MODULE_NAME, "sb offset: 0x{0:X8}", sb_offset); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_rlink: 0x{0:X8}", sb.fs_rlink); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_sblkno: 0x{0:X8}", sb.fs_sblkno); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_cblkno: 0x{0:X8}", sb.fs_cblkno); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_iblkno: 0x{0:X8}", sb.fs_iblkno); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_dblkno: 0x{0:X8}", sb.fs_dblkno); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_size: 0x{0:X8}", sb.fs_size); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_dsize: 0x{0:X8}", sb.fs_dsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_ncg: 0x{0:X8}", sb.fs_ncg); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_bsize: 0x{0:X8}", sb.fs_bsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fsize: 0x{0:X8}", sb.fs_fsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_frag: 0x{0:X8}", sb.fs_frag); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_minfree: 0x{0:X8}", sb.fs_minfree); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_bmask: 0x{0:X8}", sb.fs_bmask); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fmask: 0x{0:X8}", sb.fs_fmask); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_bshift: 0x{0:X8}", sb.fs_bshift); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fshift: 0x{0:X8}", sb.fs_fshift); AaruConsole.DebugWriteLine(MODULE_NAME, "fs_maxcontig: 0x{0:X8}", sb.fs_maxcontig); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_maxbpg: 0x{0:X8}", sb.fs_maxbpg); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_maxbpg: 0x{0:X8}", sb.fs_maxbpg); AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fragshift: 0x{0:X8}", sb.fs_fragshift); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fsbtodb: 0x{0:X8}", sb.fs_fsbtodb); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_sbsize: 0x{0:X8}", sb.fs_sbsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_csmask: 0x{0:X8}", sb.fs_csmask); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_csshift: 0x{0:X8}", sb.fs_csshift); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_nindir: 0x{0:X8}", sb.fs_nindir); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_inopb: 0x{0:X8}", sb.fs_inopb); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_optim: 0x{0:X8}", sb.fs_optim); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_id_1: 0x{0:X8}", sb.fs_id_1); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_id_2: 0x{0:X8}", sb.fs_id_2); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_csaddr: 0x{0:X8}", sb.fs_csaddr); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_cssize: 0x{0:X8}", sb.fs_cssize); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_cgsize: 0x{0:X8}", sb.fs_cgsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_ipg: 0x{0:X8}", sb.fs_ipg); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fpg: 0x{0:X8}", sb.fs_fpg); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fmod: 0x{0:X2}", sb.fs_fmod); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_clean: 0x{0:X2}", sb.fs_clean); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_ronly: 0x{0:X2}", sb.fs_ronly); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_flags: 0x{0:X2}", sb.fs_flags); - AaruConsole.DebugWriteLine(MODULE_NAME, "fs_magic: 0x{0:X8}", sb.fs_magic); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fsbtodb: 0x{0:X8}", sb.fs_fsbtodb); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_sbsize: 0x{0:X8}", sb.fs_sbsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_csmask: 0x{0:X8}", sb.fs_csmask); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_csshift: 0x{0:X8}", sb.fs_csshift); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_nindir: 0x{0:X8}", sb.fs_nindir); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_inopb: 0x{0:X8}", sb.fs_inopb); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_optim: 0x{0:X8}", sb.fs_optim); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_id_1: 0x{0:X8}", sb.fs_id_1); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_id_2: 0x{0:X8}", sb.fs_id_2); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_csaddr: 0x{0:X8}", sb.fs_csaddr); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_cssize: 0x{0:X8}", sb.fs_cssize); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_cgsize: 0x{0:X8}", sb.fs_cgsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_ipg: 0x{0:X8}", sb.fs_ipg); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fpg: 0x{0:X8}", sb.fs_fpg); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_fmod: 0x{0:X2}", sb.fs_fmod); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_clean: 0x{0:X2}", sb.fs_clean); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_ronly: 0x{0:X2}", sb.fs_ronly); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_flags: 0x{0:X2}", sb.fs_flags); + AaruConsole.DebugWriteLine(MODULE_NAME, "fs_magic: 0x{0:X8}", sb.fs_magic); if(sb.fs_magic == UFS2_MAGIC) fs_type_ufs2 = true; @@ -351,10 +353,10 @@ public sealed partial class FFSPlugin if(fs_type_42bsd) sbInformation.AppendFormat(Localization.Linked_list_of_filesystems_0, sb.fs_link).AppendLine(); - sbInformation.AppendFormat(Localization.Superblock_LBA_0, sb.fs_sblkno).AppendLine(); - sbInformation.AppendFormat(Localization.Cylinder_block_LBA_0, sb.fs_cblkno).AppendLine(); - sbInformation.AppendFormat(Localization.inode_block_LBA_0, sb.fs_iblkno).AppendLine(); - sbInformation.AppendFormat(Localization.First_data_block_LBA_0, sb.fs_dblkno).AppendLine(); + sbInformation.AppendFormat(Localization.Superblock_LBA_0, sb.fs_sblkno).AppendLine(); + sbInformation.AppendFormat(Localization.Cylinder_block_LBA_0, sb.fs_cblkno).AppendLine(); + sbInformation.AppendFormat(Localization.inode_block_LBA_0, sb.fs_iblkno).AppendLine(); + sbInformation.AppendFormat(Localization.First_data_block_LBA_0, sb.fs_dblkno).AppendLine(); sbInformation.AppendFormat(Localization.Cylinder_group_offset_in_cylinder_0, sb.fs_old_cgoffset).AppendLine(); sbInformation.AppendFormat(Localization.Volume_last_written_on_0, DateHandlers.UnixToDateTime(sb.fs_old_time)). @@ -372,10 +374,10 @@ public sealed partial class FFSPlugin (long)sb.fs_old_dsize * sb.fs_fsize).AppendLine(); sbInformation.AppendFormat(Localization._0_cylinder_groups_in_volume, sb.fs_ncg).AppendLine(); - sbInformation.AppendFormat(Localization._0_bytes_in_a_basic_block, sb.fs_bsize).AppendLine(); - sbInformation.AppendFormat(Localization._0_bytes_in_a_frag_block, sb.fs_fsize).AppendLine(); - sbInformation.AppendFormat(Localization._0_frags_in_a_block, sb.fs_frag).AppendLine(); - sbInformation.AppendFormat(Localization._0_of_blocks_must_be_free, sb.fs_minfree).AppendLine(); + sbInformation.AppendFormat(Localization._0_bytes_in_a_basic_block, sb.fs_bsize).AppendLine(); + sbInformation.AppendFormat(Localization._0_bytes_in_a_frag_block, sb.fs_fsize).AppendLine(); + sbInformation.AppendFormat(Localization._0_frags_in_a_block, sb.fs_frag).AppendLine(); + sbInformation.AppendFormat(Localization._0_of_blocks_must_be_free, sb.fs_minfree).AppendLine(); sbInformation.AppendFormat(Localization._0_ms_for_optimal_next_block, sb.fs_old_rotdelay).AppendLine(); sbInformation. @@ -386,12 +388,12 @@ public sealed partial class FFSPlugin sbInformation.AppendFormat("fs_fmask: 0x{0:X8}", sb.fs_fmask).AppendLine(); sbInformation.AppendFormat("fs_bshift: 0x{0:X8}", sb.fs_bshift).AppendLine(); sbInformation.AppendFormat("fs_fshift: 0x{0:X8}", sb.fs_fshift).AppendLine();*/ - sbInformation.AppendFormat(Localization._0_contiguous_blocks_at_maximum, sb.fs_maxcontig).AppendLine(); + sbInformation.AppendFormat(Localization._0_contiguous_blocks_at_maximum, sb.fs_maxcontig).AppendLine(); sbInformation.AppendFormat(Localization._0_blocks_per_cylinder_group_at_maximum, sb.fs_maxbpg).AppendLine(); - sbInformation.AppendFormat(Localization.Superblock_is_0_bytes, sb.fs_sbsize).AppendLine(); - sbInformation.AppendFormat(Localization.NINDIR_0, sb.fs_nindir).AppendLine(); - sbInformation.AppendFormat(Localization.INOPB_0, sb.fs_inopb).AppendLine(); - sbInformation.AppendFormat(Localization.NSPF_0, sb.fs_old_nspf).AppendLine(); + sbInformation.AppendFormat(Localization.Superblock_is_0_bytes, sb.fs_sbsize).AppendLine(); + sbInformation.AppendFormat(Localization.NINDIR_0, sb.fs_nindir).AppendLine(); + sbInformation.AppendFormat(Localization.INOPB_0, sb.fs_inopb).AppendLine(); + sbInformation.AppendFormat(Localization.NSPF_0, sb.fs_old_nspf).AppendLine(); switch(sb.fs_optim) { @@ -412,11 +414,13 @@ public sealed partial class FFSPlugin if(fs_type_sun) sbInformation.AppendFormat(Localization._0_sectors_track, sb.fs_old_npsect).AppendLine(); else if(fs_type_sun86) + { sbInformation.AppendFormat(Localization.Volume_state_on_0, DateHandlers.UnixToDateTime(sb.fs_old_npsect)). AppendLine(); + } sbInformation.AppendFormat(Localization.Hardware_sector_interleave_0, sb.fs_old_interleave).AppendLine(); - sbInformation.AppendFormat(Localization.Sector_zero_skew_0_track, sb.fs_old_trackskew).AppendLine(); + sbInformation.AppendFormat(Localization.Sector_zero_skew_0_track, sb.fs_old_trackskew).AppendLine(); switch(fs_type_43bsd) { @@ -425,7 +429,7 @@ public sealed partial class FFSPlugin break; case true when sb is { fs_id_1: > 0, fs_id_2: > 0 }: - sbInformation.AppendFormat(Localization._0_µsec_for_head_switch, sb.fs_id_1).AppendLine(); + sbInformation.AppendFormat(Localization._0_µsec_for_head_switch, sb.fs_id_1).AppendLine(); sbInformation.AppendFormat(Localization._0_µsec_for_track_to_track_seek, sb.fs_id_2).AppendLine(); break; @@ -448,7 +452,7 @@ public sealed partial class FFSPlugin metadata.FreeClusters = (ulong)sb.fs_old_cstotal.cs_nbfree; sbInformation.AppendFormat(Localization._0_free_inodes, sb.fs_old_cstotal.cs_nifree).AppendLine(); - sbInformation.AppendFormat(Localization._0_free_frags, sb.fs_old_cstotal.cs_nffree).AppendLine(); + sbInformation.AppendFormat(Localization._0_free_frags, sb.fs_old_cstotal.cs_nffree).AppendLine(); if(sb.fs_fmod == 1) { @@ -465,8 +469,10 @@ public sealed partial class FFSPlugin sbInformation.AppendFormat(Localization.Volume_flags_0_X2, sb.fs_flags).AppendLine(); if(fs_type_ufs) + { sbInformation.AppendFormat(Localization.Volume_last_mounted_at_0, StringHandlers.CToString(sb.fs_fsmnt)). AppendLine(); + } else if(fs_type_ufs2) { sbInformation.AppendFormat(Localization.Volume_last_mounted_at_0, StringHandlers.CToString(sb.fs_fsmnt)). @@ -485,14 +491,14 @@ public sealed partial class FFSPlugin AppendLine(); sbInformation.AppendFormat(Localization.Standard_superblock_LBA_0, sb.fs_sblkno).AppendLine(); - sbInformation.AppendFormat(Localization._0_directories, sb.fs_cstotal.cs_ndir).AppendLine(); + sbInformation.AppendFormat(Localization._0_directories, sb.fs_cstotal.cs_ndir).AppendLine(); sbInformation.AppendFormat(Localization._0_free_blocks_1_bytes, sb.fs_cstotal.cs_nbfree, sb.fs_cstotal.cs_nbfree * sb.fs_fsize).AppendLine(); metadata.FreeClusters = (ulong)sb.fs_cstotal.cs_nbfree; - sbInformation.AppendFormat(Localization._0_free_inodes, sb.fs_cstotal.cs_nifree).AppendLine(); - sbInformation.AppendFormat(Localization._0_free_frags, sb.fs_cstotal.cs_nffree).AppendLine(); + sbInformation.AppendFormat(Localization._0_free_inodes, sb.fs_cstotal.cs_nifree).AppendLine(); + sbInformation.AppendFormat(Localization._0_free_frags, sb.fs_cstotal.cs_nffree).AppendLine(); sbInformation.AppendFormat(Localization._0_free_clusters, sb.fs_cstotal.cs_numclusters).AppendLine(); sbInformation.AppendFormat(Localization.Volume_last_written_on_0, DateHandlers.UnixToDateTime(sb.fs_time)). @@ -514,8 +520,10 @@ public sealed partial class FFSPlugin } if(fs_type_sun) + { sbInformation.AppendFormat(Localization.Volume_state_on_0, DateHandlers.UnixToDateTime(sb.fs_old_npsect)). AppendLine(); + } else if(fs_type_sun86) sbInformation.AppendFormat(Localization._0_sectors_track, sb.fs_state).AppendLine(); else if(fs_type_44bsd) @@ -540,4 +548,6 @@ public sealed partial class FFSPlugin information = sbInformation.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/FFS/Structs.cs b/Aaru.Filesystems/FFS/Structs.cs index c7b90e103..4b63a873b 100644 --- a/Aaru.Filesystems/FFS/Structs.cs +++ b/Aaru.Filesystems/FFS/Structs.cs @@ -28,8 +28,8 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using time_t = System.Int32; -using ufs_daddr_t = System.Int32; +using time_t = int; +using ufs_daddr_t = int; namespace Aaru.Filesystems; @@ -39,6 +39,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "InconsistentNaming")] public sealed partial class FFSPlugin { +#region Nested type: csum + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct csum { @@ -52,6 +54,10 @@ public sealed partial class FFSPlugin public int cs_nffree; } +#endregion + +#region Nested type: csum_total + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct csum_total { @@ -70,6 +76,10 @@ public sealed partial class FFSPlugin public readonly long[] cs_spare; } +#endregion + +#region Nested type: SuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct SuperBlock { @@ -289,4 +299,6 @@ public sealed partial class FFSPlugin [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public readonly byte[] fs_rotbl; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Fossil/Fossil.cs b/Aaru.Filesystems/Fossil/Fossil.cs index 9b0a4d3fd..472f50972 100644 --- a/Aaru.Filesystems/Fossil/Fossil.cs +++ b/Aaru.Filesystems/Fossil/Fossil.cs @@ -35,11 +35,18 @@ namespace Aaru.Filesystems; /// Implements detection for the Plan-9 Fossil on-disk filesystem public sealed partial class Fossil : IFilesystem { + const string MODULE_NAME = "Fossil plugin"; + +#region IFilesystem Members + /// public string Name => Localization.Fossil_Name; + /// public Guid Id => new("932BF104-43F6-494F-973C-45EF58A51DA9"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "Fossil plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Fossil/Info.cs b/Aaru.Filesystems/Fossil/Info.cs index d40b61700..cb4fe6233 100644 --- a/Aaru.Filesystems/Fossil/Info.cs +++ b/Aaru.Filesystems/Fossil/Info.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// Implements detection for the Plan-9 Fossil on-disk filesystem public sealed partial class Fossil { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -86,14 +88,14 @@ public sealed partial class Fossil var sb = new StringBuilder(); sb.AppendLine(Localization.Fossil_filesystem); - sb.AppendFormat(Localization.Filesystem_version_0, hdr.version).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_block, hdr.blockSize).AppendLine(); + sb.AppendFormat(Localization.Filesystem_version_0, hdr.version).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_block, hdr.blockSize).AppendLine(); sb.AppendFormat(Localization.Superblock_resides_in_block_0, hdr.super).AppendLine(); - sb.AppendFormat(Localization.Labels_resides_in_block_0, hdr.label).AppendLine(); - sb.AppendFormat(Localization.Data_starts_at_block_0, hdr.data).AppendLine(); - sb.AppendFormat(Localization.Volume_has_0_blocks, hdr.end).AppendLine(); + sb.AppendFormat(Localization.Labels_resides_in_block_0, hdr.label).AppendLine(); + sb.AppendFormat(Localization.Data_starts_at_block_0, hdr.data).AppendLine(); + sb.AppendFormat(Localization.Volume_has_0_blocks, hdr.end).AppendLine(); - ulong sbLocation = (hdr.super * (hdr.blockSize / imagePlugin.Info.SectorSize)) + partition.Start; + ulong sbLocation = hdr.super * (hdr.blockSize / imagePlugin.Info.SectorSize) + partition.Start; metadata = new FileSystem { @@ -124,4 +126,6 @@ public sealed partial class Fossil information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Fossil/Structs.cs b/Aaru.Filesystems/Fossil/Structs.cs index 4e225eb63..0a9bd89e1 100644 --- a/Aaru.Filesystems/Fossil/Structs.cs +++ b/Aaru.Filesystems/Fossil/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; /// Implements detection for the Plan-9 Fossil on-disk filesystem public sealed partial class Fossil { +#region Nested type: Header + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Header { @@ -53,6 +55,10 @@ public sealed partial class Fossil public readonly uint end; } +#endregion + +#region Nested type: SuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock { @@ -79,4 +85,6 @@ public sealed partial class Fossil [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] public readonly byte[] name; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HAMMER/Consts.cs b/Aaru.Filesystems/HAMMER/Consts.cs index de2d732b8..60413e166 100644 --- a/Aaru.Filesystems/HAMMER/Consts.cs +++ b/Aaru.Filesystems/HAMMER/Consts.cs @@ -26,9 +26,9 @@ // Copyright © 2011-2023 Natalia Portillo // ****************************************************************************/ -using hammer_crc_t = System.UInt32; -using hammer_off_t = System.UInt64; -using hammer_tid_t = System.UInt64; +using hammer_crc_t = uint; +using hammer_off_t = ulong; +using hammer_tid_t = ulong; #pragma warning disable 169 diff --git a/Aaru.Filesystems/HAMMER/HAMMER.cs b/Aaru.Filesystems/HAMMER/HAMMER.cs index 1f6606408..fabb4b995 100644 --- a/Aaru.Filesystems/HAMMER/HAMMER.cs +++ b/Aaru.Filesystems/HAMMER/HAMMER.cs @@ -28,9 +28,9 @@ using System; using Aaru.CommonTypes.Interfaces; -using hammer_crc_t = System.UInt32; -using hammer_off_t = System.UInt64; -using hammer_tid_t = System.UInt64; +using hammer_crc_t = uint; +using hammer_off_t = ulong; +using hammer_tid_t = ulong; #pragma warning disable 169 @@ -40,10 +40,16 @@ namespace Aaru.Filesystems; /// Implements detection for the HAMMER filesystem public sealed partial class HAMMER : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.HAMMER_Name; + /// public Guid Id => new("91A188BF-5FD7-4677-BBD3-F59EBA9C864D"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HAMMER/Info.cs b/Aaru.Filesystems/HAMMER/Info.cs index 56ec116b8..511c7e317 100644 --- a/Aaru.Filesystems/HAMMER/Info.cs +++ b/Aaru.Filesystems/HAMMER/Info.cs @@ -32,9 +32,9 @@ using Aaru.CommonTypes.AaruMetadata; using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Helpers; -using hammer_crc_t = System.UInt32; -using hammer_off_t = System.UInt64; -using hammer_tid_t = System.UInt64; +using hammer_crc_t = uint; +using hammer_off_t = ulong; +using hammer_tid_t = ulong; using Partition = Aaru.CommonTypes.Partition; #pragma warning disable 169 @@ -45,6 +45,8 @@ namespace Aaru.Filesystems; /// Implements detection for the HAMMER filesystem public sealed partial class HAMMER { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -61,7 +63,7 @@ public sealed partial class HAMMER if(errno != ErrorNumber.NoError) return false; - ulong magic = BitConverter.ToUInt64(sbSector, 0); + var magic = BitConverter.ToUInt64(sbSector, 0); return magic is HAMMER_FSBUF_VOLUME or HAMMER_FSBUF_VOLUME_REV; } @@ -86,7 +88,7 @@ public sealed partial class HAMMER if(errno != ErrorNumber.NoError) return; - ulong magic = BitConverter.ToUInt64(sbSector, 0); + var magic = BitConverter.ToUInt64(sbSector, 0); SuperBlock superBlock = magic == HAMMER_FSBUF_VOLUME ? Marshal.ByteArrayToStructureLittleEndian(sbSector) @@ -102,12 +104,12 @@ public sealed partial class HAMMER sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(superBlock.vol_label, encoding)). AppendLine(); - sb.AppendFormat(Localization.Volume_serial_0, superBlock.vol_fsid).AppendLine(); - sb.AppendFormat(Localization.Filesystem_type_0, superBlock.vol_fstype).AppendLine(); - sb.AppendFormat(Localization.Boot_area_starts_at_0, superBlock.vol_bot_beg).AppendLine(); - sb.AppendFormat(Localization.Memory_log_starts_at_0, superBlock.vol_mem_beg).AppendLine(); + sb.AppendFormat(Localization.Volume_serial_0, superBlock.vol_fsid).AppendLine(); + sb.AppendFormat(Localization.Filesystem_type_0, superBlock.vol_fstype).AppendLine(); + sb.AppendFormat(Localization.Boot_area_starts_at_0, superBlock.vol_bot_beg).AppendLine(); + sb.AppendFormat(Localization.Memory_log_starts_at_0, superBlock.vol_mem_beg).AppendLine(); sb.AppendFormat(Localization.First_volume_buffer_starts_at_0, superBlock.vol_buf_beg).AppendLine(); - sb.AppendFormat(Localization.Volume_ends_at_0, superBlock.vol_buf_end).AppendLine(); + sb.AppendFormat(Localization.Volume_ends_at_0, superBlock.vol_buf_end).AppendLine(); metadata = new FileSystem { @@ -139,4 +141,6 @@ public sealed partial class HAMMER information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HAMMER/Structs.cs b/Aaru.Filesystems/HAMMER/Structs.cs index 2ceb95654..5a7f14e70 100644 --- a/Aaru.Filesystems/HAMMER/Structs.cs +++ b/Aaru.Filesystems/HAMMER/Structs.cs @@ -29,9 +29,9 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using hammer_crc_t = System.UInt32; -using hammer_off_t = System.UInt64; -using hammer_tid_t = System.UInt64; +using hammer_crc_t = uint; +using hammer_off_t = ulong; +using hammer_tid_t = ulong; #pragma warning disable 169 @@ -41,8 +41,31 @@ namespace Aaru.Filesystems; /// Implements detection for the HAMMER filesystem public sealed partial class HAMMER { +#region Nested type: HammerBlockMap + + [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] + struct HammerBlockMap + { + /// zone-2 offset only used by zone-4 + public hammer_off_t phys_offset; + /// zone-X offset only used by zone-3 + public hammer_off_t first_offset; + /// zone-X offset for allocation + public hammer_off_t next_offset; + /// zone-X offset only used by zone-3 + public hammer_off_t alloc_offset; + public uint reserved01; + public hammer_crc_t entry_crc; + } + +#endregion + +#region Nested type: SuperBlock + /// Hammer superblock - [StructLayout(LayoutKind.Sequential, Pack = 1), SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] + [StructLayout(LayoutKind.Sequential, Pack = 1)] + [SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] readonly struct SuperBlock { /// for a valid header @@ -117,18 +140,5 @@ public sealed partial class HAMMER public readonly hammer_off_t[] vol0_undo_array; } - [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] - struct HammerBlockMap - { - /// zone-2 offset only used by zone-4 - public hammer_off_t phys_offset; - /// zone-X offset only used by zone-3 - public hammer_off_t first_offset; - /// zone-X offset for allocation - public hammer_off_t next_offset; - /// zone-X offset only used by zone-3 - public hammer_off_t alloc_offset; - public uint reserved01; - public hammer_crc_t entry_crc; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HPFS/HPFS.cs b/Aaru.Filesystems/HPFS/HPFS.cs index eb5f6f544..c6552313d 100644 --- a/Aaru.Filesystems/HPFS/HPFS.cs +++ b/Aaru.Filesystems/HPFS/HPFS.cs @@ -40,10 +40,16 @@ namespace Aaru.Filesystems; /// Implements detection of IBM's High Performance File System (HPFS) public sealed partial class HPFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.HPFS_Name; + /// public Guid Id => new("33513B2C-f590-4acb-8bf2-0b1d5e19dec5"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HPFS/Info.cs b/Aaru.Filesystems/HPFS/Info.cs index 708959870..95989cab6 100644 --- a/Aaru.Filesystems/HPFS/Info.cs +++ b/Aaru.Filesystems/HPFS/Info.cs @@ -46,6 +46,8 @@ namespace Aaru.Filesystems; /// Implements detection of IBM's High Performance File System (HPFS) public sealed partial class HPFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -59,8 +61,8 @@ public sealed partial class HPFS if(errno != ErrorNumber.NoError) return false; - uint magic1 = BitConverter.ToUInt32(hpfsSbSector, 0x000); - uint magic2 = BitConverter.ToUInt32(hpfsSbSector, 0x004); + var magic1 = BitConverter.ToUInt32(hpfsSbSector, 0x000); + var magic2 = BitConverter.ToUInt32(hpfsSbSector, 0x004); return magic1 == 0xF995E849 && magic2 == 0xFA53E9C5; } @@ -107,14 +109,14 @@ public sealed partial class HPFS sp.magic2 != 0xFA5229C5) { sb.AppendLine(Localization.This_may_not_be_HPFS_following_information_may_be_not_correct); - sb.AppendFormat(Localization.File_system_type_0_Should_be_HPFS, bpb.fs_type).AppendLine(); + sb.AppendFormat(Localization.File_system_type_0_Should_be_HPFS, bpb.fs_type).AppendLine(); sb.AppendFormat(Localization.Superblock_magic1_0_Should_be_0xF995E849, hpfsSb.magic1).AppendLine(); sb.AppendFormat(Localization.Superblock_magic2_0_Should_be_0xFA53E9C5, hpfsSb.magic2).AppendLine(); sb.AppendFormat(Localization.Spareblock_magic1_0_Should_be_0xF9911849, sp.magic1).AppendLine(); sb.AppendFormat(Localization.Spareblock_magic2_0_Should_be_0xFA5229C5, sp.magic2).AppendLine(); } - sb.AppendFormat(Localization.OEM_name_0, StringHandlers.CToString(bpb.oem_name)).AppendLine(); + sb.AppendFormat(Localization.OEM_name_0, StringHandlers.CToString(bpb.oem_name)).AppendLine(); sb.AppendFormat(Localization._0_bytes_per_sector, bpb.bps).AppendLine(); // sb.AppendFormat("{0} sectors per cluster", hpfs_bpb.spc).AppendLine(); @@ -144,12 +146,12 @@ public sealed partial class HPFS DateTime lastChk = DateHandlers.UnixToDateTime(hpfsSb.last_chkdsk); DateTime lastOptim = DateHandlers.UnixToDateTime(hpfsSb.last_optim); - sb.AppendFormat(Localization.HPFS_version_0, hpfsSb.version).AppendLine(); - sb.AppendFormat(Localization.Functional_version_0, hpfsSb.func_version).AppendLine(); + sb.AppendFormat(Localization.HPFS_version_0, hpfsSb.version).AppendLine(); + sb.AppendFormat(Localization.Functional_version_0, hpfsSb.func_version).AppendLine(); sb.AppendFormat(Localization.Sector_of_root_directory_FNode_0, hpfsSb.root_fnode).AppendLine(); - sb.AppendFormat(Localization._0_sectors_are_marked_bad, hpfsSb.badblocks).AppendLine(); - sb.AppendFormat(Localization.Sector_of_free_space_bitmaps_0, hpfsSb.bitmap_lsn).AppendLine(); - sb.AppendFormat(Localization.Sector_of_bad_blocks_list_0, hpfsSb.badblock_lsn).AppendLine(); + sb.AppendFormat(Localization._0_sectors_are_marked_bad, hpfsSb.badblocks).AppendLine(); + sb.AppendFormat(Localization.Sector_of_free_space_bitmaps_0, hpfsSb.bitmap_lsn).AppendLine(); + sb.AppendFormat(Localization.Sector_of_bad_blocks_list_0, hpfsSb.badblock_lsn).AppendLine(); if(hpfsSb.last_chkdsk > 0) sb.AppendFormat(Localization.Date_of_last_integrity_check_0, lastChk).AppendLine(); @@ -161,21 +163,21 @@ public sealed partial class HPFS else sb.AppendLine(Localization.Filesystem_has_never_been_optimized); - sb.AppendFormat(Localization.Directory_band_has_0_sectors, hpfsSb.dband_sectors).AppendLine(); + sb.AppendFormat(Localization.Directory_band_has_0_sectors, hpfsSb.dband_sectors).AppendLine(); sb.AppendFormat(Localization.Directory_band_starts_at_sector_0, hpfsSb.dband_start).AppendLine(); - sb.AppendFormat(Localization.Directory_band_ends_at_sector_0, hpfsSb.dband_last).AppendLine(); + sb.AppendFormat(Localization.Directory_band_ends_at_sector_0, hpfsSb.dband_last).AppendLine(); sb.AppendFormat(Localization.Sector_of_directory_band_bitmap_0, hpfsSb.dband_bitmap).AppendLine(); - sb.AppendFormat(Localization.Sector_of_ACL_directory_0, hpfsSb.acl_start).AppendLine(); + sb.AppendFormat(Localization.Sector_of_ACL_directory_0, hpfsSb.acl_start).AppendLine(); - sb.AppendFormat(Localization.Sector_of_Hotfix_directory_0, sp.hotfix_start).AppendLine(); - sb.AppendFormat(Localization._0_used_Hotfix_entries, sp.hotfix_used).AppendLine(); - sb.AppendFormat(Localization._0_total_Hotfix_entries, sp.hotfix_entries).AppendLine(); - sb.AppendFormat(Localization._0_free_spare_DNodes, sp.spare_dnodes_free).AppendLine(); - sb.AppendFormat(Localization._0_total_spare_DNodes, sp.spare_dnodes).AppendLine(); - sb.AppendFormat(Localization.Sector_of_codepage_directory_0, sp.codepage_lsn).AppendLine(); + sb.AppendFormat(Localization.Sector_of_Hotfix_directory_0, sp.hotfix_start).AppendLine(); + sb.AppendFormat(Localization._0_used_Hotfix_entries, sp.hotfix_used).AppendLine(); + sb.AppendFormat(Localization._0_total_Hotfix_entries, sp.hotfix_entries).AppendLine(); + sb.AppendFormat(Localization._0_free_spare_DNodes, sp.spare_dnodes_free).AppendLine(); + sb.AppendFormat(Localization._0_total_spare_DNodes, sp.spare_dnodes).AppendLine(); + sb.AppendFormat(Localization.Sector_of_codepage_directory_0, sp.codepage_lsn).AppendLine(); sb.AppendFormat(Localization._0_codepages_used_in_the_volume, sp.codepages).AppendLine(); - sb.AppendFormat(Localization.SuperBlock_CRC32_0, sp.sb_crc32).AppendLine(); - sb.AppendFormat(Localization.SpareBlock_CRC32_0, sp.sp_crc32).AppendLine(); + sb.AppendFormat(Localization.SuperBlock_CRC32_0, sp.sb_crc32).AppendLine(); + sb.AppendFormat(Localization.SpareBlock_CRC32_0, sp.sp_crc32).AppendLine(); sb.AppendLine(Localization.Flags); sb.AppendLine((sp.flags1 & 0x01) == 0x01 ? Localization.Filesystem_is_dirty : Localization.Filesystem_is_clean); @@ -249,4 +251,6 @@ public sealed partial class HPFS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HPFS/Structs.cs b/Aaru.Filesystems/HPFS/Structs.cs index 619be1f80..66cc10029 100644 --- a/Aaru.Filesystems/HPFS/Structs.cs +++ b/Aaru.Filesystems/HPFS/Structs.cs @@ -39,6 +39,8 @@ namespace Aaru.Filesystems; /// Implements detection of IBM's High Performance File System (HPFS) public sealed partial class HPFS { +#region Nested type: BiosParameterBlock + /// BIOS Parameter Block, at sector 0 [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BiosParameterBlock @@ -94,6 +96,48 @@ public sealed partial class HPFS public readonly ushort signature2; } +#endregion + +#region Nested type: SpareBlock + + /// HPFS spareblock at sector 17 + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct SpareBlock + { + /// 0x000, 0xF9911849 + public readonly uint magic1; + /// 0x004, 0xFA5229C5 + public readonly uint magic2; + /// 0x008, HPFS flags + public readonly byte flags1; + /// 0x009, HPFS386 flags + public readonly byte flags2; + /// 0x00A, Alignment + public readonly ushort dummy; + /// 0x00C, LSN of hotfix directory + public readonly uint hotfix_start; + /// 0x010, Used hotfixes + public readonly uint hotfix_used; + /// 0x014, Total hotfixes available + public readonly uint hotfix_entries; + /// 0x018, Unused spare dnodes + public readonly uint spare_dnodes_free; + /// 0x01C, Length of spare dnodes list + public readonly uint spare_dnodes; + /// 0x020, LSN of codepage directory + public readonly uint codepage_lsn; + /// 0x024, Number of codepages used + public readonly uint codepages; + /// 0x028, SuperBlock CRC32 (only HPFS386) + public readonly uint sb_crc32; + /// 0x02C, SpareBlock CRC32 (only HPFS386) + public readonly uint sp_crc32; + } + +#endregion + +#region Nested type: SuperBlock + /// HPFS superblock at sector 16 [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock @@ -146,37 +190,5 @@ public sealed partial class HPFS public readonly uint acl_start; } - /// HPFS spareblock at sector 17 - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct SpareBlock - { - /// 0x000, 0xF9911849 - public readonly uint magic1; - /// 0x004, 0xFA5229C5 - public readonly uint magic2; - /// 0x008, HPFS flags - public readonly byte flags1; - /// 0x009, HPFS386 flags - public readonly byte flags2; - /// 0x00A, Alignment - public readonly ushort dummy; - /// 0x00C, LSN of hotfix directory - public readonly uint hotfix_start; - /// 0x010, Used hotfixes - public readonly uint hotfix_used; - /// 0x014, Total hotfixes available - public readonly uint hotfix_entries; - /// 0x018, Unused spare dnodes - public readonly uint spare_dnodes_free; - /// 0x01C, Length of spare dnodes list - public readonly uint spare_dnodes; - /// 0x020, LSN of codepage directory - public readonly uint codepage_lsn; - /// 0x024, Number of codepages used - public readonly uint codepages; - /// 0x028, SuperBlock CRC32 (only HPFS386) - public readonly uint sb_crc32; - /// 0x02C, SpareBlock CRC32 (only HPFS386) - public readonly uint sp_crc32; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HPOFS/Consts.cs b/Aaru.Filesystems/HPOFS/Consts.cs index 6e2befa23..491ca2708 100644 --- a/Aaru.Filesystems/HPOFS/Consts.cs +++ b/Aaru.Filesystems/HPOFS/Consts.cs @@ -30,13 +30,9 @@ namespace Aaru.Filesystems; public sealed partial class HPOFS { - readonly byte[] _type = - { - 0x48, 0x50, 0x4F, 0x46, 0x53, 0x00, 0x00, 0x00 - }; - readonly byte[] _medinfoSignature = "MEDINFO "u8.ToArray(); - readonly byte[] _volinfoSignature = "VOLINFO "u8.ToArray(); - // Do not translate - const string FS_TYPE = "hpofs"; + const string FS_TYPE = "hpofs"; + readonly byte[] _medinfoSignature = "MEDINFO "u8.ToArray(); + readonly byte[] _type = { 0x48, 0x50, 0x4F, 0x46, 0x53, 0x00, 0x00, 0x00 }; + readonly byte[] _volinfoSignature = "VOLINFO "u8.ToArray(); } \ No newline at end of file diff --git a/Aaru.Filesystems/HPOFS/HPOFS.cs b/Aaru.Filesystems/HPOFS/HPOFS.cs index 80c907c6f..f7d2472e6 100644 --- a/Aaru.Filesystems/HPOFS/HPOFS.cs +++ b/Aaru.Filesystems/HPOFS/HPOFS.cs @@ -37,11 +37,18 @@ namespace Aaru.Filesystems; /// Implements identification of IBM's High Performance Optical File System public sealed partial class HPOFS : IFilesystem { + const string MODULE_NAME = "HPOFS Plugin"; + +#region IFilesystem Members + /// public string Name => Localization.HPOFS_Name; + /// public Guid Id => new("1b72dcd5-d031-4757-8a9f-8d2fb18c59e2"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "HPOFS Plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HPOFS/Info.cs b/Aaru.Filesystems/HPOFS/Info.cs index 0576773dd..906dac540 100644 --- a/Aaru.Filesystems/HPOFS/Info.cs +++ b/Aaru.Filesystems/HPOFS/Info.cs @@ -44,6 +44,8 @@ namespace Aaru.Filesystems; public sealed partial class HPOFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -100,20 +102,20 @@ public sealed partial class HPOFS AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.oem_name = \"{0}\"", StringHandlers.CToString(bpb.oem_name)); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.bps = {0}", bpb.bps); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.spc = {0}", bpb.spc); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.rsectors = {0}", bpb.rsectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.fats_no = {0}", bpb.fats_no); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.root_ent = {0}", bpb.root_ent); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.sectors = {0}", bpb.sectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.media = 0x{0:X2}", bpb.media); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.spfat = {0}", bpb.spfat); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.sptrk = {0}", bpb.sptrk); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.heads = {0}", bpb.heads); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.hsectors = {0}", bpb.hsectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.big_sectors = {0}", bpb.big_sectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.drive_no = 0x{0:X2}", bpb.drive_no); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.nt_flags = {0}", bpb.nt_flags); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.bps = {0}", bpb.bps); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.spc = {0}", bpb.spc); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.rsectors = {0}", bpb.rsectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.fats_no = {0}", bpb.fats_no); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.root_ent = {0}", bpb.root_ent); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.sectors = {0}", bpb.sectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.media = 0x{0:X2}", bpb.media); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.spfat = {0}", bpb.spfat); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.sptrk = {0}", bpb.sptrk); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.heads = {0}", bpb.heads); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.hsectors = {0}", bpb.hsectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.big_sectors = {0}", bpb.big_sectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.drive_no = 0x{0:X2}", bpb.drive_no); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.nt_flags = {0}", bpb.nt_flags); AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.signature = 0x{0:X2}", bpb.signature); AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.serial_no = 0x{0:X8}", bpb.serial_no); @@ -125,9 +127,9 @@ public sealed partial class HPOFS AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.boot_code is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(bpb.boot_code)); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.unknown = {0}", bpb.unknown); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.unknown2 = {0}", bpb.unknown2); - AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.signature2 = {0}", bpb.signature2); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.unknown = {0}", bpb.unknown); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.unknown2 = {0}", bpb.unknown2); + AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.signature2 = {0}", bpb.signature2); AaruConsole.DebugWriteLine(MODULE_NAME, "mib.blockId = \"{0}\"", StringHandlers.CToString(mib.blockId)); AaruConsole.DebugWriteLine(MODULE_NAME, "mib.volumeLabel = \"{0}\"", @@ -142,25 +144,25 @@ public sealed partial class HPOFS DateHandlers.DosToDateTime(mib.creationDate, mib.creationTime)); AaruConsole.DebugWriteLine(MODULE_NAME, "mib.codepageType = {0}", mib.codepageType); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.codepage = {0}", mib.codepage); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.rps = {0}", mib.rps); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.bps = {0}", mib.bps); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.bpc = {0}", mib.bpc); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown2 = {0}", mib.unknown2); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.sectors = {0}", mib.sectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown3 = {0}", mib.unknown3); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown4 = {0}", mib.unknown4); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.major = {0}", mib.major); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.minor = {0}", mib.minor); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown5 = {0}", mib.unknown5); - AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown6 = {0}", mib.unknown6); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.codepage = {0}", mib.codepage); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.rps = {0}", mib.rps); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.bps = {0}", mib.bps); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.bpc = {0}", mib.bpc); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown2 = {0}", mib.unknown2); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.sectors = {0}", mib.sectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown3 = {0}", mib.unknown3); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown4 = {0}", mib.unknown4); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.major = {0}", mib.major); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.minor = {0}", mib.minor); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown5 = {0}", mib.unknown5); + AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown6 = {0}", mib.unknown6); AaruConsole.DebugWriteLine(MODULE_NAME, "mib.filler is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(mib.filler)); AaruConsole.DebugWriteLine(MODULE_NAME, "vib.blockId = \"{0}\"", StringHandlers.CToString(vib.blockId)); - AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown = {0}", vib.unknown); - AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown2 = {0}", vib.unknown2); + AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown = {0}", vib.unknown); + AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown2 = {0}", vib.unknown2); AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown3 is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(vib.unknown3)); @@ -174,9 +176,9 @@ public sealed partial class HPOFS AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown5 = \"{0}\"", StringHandlers.SpacePaddedToString(vib.unknown5)); - AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown6 = {0}", vib.unknown6); + AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown6 = {0}", vib.unknown6); AaruConsole.DebugWriteLine(MODULE_NAME, "vib.percentFull = {0}", vib.percentFull); - AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown7 = {0}", vib.unknown7); + AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown7 = {0}", vib.unknown7); AaruConsole.DebugWriteLine(MODULE_NAME, "vib.filler is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(vib.filler)); @@ -210,8 +212,8 @@ public sealed partial class HPOFS ? mib.codepageType == 2 ? Localization.EBCDIC : Localization.ASCII : Localization.Unknown_codepage, mib.codepage).AppendLine(); - sb.AppendFormat(Localization.RPS_level_0, mib.rps).AppendLine(); - sb.AppendFormat(Localization.Filesystem_version_0_1, mib.major, mib.minor).AppendLine(); + sb.AppendFormat(Localization.RPS_level_0, mib.rps).AppendLine(); + sb.AppendFormat(Localization.Filesystem_version_0_1, mib.major, mib.minor).AppendLine(); sb.AppendFormat(Localization.Volume_can_be_filled_up_to_0, vib.percentFull).AppendLine(); metadata = new FileSystem @@ -228,4 +230,6 @@ public sealed partial class HPOFS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/HPOFS/Structs.cs b/Aaru.Filesystems/HPOFS/Structs.cs index e5348f6a9..03945a8a6 100644 --- a/Aaru.Filesystems/HPOFS/Structs.cs +++ b/Aaru.Filesystems/HPOFS/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class HPOFS { +#region Nested type: BiosParameterBlock + /// BIOS Parameter Block, at sector 0, little-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BiosParameterBlock @@ -93,6 +95,180 @@ public sealed partial class HPOFS public readonly ushort signature2; } +#endregion + +#region Nested type: Dci + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct Dci + { + /// "DATA" + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] blockId; + /// Unknown + public readonly uint unknown; + /// Unknown + public readonly uint unknown2; + /// Unknown + public readonly uint unknown3; + /// Unknown + public readonly uint unknown4; + /// Unknown + public readonly uint unknown5; + /// Unknown + public readonly ushort unknown6; + /// Unknown + public readonly ushort unknown7; + /// Unknown + public readonly uint unknown8; + /// Unknown + public readonly uint unknown9; + /// Entries, size unknown + public readonly DciEntry[] entries; + } + +#endregion + +#region Nested type: DciEntry + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DciEntry + { + /// Key length + public readonly ushort key_len; + /// Record length + public readonly ushort record_len; + /// dci key + public readonly DciKey key; + /// Padding? Size is key_len - size of DciKey + public readonly byte[] padding; + /// Direct + public readonly Direct dir; + /// Padding? Size is record_len - size of Direct + public readonly byte[] unknown; + } + +#endregion + +#region Nested type: DciKey + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DciKey + { + /// Unknown + public readonly byte unknown; + /// Name size + 2 + public readonly byte size; + /// Unknown + public readonly byte unknown2; + /// Unknown + public readonly byte unknown3; + /// Unknown + public readonly byte unknown4; + /// Unknown + public readonly byte unknown5; + /// Name, length = size - 2 + public readonly byte[] name; + } + +#endregion + +#region Nested type: Direct + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct Direct + { + /// Unknown + public readonly uint unknown; + /// Unknown + public readonly uint unknown2; + /// Unknown + public readonly uint unknown3; + /// Mask 0x6000 + public readonly ushort subfiles_no; + /// Unknown + public readonly ushort unknown4; + /// Unknown + public readonly uint unknown5; + /// Unknown + public readonly uint unknown6; + /// Unknown + public readonly uint unknown7; + /// Some date + public readonly ushort date1; + /// Some time + public readonly ushort time1; + /// Some date + public readonly ushort date2; + /// Some time + public readonly ushort time2; + /// Unknown + public readonly uint unknown8; + /// Unknown + public readonly uint unknown9; + /// Unknown + public readonly uint unknown10; + /// Unknown + public readonly uint unknown11; + /// Unknown + public readonly uint unknown12; + /// Unknown + public readonly uint unknown13; + /// Unknown + public readonly uint unknown14; + /// Subfiles, length unknown + public readonly SubFile[] subfiles; + } + +#endregion + +#region Nested type: Extent + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct Extent + { + /// Extent length in sectors + public readonly ushort length; + /// Unknown + public readonly short unknown; + /// Extent starting sector + public readonly int start; + } + +#endregion + +#region Nested type: MasterRecord + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct MasterRecord + { + /// "MAST" + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] blockId; + /// Unknown + public readonly uint unknown; + /// Unknown + public readonly ushort unknown2; + /// Unknown + public readonly ushort unknown3; + /// Unknown + public readonly uint unknown4; + /// Unknown + public readonly ushort unknown5; + /// Unknown + public readonly ushort unknown6; + /// Unknown + public readonly ushort unknown7; + /// Unknown + public readonly ushort unknown8; + /// Unknown + public readonly uint unknown9; + } + +#endregion + +#region Nested type: MediaInformationBlock + /// Media Information Block, at sector 13, big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct MediaInformationBlock @@ -143,6 +319,39 @@ public sealed partial class HPOFS public readonly byte[] filler; } +#endregion + +#region Nested type: SubFile + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct SubFile + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public readonly Extent[] extents; + /// Unknown + public readonly uint unknown; + /// Unknown + public readonly uint unknown2; + /// Logical size in bytes + public readonly uint logical_size; + /// Unknown + public readonly uint unknown3; + /// Physical size in bytes + public readonly uint physical_size; + /// Unknown + public readonly uint unknown4; + /// Physical size in bytes + public readonly uint physical_size2; + /// Unknown + public readonly uint unknown5; + /// Unknown + public readonly uint unknown6; + } + +#endregion + +#region Nested type: VolumeInformationBlock + /// Volume Information Block, at sector 14, big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct VolumeInformationBlock @@ -181,174 +390,5 @@ public sealed partial class HPOFS public readonly byte[] filler; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct Extent - { - /// Extent length in sectors - public readonly ushort length; - /// Unknown - public readonly short unknown; - /// Extent starting sector - public readonly int start; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct SubFile - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public readonly Extent[] extents; - /// Unknown - public readonly uint unknown; - /// Unknown - public readonly uint unknown2; - /// Logical size in bytes - public readonly uint logical_size; - /// Unknown - public readonly uint unknown3; - /// Physical size in bytes - public readonly uint physical_size; - /// Unknown - public readonly uint unknown4; - /// Physical size in bytes - public readonly uint physical_size2; - /// Unknown - public readonly uint unknown5; - /// Unknown - public readonly uint unknown6; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct Direct - { - /// Unknown - public readonly uint unknown; - /// Unknown - public readonly uint unknown2; - /// Unknown - public readonly uint unknown3; - /// Mask 0x6000 - public readonly ushort subfiles_no; - /// Unknown - public readonly ushort unknown4; - /// Unknown - public readonly uint unknown5; - /// Unknown - public readonly uint unknown6; - /// Unknown - public readonly uint unknown7; - /// Some date - public readonly ushort date1; - /// Some time - public readonly ushort time1; - /// Some date - public readonly ushort date2; - /// Some time - public readonly ushort time2; - /// Unknown - public readonly uint unknown8; - /// Unknown - public readonly uint unknown9; - /// Unknown - public readonly uint unknown10; - /// Unknown - public readonly uint unknown11; - /// Unknown - public readonly uint unknown12; - /// Unknown - public readonly uint unknown13; - /// Unknown - public readonly uint unknown14; - /// Subfiles, length unknown - public readonly SubFile[] subfiles; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct MasterRecord - { - /// "MAST" - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] blockId; - /// Unknown - public readonly uint unknown; - /// Unknown - public readonly ushort unknown2; - /// Unknown - public readonly ushort unknown3; - /// Unknown - public readonly uint unknown4; - /// Unknown - public readonly ushort unknown5; - /// Unknown - public readonly ushort unknown6; - /// Unknown - public readonly ushort unknown7; - /// Unknown - public readonly ushort unknown8; - /// Unknown - public readonly uint unknown9; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DciKey - { - /// Unknown - public readonly byte unknown; - /// Name size + 2 - public readonly byte size; - /// Unknown - public readonly byte unknown2; - /// Unknown - public readonly byte unknown3; - /// Unknown - public readonly byte unknown4; - /// Unknown - public readonly byte unknown5; - /// Name, length = size - 2 - public readonly byte[] name; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DciEntry - { - /// Key length - public readonly ushort key_len; - /// Record length - public readonly ushort record_len; - /// dci key - public readonly DciKey key; - /// Padding? Size is key_len - size of DciKey - public readonly byte[] padding; - /// Direct - public readonly Direct dir; - /// Padding? Size is record_len - size of Direct - public readonly byte[] unknown; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct Dci - { - /// "DATA" - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] blockId; - /// Unknown - public readonly uint unknown; - /// Unknown - public readonly uint unknown2; - /// Unknown - public readonly uint unknown3; - /// Unknown - public readonly uint unknown4; - /// Unknown - public readonly uint unknown5; - /// Unknown - public readonly ushort unknown6; - /// Unknown - public readonly ushort unknown7; - /// Unknown - public readonly uint unknown8; - /// Unknown - public readonly uint unknown9; - /// Entries, size unknown - public readonly DciEntry[] entries; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/AAIP.cs b/Aaru.Filesystems/ISO9660/Consts/AAIP.cs index a40405e9c..eb34f9025 100644 --- a/Aaru.Filesystems/ISO9660/Consts/AAIP.cs +++ b/Aaru.Filesystems/ISO9660/Consts/AAIP.cs @@ -38,9 +38,13 @@ public sealed partial class ISO9660 const ushort AAIP_MAGIC = 0x414C; // "AL" const ushort AAIP_MAGIC_OLD = 0x4141; // "AA" +#region Nested type: AAIPFlags + [Flags] enum AAIPFlags : byte { Continue = 1 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/Amiga.cs b/Aaru.Filesystems/ISO9660/Consts/Amiga.cs index 4dfac99fd..66f71e860 100644 --- a/Aaru.Filesystems/ISO9660/Consts/Amiga.cs +++ b/Aaru.Filesystems/ISO9660/Consts/Amiga.cs @@ -37,25 +37,49 @@ public sealed partial class ISO9660 { const ushort AMIGA_MAGIC = 0x4153; // "AS" - [Flags] - enum AmigaFlags : byte - { - Protection = 1 << 0, Comment = 1 << 1, CommentContinues = 1 << 2 - } - - [Flags] - enum AmigaMultiuser : byte - { - GroupDelete = 1 << 0, GroupExec = 1 << 1, GroupWrite = 1 << 2, - GroupRead = 1 << 3, OtherDelete = 1 << 4, OtherExec = 1 << 5, - OtherWrite = 1 << 6, OtherRead = 1 << 7 - } +#region Nested type: AmigaAttributes [Flags] enum AmigaAttributes : byte { - OwnerDelete = 1 << 0, OwnerExec = 1 << 1, OwnerWrite = 1 << 2, - OwnerRead = 1 << 3, Archive = 1 << 4, Reentrant = 1 << 5, - Script = 1 << 6, Reserved = 1 << 7 + OwnerDelete = 1 << 0, + OwnerExec = 1 << 1, + OwnerWrite = 1 << 2, + OwnerRead = 1 << 3, + Archive = 1 << 4, + Reentrant = 1 << 5, + Script = 1 << 6, + Reserved = 1 << 7 } + +#endregion + +#region Nested type: AmigaFlags + + [Flags] + enum AmigaFlags : byte + { + Protection = 1 << 0, + Comment = 1 << 1, + CommentContinues = 1 << 2 + } + +#endregion + +#region Nested type: AmigaMultiuser + + [Flags] + enum AmigaMultiuser : byte + { + GroupDelete = 1 << 0, + GroupExec = 1 << 1, + GroupWrite = 1 << 2, + GroupRead = 1 << 3, + OtherDelete = 1 << 4, + OtherExec = 1 << 5, + OtherWrite = 1 << 6, + OtherRead = 1 << 7 + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/Apple.cs b/Aaru.Filesystems/ISO9660/Consts/Apple.cs index 05335122c..4682fa03d 100644 --- a/Aaru.Filesystems/ISO9660/Consts/Apple.cs +++ b/Aaru.Filesystems/ISO9660/Consts/Apple.cs @@ -34,14 +34,27 @@ public sealed partial class ISO9660 const ushort APPLE_MAGIC = 0x4141; // "AA" const ushort APPLE_MAGIC_OLD = 0x4241; // "BA" +#region Nested type: AppleId + enum AppleId : byte { - ProDOS = 1, HFS = 2 + ProDOS = 1, + HFS = 2 } +#endregion + +#region Nested type: AppleOldId + enum AppleOldId : byte { - ProDOS = 1, TypeCreator = 2, TypeCreatorBundle = 3, - TypeCreatorIcon = 4, TypeCreatorIconBundle = 5, HFS = 6 + ProDOS = 1, + TypeCreator = 2, + TypeCreatorBundle = 3, + TypeCreatorIcon = 4, + TypeCreatorIconBundle = 5, + HFS = 6 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/CDi.cs b/Aaru.Filesystems/ISO9660/Consts/CDi.cs index a11c03d38..6775d890e 100644 --- a/Aaru.Filesystems/ISO9660/Consts/CDi.cs +++ b/Aaru.Filesystems/ISO9660/Consts/CDi.cs @@ -44,24 +44,41 @@ public sealed partial class ISO9660 static readonly int _cdiDirectoryRecordSize = Marshal.SizeOf(); static readonly int _cdiSystemAreaSize = Marshal.SizeOf(); +#region Nested type: CdiAttributes + [Flags] - enum CdiVolumeFlags : byte + enum CdiAttributes : ushort { - // Escapes are not ISO 2375 but ISO 2022 - NotISO2375 = 1 + OwnerRead = 1 << 0, + OwnerExecute = 1 << 2, + GroupRead = 1 << 4, + GroupExecute = 1 << 6, + OtherRead = 1 << 8, + OtherExecute = 1 << 10, + DigitalAudio = 1 << 14, + Directory = 1 << 15 } +#endregion + +#region Nested type: CdiFileFlags + [Flags] enum CdiFileFlags : byte { Hidden = 0x01 } +#endregion + +#region Nested type: CdiVolumeFlags + [Flags] - enum CdiAttributes : ushort + enum CdiVolumeFlags : byte { - OwnerRead = 1 << 0, OwnerExecute = 1 << 2, GroupRead = 1 << 4, - GroupExecute = 1 << 6, OtherRead = 1 << 8, OtherExecute = 1 << 10, - DigitalAudio = 1 << 14, Directory = 1 << 15 + // Escapes are not ISO 2375 but ISO 2022 + NotISO2375 = 1 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/ElTorito.cs b/Aaru.Filesystems/ISO9660/Consts/ElTorito.cs index 7738d6c60..dd0005157 100644 --- a/Aaru.Filesystems/ISO9660/Consts/ElTorito.cs +++ b/Aaru.Filesystems/ISO9660/Consts/ElTorito.cs @@ -39,29 +39,55 @@ public sealed partial class ISO9660 const ushort EL_TORITO_MAGIC = 0xAA55; const int EL_TORITO_ENTRY_SIZE = 32; - enum ElToritoIndicator : byte - { - Header = 1, Extension = 0x44, Bootable = 0x88, - MoreHeaders = 0x90, LastHeader = 0x91 - } - - [SuppressMessage("ReSharper", "InconsistentNaming")] - enum ElToritoPlatform : byte - { - x86 = 0, PowerPC = 1, Macintosh = 2, - EFI = 0xef - } +#region Nested type: ElToritoEmulation enum ElToritoEmulation : byte { - None = 0, Md2Hd = 1, Mf2Hd = 2, - Mf2Ed = 3, Hdd = 4 + None = 0, + Md2Hd = 1, + Mf2Hd = 2, + Mf2Ed = 3, + Hdd = 4 } +#endregion + +#region Nested type: ElToritoFlags + [Flags] enum ElToritoFlags : byte { - Reserved = 0x10, Continued = 0x20, ATAPI = 0x40, - SCSI = 0x08 + Reserved = 0x10, + Continued = 0x20, + ATAPI = 0x40, + SCSI = 0x08 } + +#endregion + +#region Nested type: ElToritoIndicator + + enum ElToritoIndicator : byte + { + Header = 1, + Extension = 0x44, + Bootable = 0x88, + MoreHeaders = 0x90, + LastHeader = 0x91 + } + +#endregion + +#region Nested type: ElToritoPlatform + + [SuppressMessage("ReSharper", "InconsistentNaming")] + enum ElToritoPlatform : byte + { + x86 = 0, + PowerPC = 1, + Macintosh = 2, + EFI = 0xef + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/ISO.cs b/Aaru.Filesystems/ISO9660/Consts/ISO.cs index 4dd527e5c..670662131 100644 --- a/Aaru.Filesystems/ISO9660/Consts/ISO.cs +++ b/Aaru.Filesystems/ISO9660/Consts/ISO.cs @@ -37,29 +37,58 @@ public sealed partial class ISO9660 { const string ISO_MAGIC = "CD001"; +#region Nested type: FileFlags + [Flags] enum FileFlags : byte { - Hidden = 0x01, Directory = 0x02, Associated = 0x04, - Record = 0x08, Protected = 0x10, MultiExtent = 0x80 + Hidden = 0x01, + Directory = 0x02, + Associated = 0x04, + Record = 0x08, + Protected = 0x10, + MultiExtent = 0x80 } +#endregion + +#region Nested type: Permissions + [Flags] enum Permissions : ushort { - SystemRead = 0x01, SystemExecute = 0x04, OwnerRead = 0x10, - OwnerExecute = 0x40, GroupRead = 0x100, GroupExecute = 0x400, - OtherRead = 0x1000, OtherExecute = 0x4000 + SystemRead = 0x01, + SystemExecute = 0x04, + OwnerRead = 0x10, + OwnerExecute = 0x40, + GroupRead = 0x100, + GroupExecute = 0x400, + OtherRead = 0x1000, + OtherExecute = 0x4000 } - enum RecordFormat : byte - { - Unspecified = 0, FixedLength = 1, VariableLength = 2, - VariableLengthAlternate = 3 - } +#endregion + +#region Nested type: RecordAttribute enum RecordAttribute : byte { - LFCR = 0, ISO1539 = 1, ControlContained = 2 + LFCR = 0, + ISO1539 = 1, + ControlContained = 2 } + +#endregion + +#region Nested type: RecordFormat + + enum RecordFormat : byte + { + Unspecified = 0, + FixedLength = 1, + VariableLength = 2, + VariableLengthAlternate = 3 + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/Internal.cs b/Aaru.Filesystems/ISO9660/Consts/Internal.cs index 404f7465e..d7ae1b801 100644 --- a/Aaru.Filesystems/ISO9660/Consts/Internal.cs +++ b/Aaru.Filesystems/ISO9660/Consts/Internal.cs @@ -35,16 +35,23 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class ISO9660 { - const byte MODE2_FORM2 = 0x20; - static readonly int _directoryRecordSize = Marshal.SizeOf(); + const byte MODE2_FORM2 = 0x20; + + const string FS_TYPE_HSF = "hfs"; + const string FS_TYPE_CDI = "cdi"; + const string FS_TYPE_ISO = "iso9660"; + static readonly int _directoryRecordSize = Marshal.SizeOf(); + +#region Nested type: Namespace enum Namespace { - Normal, Vms, Joliet, - Rrip, Romeo + Normal, + Vms, + Joliet, + Rrip, + Romeo } - const string FS_TYPE_HSF = "hfs"; - const string FS_TYPE_CDI = "cdi"; - const string FS_TYPE_ISO = "iso9660"; +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/RRIP.cs b/Aaru.Filesystems/ISO9660/Consts/RRIP.cs index 09b9d7b32..fc8c1de7f 100644 --- a/Aaru.Filesystems/ISO9660/Consts/RRIP.cs +++ b/Aaru.Filesystems/ISO9660/Consts/RRIP.cs @@ -46,43 +46,86 @@ public sealed partial class ISO9660 const ushort RRIP_TIMESTAMPS = 0x5446; // "TF" const ushort RRIP_SPARSE = 0x5346; // "SF" +#region Nested type: AlternateNameFlags + + [Flags] + enum AlternateNameFlags : byte + { + Continue = 1, + Current = 2, + Parent = 4, + Networkname = 32 + } + +#endregion + +#region Nested type: PosixMode + [Flags] enum PosixMode : uint { - OwnerRead = 0x0100, OwnerWrite = 0x0080, OwnerExecute = 0x0040, - GroupRead = 0x0020, GroupWrite = 0x0010, GroupExecute = 0x0008, - OtherRead = 0x0004, OtherWrite = 0x0002, OtherExecute = 0x0001, - SetUID = 0x0800, SetGid = 0x0400, IsVTX = 0x0200, - Socket = 0xC000, Symlink = 0xA000, Regular = 0x8000, - Block = 0x6000, Character = 0x2000, Directory = 0x4000, - Pipe = 0x1000 + OwnerRead = 0x0100, + OwnerWrite = 0x0080, + OwnerExecute = 0x0040, + GroupRead = 0x0020, + GroupWrite = 0x0010, + GroupExecute = 0x0008, + OtherRead = 0x0004, + OtherWrite = 0x0002, + OtherExecute = 0x0001, + SetUID = 0x0800, + SetGid = 0x0400, + IsVTX = 0x0200, + Socket = 0xC000, + Symlink = 0xA000, + Regular = 0x8000, + Block = 0x6000, + Character = 0x2000, + Directory = 0x4000, + Pipe = 0x1000 } +#endregion + +#region Nested type: SymlinkComponentFlags + + [Flags] + enum SymlinkComponentFlags : byte + { + Continue = 1, + Current = 2, + Parent = 4, + Root = 8, + Mountpoint = 16, + Networkname = 32 + } + +#endregion + +#region Nested type: SymlinkFlags + [Flags] enum SymlinkFlags : byte { Continue = 1 } - [Flags] - enum SymlinkComponentFlags : byte - { - Continue = 1, Current = 2, Parent = 4, - Root = 8, Mountpoint = 16, Networkname = 32 - } +#endregion - [Flags] - enum AlternateNameFlags : byte - { - Continue = 1, Current = 2, Parent = 4, - Networkname = 32 - } +#region Nested type: TimestampFlags [Flags] enum TimestampFlags : byte { - Creation = 1 << 0, Modification = 1 << 1, Access = 1 << 2, - AttributeChange = 1 << 3, Backup = 1 << 4, Expiration = 1 << 5, - Effective = 1 << 6, LongFormat = 1 << 7 + Creation = 1 << 0, + Modification = 1 << 1, + Access = 1 << 2, + AttributeChange = 1 << 3, + Backup = 1 << 4, + Expiration = 1 << 5, + Effective = 1 << 6, + LongFormat = 1 << 7 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Consts/XA.cs b/Aaru.Filesystems/ISO9660/Consts/XA.cs index 2ad745c1c..914f9c14c 100644 --- a/Aaru.Filesystems/ISO9660/Consts/XA.cs +++ b/Aaru.Filesystems/ISO9660/Consts/XA.cs @@ -41,20 +41,40 @@ public sealed partial class ISO9660 { const ushort XA_MAGIC = 0x5841; // "XA" - [Flags] - enum XaAttributes : ushort - { - SystemRead = 0x01, SystemExecute = 0x04, OwnerRead = 0x10, - OwnerExecute = 0x40, GroupRead = 0x100, GroupExecute = 0x400, - Mode2Form1 = 0x800, Mode2Form2 = 0x1000, Interleaved = 0x2000, - Cdda = 0x4000, Directory = 0x8000 - } +#region Nested type: Mode2Submode [Flags] enum Mode2Submode : byte { - EndOfFile = 0x80, RealTime = 0x40, Form2 = 0x20, - Trigger = 0x10, Data = 0x08, Audio = 0x04, - Video = 0x02, EndOfRecord = 0x01 + EndOfFile = 0x80, + RealTime = 0x40, + Form2 = 0x20, + Trigger = 0x10, + Data = 0x08, + Audio = 0x04, + Video = 0x02, + EndOfRecord = 0x01 } + +#endregion + +#region Nested type: XaAttributes + + [Flags] + enum XaAttributes : ushort + { + SystemRead = 0x01, + SystemExecute = 0x04, + OwnerRead = 0x10, + OwnerExecute = 0x40, + GroupRead = 0x100, + GroupExecute = 0x400, + Mode2Form1 = 0x800, + Mode2Form2 = 0x1000, + Interleaved = 0x2000, + Cdda = 0x4000, + Directory = 0x8000 + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Date.cs b/Aaru.Filesystems/ISO9660/Date.cs index 90d9cba73..2d4be8ad3 100644 --- a/Aaru.Filesystems/ISO9660/Date.cs +++ b/Aaru.Filesystems/ISO9660/Date.cs @@ -35,11 +35,14 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { static DateTime? DecodeIsoDateTime(byte[] timestamp) => timestamp?.Length switch - { - 7 => DecodeIsoDateTime(Marshal.ByteArrayToStructureLittleEndian(timestamp)), - 17 => DateHandlers.Iso9660ToDateTime(timestamp), - _ => null - }; + { + 7 => DecodeIsoDateTime( + Marshal. + ByteArrayToStructureLittleEndian( + timestamp)), + 17 => DateHandlers.Iso9660ToDateTime(timestamp), + _ => null + }; static DateTime? DecodeIsoDateTime(IsoTimestamp timestamp) { diff --git a/Aaru.Filesystems/ISO9660/Dir.cs b/Aaru.Filesystems/ISO9660/Dir.cs index 6f9027cb8..216cf7ea4 100644 --- a/Aaru.Filesystems/ISO9660/Dir.cs +++ b/Aaru.Filesystems/ISO9660/Dir.cs @@ -43,6 +43,8 @@ public sealed partial class ISO9660 { Dictionary> _directoryCache; +#region IReadOnlyFilesystem Members + /// public ErrorNumber OpenDir(string path, out IDirNode node) { @@ -80,10 +82,7 @@ public sealed partial class ISO9660 return ErrorNumber.NoError; } - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); KeyValuePair entry = _rootDirectoryCache.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) == pieces[0]); @@ -98,7 +97,7 @@ public sealed partial class ISO9660 currentDirectory = _rootDirectoryCache; - for(int p = 0; p < pieces.Length; p++) + for(var p = 0; p < pieces.Length; p++) { entry = currentDirectory.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) == pieces[p]); @@ -120,18 +119,21 @@ public sealed partial class ISO9660 ? DecodeCdiDirectory(entry.Value.Extents[0].extent + entry.Value.XattrLength, entry.Value.Extents[0].size) : _highSierra - ? DecodeHighSierraDirectory(entry.Value.Extents[0].extent + entry.Value.XattrLength, - entry.Value.Extents[0].size) + ? DecodeHighSierraDirectory( + entry.Value.Extents[0].extent + entry.Value.XattrLength, + entry.Value.Extents[0].size) : DecodeIsoDirectory(entry.Value.Extents[0].extent + entry.Value.XattrLength, entry.Value.Extents[0].size); if(_usePathTable) + { foreach(DecodedDirectoryEntry subDirectory in _cdi ? GetSubdirsFromCdiPathTable(currentPath) : _highSierra ? GetSubdirsFromHighSierraPathTable(currentPath) : GetSubdirsFromIsoPathTable(currentPath)) currentDirectory[subDirectory.Filename] = subDirectory; + } _directoryCache.Add(currentPath, currentDirectory); } @@ -181,7 +183,8 @@ public sealed partial class ISO9660 filename = mynode._entries[mynode._position].Filename; break; - default: return ErrorNumber.InvalidArgument; + default: + return ErrorNumber.InvalidArgument; } mynode._position++; @@ -201,10 +204,12 @@ public sealed partial class ISO9660 return ErrorNumber.NoError; } +#endregion + Dictionary DecodeCdiDirectory(ulong start, uint size) { Dictionary entries = new(); - int entryOff = 0; + var entryOff = 0; ErrorNumber errno = ReadSingleExtent(size, (uint)start, out byte[] data); @@ -219,9 +224,9 @@ public sealed partial class ISO9660 if(record.length == 0) { // Skip to next sector - if(data.Length - (((entryOff / 2048) + 1) * 2048) > 0) + if(data.Length - (entryOff / 2048 + 1) * 2048 > 0) { - entryOff = ((entryOff / 2048) + 1) * 2048; + entryOff = (entryOff / 2048 + 1) * 2048; continue; } @@ -231,6 +236,7 @@ public sealed partial class ISO9660 // Special entries for current and parent directories, skip them if(record.name_len == 1) + { if(data[entryOff + _directoryRecordSize] == 0 || data[entryOff + _directoryRecordSize] == 1) { @@ -238,6 +244,7 @@ public sealed partial class ISO9660 continue; } + } var entry = new DecodedDirectoryEntry { @@ -283,7 +290,7 @@ public sealed partial class ISO9660 Dictionary DecodeHighSierraDirectory(ulong start, uint size) { Dictionary entries = new(); - int entryOff = 0; + var entryOff = 0; ErrorNumber errno = ReadSingleExtent(size, (uint)start, out byte[] data); @@ -299,9 +306,9 @@ public sealed partial class ISO9660 if(record.length == 0) { // Skip to next sector - if(data.Length - (((entryOff / 2048) + 1) * 2048) > 0) + if(data.Length - (entryOff / 2048 + 1) * 2048 > 0) { - entryOff = ((entryOff / 2048) + 1) * 2048; + entryOff = (entryOff / 2048 + 1) * 2048; continue; } @@ -311,6 +318,7 @@ public sealed partial class ISO9660 // Special entries for current and parent directories, skip them if(record.name_len == 1) + { if(data[entryOff + _directoryRecordSize] == 0 || data[entryOff + _directoryRecordSize] == 1) { @@ -318,6 +326,7 @@ public sealed partial class ISO9660 continue; } + } var entry = new DecodedDirectoryEntry { @@ -356,7 +365,7 @@ public sealed partial class ISO9660 Dictionary DecodeIsoDirectory(ulong start, uint size) { Dictionary entries = new(); - int entryOff = 0; + var entryOff = 0; ErrorNumber errno = ReadSingleExtent(size, (uint)start, out byte[] data); @@ -371,9 +380,9 @@ public sealed partial class ISO9660 if(record.length == 0) { // Skip to next sector - if(data.Length - (((entryOff / 2048) + 1) * 2048) > 0) + if(data.Length - (entryOff / 2048 + 1) * 2048 > 0) { - entryOff = ((entryOff / 2048) + 1) * 2048; + entryOff = (entryOff / 2048 + 1) * 2048; continue; } @@ -383,6 +392,7 @@ public sealed partial class ISO9660 // Special entries for current and parent directories, skip them if(record.name_len == 1) + { if(data[entryOff + _directoryRecordSize] == 0 || data[entryOff + _directoryRecordSize] == 1) { @@ -390,14 +400,16 @@ public sealed partial class ISO9660 continue; } + } var entry = new DecodedDirectoryEntry { Size = record.size, Flags = record.flags, Filename = - _joliet ? Encoding.BigEndianUnicode.GetString(data, entryOff + _directoryRecordSize, - record.name_len) + _joliet + ? Encoding.BigEndianUnicode.GetString(data, entryOff + _directoryRecordSize, + record.name_len) : Encoding.GetString(data, entryOff + _directoryRecordSize, record.name_len), FileUnitSize = record.file_unit_size, Interleave = record.interleave, @@ -512,7 +524,8 @@ public sealed partial class ISO9660 // Relocated directories should be shown in correct place when using Rock Ridge namespace return _namespace == Namespace.Rrip - ? entries.Where(e => !e.Value.RockRidgeRelocated).ToDictionary(x => x.Key, x => x.Value) : entries; + ? entries.Where(e => !e.Value.RockRidgeRelocated).ToDictionary(x => x.Key, x => x.Value) + : entries; } void DecodeTransTable(Dictionary entries) @@ -579,12 +592,12 @@ public sealed partial class ISO9660 { int systemAreaOff = start; hasResourceFork = false; - bool continueSymlink = false; - bool continueSymlinkComponent = false; + var continueSymlink = false; + var continueSymlinkComponent = false; while(systemAreaOff + 2 <= end) { - ushort systemAreaSignature = BigEndianBitConverter.ToUInt16(data, systemAreaOff); + var systemAreaSignature = BigEndianBitConverter.ToUInt16(data, systemAreaOff); if(BigEndianBitConverter.ToUInt16(data, systemAreaOff + 6) == XA_MAGIC) systemAreaSignature = XA_MAGIC; @@ -732,7 +745,7 @@ public sealed partial class ISO9660 Marshal.ByteArrayToStructureBigEndian(data, systemAreaOff, Marshal.SizeOf()); - int protectionLength = 0; + var protectionLength = 0; if(amiga.flags.HasFlag(AmigaFlags.Protection)) { @@ -747,10 +760,10 @@ public sealed partial class ISO9660 { entry.AmigaComment ??= Array.Empty(); - byte[] newComment = new byte[entry.AmigaComment.Length + - data - [systemAreaOff + Marshal.SizeOf() + protectionLength] - - 1]; + var newComment = new byte[entry.AmigaComment.Length + + data + [systemAreaOff + Marshal.SizeOf() + protectionLength] - + 1]; Array.Copy(entry.AmigaComment, 0, newComment, 0, entry.AmigaComment.Length); @@ -861,13 +874,16 @@ public sealed partial class ISO9660 AlternateName alternateName = Marshal.ByteArrayToStructureLittleEndian(data, systemAreaOff, - Marshal.SizeOf()); + Marshal.SizeOf()); byte[] nm; if(alternateName.flags.HasFlag(AlternateNameFlags.Networkname)) - nm = _joliet ? Encoding.BigEndianUnicode.GetBytes(Environment.MachineName) + { + nm = _joliet + ? Encoding.BigEndianUnicode.GetBytes(Environment.MachineName) : Encoding.GetBytes(Environment.MachineName); + } else { nm = new byte[nmLength - Marshal.SizeOf()]; @@ -877,15 +893,16 @@ public sealed partial class ISO9660 entry.RockRidgeAlternateName ??= Array.Empty(); - byte[] newNm = new byte[entry.RockRidgeAlternateName.Length + nm.Length]; + var newNm = new byte[entry.RockRidgeAlternateName.Length + nm.Length]; Array.Copy(entry.RockRidgeAlternateName, 0, newNm, 0, entry.RockRidgeAlternateName.Length); - Array.Copy(nm, 0, newNm, entry.RockRidgeAlternateName.Length, nm.Length); + Array.Copy(nm, 0, newNm, entry.RockRidgeAlternateName.Length, nm.Length); entry.RockRidgeAlternateName = newNm; if(!alternateName.flags.HasFlag(AlternateNameFlags.Continue)) { - entry.Filename = _joliet ? Encoding.BigEndianUnicode.GetString(entry.RockRidgeAlternateName) + entry.Filename = _joliet + ? Encoding.BigEndianUnicode.GetString(entry.RockRidgeAlternateName) : Encoding.GetString(entry.RockRidgeAlternateName); entry.RockRidgeAlternateName = null; @@ -1094,20 +1111,17 @@ public sealed partial class ISO9660 ? path[1..].ToLower(CultureInfo.CurrentUICulture) : path.ToLower(CultureInfo.CurrentUICulture); - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); - int currentParent = 1; - int currentPiece = 0; + var currentParent = 1; + var currentPiece = 0; while(currentPiece < pieces.Length) { PathTableEntryInternal currentEntry = _pathTable.FirstOrDefault(p => p.Parent == currentParent && - p.Name.ToLower(CultureInfo. - CurrentUICulture) == - pieces[currentPiece]); + p.Name.ToLower(CultureInfo. + CurrentUICulture) == + pieces[currentPiece]); if(currentEntry is null) break; diff --git a/Aaru.Filesystems/ISO9660/File.cs b/Aaru.Filesystems/ISO9660/File.cs index a817c28b9..9749e3716 100644 --- a/Aaru.Filesystems/ISO9660/File.cs +++ b/Aaru.Filesystems/ISO9660/File.cs @@ -44,6 +44,8 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -128,7 +130,7 @@ public sealed partial class ISO9660 if(length + mynode.Offset >= mynode.Length) read = mynode.Length - mynode.Offset; - long offset = mynode.Offset + (mynode._dentry.XattrLength * _blockSize); + long offset = mynode.Offset + mynode._dentry.XattrLength * _blockSize; if(mynode._dentry.CdiSystemArea?.attributes.HasFlag(CdiAttributes.DigitalAudio) != true || mynode._dentry.Extents.Count != 1) @@ -360,8 +362,10 @@ public sealed partial class ISO9660 } if(entry.PosixDeviceNumber != null) + { stat.DeviceNo = ((ulong)entry.PosixDeviceNumber.Value.dev_t_high << 32) + entry.PosixDeviceNumber.Value.dev_t_low; + } if(entry.RripModify != null) stat.LastWriteTimeUtc = DecodeIsoDateTime(entry.RripModify); @@ -461,6 +465,8 @@ public sealed partial class ISO9660 return ErrorNumber.NoError; } +#endregion + ErrorNumber GetFileEntry(string path, out DecodedDirectoryEntry entry) { entry = null; @@ -469,15 +475,12 @@ public sealed partial class ISO9660 ? path[1..].ToLower(CultureInfo.CurrentUICulture) : path.ToLower(CultureInfo.CurrentUICulture); - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pieces.Length == 0) return ErrorNumber.InvalidArgument; - string parentPath = string.Join("/", pieces, 0, pieces.Length - 1); + var parentPath = string.Join("/", pieces, 0, pieces.Length - 1); if(!_directoryCache.TryGetValue(parentPath, out _)) { @@ -526,7 +529,7 @@ public sealed partial class ISO9660 }, interleaved, fileNumber, out buffer); [MethodImpl(MethodImplOptions.AggressiveInlining)] - ErrorNumber ReadSingleExtent(long offset, long size, uint startingSector, out byte[] buffer, + ErrorNumber ReadSingleExtent(long offset, long size, uint startingSector, out byte[] buffer, bool interleaved = false, byte fileNumber = 0) => ReadWithExtents(offset, size, new List<(uint extent, uint size)> { @@ -534,13 +537,13 @@ public sealed partial class ISO9660 }, interleaved, fileNumber, out buffer); // Cannot think how to make this faster, as we don't know the mode sector until it is read, but we have size in bytes - ErrorNumber ReadWithExtents(long offset, long size, List<(uint extent, uint size)> extents, bool interleaved, + ErrorNumber ReadWithExtents(long offset, long size, List<(uint extent, uint size)> extents, bool interleaved, byte fileNumber, out byte[] buffer) { var ms = new MemoryStream(); long currentFilePos = 0; - for(int i = 0; i < extents.Count; i++) + for(var i = 0; i < extents.Count; i++) { if(offset - currentFilePos >= extents[i].size) { @@ -611,7 +614,7 @@ public sealed partial class ISO9660 { var ms = new MemoryStream(); - for(int i = 0; i < extents.Count; i++) + for(var i = 0; i < extents.Count; i++) { long leftExtentSize = extents[i].size; uint currentExtentSector = 0; diff --git a/Aaru.Filesystems/ISO9660/ISO9660.cs b/Aaru.Filesystems/ISO9660/ISO9660.cs index e182c8fe3..4eca2fb36 100644 --- a/Aaru.Filesystems/ISO9660/ISO9660.cs +++ b/Aaru.Filesystems/ISO9660/ISO9660.cs @@ -43,6 +43,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class ISO9660 : IReadOnlyFilesystem { + const string MODULE_NAME = "ISO9660 plugin"; + ushort _blockSize; bool _cdi; bool _debug; bool _highSierra; @@ -56,15 +58,19 @@ public sealed partial class ISO9660 : IReadOnlyFilesystem bool _useEvd; bool _usePathTable; bool _useTransTbl; - ushort _blockSize; Encoding Encoding; +#region IReadOnlyFilesystem Members + /// public FileSystem Metadata { get; private set; } + /// public string Name => "ISO9660 Filesystem"; + /// public Guid Id => new("d812f4d3-c357-400d-90fd-3b22ef786aa8"); + /// public string Author => Authors.NataliaPortillo; @@ -73,37 +79,24 @@ public sealed partial class ISO9660 : IReadOnlyFilesystem new (string name, Type type, string description)[] { ("use_path_table", typeof(bool), "Use path table for directory traversal"), - ("use_trans_tbl", typeof(bool), "Use TRANS.TBL for filenames"), - ("use_evd", typeof(bool), - "If present, use Enhanced Volume Descriptor with specified encoding (overrides namespace)") + ("use_trans_tbl", typeof(bool), "Use TRANS.TBL for filenames"), ("use_evd", typeof(bool), + "If present, use Enhanced Volume Descriptor with specified encoding (overrides namespace)") }; /// public Dictionary Namespaces => new() { - { - "normal", "Primary Volume Descriptor, ignoring ;1 suffixes" - }, - { - "vms", "Primary Volume Descriptor, showing version suffixes" - }, - { - "joliet", "Joliet Volume Descriptor (default)" - }, - { - "rrip", "Rock Ridge" - }, - { - "romeo", "Primary Volume Descriptor using the specified encoding codepage" - } + { "normal", "Primary Volume Descriptor, ignoring ;1 suffixes" }, + { "vms", "Primary Volume Descriptor, showing version suffixes" }, + { "joliet", "Joliet Volume Descriptor (default)" }, + { "rrip", "Rock Ridge" }, + { "romeo", "Primary Volume Descriptor using the specified encoding codepage" } }; +#endregion + static Dictionary GetDefaultOptions() => new() { - { - "debug", false.ToString() - } + { "debug", false.ToString() } }; - - const string MODULE_NAME = "ISO9660 plugin"; } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Info.cs b/Aaru.Filesystems/ISO9660/Info.cs index 4b5a7bb1b..11278bf90 100644 --- a/Aaru.Filesystems/ISO9660/Info.cs +++ b/Aaru.Filesystems/ISO9660/Info.cs @@ -43,6 +43,8 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { +#region IReadOnlyFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -60,14 +62,14 @@ public sealed partial class ISO9660 if(errno != ErrorNumber.NoError) return false; - int xaOff = 0; + var xaOff = 0; if(vdSector.Length == 2336) xaOff = 8; - byte vdType = vdSector[0 + xaOff]; - byte[] vdMagic = new byte[5]; - byte[] hsMagic = new byte[5]; + byte vdType = vdSector[0 + xaOff]; + var vdMagic = new byte[5]; + var hsMagic = new byte[5]; // This indicates the end of a volume descriptor. HighSierra here would have 16 so no problem if(vdType == 255) @@ -90,11 +92,11 @@ public sealed partial class ISO9660 encoding ??= Encoding.ASCII; information = ""; metadata = new FileSystem(); - var isoMetadata = new StringBuilder(); - byte[] vdMagic = new byte[5]; // Volume Descriptor magic "CD001" - byte[] hsMagic = new byte[5]; // Volume Descriptor magic "CDROM" + var isoMetadata = new StringBuilder(); + var vdMagic = new byte[5]; // Volume Descriptor magic "CD001" + var hsMagic = new byte[5]; // Volume Descriptor magic "CDROM" - string bootSpec = ""; + var bootSpec = ""; PrimaryVolumeDescriptor? pvd = null; PrimaryVolumeDescriptor? jolietvd = null; @@ -121,14 +123,14 @@ public sealed partial class ISO9660 int xaOff = vdSector.Length == 2336 ? 8 : 0; Array.Copy(vdSector, 0x009 + xaOff, hsMagic, 0, 5); bool highSierraInfo = encoding.GetString(hsMagic) == HIGH_SIERRA_MAGIC; - int hsOff = 0; + var hsOff = 0; if(highSierraInfo) hsOff = 8; - bool cdiInfo = false; - bool evd = false; - bool vpd = false; + var cdiInfo = false; + var evd = false; + var vpd = false; while(true) { @@ -211,13 +213,17 @@ public sealed partial class ISO9660 { if(svd.escape_sequences[0] == '%' && svd.escape_sequences[1] == '/') + { if(svd.escape_sequences[2] == '@' || svd.escape_sequences[2] == 'C' || svd.escape_sequences[2] == 'E') jolietvd = svd; else + { AaruConsole.WriteLine(MODULE_NAME, Localization.Found_unknown_supplementary_volume_descriptor); + } + } } else evd = true; @@ -266,7 +272,8 @@ public sealed partial class ISO9660 // No need to read root on CD-i, as extensions are not supported... if(!cdiInfo) { - rootLocation = highSierraInfo ? hsvd.Value.root_directory_record.extent + rootLocation = highSierraInfo + ? hsvd.Value.root_directory_record.extent : pvd.Value.root_directory_record.extent; if(highSierraInfo) @@ -286,14 +293,14 @@ public sealed partial class ISO9660 } byte[] rootDir = Array.Empty(); - int rootOff = 0; - bool xaExtensions = false; - bool apple = false; - bool susp = false; - bool rrip = false; - bool ziso = false; - bool amiga = false; - bool aaip = false; + var rootOff = 0; + var xaExtensions = false; + var apple = false; + var susp = false; + var rrip = false; + var ziso = false; + var amiga = false; + var aaip = false; List contareas = new(); List refareas = new(); var suspInformation = new StringBuilder(); @@ -321,13 +328,13 @@ public sealed partial class ISO9660 if(saLen > 0 && rootOff + saOff + saLen <= rootDir.Length) { - byte[] sa = new byte[saLen]; + var sa = new byte[saLen]; Array.Copy(rootDir, rootOff + saOff, sa, 0, saLen); saOff = 0; while(saOff < saLen) { - bool noneFound = true; + var noneFound = true; if(Marshal.SizeOf() + saOff <= saLen) { @@ -344,7 +351,7 @@ public sealed partial class ISO9660 if(saOff + 2 >= saLen) break; - ushort nextSignature = BigEndianBitConverter.ToUInt16(sa, saOff); + var nextSignature = BigEndianBitConverter.ToUInt16(sa, saOff); switch(nextSignature) { @@ -407,7 +414,7 @@ public sealed partial class ISO9660 break; case SUSP_CONTINUATION when saOff + sa[saOff + 2] <= saLen: - byte[] ce = new byte[sa[saOff + 2]]; + var ce = new byte[sa[saOff + 2]]; Array.Copy(sa, saOff, ce, 0, ce.Length); ContinuationArea ca = @@ -417,7 +424,7 @@ public sealed partial class ISO9660 break; case SUSP_REFERENCE when saOff + sa[saOff + 2] <= saLen: - byte[] er = new byte[sa[saOff + 2]]; + var er = new byte[sa[saOff + 2]]; Array.Copy(sa, saOff, er, 0, er.Length); refareas.Add(er); @@ -425,14 +432,14 @@ public sealed partial class ISO9660 } rrip |= nextSignature is RRIP_MAGIC or RRIP_POSIX_ATTRIBUTES or RRIP_POSIX_DEV_NO - or RRIP_SYMLINK or RRIP_NAME or RRIP_CHILDLINK or RRIP_PARENTLINK - or RRIP_RELOCATED_DIR or RRIP_TIMESTAMPS or RRIP_SPARSE; + or RRIP_SYMLINK or RRIP_NAME or RRIP_CHILDLINK or RRIP_PARENTLINK + or RRIP_RELOCATED_DIR or RRIP_TIMESTAMPS or RRIP_SPARSE; ziso |= nextSignature == ZISO_MAGIC; amiga |= nextSignature == AMIGA_MAGIC; - aaip |= nextSignature == AAIP_MAGIC || (nextSignature == AAIP_MAGIC_OLD && - sa[saOff + 3] == 1 && sa[saOff + 2] >= 9); + aaip |= nextSignature == AAIP_MAGIC || nextSignature == AAIP_MAGIC_OLD && + sa[saOff + 3] == 1 && sa[saOff + 2] >= 9; saOff += sa[saOff + 2]; @@ -468,13 +475,13 @@ public sealed partial class ISO9660 if(errno != ErrorNumber.NoError) return; - byte[] caData = new byte[ca.ca_length_be]; + var caData = new byte[ca.ca_length_be]; Array.Copy(caSectors, ca.offset_be, caData, 0, ca.ca_length_be); - int caOff = 0; + var caOff = 0; while(caOff < ca.ca_length_be) { - ushort nextSignature = BigEndianBitConverter.ToUInt16(caData, caOff); + var nextSignature = BigEndianBitConverter.ToUInt16(caData, caOff); switch(nextSignature) { @@ -488,7 +495,7 @@ public sealed partial class ISO9660 break; case SUSP_REFERENCE when caOff + caData[caOff + 2] <= ca.ca_length_be: - byte[] er = new byte[caData[caOff + 2]]; + var er = new byte[caData[caOff + 2]]; Array.Copy(caData, caOff, er, 0, er.Length); refareas.Add(er); @@ -496,14 +503,15 @@ public sealed partial class ISO9660 } rrip |= nextSignature is RRIP_MAGIC or RRIP_POSIX_ATTRIBUTES or RRIP_POSIX_DEV_NO or RRIP_SYMLINK - or RRIP_NAME or RRIP_CHILDLINK or RRIP_PARENTLINK or RRIP_RELOCATED_DIR or RRIP_TIMESTAMPS - or RRIP_SPARSE; + or RRIP_NAME or RRIP_CHILDLINK or RRIP_PARENTLINK or RRIP_RELOCATED_DIR + or RRIP_TIMESTAMPS + or RRIP_SPARSE; ziso |= nextSignature == ZISO_MAGIC; amiga |= nextSignature == AMIGA_MAGIC; - aaip |= nextSignature == AAIP_MAGIC || (nextSignature == AAIP_MAGIC_OLD && caData[caOff + 3] == 1 && - caData[caOff + 2] >= 9); + aaip |= nextSignature == AAIP_MAGIC || nextSignature == AAIP_MAGIC_OLD && caData[caOff + 3] == 1 && + caData[caOff + 2] >= 9; caOff += caData[caOff + 2]; } @@ -527,10 +535,10 @@ public sealed partial class ISO9660 string extSrc = encoding.GetString(erb, Marshal.SizeOf() + er.id_len + er.des_len, er.src_len); - suspInformation.AppendFormat(Localization.Extension_0, counter).AppendLine(); + suspInformation.AppendFormat(Localization.Extension_0, counter).AppendLine(); suspInformation.AppendFormat("\t" + Localization.ID_0_version_1, extId, er.ext_ver).AppendLine(); - suspInformation.AppendFormat("\t" + Localization.Description_0, extDes).AppendLine(); - suspInformation.AppendFormat("\t" + Localization.Source_0, extSrc).AppendLine(); + suspInformation.AppendFormat("\t" + Localization.Description_0, extDes).AppendLine(); + suspInformation.AppendFormat("\t" + Localization.Source_0, extSrc).AppendLine(); counter++; } } @@ -615,16 +623,16 @@ public sealed partial class ISO9660 isoMetadata.AppendLine(Localization.VOLUME_DESCRIPTOR_INFORMATION_border); } - isoMetadata.AppendFormat(Localization.System_identifier_0, decodedVd.SystemIdentifier).AppendLine(); - isoMetadata.AppendFormat(Localization.Volume_identifier_0, decodedVd.VolumeIdentifier).AppendLine(); + isoMetadata.AppendFormat(Localization.System_identifier_0, decodedVd.SystemIdentifier).AppendLine(); + isoMetadata.AppendFormat(Localization.Volume_identifier_0, decodedVd.VolumeIdentifier).AppendLine(); isoMetadata.AppendFormat(Localization.Volume_set_identifier_0, decodedVd.VolumeSetIdentifier).AppendLine(); - isoMetadata.AppendFormat(Localization.Publisher_identifier_0, decodedVd.PublisherIdentifier).AppendLine(); + isoMetadata.AppendFormat(Localization.Publisher_identifier_0, decodedVd.PublisherIdentifier).AppendLine(); isoMetadata.AppendFormat(Localization.Data_preparer_identifier_0, decodedVd.DataPreparerIdentifier). AppendLine(); isoMetadata.AppendFormat(Localization.Application_identifier_0, decodedVd.ApplicationIdentifier).AppendLine(); - isoMetadata.AppendFormat(Localization.Volume_creation_date_0, decodedVd.CreationTime).AppendLine(); + isoMetadata.AppendFormat(Localization.Volume_creation_date_0, decodedVd.CreationTime).AppendLine(); if(decodedVd.HasModificationTime) isoMetadata.AppendFormat(Localization.Volume_modification_date_0, decodedVd.ModificationTime).AppendLine(); @@ -668,20 +676,26 @@ public sealed partial class ISO9660 isoMetadata.AppendFormat(Localization.Volume_creation_date_0, decodedJolietVd.CreationTime).AppendLine(); if(decodedJolietVd.HasModificationTime) + { isoMetadata.AppendFormat(Localization.Volume_modification_date_0, decodedJolietVd.ModificationTime). AppendLine(); + } else isoMetadata.AppendFormat(Localization.Volume_has_not_been_modified).AppendLine(); if(decodedJolietVd.HasExpirationTime) + { isoMetadata.AppendFormat(Localization.Volume_expiration_date_0, decodedJolietVd.ExpirationTime). AppendLine(); + } else isoMetadata.AppendFormat(Localization.Volume_does_not_expire).AppendLine(); if(decodedJolietVd.HasEffectiveTime) + { isoMetadata.AppendFormat(Localization.Volume_effective_date_0, decodedJolietVd.EffectiveTime). AppendLine(); + } else isoMetadata.AppendFormat(Localization.Volume_has_always_been_effective).AppendLine(); } @@ -693,7 +707,7 @@ public sealed partial class ISO9660 if(errno != ErrorNumber.NoError) return; - int toritoOff = 0; + var toritoOff = 0; if(vdSector[toritoOff] != 1) goto exit_torito; @@ -721,8 +735,10 @@ public sealed partial class ISO9660 byte[] bootImage = null; if(initialEntry.load_rba + partition.Start + initialEntry.sector_count - 1 <= partition.End) + { imagePlugin.ReadSectors(initialEntry.load_rba + partition.Start, initialEntry.sector_count, out bootImage); + } isoMetadata.AppendLine(Localization.EL_TORITO_INFORMATION_border); isoMetadata.AppendLine(Localization.EL_TORITO_INFORMATION); @@ -741,11 +757,15 @@ public sealed partial class ISO9660 initialEntry.load_rba, initialEntry.sector_count).AppendLine(); if(valentry.platform_id == ElToritoPlatform.x86) + { isoMetadata.AppendFormat("\t" + Localization.Bootable_image_will_be_loaded_at_segment_0, initialEntry.load_seg == 0 ? 0x7C0 : initialEntry.load_seg).AppendLine(); + } else + { isoMetadata.AppendFormat("\t" + Localization.Bootable_image_will_be_loaded_at_0, (uint)initialEntry.load_seg * 10).AppendLine(); + } switch(initialEntry.boot_type) { @@ -775,9 +795,11 @@ public sealed partial class ISO9660 isoMetadata.AppendFormat("\t" + Localization.System_type_0, initialEntry.system_type).AppendLine(); if(bootImage != null) + { isoMetadata. AppendFormat("\t" + Localization.Bootable_image_SHA1_0, Sha1Context.Data(bootImage, out _)). AppendLine(); + } } else isoMetadata.AppendLine("\t" + Localization.Not_bootable); @@ -802,7 +824,8 @@ public sealed partial class ISO9660 AppendFormat("\t" + Localization.Section_ID_0, encoding.GetString(sectionHeader.identifier)). AppendLine(); - for(int entryCounter = 1; entryCounter <= sectionHeader.entries && toritoOff < vdSector.Length; + for(var entryCounter = 1; + entryCounter <= sectionHeader.entries && toritoOff < vdSector.Length; entryCounter++) { ElToritoSectionEntry sectionEntry = @@ -818,8 +841,10 @@ public sealed partial class ISO9660 bootImage = null; if(sectionEntry.load_rba + partition.Start + sectionEntry.sector_count - 1 <= partition.End) + { imagePlugin.ReadSectors(sectionEntry.load_rba + partition.Start, sectionEntry.sector_count, out bootImage); + } isoMetadata.AppendFormat("\t\t" + Localization.Bootable_on_0, sectionHeader.platform_id). AppendLine(); @@ -829,12 +854,16 @@ public sealed partial class ISO9660 sectionEntry.load_rba, sectionEntry.sector_count).AppendLine(); if(valentry.platform_id == ElToritoPlatform.x86) + { isoMetadata.AppendFormat("\t\t" + Localization.Bootable_image_will_be_loaded_at_segment_0, sectionEntry.load_seg == 0 ? 0x7C0 : sectionEntry.load_seg). AppendLine(); + } else + { isoMetadata.AppendFormat("\t\t" + Localization.Bootable_image_will_be_loaded_at_0, (uint)sectionEntry.load_seg * 10).AppendLine(); + } switch((ElToritoEmulation)((byte)sectionEntry.boot_type & 0xF)) { @@ -871,8 +900,10 @@ public sealed partial class ISO9660 AppendLine(); if(bootImage != null) + { isoMetadata.AppendFormat("\t\t" + Localization.Bootable_image_SHA1_0, Sha1Context.Data(bootImage, out _)).AppendLine(); + } } else isoMetadata.AppendLine("\t\t" + Localization.Not_bootable); @@ -906,7 +937,7 @@ public sealed partial class ISO9660 } } - exit_torito: + exit_torito: if(refareas.Count > 0) isoMetadata.Append(suspInformation); @@ -926,53 +957,62 @@ public sealed partial class ISO9660 decodedVd.SystemIdentifier.Length > decodedJolietVd.SystemIdentifier.Length) metadata.SystemIdentifier = decodedVd.SystemIdentifier; else - metadata.SystemIdentifier = string.IsNullOrEmpty(decodedJolietVd.SystemIdentifier) ? null + { + metadata.SystemIdentifier = string.IsNullOrEmpty(decodedJolietVd.SystemIdentifier) + ? null : decodedJolietVd.SystemIdentifier; + } if(string.IsNullOrEmpty(decodedJolietVd.VolumeSetIdentifier) || decodedVd.VolumeSetIdentifier.Length > decodedJolietVd.VolumeSetIdentifier.Length) metadata.VolumeSetIdentifier = decodedVd.VolumeSetIdentifier; else - metadata.VolumeSetIdentifier = string.IsNullOrEmpty(decodedJolietVd.VolumeSetIdentifier) ? null + { + metadata.VolumeSetIdentifier = string.IsNullOrEmpty(decodedJolietVd.VolumeSetIdentifier) + ? null : decodedJolietVd.VolumeSetIdentifier; + } if(string.IsNullOrEmpty(decodedJolietVd.PublisherIdentifier) || decodedVd.PublisherIdentifier.Length > decodedJolietVd.PublisherIdentifier.Length) metadata.PublisherIdentifier = decodedVd.PublisherIdentifier; else - metadata.PublisherIdentifier = string.IsNullOrEmpty(decodedJolietVd.PublisherIdentifier) ? null + { + metadata.PublisherIdentifier = string.IsNullOrEmpty(decodedJolietVd.PublisherIdentifier) + ? null : decodedJolietVd.PublisherIdentifier; + } if(string.IsNullOrEmpty(decodedJolietVd.DataPreparerIdentifier) || decodedVd.DataPreparerIdentifier.Length > decodedJolietVd.DataPreparerIdentifier.Length) metadata.DataPreparerIdentifier = decodedVd.DataPreparerIdentifier; else - metadata.DataPreparerIdentifier = string.IsNullOrEmpty(decodedJolietVd.DataPreparerIdentifier) ? null + { + metadata.DataPreparerIdentifier = string.IsNullOrEmpty(decodedJolietVd.DataPreparerIdentifier) + ? null : decodedJolietVd.DataPreparerIdentifier; + } if(string.IsNullOrEmpty(decodedJolietVd.ApplicationIdentifier) || decodedVd.ApplicationIdentifier.Length > decodedJolietVd.ApplicationIdentifier.Length) metadata.ApplicationIdentifier = decodedVd.ApplicationIdentifier; else - metadata.ApplicationIdentifier = string.IsNullOrEmpty(decodedJolietVd.ApplicationIdentifier) ? null + { + metadata.ApplicationIdentifier = string.IsNullOrEmpty(decodedJolietVd.ApplicationIdentifier) + ? null : decodedJolietVd.ApplicationIdentifier; + } metadata.CreationDate = decodedJolietVd.CreationTime; if(decodedJolietVd.HasModificationTime) - { metadata.ModificationDate = decodedJolietVd.ModificationTime; - } if(decodedJolietVd.HasExpirationTime) - { metadata.ExpirationDate = decodedJolietVd.ExpirationTime; - } if(decodedJolietVd.HasEffectiveTime) - { metadata.EffectiveDate = decodedJolietVd.EffectiveTime; - } } else { @@ -985,19 +1025,13 @@ public sealed partial class ISO9660 metadata.CreationDate = decodedVd.CreationTime; if(decodedVd.HasModificationTime) - { metadata.ModificationDate = decodedVd.ModificationTime; - } if(decodedVd.HasExpirationTime) - { metadata.ExpirationDate = decodedVd.ExpirationTime; - } if(decodedVd.HasEffectiveTime) - { metadata.EffectiveDate = decodedVd.EffectiveTime; - } } metadata.Bootable |= bvd != null || segaCd != null || saturn != null || dreamcast != null; @@ -1006,4 +1040,6 @@ public sealed partial class ISO9660 information = isoMetadata.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Mode2.cs b/Aaru.Filesystems/ISO9660/Mode2.cs index 13265d8a3..6fa7ccf87 100644 --- a/Aaru.Filesystems/ISO9660/Mode2.cs +++ b/Aaru.Filesystems/ISO9660/Mode2.cs @@ -68,6 +68,7 @@ public sealed partial class ISO9660 return errno; if(_debug) + { switch(data.Length) { case 2048: @@ -111,6 +112,7 @@ public sealed partial class ISO9660 break; } + } if(_blockSize == 2048) { @@ -119,7 +121,7 @@ public sealed partial class ISO9660 return ErrorNumber.NoError; } - byte[] tmp = new byte[_blockSize]; + var tmp = new byte[_blockSize]; Array.Copy(Sector.GetUserData(data, interleaved, fileNumber), (int)offset, tmp, 0, _blockSize); buffer = tmp; @@ -143,6 +145,7 @@ public sealed partial class ISO9660 return errno; if(_debug) + { switch(data.Length) { case 2048: @@ -187,13 +190,14 @@ public sealed partial class ISO9660 break; } + } byte[] sectorData = Sector.GetUserData(data, interleaved, fileNumber); ms.Write(sectorData, 0, sectorData.Length); } - byte[] tmp = new byte[_blockSize]; + var tmp = new byte[_blockSize]; Array.Copy(Sector.GetUserData(ms.ToArray(), interleaved, fileNumber), 0, tmp, 0, _blockSize); buffer = tmp; diff --git a/Aaru.Filesystems/ISO9660/PathTable.cs b/Aaru.Filesystems/ISO9660/PathTable.cs index 9cb463349..e6aac76b3 100644 --- a/Aaru.Filesystems/ISO9660/PathTable.cs +++ b/Aaru.Filesystems/ISO9660/PathTable.cs @@ -42,7 +42,7 @@ public sealed partial class ISO9660 List table = new(); - int off = 0; + var off = 0; PathTableEntry entry = Marshal.ByteArrayToStructureBigEndian(data, off, Marshal.SizeOf()); @@ -88,15 +88,15 @@ public sealed partial class ISO9660 List table = new(); - int off = 0; + var off = 0; while(off < data.Length) { HighSierraPathTableEntry entry = Marshal.ByteArrayToStructureBigEndian(data, off, - Marshal. - SizeOf< - HighSierraPathTableEntry>()); + Marshal. + SizeOf< + HighSierraPathTableEntry>()); if(entry.name_len == 0) break; diff --git a/Aaru.Filesystems/ISO9660/Structs/Amiga.cs b/Aaru.Filesystems/ISO9660/Structs/Amiga.cs index 17dbce77d..9f2685d50 100644 --- a/Aaru.Filesystems/ISO9660/Structs/Amiga.cs +++ b/Aaru.Filesystems/ISO9660/Structs/Amiga.cs @@ -33,6 +33,8 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { +#region Nested type: AmigaEntry + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct AmigaEntry { @@ -45,6 +47,10 @@ public sealed partial class ISO9660 // Followed by length-prefixed string for comment if present } +#endregion + +#region Nested type: AmigaProtection + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct AmigaProtection { @@ -53,4 +59,6 @@ public sealed partial class ISO9660 public readonly AmigaMultiuser Multiuser; public readonly AmigaAttributes Protection; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/Apple.cs b/Aaru.Filesystems/ISO9660/Structs/Apple.cs index 425f9da11..712d9ae32 100644 --- a/Aaru.Filesystems/ISO9660/Structs/Apple.cs +++ b/Aaru.Filesystems/ISO9660/Structs/Apple.cs @@ -33,48 +33,7 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { - // Little-endian - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct AppleProDOSSystemUse - { - public readonly ushort signature; - public readonly byte length; - public readonly AppleId id; - public readonly byte type; - public readonly ushort aux_type; - } - - // Big-endian - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct AppleHFSSystemUse - { - public readonly ushort signature; - public readonly byte length; - public readonly AppleId id; - public readonly uint type; - public readonly uint creator; - public readonly AppleCommon.FinderFlags finder_flags; - } - - // Little-endian - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct AppleProDOSOldSystemUse - { - public readonly ushort signature; - public readonly AppleOldId id; - public readonly byte type; - public readonly ushort aux_type; - } - - // Big-endian - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct AppleHFSTypeCreatorSystemUse - { - public readonly ushort signature; - public readonly AppleOldId id; - public readonly uint type; - public readonly uint creator; - } +#region Nested type: AppleHFSIconSystemUse // Big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -88,6 +47,10 @@ public sealed partial class ISO9660 public readonly byte[] icon; } +#endregion + +#region Nested type: AppleHFSOldSystemUse + // Big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct AppleHFSOldSystemUse @@ -98,4 +61,65 @@ public sealed partial class ISO9660 public readonly uint creator; public readonly ushort finder_flags; } + +#endregion + +#region Nested type: AppleHFSSystemUse + + // Big-endian + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct AppleHFSSystemUse + { + public readonly ushort signature; + public readonly byte length; + public readonly AppleId id; + public readonly uint type; + public readonly uint creator; + public readonly AppleCommon.FinderFlags finder_flags; + } + +#endregion + +#region Nested type: AppleHFSTypeCreatorSystemUse + + // Big-endian + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct AppleHFSTypeCreatorSystemUse + { + public readonly ushort signature; + public readonly AppleOldId id; + public readonly uint type; + public readonly uint creator; + } + +#endregion + +#region Nested type: AppleProDOSOldSystemUse + + // Little-endian + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct AppleProDOSOldSystemUse + { + public readonly ushort signature; + public readonly AppleOldId id; + public readonly byte type; + public readonly ushort aux_type; + } + +#endregion + +#region Nested type: AppleProDOSSystemUse + + // Little-endian + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct AppleProDOSSystemUse + { + public readonly ushort signature; + public readonly byte length; + public readonly AppleId id; + public readonly byte type; + public readonly ushort aux_type; + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/CDi.cs b/Aaru.Filesystems/ISO9660/Structs/CDi.cs index 4613cdd8e..74b0c534e 100644 --- a/Aaru.Filesystems/ISO9660/Structs/CDi.cs +++ b/Aaru.Filesystems/ISO9660/Structs/CDi.cs @@ -90,6 +90,48 @@ public sealed partial class ISO9660 return decodedVd; } +#region Nested type: CdiDirectoryRecord + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CdiDirectoryRecord + { + public readonly byte length; + public readonly byte xattr_len; + public readonly uint reserved1; + public readonly uint start_lbn; + public readonly uint reserved2; + public readonly uint size; + public readonly HighSierraTimestamp date; + public readonly byte reserved3; + public readonly CdiFileFlags flags; + public readonly ushort file_unit_size; + public readonly ushort reserved4; + public readonly ushort volume_sequence_number; + public readonly byte name_len; + + // Followed by name[name_len] and then CdiSystemArea until length arrives + } + +#endregion + +#region Nested type: CdiSystemArea + + // Follows filename on directory record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CdiSystemArea + { + public readonly ushort group; + public readonly ushort owner; + public readonly CdiAttributes attributes; + public readonly ushort reserved1; + public readonly byte file_no; + public readonly byte reserved2; + } + +#endregion + +#region Nested type: FileStructureVolumeDescriptor + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct FileStructureVolumeDescriptor { @@ -161,35 +203,5 @@ public sealed partial class ISO9660 public readonly byte[] reserved16; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CdiDirectoryRecord - { - public readonly byte length; - public readonly byte xattr_len; - public readonly uint reserved1; - public readonly uint start_lbn; - public readonly uint reserved2; - public readonly uint size; - public readonly HighSierraTimestamp date; - public readonly byte reserved3; - public readonly CdiFileFlags flags; - public readonly ushort file_unit_size; - public readonly ushort reserved4; - public readonly ushort volume_sequence_number; - public readonly byte name_len; - - // Followed by name[name_len] and then CdiSystemArea until length arrives - } - - // Follows filename on directory record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CdiSystemArea - { - public readonly ushort group; - public readonly ushort owner; - public readonly CdiAttributes attributes; - public readonly ushort reserved1; - public readonly byte file_no; - public readonly byte reserved2; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/ElTorito.cs b/Aaru.Filesystems/ISO9660/Structs/ElTorito.cs index 98106a93b..8502df7be 100644 --- a/Aaru.Filesystems/ISO9660/Structs/ElTorito.cs +++ b/Aaru.Filesystems/ISO9660/Structs/ElTorito.cs @@ -33,6 +33,8 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { +#region Nested type: ElToritoBootRecord + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct ElToritoBootRecord { @@ -49,17 +51,9 @@ public sealed partial class ISO9660 public readonly byte[] boot_use; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ElToritoValidationEntry - { - public readonly ElToritoIndicator header_id; - public readonly ElToritoPlatform platform_id; - public readonly ushort reserved; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)] - public readonly byte[] developer_id; - public readonly ushort checksum; - public readonly ushort signature; - } +#endregion + +#region Nested type: ElToritoInitialEntry [StructLayout(LayoutKind.Sequential, Pack = 1)] struct ElToritoInitialEntry @@ -75,15 +69,9 @@ public sealed partial class ISO9660 public readonly byte[] reserved2; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ElToritoSectionHeaderEntry - { - public readonly ElToritoIndicator header_id; - public readonly ElToritoPlatform platform_id; - public readonly ushort entries; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 28)] - public readonly byte[] identifier; - } +#endregion + +#region Nested type: ElToritoSectionEntry [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct ElToritoSectionEntry @@ -100,6 +88,10 @@ public sealed partial class ISO9660 public readonly byte[] selection_criterias; } +#endregion + +#region Nested type: ElToritoSectionEntryExtension + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct ElToritoSectionEntryExtension { @@ -108,4 +100,36 @@ public sealed partial class ISO9660 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30)] public readonly byte[] selection_criterias; } + +#endregion + +#region Nested type: ElToritoSectionHeaderEntry + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ElToritoSectionHeaderEntry + { + public readonly ElToritoIndicator header_id; + public readonly ElToritoPlatform platform_id; + public readonly ushort entries; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 28)] + public readonly byte[] identifier; + } + +#endregion + +#region Nested type: ElToritoValidationEntry + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ElToritoValidationEntry + { + public readonly ElToritoIndicator header_id; + public readonly ElToritoPlatform platform_id; + public readonly ushort reserved; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)] + public readonly byte[] developer_id; + public readonly ushort checksum; + public readonly ushort signature; + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/HighSierra.cs b/Aaru.Filesystems/ISO9660/Structs/HighSierra.cs index c13190801..b9be758f4 100644 --- a/Aaru.Filesystems/ISO9660/Structs/HighSierra.cs +++ b/Aaru.Filesystems/ISO9660/Structs/HighSierra.cs @@ -87,6 +87,49 @@ public sealed partial class ISO9660 return decodedVd; } +#region Nested type: HighSierraDirectoryRecord + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct HighSierraDirectoryRecord + { + public readonly byte length; + public readonly byte xattr_len; + public readonly uint extent; + public readonly uint extent_be; + public readonly uint size; + public readonly uint size_be; + public readonly HighSierraTimestamp date; + public readonly FileFlags flags; + public readonly byte reserved; + public readonly byte interleave_size; + public readonly byte interleave; + public readonly ushort volume_sequence_number; + public readonly ushort volume_sequence_number_be; + public readonly byte name_len; + + // Followed by name[name_len] and then system area until length arrives + } + +#endregion + +#region Nested type: HighSierraPathTableEntry + + // There are two tables one in little endian one in big endian + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct HighSierraPathTableEntry + { + public readonly uint start_lbn; + public readonly byte xattr_len; + public readonly byte name_len; + public readonly ushort parent_dirno; + + // Followed by name[name_len] + } + +#endregion + +#region Nested type: HighSierraPrimaryVolumeDescriptor + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct HighSierraPrimaryVolumeDescriptor { @@ -154,26 +197,9 @@ public sealed partial class ISO9660 public readonly byte[] reserved3; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct HighSierraDirectoryRecord - { - public readonly byte length; - public readonly byte xattr_len; - public readonly uint extent; - public readonly uint extent_be; - public readonly uint size; - public readonly uint size_be; - public readonly HighSierraTimestamp date; - public readonly FileFlags flags; - public readonly byte reserved; - public readonly byte interleave_size; - public readonly byte interleave; - public readonly ushort volume_sequence_number; - public readonly ushort volume_sequence_number_be; - public readonly byte name_len; +#endregion - // Followed by name[name_len] and then system area until length arrives - } +#region Nested type: HighSierraTimestamp [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct HighSierraTimestamp @@ -186,15 +212,5 @@ public sealed partial class ISO9660 public readonly byte Second; } - // There are two tables one in little endian one in big endian - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct HighSierraPathTableEntry - { - public readonly uint start_lbn; - public readonly byte xattr_len; - public readonly byte name_len; - public readonly ushort parent_dirno; - - // Followed by name[name_len] - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/ISO.cs b/Aaru.Filesystems/ISO9660/Structs/ISO.cs index e811b5073..b2cbe7f56 100644 --- a/Aaru.Filesystems/ISO9660/Structs/ISO.cs +++ b/Aaru.Filesystems/ISO9660/Structs/ISO.cs @@ -44,11 +44,11 @@ public sealed partial class ISO9660 var decodedVd = new DecodedVolumeDescriptor { - SystemIdentifier = StringHandlers.CToString(pvd.system_id, encoding).TrimEnd(), - VolumeIdentifier = StringHandlers.CToString(pvd.volume_id, encoding).TrimEnd(), - VolumeSetIdentifier = StringHandlers.CToString(pvd.volume_set_id, encoding).TrimEnd(), - PublisherIdentifier = StringHandlers.CToString(pvd.publisher_id, encoding).TrimEnd(), - DataPreparerIdentifier = StringHandlers.CToString(pvd.preparer_id, encoding).TrimEnd(), + SystemIdentifier = StringHandlers.CToString(pvd.system_id, encoding).TrimEnd(), + VolumeIdentifier = StringHandlers.CToString(pvd.volume_id, encoding).TrimEnd(), + VolumeSetIdentifier = StringHandlers.CToString(pvd.volume_set_id, encoding).TrimEnd(), + PublisherIdentifier = StringHandlers.CToString(pvd.publisher_id, encoding).TrimEnd(), + DataPreparerIdentifier = StringHandlers.CToString(pvd.preparer_id, encoding).TrimEnd(), ApplicationIdentifier = StringHandlers.CToString(pvd.application_id, encoding).TrimEnd() }; @@ -91,6 +91,143 @@ public sealed partial class ISO9660 return decodedVd; } +#region Nested type: BootRecord + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct BootRecord + { + public readonly byte type; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public readonly byte[] id; + public readonly byte version; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] system_id; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] boot_id; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1977)] + public readonly byte[] boot_use; + } + +#endregion + +#region Nested type: DirectoryRecord + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryRecord + { + public readonly byte length; + public readonly byte xattr_len; + public readonly uint extent; + public readonly uint extent_be; + public readonly uint size; + public readonly uint size_be; + public readonly IsoTimestamp date; + public readonly FileFlags flags; + public readonly byte file_unit_size; + public readonly byte interleave; + public readonly ushort volume_sequence_number; + public readonly ushort volume_sequence_number_be; + public readonly byte name_len; + + // Followed by name[name_len] and then system area until length arrives + } + +#endregion + +#region Nested type: ExtendedAttributeRecord + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ExtendedAttributeRecord + { + public readonly ushort owner; + public readonly ushort owner_be; + public readonly ushort group; + public readonly ushort group_be; + public readonly Permissions permissions; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] + public readonly byte[] creation_date; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] + public readonly byte[] modification_date; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] + public readonly byte[] expiration_date; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] + public readonly byte[] effective_date; + public readonly RecordFormat record_format; + public readonly RecordAttribute record_attributes; + public readonly ushort record_length; + public readonly ushort record_length_be; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] system_id; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] system_use; + public readonly byte record_version; + public readonly byte escape_len; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] reserved1; + public readonly ushort app_use_len; + public readonly ushort app_use_len_be; + } + +#endregion + +#region Nested type: IsoTimestamp + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct IsoTimestamp + { + public readonly byte Years; + public readonly byte Month; + public readonly byte Day; + public readonly byte Hour; + public readonly byte Minute; + public readonly byte Second; + public readonly sbyte GmtOffset; + } + +#endregion + +#region Nested type: PartitionDescriptor + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct PartitionDescriptor + { + public readonly byte type; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public readonly byte[] id; + public readonly byte version; + public readonly byte reserved1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] system_id; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] partition_id; + public readonly uint partition_location; + public readonly uint partition_location_be; + public readonly uint partition_size; + public readonly uint partition_size_be; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1960)] + public readonly byte[] system_use; + } + +#endregion + +#region Nested type: PathTableEntry + + // There are two tables one in little endian one in big endian + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct PathTableEntry + { + public readonly byte name_len; + public readonly byte xattr_len; + public readonly uint start_lbn; + public readonly ushort parent_dirno; + + // Followed by name[name_len] + } + +#endregion + +#region Nested type: PrimaryVolumeDescriptor + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct PrimaryVolumeDescriptor { @@ -156,114 +293,5 @@ public sealed partial class ISO9660 public readonly byte[] reserved3; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct BootRecord - { - public readonly byte type; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public readonly byte[] id; - public readonly byte version; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] system_id; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] boot_id; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1977)] - public readonly byte[] boot_use; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct PartitionDescriptor - { - public readonly byte type; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public readonly byte[] id; - public readonly byte version; - public readonly byte reserved1; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] system_id; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] partition_id; - public readonly uint partition_location; - public readonly uint partition_location_be; - public readonly uint partition_size; - public readonly uint partition_size_be; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1960)] - public readonly byte[] system_use; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryRecord - { - public readonly byte length; - public readonly byte xattr_len; - public readonly uint extent; - public readonly uint extent_be; - public readonly uint size; - public readonly uint size_be; - public readonly IsoTimestamp date; - public readonly FileFlags flags; - public readonly byte file_unit_size; - public readonly byte interleave; - public readonly ushort volume_sequence_number; - public readonly ushort volume_sequence_number_be; - public readonly byte name_len; - - // Followed by name[name_len] and then system area until length arrives - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ExtendedAttributeRecord - { - public readonly ushort owner; - public readonly ushort owner_be; - public readonly ushort group; - public readonly ushort group_be; - public readonly Permissions permissions; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] - public readonly byte[] creation_date; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] - public readonly byte[] modification_date; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] - public readonly byte[] expiration_date; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] - public readonly byte[] effective_date; - public readonly RecordFormat record_format; - public readonly RecordAttribute record_attributes; - public readonly ushort record_length; - public readonly ushort record_length_be; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] system_id; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] system_use; - public readonly byte record_version; - public readonly byte escape_len; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] reserved1; - public readonly ushort app_use_len; - public readonly ushort app_use_len_be; - } - - // There are two tables one in little endian one in big endian - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct PathTableEntry - { - public readonly byte name_len; - public readonly byte xattr_len; - public readonly uint start_lbn; - public readonly ushort parent_dirno; - - // Followed by name[name_len] - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct IsoTimestamp - { - public readonly byte Years; - public readonly byte Month; - public readonly byte Day; - public readonly byte Hour; - public readonly byte Minute; - public readonly byte Second; - public readonly sbyte GmtOffset; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/Internal.cs b/Aaru.Filesystems/ISO9660/Structs/Internal.cs index 21a3aff72..936424248 100644 --- a/Aaru.Filesystems/ISO9660/Structs/Internal.cs +++ b/Aaru.Filesystems/ISO9660/Structs/Internal.cs @@ -35,24 +35,7 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { - struct DecodedVolumeDescriptor - { - public string SystemIdentifier; - public string VolumeIdentifier; - public string VolumeSetIdentifier; - public string PublisherIdentifier; - public string DataPreparerIdentifier; - public string ApplicationIdentifier; - public DateTime CreationTime; - public bool HasModificationTime; - public DateTime ModificationTime; - public bool HasExpirationTime; - public DateTime ExpirationTime; - public bool HasEffectiveTime; - public DateTime EffectiveTime; - public ushort BlockSize; - public uint Blocks; - } +#region Nested type: DecodedDirectoryEntry sealed class DecodedDirectoryEntry { @@ -94,6 +77,72 @@ public sealed partial class ISO9660 public override string ToString() => Filename; } +#endregion + +#region Nested type: DecodedVolumeDescriptor + + struct DecodedVolumeDescriptor + { + public string SystemIdentifier; + public string VolumeIdentifier; + public string VolumeSetIdentifier; + public string PublisherIdentifier; + public string DataPreparerIdentifier; + public string ApplicationIdentifier; + public DateTime CreationTime; + public bool HasModificationTime; + public DateTime ModificationTime; + public bool HasExpirationTime; + public DateTime ExpirationTime; + public bool HasEffectiveTime; + public DateTime EffectiveTime; + public ushort BlockSize; + public uint Blocks; + } + +#endregion + +#region Nested type: Iso9660DirNode + + sealed class Iso9660DirNode : IDirNode + { + internal DecodedDirectoryEntry[] _entries; + internal int _position; + + #region IDirNode Members + + /// + public string Path { get; init; } + + #endregion + } + +#endregion + +#region Nested type: Iso9660FileNode + + sealed class Iso9660FileNode : IFileNode + { + internal DecodedDirectoryEntry _dentry; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: PathTableEntryInternal + sealed class PathTableEntryInternal { public uint Extent; @@ -104,22 +153,5 @@ public sealed partial class ISO9660 public override string ToString() => Name; } - sealed class Iso9660FileNode : IFileNode - { - internal DecodedDirectoryEntry _dentry; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } - - sealed class Iso9660DirNode : IDirNode - { - internal DecodedDirectoryEntry[] _entries; - internal int _position; - /// - public string Path { get; init; } - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/RRIP.cs b/Aaru.Filesystems/ISO9660/Structs/RRIP.cs index ff2824e7c..25c6da097 100644 --- a/Aaru.Filesystems/ISO9660/Structs/RRIP.cs +++ b/Aaru.Filesystems/ISO9660/Structs/RRIP.cs @@ -35,23 +35,51 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class ISO9660 { - // RRIP 1.10 +#region Nested type: AlternateName + [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct PosixAttributesOld + readonly struct AlternateName { - public readonly ushort signature; - public readonly byte length; - public readonly byte version; - public readonly PosixMode st_mode; - public readonly PosixMode st_mode_be; - public readonly uint st_nlink; - public readonly uint st_nlink_be; - public readonly uint st_uid; - public readonly uint st_uid_be; - public readonly uint st_gid; - public readonly uint st_gid_be; + public readonly ushort signature; + public readonly byte length; + public readonly byte version; + public readonly AlternateNameFlags flags; + + // Folowed by name, can be divided in pieces } +#endregion + +#region Nested type: ChildLink + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ChildLink + { + public readonly ushort signature; + public readonly byte length; + public readonly byte version; + public readonly uint child_dir_lba; + public readonly uint child_dir_lba_be; + } + +#endregion + +#region Nested type: ParentLink + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ParentLink + { + public readonly ushort signature; + public readonly byte length; + public readonly byte version; + public readonly uint parent_dir_lba; + public readonly uint parent_dir_lba_be; + } + +#endregion + +#region Nested type: PosixAttributes + // RRIP 1.12 [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct PosixAttributes @@ -71,6 +99,31 @@ public sealed partial class ISO9660 public readonly uint st_ino_be; } +#endregion + +#region Nested type: PosixAttributesOld + + // RRIP 1.10 + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct PosixAttributesOld + { + public readonly ushort signature; + public readonly byte length; + public readonly byte version; + public readonly PosixMode st_mode; + public readonly PosixMode st_mode_be; + public readonly uint st_nlink; + public readonly uint st_nlink_be; + public readonly uint st_uid; + public readonly uint st_uid_be; + public readonly uint st_gid; + public readonly uint st_gid_be; + } + +#endregion + +#region Nested type: PosixDeviceNumber + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct PosixDeviceNumber { @@ -83,6 +136,39 @@ public sealed partial class ISO9660 public readonly uint dev_t_low_be; } +#endregion + +#region Nested type: RelocatedDirectory + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct RelocatedDirectory + { + public readonly ushort signature; + public readonly byte length; + public readonly byte version; + } + +#endregion + +#region Nested type: SparseFile + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct SparseFile + { + public readonly ushort signature; + public readonly byte length; + public readonly byte version; + public readonly uint virtual_size_high; + public readonly uint virtual_size_high_be; + public readonly uint virtual_size_low; + public readonly uint virtual_size_low_be; + public readonly byte table_depth; + } + +#endregion + +#region Nested type: SymbolicLink + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SymbolicLink { @@ -94,6 +180,10 @@ public sealed partial class ISO9660 // Followed by SymbolicLinkComponent (link to /bar/foo uses at least two of these structs) } +#endregion + +#region Nested type: SymbolicLinkComponent + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SymbolicLinkComponent { @@ -103,44 +193,9 @@ public sealed partial class ISO9660 // Followed by component content } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct AlternateName - { - public readonly ushort signature; - public readonly byte length; - public readonly byte version; - public readonly AlternateNameFlags flags; +#endregion - // Folowed by name, can be divided in pieces - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ChildLink - { - public readonly ushort signature; - public readonly byte length; - public readonly byte version; - public readonly uint child_dir_lba; - public readonly uint child_dir_lba_be; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ParentLink - { - public readonly ushort signature; - public readonly byte length; - public readonly byte version; - public readonly uint parent_dir_lba; - public readonly uint parent_dir_lba_be; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct RelocatedDirectory - { - public readonly ushort signature; - public readonly byte length; - public readonly byte version; - } +#region Nested type: Timestamps [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Timestamps @@ -160,16 +215,5 @@ public sealed partial class ISO9660 // Followed by effective time if present } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct SparseFile - { - public readonly ushort signature; - public readonly byte length; - public readonly byte version; - public readonly uint virtual_size_high; - public readonly uint virtual_size_high_be; - public readonly uint virtual_size_low; - public readonly uint virtual_size_low_be; - public readonly byte table_depth; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/SUSP.cs b/Aaru.Filesystems/ISO9660/Structs/SUSP.cs index d6ec5bc40..7884eb093 100644 --- a/Aaru.Filesystems/ISO9660/Structs/SUSP.cs +++ b/Aaru.Filesystems/ISO9660/Structs/SUSP.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { +#region Nested type: ContinuationArea + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct ContinuationArea { @@ -49,13 +51,9 @@ public sealed partial class ISO9660 public readonly uint ca_length_be; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct PaddingArea - { - public readonly ushort signature; - public readonly byte length; - public readonly byte version; - } +#endregion + +#region Nested type: IndicatorArea [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct IndicatorArea @@ -67,14 +65,22 @@ public sealed partial class ISO9660 public readonly byte skipped; } +#endregion + +#region Nested type: PaddingArea + [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct TerminatorArea + readonly struct PaddingArea { public readonly ushort signature; public readonly byte length; public readonly byte version; } +#endregion + +#region Nested type: ReferenceArea + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct ReferenceArea { @@ -91,6 +97,10 @@ public sealed partial class ISO9660 // Follows extension source for src_len bytes } +#endregion + +#region Nested type: SelectorArea + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SelectorArea { @@ -99,4 +109,18 @@ public sealed partial class ISO9660 public readonly byte version; public readonly byte sequence; } + +#endregion + +#region Nested type: TerminatorArea + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct TerminatorArea + { + public readonly ushort signature; + public readonly byte length; + public readonly byte version; + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/XA.cs b/Aaru.Filesystems/ISO9660/Structs/XA.cs index c2d71fc6b..18d192c65 100644 --- a/Aaru.Filesystems/ISO9660/Structs/XA.cs +++ b/Aaru.Filesystems/ISO9660/Structs/XA.cs @@ -37,6 +37,8 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { +#region Nested type: CdromXa + // Big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct CdromXa @@ -49,4 +51,6 @@ public sealed partial class ISO9660 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public readonly byte[] reserved; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Structs/Ziso.cs b/Aaru.Filesystems/ISO9660/Structs/Ziso.cs index 063dedf5c..80ff87f5e 100644 --- a/Aaru.Filesystems/ISO9660/Structs/Ziso.cs +++ b/Aaru.Filesystems/ISO9660/Structs/Ziso.cs @@ -35,15 +35,7 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class ISO9660 { - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ZisofsHeader - { - public readonly ulong magic; - public readonly uint uncomp_len; - public readonly uint uncomp_len_be; - public readonly byte header_size; // Shifted >> 2 - public readonly byte block_size_log; // log2(block_size) - } +#region Nested type: ZisofsEntry [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct ZisofsEntry @@ -57,4 +49,20 @@ public sealed partial class ISO9660 public readonly uint uncomp_len; public readonly uint uncomp_len_be; } + +#endregion + +#region Nested type: ZisofsHeader + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ZisofsHeader + { + public readonly ulong magic; + public readonly uint uncomp_len; + public readonly uint uncomp_len_be; + public readonly byte header_size; // Shifted >> 2 + public readonly byte block_size_log; // log2(block_size) + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Super.cs b/Aaru.Filesystems/ISO9660/Super.cs index 21e16fac5..5dc226b3f 100644 --- a/Aaru.Filesystems/ISO9660/Super.cs +++ b/Aaru.Filesystems/ISO9660/Super.cs @@ -47,13 +47,15 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { Encoding = encoding ?? Encoding.GetEncoding(1252); - byte[] vdMagic = new byte[5]; // Volume Descriptor magic "CD001" - byte[] hsMagic = new byte[5]; // Volume Descriptor magic "CDROM" + var vdMagic = new byte[5]; // Volume Descriptor magic "CD001" + var hsMagic = new byte[5]; // Volume Descriptor magic "CDROM" options ??= GetDefaultOptions(); @@ -94,7 +96,8 @@ public sealed partial class ISO9660 _namespace = Namespace.Romeo; break; - default: return ErrorNumber.InvalidArgument; + default: + return ErrorNumber.InvalidArgument; } PrimaryVolumeDescriptor? pvd = null; @@ -121,7 +124,7 @@ public sealed partial class ISO9660 int xaOff = vdSector.Length == 2336 ? 8 : 0; Array.Copy(vdSector, 0x009 + xaOff, hsMagic, 0, 5); _highSierra = Encoding.GetString(hsMagic) == HIGH_SIERRA_MAGIC; - int hsOff = 0; + var hsOff = 0; if(_highSierra) hsOff = 8; @@ -209,13 +212,17 @@ public sealed partial class ISO9660 { if(svd.escape_sequences[0] == '%' && svd.escape_sequences[1] == '/') + { if(svd.escape_sequences[2] == '@' || svd.escape_sequences[2] == 'C' || svd.escape_sequences[2] == 'E') jolietvd = svd; else + { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Found_unknown_supplementary_volume_descriptor); + } + } if(_debug) svdSectors.Add(16 + counter + partition.Start); @@ -356,10 +363,12 @@ public sealed partial class ISO9660 if(!_cdi) { - rootLocation = _highSierra ? hsvd.Value.root_directory_record.extent + rootLocation = _highSierra + ? hsvd.Value.root_directory_record.extent : pvd.Value.root_directory_record.extent; - rootXattrLength = _highSierra ? hsvd.Value.root_directory_record.xattr_len + rootXattrLength = _highSierra + ? hsvd.Value.root_directory_record.xattr_len : pvd.Value.root_directory_record.xattr_len; rootSize = _highSierra ? hsvd.Value.root_directory_record.size : pvd.Value.root_directory_record.size; @@ -376,7 +385,7 @@ public sealed partial class ISO9660 if(errno != ErrorNumber.NoError) return errno; - bool pvdWrongRoot = false; + var pvdWrongRoot = false; if(_highSierra) { @@ -401,7 +410,7 @@ public sealed partial class ISO9660 Localization. PVD_does_not_point_to_correct_root_directory_checking_path_table); - bool pathTableWrongRoot = false; + var pathTableWrongRoot = false; rootLocation = _pathTable[0].Extent; @@ -511,11 +520,13 @@ public sealed partial class ISO9660 _usePathTable = false; if(_namespace != Namespace.Joliet) + { _rootDirectoryCache = _cdi ? DecodeCdiDirectory(rootLocation + rootXattrLength, rootSize) : _highSierra ? DecodeHighSierraDirectory(rootLocation + rootXattrLength, rootSize) : DecodeIsoDirectory(rootLocation + rootXattrLength, rootSize); + } Metadata.Type = fsFormat; @@ -537,53 +548,62 @@ public sealed partial class ISO9660 decodedVd.SystemIdentifier.Length > decodedJolietVd.SystemIdentifier.Length) Metadata.SystemIdentifier = decodedVd.SystemIdentifier; else - Metadata.SystemIdentifier = string.IsNullOrEmpty(decodedJolietVd.SystemIdentifier) ? null + { + Metadata.SystemIdentifier = string.IsNullOrEmpty(decodedJolietVd.SystemIdentifier) + ? null : decodedJolietVd.SystemIdentifier; + } if(string.IsNullOrEmpty(decodedJolietVd.VolumeSetIdentifier) || decodedVd.VolumeSetIdentifier.Length > decodedJolietVd.VolumeSetIdentifier.Length) Metadata.VolumeSetIdentifier = decodedVd.VolumeSetIdentifier; else - Metadata.VolumeSetIdentifier = string.IsNullOrEmpty(decodedJolietVd.VolumeSetIdentifier) ? null + { + Metadata.VolumeSetIdentifier = string.IsNullOrEmpty(decodedJolietVd.VolumeSetIdentifier) + ? null : decodedJolietVd.VolumeSetIdentifier; + } if(string.IsNullOrEmpty(decodedJolietVd.PublisherIdentifier) || decodedVd.PublisherIdentifier.Length > decodedJolietVd.PublisherIdentifier.Length) Metadata.PublisherIdentifier = decodedVd.PublisherIdentifier; else - Metadata.PublisherIdentifier = string.IsNullOrEmpty(decodedJolietVd.PublisherIdentifier) ? null + { + Metadata.PublisherIdentifier = string.IsNullOrEmpty(decodedJolietVd.PublisherIdentifier) + ? null : decodedJolietVd.PublisherIdentifier; + } if(string.IsNullOrEmpty(decodedJolietVd.DataPreparerIdentifier) || decodedVd.DataPreparerIdentifier.Length > decodedJolietVd.DataPreparerIdentifier.Length) Metadata.DataPreparerIdentifier = decodedVd.DataPreparerIdentifier; else - Metadata.DataPreparerIdentifier = string.IsNullOrEmpty(decodedJolietVd.DataPreparerIdentifier) ? null + { + Metadata.DataPreparerIdentifier = string.IsNullOrEmpty(decodedJolietVd.DataPreparerIdentifier) + ? null : decodedJolietVd.DataPreparerIdentifier; + } if(string.IsNullOrEmpty(decodedJolietVd.ApplicationIdentifier) || decodedVd.ApplicationIdentifier.Length > decodedJolietVd.ApplicationIdentifier.Length) Metadata.ApplicationIdentifier = decodedVd.ApplicationIdentifier; else - Metadata.ApplicationIdentifier = string.IsNullOrEmpty(decodedJolietVd.ApplicationIdentifier) ? null + { + Metadata.ApplicationIdentifier = string.IsNullOrEmpty(decodedJolietVd.ApplicationIdentifier) + ? null : decodedJolietVd.ApplicationIdentifier; + } Metadata.CreationDate = decodedJolietVd.CreationTime; if(decodedJolietVd.HasModificationTime) - { Metadata.ModificationDate = decodedJolietVd.ModificationTime; - } if(decodedJolietVd.HasExpirationTime) - { Metadata.ExpirationDate = decodedJolietVd.ExpirationTime; - } if(decodedJolietVd.HasEffectiveTime) - { Metadata.EffectiveDate = decodedJolietVd.EffectiveTime; - } decodedVd = decodedJolietVd; } @@ -598,19 +618,13 @@ public sealed partial class ISO9660 Metadata.CreationDate = decodedVd.CreationTime; if(decodedVd.HasModificationTime) - { Metadata.ModificationDate = decodedVd.ModificationTime; - } if(decodedVd.HasExpirationTime) - { Metadata.ExpirationDate = decodedVd.ExpirationTime; - } if(decodedVd.HasEffectiveTime) - { Metadata.EffectiveDate = decodedVd.EffectiveTime; - } } if(_debug) @@ -627,6 +641,7 @@ public sealed partial class ISO9660 }); if(!_cdi) + { _rootDirectoryCache.Add("$PATH_TABLE.LSB", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -637,6 +652,7 @@ public sealed partial class ISO9660 Size = (uint)pathTableData.Length, Timestamp = decodedVd.CreationTime }); + } _rootDirectoryCache.Add("$PATH_TABLE.MSB", new DecodedDirectoryEntry { @@ -649,7 +665,8 @@ public sealed partial class ISO9660 Timestamp = decodedVd.CreationTime }); - for(int i = 0; i < bvdSectors.Count; i++) + for(var i = 0; i < bvdSectors.Count; i++) + { _rootDirectoryCache.Add(i == 0 ? "$BOOT" : $"$BOOT_{i}", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -660,8 +677,10 @@ public sealed partial class ISO9660 Size = 2048, Timestamp = decodedVd.CreationTime }); + } - for(int i = 0; i < pvdSectors.Count; i++) + for(var i = 0; i < pvdSectors.Count; i++) + { _rootDirectoryCache.Add(i == 0 ? "$PVD" : $"$PVD{i}", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -672,8 +691,10 @@ public sealed partial class ISO9660 Size = 2048, Timestamp = decodedVd.CreationTime }); + } - for(int i = 0; i < svdSectors.Count; i++) + for(var i = 0; i < svdSectors.Count; i++) + { _rootDirectoryCache.Add(i == 0 ? "$SVD" : $"$SVD_{i}", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -684,8 +705,10 @@ public sealed partial class ISO9660 Size = 2048, Timestamp = decodedVd.CreationTime }); + } - for(int i = 0; i < evdSectors.Count; i++) + for(var i = 0; i < evdSectors.Count; i++) + { _rootDirectoryCache.Add(i == 0 ? "$EVD" : $"$EVD_{i}", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -696,8 +719,10 @@ public sealed partial class ISO9660 Size = 2048, Timestamp = decodedVd.CreationTime }); + } - for(int i = 0; i < vpdSectors.Count; i++) + for(var i = 0; i < vpdSectors.Count; i++) + { _rootDirectoryCache.Add(i == 0 ? "$VPD" : $"$VPD_{i}", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -708,8 +733,10 @@ public sealed partial class ISO9660 Size = 2048, Timestamp = decodedVd.CreationTime }); + } if(segaCd != null) + { _rootDirectoryCache.Add("$IP.BIN", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -720,8 +747,10 @@ public sealed partial class ISO9660 Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime }); + } if(saturn != null) + { _rootDirectoryCache.Add("$IP.BIN", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -732,8 +761,10 @@ public sealed partial class ISO9660 Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime }); + } if(dreamcast != null) + { _rootDirectoryCache.Add("$IP.BIN", new DecodedDirectoryEntry { Extents = new List<(uint extent, uint size)> @@ -744,6 +775,7 @@ public sealed partial class ISO9660 Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime }); + } } Metadata.Bootable |= bvd != null || segaCd != null || saturn != null || dreamcast != null; @@ -761,12 +793,14 @@ public sealed partial class ISO9660 _directoryCache = new Dictionary>(); if(_usePathTable) + { foreach(DecodedDirectoryEntry subDirectory in _cdi ? GetSubdirsFromCdiPathTable("") : _highSierra ? GetSubdirsFromHighSierraPathTable("") : GetSubdirsFromIsoPathTable("")) _rootDirectoryCache[subDirectory.Filename] = subDirectory; + } _mounted = true; @@ -798,4 +832,6 @@ public sealed partial class ISO9660 return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Xattr.cs b/Aaru.Filesystems/ISO9660/Xattr.cs index e4042954f..1b8a5b690 100644 --- a/Aaru.Filesystems/ISO9660/Xattr.cs +++ b/Aaru.Filesystems/ISO9660/Xattr.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; public sealed partial class ISO9660 { +#region IReadOnlyFilesystem Members + /// public ErrorNumber ListXAttr(string path, out List xattrs) { @@ -128,10 +130,12 @@ public sealed partial class ISO9660 return ErrorNumber.InvalidArgument; if(entry.AssociatedFile.Size != 0) + { return ReadWithExtents(0, (long)entry.AssociatedFile.Size, entry.AssociatedFile.Extents, entry.AssociatedFile.XA?.signature == XA_MAGIC && entry.AssociatedFile.XA?.attributes.HasFlag(XaAttributes.Interleaved) == true, entry.AssociatedFile.XA?.filenumber ?? 0, out buf); + } buf = Array.Empty(); @@ -160,10 +164,12 @@ public sealed partial class ISO9660 return ErrorNumber.InvalidArgument; if(entry.ResourceFork.Size != 0) + { return ReadWithExtents(0, (long)entry.ResourceFork.Size, entry.ResourceFork.Extents, entry.ResourceFork.XA?.signature == XA_MAGIC && entry.ResourceFork.XA?.attributes.HasFlag(XaAttributes.Interleaved) == true, entry.ResourceFork.XA?.filenumber ?? 0, out buf); + } buf = Array.Empty(); @@ -200,7 +206,10 @@ public sealed partial class ISO9660 buf = ReadSubheaderWithExtents(entry.Extents, true); return ErrorNumber.NoError; - default: return ErrorNumber.NoSuchExtendedAttribute; + default: + return ErrorNumber.NoSuchExtendedAttribute; } } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/JFS/Enums.cs b/Aaru.Filesystems/JFS/Enums.cs index bd6b9d07d..011e2c08d 100644 --- a/Aaru.Filesystems/JFS/Enums.cs +++ b/Aaru.Filesystems/JFS/Enums.cs @@ -37,23 +37,50 @@ namespace Aaru.Filesystems; /// Implements detection of IBM's Journaled File System public sealed partial class JFS { - [Flags, SuppressMessage("ReSharper", "InconsistentNaming")] +#region Nested type: Flags + + [Flags] + [SuppressMessage("ReSharper", "InconsistentNaming")] enum Flags : uint { - Unicode = 0x00000001, RemountRO = 0x00000002, Continue = 0x00000004, - Panic = 0x00000008, UserQuota = 0x00000010, GroupQuota = 0x00000020, - NoJournal = 0x00000040, Discard = 0x00000080, GroupCommit = 0x00000100, - LazyCommit = 0x00000200, Temporary = 0x00000400, InlineLog = 0x00000800, - InlineMoving = 0x00001000, BadSAIT = 0x00010000, Sparse = 0x00020000, - DASDEnabled = 0x00040000, DASDPrime = 0x00080000, SwapBytes = 0x00100000, - DirIndex = 0x00200000, Linux = 0x10000000, DFS = 0x20000000, - OS2 = 0x40000000, AIX = 0x80000000 + Unicode = 0x00000001, + RemountRO = 0x00000002, + Continue = 0x00000004, + Panic = 0x00000008, + UserQuota = 0x00000010, + GroupQuota = 0x00000020, + NoJournal = 0x00000040, + Discard = 0x00000080, + GroupCommit = 0x00000100, + LazyCommit = 0x00000200, + Temporary = 0x00000400, + InlineLog = 0x00000800, + InlineMoving = 0x00001000, + BadSAIT = 0x00010000, + Sparse = 0x00020000, + DASDEnabled = 0x00040000, + DASDPrime = 0x00080000, + SwapBytes = 0x00100000, + DirIndex = 0x00200000, + Linux = 0x10000000, + DFS = 0x20000000, + OS2 = 0x40000000, + AIX = 0x80000000 } +#endregion + +#region Nested type: State + [Flags] enum State : uint { - Clean = 0, Mounted = 1, Dirty = 2, - Logredo = 4, Extendfs = 8 + Clean = 0, + Mounted = 1, + Dirty = 2, + Logredo = 4, + Extendfs = 8 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/JFS/Info.cs b/Aaru.Filesystems/JFS/Info.cs index 7de1c99e3..cf3bd97e1 100644 --- a/Aaru.Filesystems/JFS/Info.cs +++ b/Aaru.Filesystems/JFS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of IBM's Journaled File System public sealed partial class JFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -82,8 +84,8 @@ public sealed partial class JFS SuperBlock jfsSb = Marshal.ByteArrayToStructureLittleEndian(sector); sb.AppendLine(Localization.JFS_filesystem); - sb.AppendFormat(Localization.Version_0, jfsSb.s_version).AppendLine(); - sb.AppendFormat(Localization._0_blocks_of_1_bytes, jfsSb.s_size, jfsSb.s_bsize).AppendLine(); + sb.AppendFormat(Localization.Version_0, jfsSb.s_version).AppendLine(); + sb.AppendFormat(Localization._0_blocks_of_1_bytes, jfsSb.s_size, jfsSb.s_bsize).AppendLine(); sb.AppendFormat(Localization._0_blocks_per_allocation_group, jfsSb.s_agsize).AppendLine(); if(jfsSb.s_flags.HasFlag(Flags.Unicode)) @@ -184,4 +186,6 @@ public sealed partial class JFS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/JFS/JFS.cs b/Aaru.Filesystems/JFS/JFS.cs index cbe6d4de5..56f8e9982 100644 --- a/Aaru.Filesystems/JFS/JFS.cs +++ b/Aaru.Filesystems/JFS/JFS.cs @@ -37,10 +37,16 @@ namespace Aaru.Filesystems; /// Implements detection of IBM's Journaled File System public sealed partial class JFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.JFS_Name; + /// public Guid Id => new("D3BE2A41-8F28-4055-94DC-BB6C72A0E9C4"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/JFS/Structs.cs b/Aaru.Filesystems/JFS/Structs.cs index 4e7500aec..57c915105 100644 --- a/Aaru.Filesystems/JFS/Structs.cs +++ b/Aaru.Filesystems/JFS/Structs.cs @@ -37,6 +37,8 @@ namespace Aaru.Filesystems; /// Implements detection of IBM's Journaled File System public sealed partial class JFS { +#region Nested type: Extent + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Extent { @@ -45,12 +47,9 @@ public sealed partial class JFS public readonly uint addr2; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct TimeStruct - { - public readonly uint tv_sec; - public readonly uint tv_nsec; - } +#endregion + +#region Nested type: SuperBlock [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock @@ -87,4 +86,17 @@ public sealed partial class JFS public readonly byte[] s_label; public readonly Guid s_loguuid; } + +#endregion + +#region Nested type: TimeStruct + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct TimeStruct + { + public readonly uint tv_sec; + public readonly uint tv_nsec; + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/LIF/Info.cs b/Aaru.Filesystems/LIF/Info.cs index d427284fd..0d1bd675d 100644 --- a/Aaru.Filesystems/LIF/Info.cs +++ b/Aaru.Filesystems/LIF/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of the LIF filesystem public sealed partial class LIF { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -83,9 +85,9 @@ public sealed partial class LIF sb.AppendLine(Localization.HP_Logical_Interchange_Format); sb.AppendFormat(Localization.Directory_starts_at_cluster_0, lifSb.directoryStart).AppendLine(); - sb.AppendFormat(Localization.LIF_identifier_0, lifSb.lifId).AppendLine(); - sb.AppendFormat(Localization.Directory_size_0_clusters, lifSb.directorySize).AppendLine(); - sb.AppendFormat(Localization.LIF_version_0, lifSb.lifVersion).AppendLine(); + sb.AppendFormat(Localization.LIF_identifier_0, lifSb.lifId).AppendLine(); + sb.AppendFormat(Localization.Directory_size_0_clusters, lifSb.directorySize).AppendLine(); + sb.AppendFormat(Localization.LIF_version_0, lifSb.lifVersion).AppendLine(); // How is this related to volume size? I have only CDs to test and makes no sense there sb.AppendFormat(Localization._0_tracks, lifSb.tracks).AppendLine(); @@ -105,4 +107,6 @@ public sealed partial class LIF VolumeName = StringHandlers.CToString(lifSb.volumeLabel, encoding) }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/LIF/LIF.cs b/Aaru.Filesystems/LIF/LIF.cs index 1f754e1ee..ea46d88fb 100644 --- a/Aaru.Filesystems/LIF/LIF.cs +++ b/Aaru.Filesystems/LIF/LIF.cs @@ -36,11 +36,18 @@ namespace Aaru.Filesystems; /// Implements detection of the LIF filesystem public sealed partial class LIF : IFilesystem { + const string MODULE_NAME = "LIF plugin"; + +#region IFilesystem Members + /// public string Name => Localization.LIF_Name; + /// public Guid Id => new("41535647-77A5-477B-9206-DA727ACDC704"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "LIF plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/LIF/Structs.cs b/Aaru.Filesystems/LIF/Structs.cs index 833c7d146..baecd71a0 100644 --- a/Aaru.Filesystems/LIF/Structs.cs +++ b/Aaru.Filesystems/LIF/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of the LIF filesystem public sealed partial class LIF { +#region Nested type: SystemBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SystemBlock { @@ -53,4 +55,6 @@ public sealed partial class LIF [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public readonly byte[] creationDate; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/LisaFS/Consts.cs b/Aaru.Filesystems/LisaFS/Consts.cs index 9059ef515..60b6c000d 100644 --- a/Aaru.Filesystems/LisaFS/Consts.cs +++ b/Aaru.Filesystems/LisaFS/Consts.cs @@ -71,6 +71,10 @@ public sealed partial class LisaFS /// Root directory ID const short DIRID_ROOT = 0; + const string FS_TYPE = "lisafs"; + +#region Nested type: FileType + enum FileType : byte { /// Undefined file type @@ -107,5 +111,5 @@ public sealed partial class LisaFS KilledObject = 15 } - const string FS_TYPE = "lisafs"; +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/LisaFS/Dir.cs b/Aaru.Filesystems/LisaFS/Dir.cs index 8bd1f77cc..8eb468acd 100644 --- a/Aaru.Filesystems/LisaFS/Dir.cs +++ b/Aaru.Filesystems/LisaFS/Dir.cs @@ -43,6 +43,8 @@ namespace Aaru.Filesystems; public sealed partial class LisaFS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber ReadLink(string path, out string dest) { @@ -129,11 +131,14 @@ public sealed partial class LisaFS return ErrorNumber.NoError; } +#endregion + void ReadDir(short dirId, out List contents) => // Do same trick as Mac OS X, replace filesystem '/' with '-', // as '-' is the path separator in Lisa OS - contents = (from entry in _catalogCache where entry.parentID == dirId + contents = (from entry in _catalogCache + where entry.parentID == dirId select StringHandlers.CToString(entry.filename, _encoding).Replace('/', '-')).ToList(); /// Reads, interprets and caches the Catalog File @@ -154,7 +159,7 @@ public sealed partial class LisaFS if(error != ErrorNumber.NoError) return error; - int offset = 0; + var offset = 0; List catalogV2 = new(); // For each entry on the catalog @@ -299,12 +304,13 @@ public sealed partial class LisaFS // Foreach catalog block foreach(byte[] buf in catalogBlocks) { - int offset = 0; + var offset = 0; // Traverse all entries while(offset + 64 <= buf.Length) // Catalog block header + { if(buf[offset + 0x24] == 0x08) offset += 78; @@ -337,14 +343,16 @@ public sealed partial class LisaFS }; Array.Copy(buf, offset + 0x03, entry.filename, 0, E_NAME); - Array.Copy(buf, offset + 0x38, entry.tail, 0, 8); + Array.Copy(buf, offset + 0x38, entry.tail, 0, 8); if(ReadExtentsFile(entry.fileID, out _) == ErrorNumber.NoError) + { if(!_fileSizeCache.ContainsKey(entry.fileID)) { _catalogCache.Add(entry); _fileSizeCache.Add(entry.fileID, entry.length); } + } offset += 64; } @@ -380,6 +388,7 @@ public sealed partial class LisaFS } else break; + } } return ErrorNumber.NoError; diff --git a/Aaru.Filesystems/LisaFS/Extent.cs b/Aaru.Filesystems/LisaFS/Extent.cs index e615281e9..0d08facc7 100644 --- a/Aaru.Filesystems/LisaFS/Extent.cs +++ b/Aaru.Filesystems/LisaFS/Extent.cs @@ -49,7 +49,7 @@ public sealed partial class LisaFS return ErrorNumber.AccessDenied; if(fileId < 4 || - (fileId == 4 && _mddf.fsversion != LISA_V2 && _mddf.fsversion != LISA_V1)) + fileId == 4 && _mddf.fsversion != LISA_V2 && _mddf.fsversion != LISA_V1) return ErrorNumber.InvalidArgument; if(_extentCache.TryGetValue(fileId, out file)) @@ -76,7 +76,7 @@ public sealed partial class LisaFS // This code just allow to ignore that corruption by searching the Extents File using sector tags if(ptr >= _device.Info.Sectors) { - bool found = false; + var found = false; for(ulong i = 0; i < _device.Info.Sectors; i++) { @@ -113,7 +113,8 @@ public sealed partial class LisaFS byte[] sector; - errno = _mddf.fsversion == LISA_V1 ? _device.ReadSectors(ptr, 2, out sector) + errno = _mddf.fsversion == LISA_V1 + ? _device.ReadSectors(ptr, 2, out sector) : _device.ReadSector(ptr, out sector); if(errno != ErrorNumber.NoError) @@ -164,7 +165,7 @@ public sealed partial class LisaFS file.LisaInfo = new byte[128]; Array.Copy(sector, 0x180, file.LisaInfo, 0, 128); - int extentsCount = 0; + var extentsCount = 0; int extentsOffset; if(_mddf.fsversion == LISA_V1) @@ -180,9 +181,9 @@ public sealed partial class LisaFS extentsOffset = 0x88; } - for(int j = 0; j < 41; j++) + for(var j = 0; j < 41; j++) { - if(BigEndianBitConverter.ToInt16(sector, extentsOffset + (j * 6) + 4) == 0) + if(BigEndianBitConverter.ToInt16(sector, extentsOffset + j * 6 + 4) == 0) break; extentsCount++; @@ -190,12 +191,14 @@ public sealed partial class LisaFS file.extents = new Extent[extentsCount]; - for(int j = 0; j < extentsCount; j++) + for(var j = 0; j < extentsCount; j++) + { file.extents[j] = new Extent { - start = BigEndianBitConverter.ToInt32(sector, extentsOffset + (j * 6)), - length = BigEndianBitConverter.ToInt16(sector, extentsOffset + (j * 6) + 4) + start = BigEndianBitConverter.ToInt32(sector, extentsOffset + j * 6), + length = BigEndianBitConverter.ToInt16(sector, extentsOffset + j * 6 + 4) }; + } _extentCache.Add(fileId, file); @@ -210,25 +213,25 @@ public sealed partial class LisaFS AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].filename = {1}", fileId, StringHandlers.CToString(file.filename, _encoding)); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown1 = 0x{1:X4}", fileId, file.unknown1); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown1 = 0x{1:X4}", fileId, file.unknown1); AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].file_uid = 0x{1:X16}", fileId, file.file_uid); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown2 = 0x{1:X2}", fileId, file.unknown2); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].etype = 0x{1:X2}", fileId, file.etype); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].ftype = {1}", fileId, file.ftype); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown3 = 0x{1:X2}", fileId, file.unknown3); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dtc = {1}", fileId, file.dtc); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dta = {1}", fileId, file.dta); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dtm = {1}", fileId, file.dtm); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dtb = {1}", fileId, file.dtb); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dts = {1}", fileId, file.dts); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].serial = {1}", fileId, file.serial); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown4 = 0x{1:X2}", fileId, file.unknown4); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].locked = {1}", fileId, file.locked > 0); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].protect = {1}", fileId, file.protect > 0); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].master = {1}", fileId, file.master > 0); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].scavenged = {1}", fileId, file.scavenged > 0); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].closed = {1}", fileId, file.closed > 0); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].open = {1}", fileId, file.open > 0); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown2 = 0x{1:X2}", fileId, file.unknown2); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].etype = 0x{1:X2}", fileId, file.etype); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].ftype = {1}", fileId, file.ftype); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown3 = 0x{1:X2}", fileId, file.unknown3); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dtc = {1}", fileId, file.dtc); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dta = {1}", fileId, file.dta); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dtm = {1}", fileId, file.dtm); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dtb = {1}", fileId, file.dtb); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].dts = {1}", fileId, file.dts); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].serial = {1}", fileId, file.serial); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown4 = 0x{1:X2}", fileId, file.unknown4); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].locked = {1}", fileId, file.locked > 0); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].protect = {1}", fileId, file.protect > 0); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].master = {1}", fileId, file.master > 0); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].scavenged = {1}", fileId, file.scavenged > 0); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].closed = {1}", fileId, file.closed > 0); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].open = {1}", fileId, file.open > 0); AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown5 = 0x{1:X2}{2:X2}{3:X2}{4:X2}{5:X2}{6:X2}{7:X2}{8:X2}{9:X2}" + @@ -237,11 +240,11 @@ public sealed partial class LisaFS file.unknown5[7], file.unknown5[8], file.unknown5[9], file.unknown5[10]); AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].release = {1}", fileId, file.release); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].build = {1}", fileId, file.build); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].build = {1}", fileId, file.build); AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].compatibility = {1}", fileId, file.compatibility); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].revision = {1}", fileId, file.revision); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].revision = {1}", fileId, file.revision); AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown6 = 0x{1:X4}", fileId, file.unknown6); AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].password_valid = {1}", fileId, @@ -263,10 +266,10 @@ public sealed partial class LisaFS file.unknown8[9], file.unknown8[10], file.unknown8[11], file.unknown8[12], file.unknown8[13], file.unknown8[14], file.unknown8[15]); - AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].length = {1}", fileId, file.length); + AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].length = {1}", fileId, file.length); AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].unknown9 = 0x{1:X8}", fileId, file.unknown9); - for(int ext = 0; ext < file.extents.Length; ext++) + for(var ext = 0; ext < file.extents.Length; ext++) { AaruConsole.DebugWriteLine(MODULE_NAME, "ExtentFile[{0}].extents[{1}].start = {2}", fileId, ext, file.extents[ext].start); @@ -298,14 +301,16 @@ public sealed partial class LisaFS // Each entry takes 14 bytes _srecords = new SRecord[sectors.Length / 14]; - for(int s = 0; s < _srecords.Length; s++) + for(var s = 0; s < _srecords.Length; s++) + { _srecords[s] = new SRecord { - extent_ptr = BigEndianBitConverter.ToUInt32(sectors, 0x00 + (14 * s)), - unknown = BigEndianBitConverter.ToUInt32(sectors, 0x04 + (14 * s)), - filesize = BigEndianBitConverter.ToUInt32(sectors, 0x08 + (14 * s)), - flags = BigEndianBitConverter.ToUInt16(sectors, 0x0C + (14 * s)) + extent_ptr = BigEndianBitConverter.ToUInt32(sectors, 0x00 + 14 * s), + unknown = BigEndianBitConverter.ToUInt32(sectors, 0x04 + 14 * s), + filesize = BigEndianBitConverter.ToUInt32(sectors, 0x08 + 14 * s), + flags = BigEndianBitConverter.ToUInt16(sectors, 0x0C + 14 * s) }; + } return ErrorNumber.NoError; } diff --git a/Aaru.Filesystems/LisaFS/File.cs b/Aaru.Filesystems/LisaFS/File.cs index a58a248d4..862706f7f 100644 --- a/Aaru.Filesystems/LisaFS/File.cs +++ b/Aaru.Filesystems/LisaFS/File.cs @@ -38,6 +38,8 @@ namespace Aaru.Filesystems; public sealed partial class LisaFS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -124,6 +126,7 @@ public sealed partial class LisaFS ErrorNumber error; if(_debug) + { switch(mynode._fileId) { case FILEID_BOOT_SIGNED: @@ -140,6 +143,7 @@ public sealed partial class LisaFS break; } + } else error = ReadFile(mynode._fileId, out tmp); @@ -169,6 +173,8 @@ public sealed partial class LisaFS return isDir ? StatDir(fileId, out stat) : Stat(fileId, out stat); } +#endregion + ErrorNumber GetAttributes(short fileId, out FileAttributes attributes) { attributes = new FileAttributes(); @@ -210,7 +216,8 @@ public sealed partial class LisaFS attributes |= FileAttributes.Pipe; break; - case FileType.Undefined: break; + case FileType.Undefined: + break; default: attributes |= FileAttributes.File; attributes |= FileAttributes.Extents; @@ -242,17 +249,20 @@ public sealed partial class LisaFS return ErrorNumber.AccessDenied; if(fileId is > 4 or <= 0) + { if(fileId != FILEID_BOOT_SIGNED && fileId != FILEID_LOADER_SIGNED) return ErrorNumber.InvalidArgument; + } if(_systemFileCache.TryGetValue(fileId, out buf) && !tags) return ErrorNumber.NoError; - int count = 0; + var count = 0; if(fileId == FILEID_SRECORD) + { if(!tags) { errno = _device.ReadSectors(_mddf.mddf_block + _volumePrefix + _mddf.srec_ptr, _mddf.srec_len, out buf); @@ -271,6 +281,7 @@ public sealed partial class LisaFS return errno != ErrorNumber.NoError ? errno : ErrorNumber.NoError; } + } LisaTag.PriamTag sysTag; @@ -308,7 +319,8 @@ public sealed partial class LisaFS byte[] sector; - errno = !tags ? _device.ReadSector(i, out sector) + errno = !tags + ? _device.ReadSector(i, out sector) : _device.ReadSectorTag(i, SectorTagType.AppleSectorTag, out sector); if(errno != ErrorNumber.NoError) @@ -338,6 +350,7 @@ public sealed partial class LisaFS ExtentFile file; if(fileId <= 4) + { if(!_debug || fileId == 0) return ErrorNumber.NoSuchFile; @@ -392,6 +405,7 @@ public sealed partial class LisaFS return ErrorNumber.NoError; } + } stat = new FileEntryInfo(); @@ -437,7 +451,7 @@ public sealed partial class LisaFS tags &= _debug; if(fileId < 4 || - (fileId == 4 && _mddf.fsversion != LISA_V2 && _mddf.fsversion != LISA_V1)) + fileId == 4 && _mddf.fsversion != LISA_V2 && _mddf.fsversion != LISA_V1) return ErrorNumber.InvalidArgument; if(!tags && @@ -456,17 +470,18 @@ public sealed partial class LisaFS else sectorSize = (int)_device.Info.SectorSize; - byte[] temp = new byte[file.length * sectorSize]; + var temp = new byte[file.length * sectorSize]; - int offset = 0; + var offset = 0; - for(int i = 0; i < file.extents.Length; i++) + for(var i = 0; i < file.extents.Length; i++) { byte[] sector; ErrorNumber errno = - !tags ? _device.ReadSectors((ulong)file.extents[i].start + _mddf.mddf_block + _volumePrefix, - (uint)file.extents[i].length, out sector) + !tags + ? _device.ReadSectors((ulong)file.extents[i].start + _mddf.mddf_block + _volumePrefix, + (uint)file.extents[i].length, out sector) : _device.ReadSectorsTag((ulong)file.extents[i].start + _mddf.mddf_block + _volumePrefix, (uint)file.extents[i].length, SectorTagType.AppleSectorTag, out sector); @@ -480,8 +495,10 @@ public sealed partial class LisaFS if(!tags) { if(_fileSizeCache.TryGetValue(fileId, out int realSize)) + { if(realSize > temp.Length) AaruConsole.ErrorWriteLine(Localization.File_0_gets_truncated, fileId); + } buf = temp; @@ -501,10 +518,7 @@ public sealed partial class LisaFS if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); switch(pathElements.Length) { @@ -515,7 +529,8 @@ public sealed partial class LisaFS return ErrorNumber.NoError; // Only V3 supports subdirectories - case > 1 when _mddf.fsversion != LISA_V3: return ErrorNumber.NotSupported; + case > 1 when _mddf.fsversion != LISA_V3: + return ErrorNumber.NotSupported; } if(_debug && pathElements.Length == 1) @@ -564,7 +579,7 @@ public sealed partial class LisaFS } } - for(int lvl = 0; lvl < pathElements.Length; lvl++) + for(var lvl = 0; lvl < pathElements.Length; lvl++) { string wantedFilename = pathElements[0].Replace('-', '/'); diff --git a/Aaru.Filesystems/LisaFS/Info.cs b/Aaru.Filesystems/LisaFS/Info.cs index 505cd4a5b..1b00a3e3c 100644 --- a/Aaru.Filesystems/LisaFS/Info.cs +++ b/Aaru.Filesystems/LisaFS/Info.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; public sealed partial class LisaFS { +#region IReadOnlyFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -55,7 +57,7 @@ public sealed partial class LisaFS int beforeMddf = -1; // LisaOS searches sectors until tag tells MDDF resides there, so we'll search 100 sectors - for(int i = 0; i < 100; i++) + for(var i = 0; i < 100; i++) { ErrorNumber errno = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag, out byte[] tag); @@ -89,17 +91,17 @@ public sealed partial class LisaFS }; AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Current_sector_0, i); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.mddf_block = {0}", infoMddf.mddf_block); - AaruConsole.DebugWriteLine(MODULE_NAME, "Disk size = {0} sectors", imagePlugin.Info.Sectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.mddf_block = {0}", infoMddf.mddf_block); + AaruConsole.DebugWriteLine(MODULE_NAME, "Disk size = {0} sectors", imagePlugin.Info.Sectors); AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.vol_size = {0} sectors", infoMddf.vol_size); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.vol_size - 1 = {0}", infoMddf.volsize_minus_one); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.vol_size - 1 = {0}", infoMddf.volsize_minus_one); AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.vol_size - mddf.mddf_block -1 = {0}", infoMddf.volsize_minus_mddf_minus_one); - AaruConsole.DebugWriteLine(MODULE_NAME, "Disk sector = {0} bytes", imagePlugin.Info.SectorSize); + AaruConsole.DebugWriteLine(MODULE_NAME, "Disk sector = {0} bytes", imagePlugin.Info.SectorSize); AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.blocksize = {0} bytes", infoMddf.blocksize); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.datasize = {0} bytes", infoMddf.datasize); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.datasize = {0} bytes", infoMddf.datasize); if(infoMddf.mddf_block != i - beforeMddf) return false; @@ -144,7 +146,7 @@ public sealed partial class LisaFS int beforeMddf = -1; // LisaOS searches sectors until tag tells MDDF resides there, so we'll search 100 sectors - for(int i = 0; i < 100; i++) + for(var i = 0; i < 100; i++) { ErrorNumber errno = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag, out byte[] tag); @@ -167,8 +169,8 @@ public sealed partial class LisaFS if(errno != ErrorNumber.NoError) continue; - var infoMddf = new MDDF(); - byte[] pString = new byte[33]; + var infoMddf = new MDDF(); + var pString = new byte[33]; infoMddf.fsversion = BigEndianBitConverter.ToUInt16(sector, 0x00); infoMddf.volid = BigEndianBitConverter.ToUInt64(sector, 0x02); @@ -183,7 +185,7 @@ public sealed partial class LisaFS infoMddf.unknown2 = sector[0x4F]; infoMddf.machine_id = BigEndianBitConverter.ToUInt32(sector, 0x50); infoMddf.master_copy_id = BigEndianBitConverter.ToUInt32(sector, 0x54); - uint lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x58); + var lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x58); infoMddf.dtvc = DateHandlers.LisaToDateTime(lisaTime); lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x5C); infoMddf.dtcc = DateHandlers.LisaToDateTime(lisaTime); @@ -250,14 +252,14 @@ public sealed partial class LisaFS infoMddf.vol_sequence = BigEndianBitConverter.ToUInt16(sector, 0x136); infoMddf.vol_left_mounted = sector[0x138]; - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown1 = 0x{0:X2} ({0})", infoMddf.unknown1); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown2 = 0x{0:X2} ({0})", infoMddf.unknown2); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown3 = 0x{0:X8} ({0})", infoMddf.unknown3); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown4 = 0x{0:X4} ({0})", infoMddf.unknown4); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown5 = 0x{0:X8} ({0})", infoMddf.unknown5); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown6 = 0x{0:X8} ({0})", infoMddf.unknown6); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown7 = 0x{0:X8} ({0})", infoMddf.unknown7); - AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown9 = 0x{0:X4} ({0})", infoMddf.unknown9); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown1 = 0x{0:X2} ({0})", infoMddf.unknown1); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown2 = 0x{0:X2} ({0})", infoMddf.unknown2); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown3 = 0x{0:X8} ({0})", infoMddf.unknown3); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown4 = 0x{0:X4} ({0})", infoMddf.unknown4); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown5 = 0x{0:X8} ({0})", infoMddf.unknown5); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown6 = 0x{0:X8} ({0})", infoMddf.unknown6); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown7 = 0x{0:X8} ({0})", infoMddf.unknown7); + AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown9 = 0x{0:X4} ({0})", infoMddf.unknown9); AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown10 = 0x{0:X8} ({0})", infoMddf.unknown10); AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown11 = 0x{0:X8} ({0})", infoMddf.unknown11); AaruConsole.DebugWriteLine(MODULE_NAME, "mddf.unknown12 = 0x{0:X8} ({0})", infoMddf.unknown12); @@ -333,9 +335,9 @@ public sealed partial class LisaFS break; } - sb.AppendFormat(Localization.Volume_name_0, infoMddf.volname).AppendLine(); - sb.AppendFormat(Localization.Volume_password_0, infoMddf.password).AppendLine(); - sb.AppendFormat(Localization.Volume_ID_0_X16, infoMddf.volid).AppendLine(); + sb.AppendFormat(Localization.Volume_name_0, infoMddf.volname).AppendLine(); + sb.AppendFormat(Localization.Volume_password_0, infoMddf.password).AppendLine(); + sb.AppendFormat(Localization.Volume_ID_0_X16, infoMddf.volid).AppendLine(); sb.AppendFormat(Localization.Backup_volume_ID_0, infoMddf.backup_volid).AppendLine(); sb.AppendFormat(Localization.Master_copy_ID_0, infoMddf.master_copy_id).AppendLine(); @@ -359,19 +361,19 @@ public sealed partial class LisaFS sb.AppendFormat(Localization._0_blocks_minus_one_minus_MDDF_offset, infoMddf.volsize_minus_mddf_minus_one). AppendLine(); - sb.AppendFormat(Localization._0_blocks_in_volume, infoMddf.vol_size).AppendLine(); + sb.AppendFormat(Localization._0_blocks_in_volume, infoMddf.vol_size).AppendLine(); sb.AppendFormat(Localization._0_bytes_per_sector_uncooked, infoMddf.blocksize).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_sector, infoMddf.datasize).AppendLine(); - sb.AppendFormat(Localization._0_blocks_per_cluster, infoMddf.clustersize).AppendLine(); - sb.AppendFormat(Localization._0_blocks_in_filesystem, infoMddf.fs_size).AppendLine(); - sb.AppendFormat(Localization._0_files_in_volume, infoMddf.filecount).AppendLine(); - sb.AppendFormat(Localization._0_blocks_free, infoMddf.freecount).AppendLine(); - sb.AppendFormat(Localization._0_bytes_in_LisaInfo, infoMddf.label_size).AppendLine(); - sb.AppendFormat(Localization.Filesystem_overhead_0, infoMddf.fs_overhead).AppendLine(); - sb.AppendFormat(Localization.Scavenger_result_code_0, infoMddf.result_scavenge).AppendLine(); - sb.AppendFormat(Localization.Boot_code_0, infoMddf.boot_code).AppendLine(); - sb.AppendFormat(Localization.Boot_environment_0, infoMddf.boot_environ).AppendLine(); - sb.AppendFormat(Localization.Overmount_stamp_0, infoMddf.overmount_stamp).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_sector, infoMddf.datasize).AppendLine(); + sb.AppendFormat(Localization._0_blocks_per_cluster, infoMddf.clustersize).AppendLine(); + sb.AppendFormat(Localization._0_blocks_in_filesystem, infoMddf.fs_size).AppendLine(); + sb.AppendFormat(Localization._0_files_in_volume, infoMddf.filecount).AppendLine(); + sb.AppendFormat(Localization._0_blocks_free, infoMddf.freecount).AppendLine(); + sb.AppendFormat(Localization._0_bytes_in_LisaInfo, infoMddf.label_size).AppendLine(); + sb.AppendFormat(Localization.Filesystem_overhead_0, infoMddf.fs_overhead).AppendLine(); + sb.AppendFormat(Localization.Scavenger_result_code_0, infoMddf.result_scavenge).AppendLine(); + sb.AppendFormat(Localization.Boot_code_0, infoMddf.boot_code).AppendLine(); + sb.AppendFormat(Localization.Boot_environment_0, infoMddf.boot_environ).AppendLine(); + sb.AppendFormat(Localization.Overmount_stamp_0, infoMddf.overmount_stamp).AppendLine(); sb.AppendFormat(Localization.S_Records_start_at_0_and_spans_for_1_blocks, infoMddf.srec_ptr + infoMddf.mddf_block + beforeMddf, infoMddf.srec_len).AppendLine(); @@ -383,17 +385,13 @@ public sealed partial class LisaFS metadata = new FileSystem(); if(DateTime.Compare(infoMddf.dtvb, DateHandlers.LisaToDateTime(0)) > 0) - { metadata.BackupDate = infoMddf.dtvb; - } metadata.Clusters = infoMddf.vol_size; metadata.ClusterSize = (uint)(infoMddf.clustersize * infoMddf.datasize); if(DateTime.Compare(infoMddf.dtvc, DateHandlers.LisaToDateTime(0)) > 0) - { metadata.CreationDate = infoMddf.dtvc; - } metadata.Dirty = infoMddf.vol_left_mounted != 0; metadata.Files = infoMddf.filecount; @@ -405,4 +403,6 @@ public sealed partial class LisaFS return; } } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/LisaFS/LisaFS.cs b/Aaru.Filesystems/LisaFS/LisaFS.cs index 9f1f3c82d..11096cdc2 100644 --- a/Aaru.Filesystems/LisaFS/LisaFS.cs +++ b/Aaru.Filesystems/LisaFS/LisaFS.cs @@ -40,21 +40,27 @@ namespace Aaru.Filesystems; /// Implements the Apple Lisa File System public sealed partial class LisaFS : IReadOnlyFilesystem { - bool _debug; - IMediaImage _device; - int _devTagSize; - MDDF _mddf; - bool _mounted; - SRecord[] _srecords; - ulong _volumePrefix; - Encoding _encoding; + const string MODULE_NAME = "LisaFS plugin"; + bool _debug; + IMediaImage _device; + int _devTagSize; + Encoding _encoding; + MDDF _mddf; + bool _mounted; + SRecord[] _srecords; + ulong _volumePrefix; + +#region IReadOnlyFilesystem Members /// public string Name => "Apple Lisa File System"; + /// public FileSystem Metadata { get; private set; } + /// public Guid Id => new("7E6034D1-D823-4248-A54D-239742B28391"); + /// public string Author => Authors.NataliaPortillo; @@ -66,22 +72,19 @@ public sealed partial class LisaFS : IReadOnlyFilesystem /// public Dictionary Namespaces => new() { - { - "workshop", "Filenames as shown by the Lisa Pascal Workshop (default)" - }, - { - "office", "Filenames as shown by the Lisa Office System (not yet implemented)" - } + { "workshop", "Filenames as shown by the Lisa Pascal Workshop (default)" }, + { "office", "Filenames as shown by the Lisa Office System (not yet implemented)" } }; +#endregion + static Dictionary GetDefaultOptions() => new() { - { - "debug", false.ToString() - } + { "debug", false.ToString() } }; - #region Caches +#region Caches + /// Caches Extents Files Dictionary _extentCache; /// Caches system files @@ -96,7 +99,6 @@ public sealed partial class LisaFS : IReadOnlyFilesystem List _printedExtents; /// Caches the creation times for subdirectories as to not have to traverse the Catalog File on each stat Dictionary _directoryDtcCache; - #endregion Caches - const string MODULE_NAME = "LisaFS plugin"; +#endregion Caches } \ No newline at end of file diff --git a/Aaru.Filesystems/LisaFS/Structs.cs b/Aaru.Filesystems/LisaFS/Structs.cs index d3af653dc..6c131f4f3 100644 --- a/Aaru.Filesystems/LisaFS/Structs.cs +++ b/Aaru.Filesystems/LisaFS/Structs.cs @@ -37,6 +37,231 @@ namespace Aaru.Filesystems; public sealed partial class LisaFS { +#region Nested type: CatalogEntry + + /// + /// An entry in the catalog from V3. The first entry is bigger than the rest, may be a header, I have not needed + /// any of its values so I just ignored it. Each catalog is divided in 4-sector blocks, and if it needs more than a + /// block there are previous and next block pointers, effectively making the V3 catalog a double-linked list. Garbage + /// is not zeroed. + /// + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct CatalogEntry + { + /// 0x00, seems to be 0x24 when the entry is valid + public byte marker; + /// 0x01, parent directory ID for this file, 0 for root directory + public ushort parentID; + /// 0x03, filename, 32-bytes, null-padded + public byte[] filename; + /// 0x23, null-termination + public byte terminator; + /// + /// At 0x24 0x01 here for subdirectories, entries 48 bytes long 0x03 here for entries 64 bytes long 0x08 here for + /// entries 78 bytes long This is incomplete, may fail, mostly works... + /// + public byte fileType; + /// 0x25, lot of values found here, unknown + public byte unknown; + /// 0x26, file ID, must be positive and bigger than 4 + public short fileID; + /// 0x28, creation date + public uint dtc; + /// 0x2C, last modification date + public uint dtm; + /// 0x30, file length in bytes + public int length; + /// 0x34, file length in bytes, including wasted block space + public int wasted; + /// 0x38, unknown + public byte[] tail; + } + +#endregion + +#region Nested type: CatalogEntryV2 + + /// + /// The catalog entry for the V1 and V2 volume formats. It merely contains the file name, type and ID, plus a few + /// (mostly empty) unknown fields. Contrary to V3, it has no header and instead of being a double-linked list it is + /// fragmented using an Extents File. The Extents File position for the root catalog is then stored in the S-Records + /// File. Its entries are not filed sequentially denoting some kind of in-memory structure while at the same time + /// forcing LisaOS to read the whole catalog. That or I missed the pointers. Empty entries just contain a 0-len + /// filename. Garbage is not zeroed. + /// + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct CatalogEntryV2 + { + /// 0x00, filename, 32-bytes, null-padded + public byte filenameLen; + /// 0x01, filename, 31-bytes + public byte[] filename; + /// 0x21, unknown + public byte unknown1; + /// 0x22, unknown + public byte fileType; + /// 0x23, unknown + public byte unknown2; + /// 0x24, unknown + public short fileID; + /// 0x26, 16 bytes, unknown + public byte[] unknown3; + } + +#endregion + +#region Nested type: Extent + + /// An extent indicating a start and a run of sectors. + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct Extent + { + public int start; + public short length; + } + +#endregion + +#region Nested type: ExtentFile + + /// + /// The Extents File. There is one Extents File per each file stored on disk. The file ID present on the sectors + /// tags for the Extents File is the negated value of the file ID it represents. e.g. file = 5 (0x0005) extents = -5 + /// (0xFFFB) It spans a single sector on V2 and V3 but 2 sectors on V1. It contains all information about a file, and + /// is indexed in the S-Records file. It also contains the label. Garbage is zeroed. + /// + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct ExtentFile + { + /// 0x00, filename length + public byte filenameLen; + /// 0x01, filename + public byte[] filename; + /// 0x20, unknown + public ushort unknown1; + /// 0x22, 8 bytes + public ulong file_uid; + /// 0x2A, unknown + public byte unknown2; + /// 0x2B, entry type? gets modified + public byte etype; + /// 0x2C, file type + public FileType ftype; + /// 0x2D, unknown + public byte unknown3; + /// 0x2E, creation time + public uint dtc; + /// 0x32, last access time + public uint dta; + /// 0x36, modification time + public uint dtm; + /// 0x3A, backup time + public uint dtb; + /// 0x3E, scavenge time + public uint dts; + /// 0x42, machine serial number + public uint serial; + /// 0x46, unknown + public byte unknown4; + /// 0x47, locked file + public byte locked; + /// 0x48, protected file + public byte protect; + /// 0x49, master file + public byte master; + /// 0x4A, scavenged file + public byte scavenged; + /// 0x4B, file closed by os + public byte closed; + /// 0x4C, file left open + public byte open; + /// 0x4D, 11 bytes, unknown + public byte[] unknown5; + /// 0x58, Release number + public ushort release; + /// 0x5A, Build number + public ushort build; + /// 0x5C, Compatibility level + public ushort compatibility; + /// 0x5E, Revision level + public ushort revision; + /// 0x60, unknown + public ushort unknown6; + /// 0x62, 0x08 set if password is valid + public byte password_valid; + /// 0x63, 8 bytes, scrambled password + public byte[] password; + /// 0x6B, 3 bytes, unknown + public byte[] unknown7; + /// 0x6E, filesystem overhead + public ushort overhead; + /// 0x70, 16 bytes, unknown + public byte[] unknown8; + /// 0x80, 0x200 in v1, file length in blocks + public int length; + /// 0x84, 0x204 in v1, unknown + public int unknown9; + /// + /// 0x88, 0x208 in v1, extents, can contain up to 41 extents (85 in v1), dunno LisaOS maximum (never seen more + /// than 3) + /// + public Extent[] extents; + /// 0x17E, unknown, empty, padding? + public short unknown10; + /// + /// At 0x180, this is the label. While 1982 pre-release documentation says the label can be up to 448 bytes, v1 + /// onward only have space for a 128 bytes one. Any application can write whatever they want in the label, however, + /// Lisa Office uses it to store its own information, something that will effectively overwrite any information a user + /// application wrote there. The information written here by Lisa Office is like the information Finder writes in the + /// FinderInfo structures, plus the non-unique name that is shown on the GUI. For this reason I called it LisaInfo. I + /// have not tried to reverse engineer it. + /// + public byte[] LisaInfo; + } + +#endregion + +#region Nested type: LisaDirNode + + sealed class LisaDirNode : IDirNode + { + internal string[] _contents; + internal int _position; + + #region IDirNode Members + + /// + public string Path { get; init; } + + #endregion + } + +#endregion + +#region Nested type: LisaFileNode + + sealed class LisaFileNode : IFileNode + { + internal short _fileId; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: MDDF + /// /// The MDDF is the most import block on a Lisa FS volume. It describes the volume and its contents. On /// initialization the memory where it resides is not emptied so it tends to contain a lot of garbage. This has @@ -201,7 +426,7 @@ public sealed partial class LisaFS public byte write_protected; /// Master disk (On-disk position unknown) public byte master; - #pragma warning restore CS0649 + #pragma warning restore CS0649 /// Copy disk (On-disk position unknown) public byte copy; /// No idea (On-disk position unknown) @@ -210,146 +435,9 @@ public sealed partial class LisaFS public byte scavenge_flag; } - /// - /// An entry in the catalog from V3. The first entry is bigger than the rest, may be a header, I have not needed - /// any of its values so I just ignored it. Each catalog is divided in 4-sector blocks, and if it needs more than a - /// block there are previous and next block pointers, effectively making the V3 catalog a double-linked list. Garbage - /// is not zeroed. - /// - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct CatalogEntry - { - /// 0x00, seems to be 0x24 when the entry is valid - public byte marker; - /// 0x01, parent directory ID for this file, 0 for root directory - public ushort parentID; - /// 0x03, filename, 32-bytes, null-padded - public byte[] filename; - /// 0x23, null-termination - public byte terminator; - /// - /// At 0x24 0x01 here for subdirectories, entries 48 bytes long 0x03 here for entries 64 bytes long 0x08 here for - /// entries 78 bytes long This is incomplete, may fail, mostly works... - /// - public byte fileType; - /// 0x25, lot of values found here, unknown - public byte unknown; - /// 0x26, file ID, must be positive and bigger than 4 - public short fileID; - /// 0x28, creation date - public uint dtc; - /// 0x2C, last modification date - public uint dtm; - /// 0x30, file length in bytes - public int length; - /// 0x34, file length in bytes, including wasted block space - public int wasted; - /// 0x38, unknown - public byte[] tail; - } +#endregion - /// An extent indicating a start and a run of sectors. - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct Extent - { - public int start; - public short length; - } - - /// - /// The Extents File. There is one Extents File per each file stored on disk. The file ID present on the sectors - /// tags for the Extents File is the negated value of the file ID it represents. e.g. file = 5 (0x0005) extents = -5 - /// (0xFFFB) It spans a single sector on V2 and V3 but 2 sectors on V1. It contains all information about a file, and - /// is indexed in the S-Records file. It also contains the label. Garbage is zeroed. - /// - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct ExtentFile - { - /// 0x00, filename length - public byte filenameLen; - /// 0x01, filename - public byte[] filename; - /// 0x20, unknown - public ushort unknown1; - /// 0x22, 8 bytes - public ulong file_uid; - /// 0x2A, unknown - public byte unknown2; - /// 0x2B, entry type? gets modified - public byte etype; - /// 0x2C, file type - public FileType ftype; - /// 0x2D, unknown - public byte unknown3; - /// 0x2E, creation time - public uint dtc; - /// 0x32, last access time - public uint dta; - /// 0x36, modification time - public uint dtm; - /// 0x3A, backup time - public uint dtb; - /// 0x3E, scavenge time - public uint dts; - /// 0x42, machine serial number - public uint serial; - /// 0x46, unknown - public byte unknown4; - /// 0x47, locked file - public byte locked; - /// 0x48, protected file - public byte protect; - /// 0x49, master file - public byte master; - /// 0x4A, scavenged file - public byte scavenged; - /// 0x4B, file closed by os - public byte closed; - /// 0x4C, file left open - public byte open; - /// 0x4D, 11 bytes, unknown - public byte[] unknown5; - /// 0x58, Release number - public ushort release; - /// 0x5A, Build number - public ushort build; - /// 0x5C, Compatibility level - public ushort compatibility; - /// 0x5E, Revision level - public ushort revision; - /// 0x60, unknown - public ushort unknown6; - /// 0x62, 0x08 set if password is valid - public byte password_valid; - /// 0x63, 8 bytes, scrambled password - public byte[] password; - /// 0x6B, 3 bytes, unknown - public byte[] unknown7; - /// 0x6E, filesystem overhead - public ushort overhead; - /// 0x70, 16 bytes, unknown - public byte[] unknown8; - /// 0x80, 0x200 in v1, file length in blocks - public int length; - /// 0x84, 0x204 in v1, unknown - public int unknown9; - /// - /// 0x88, 0x208 in v1, extents, can contain up to 41 extents (85 in v1), dunno LisaOS maximum (never seen more - /// than 3) - /// - public Extent[] extents; - /// 0x17E, unknown, empty, padding? - public short unknown10; - /// - /// At 0x180, this is the label. While 1982 pre-release documentation says the label can be up to 448 bytes, v1 - /// onward only have space for a 128 bytes one. Any application can write whatever they want in the label, however, - /// Lisa Office uses it to store its own information, something that will effectively overwrite any information a user - /// application wrote there. The information written here by Lisa Office is like the information Finder writes in the - /// FinderInfo structures, plus the non-unique name that is shown on the GUI. For this reason I called it LisaInfo. I - /// have not tried to reverse engineer it. - /// - public byte[] LisaInfo; - } +#region Nested type: SRecord /// /// The S-Records File is a hashtable of S-Records, where the hash is the file ID they belong to. The S-Records @@ -372,49 +460,5 @@ public sealed partial class LisaFS public ushort flags; } - /// - /// The catalog entry for the V1 and V2 volume formats. It merely contains the file name, type and ID, plus a few - /// (mostly empty) unknown fields. Contrary to V3, it has no header and instead of being a double-linked list it is - /// fragmented using an Extents File. The Extents File position for the root catalog is then stored in the S-Records - /// File. Its entries are not filed sequentially denoting some kind of in-memory structure while at the same time - /// forcing LisaOS to read the whole catalog. That or I missed the pointers. Empty entries just contain a 0-len - /// filename. Garbage is not zeroed. - /// - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct CatalogEntryV2 - { - /// 0x00, filename, 32-bytes, null-padded - public byte filenameLen; - /// 0x01, filename, 31-bytes - public byte[] filename; - /// 0x21, unknown - public byte unknown1; - /// 0x22, unknown - public byte fileType; - /// 0x23, unknown - public byte unknown2; - /// 0x24, unknown - public short fileID; - /// 0x26, 16 bytes, unknown - public byte[] unknown3; - } - - sealed class LisaFileNode : IFileNode - { - internal short _fileId; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } - - sealed class LisaDirNode : IDirNode - { - internal string[] _contents; - internal int _position; - /// - public string Path { get; init; } - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/LisaFS/Super.cs b/Aaru.Filesystems/LisaFS/Super.cs index aa4e5bdc9..402c1381c 100644 --- a/Aaru.Filesystems/LisaFS/Super.cs +++ b/Aaru.Filesystems/LisaFS/Super.cs @@ -43,9 +43,11 @@ namespace Aaru.Filesystems; public sealed partial class LisaFS { +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { try { @@ -99,7 +101,7 @@ public sealed partial class LisaFS return errno; _mddf = new MDDF(); - byte[] pString = new byte[33]; + var pString = new byte[33]; _mddf.fsversion = BigEndianBitConverter.ToUInt16(sector, 0x00); _mddf.volid = BigEndianBitConverter.ToUInt64(sector, 0x02); @@ -114,7 +116,7 @@ public sealed partial class LisaFS _mddf.unknown2 = sector[0x4F]; _mddf.machine_id = BigEndianBitConverter.ToUInt32(sector, 0x50); _mddf.master_copy_id = BigEndianBitConverter.ToUInt32(sector, 0x54); - uint lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x58); + var lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x58); _mddf.dtvc = DateHandlers.LisaToDateTime(lisaTime); lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x5C); _mddf.dtcc = DateHandlers.LisaToDateTime(lisaTime); @@ -247,9 +249,7 @@ public sealed partial class LisaFS _directoryDtcCache = new Dictionary { - { - DIRID_ROOT, _mddf.dtcc - } + { DIRID_ROOT, _mddf.dtcc } }; // Read the Catalog File @@ -323,17 +323,13 @@ public sealed partial class LisaFS Metadata = new FileSystem(); if(DateTime.Compare(_mddf.dtvb, DateHandlers.LisaToDateTime(0)) > 0) - { Metadata.BackupDate = _mddf.dtvb; - } Metadata.Clusters = _mddf.vol_size; Metadata.ClusterSize = (uint)(_mddf.clustersize * _mddf.datasize); if(DateTime.Compare(_mddf.dtvc, DateHandlers.LisaToDateTime(0)) > 0) - { Metadata.CreationDate = _mddf.dtvc; - } Metadata.Dirty = _mddf.vol_left_mounted != 0; Metadata.Files = _mddf.filecount; @@ -400,13 +396,15 @@ public sealed partial class LisaFS stat.FreeFiles = FILEID_MAX - stat.Files; stat.Type = _mddf.fsversion switch - { - LISA_V1 => "LisaFS v1", - LISA_V2 => "LisaFS v2", - LISA_V3 => "LisaFS v3", - _ => stat.Type - }; + { + LISA_V1 => "LisaFS v1", + LISA_V2 => "LisaFS v2", + LISA_V3 => "LisaFS v3", + _ => stat.Type + }; return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/LisaFS/Xattr.cs b/Aaru.Filesystems/LisaFS/Xattr.cs index c3ece4f8a..827ffc26f 100644 --- a/Aaru.Filesystems/LisaFS/Xattr.cs +++ b/Aaru.Filesystems/LisaFS/Xattr.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; public sealed partial class LisaFS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber ListXAttr(string path, out List xattrs) { @@ -65,6 +67,8 @@ public sealed partial class LisaFS return isDir ? ErrorNumber.InvalidArgument : GetXattr(fileId, xattr, out buf); } +#endregion + /// Lists special Apple Lisa filesystem features as extended attributes /// Error number. /// File identifier. @@ -148,12 +152,14 @@ public sealed partial class LisaFS // Only MDDF contains an extended attributes if(fileId == FILEID_MDDF) + { if(xattr == "com.apple.lisa.password") { buf = Encoding.ASCII.GetBytes(_mddf.password); return ErrorNumber.NoError; } + } // But on debug mode even system files contain tags if(_debug && xattr == "com.apple.lisa.tags") diff --git a/Aaru.Filesystems/Localization/Localization.es.resx b/Aaru.Filesystems/Localization/Localization.es.resx index 12307042e..eae3441c2 100644 --- a/Aaru.Filesystems/Localization/Localization.es.resx +++ b/Aaru.Filesystems/Localization/Localization.es.resx @@ -1,3679 +1,3686 @@ - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + (acl): Activar ACLs POSIX - + Sistema de Ficheros de Disco Avanzado de Acorn - + Sistema de Ficheros de Disco Avanzado de Acorn - + Bloque raíz activo: {0} - + La instantánea activa tiene el ID {0}, en el nodo-i {1}, con {2} bloques reservados, y la lista empezando en el bloque {3} - + El contenedor de espacio administrativo comienza en el bloque {0} - + Sistema de ficheros de DOS de Alexander Osipov - + Asignar búferes secundarios de sonido y video en el arranque. - + Asignar búfer secundario de sonido en el arranque. - + Bloques de asignación del volumen HFS+: {0} - + El descriptor del mapa de bits de asignación comienza en el bloque {0} - + El Archivo de Asignación ocupa {0} bytes. - + Todas las copias de la FAT son iguales. - + La siguiente información puede ser incorrecta - + Sistema de ficheros de Amiga DOS - + Extensiones de Amiga presentes. - + Sistema de ficheros rápido de Amiga - + Sistema de ficheros rápido de Amiga con caché de directorio - + Sistema de ficheros rápido de Amiga con caracteres internacionales - + Sistema de ficheros rápido de Amiga con nombres de archivo largos - + Sistema de ficheros original de Amiga - + Sistema de ficheros original de Amiga con caché de directorio - + Sistema de ficheros original de Amiga con caracteres internacionales - + Sistema de ficheros original de Amiga con nombres de archivo largos - + Sistema de ficheros de DOS de Alexander Osipov - + Sistema de ficheros Apple (APFS) - + Sistema de ficheros de Apple DOS - + Sistema de ficheros Apple HFS+ - + Sistema de ficheros de Apple Macintosh - + Extensiones de Apple presentes. - + Sistema de ficheros Apple (APFS) - + Identificador de aplicación: {0} - + FAT12 de Apricot - + Protocolo de Intercambio de Atributos Arbitrarios presente. - + ASCII - + FAT12 de Atari - + FAT16 de Atari - + Sistema de ficheros de AtheOS - + Sistema de ficheros de AtheOS - + El Archivo de Atributos ocupa {0} bytes. - + El búfer de transmisión de audio tiene {0} bytes. - + La recomendación de edad para Australia es {0} - + Un archivo puede ocupar un máximo de {0} bytes - + Volumen vertebral - + El INDEXF.SYS;1 de respaldo está en el sector {0} (VBN {1}) - + Número de sencuencia de respaldo: {0} - + ID del volumen de respaldo: 0x{0:X16} - + Sistema de ficheros Be - + ¡¡¡ATENCIÓN!!! ¡La siguiente información podría estar completamente incorrecta! - + Sistema de ficheros de arranque de UNIX - + Big-endian - + BeFS big-endian - + Sistema de ficheros big-endian UFS de BorderWare - + Sistema de ficheros big-endian UFS2 - + Sistema de ficheros big-endian UFS - + La unidad BIOS es {0:X2}h - + Número de unidad BIOS: 0x{0:X2} - + La extensión del mapa de bits está en el bloque {0} - + El mapa de bits reside en el bloque {0} - + El mapa de bits comienza en el bloque {0} - + 1 << block_shift == block_size => 1 << {0} == {1} (debería ser {2}) - + El número del grupo del bloque es {0} - + Tamaño del bloque: {0} bytes - + SHA1 de la imagen de arranque: {0} - + La imagen de arranque comienza en el sector {0} y ocupa {1} sectores - + La imagen de arranque se cargará en 0x{0:X8} - + La imagen de arranque se cargará en el segmento {0:X4}h - + Arrancable en {0} - + El bloque de arranque apunta a {0} como el bloque raíz - + El área de arranque comienza en el bloque {0} - + Bloque de arranque: - + El bloque de arranque está en el nuevo formato. - + El bloque de arranque debe ejecutarse. - + Código de arranque: 0x{0:X8} - + El código de arranque corresponde a {0} - + SHA1 del código de arranque: {0} - + Entorno de arranque: 0x{0:X8} - + El descriptor del archivo de arranque comienza en el bloque {0} - + El archivo de arranque comienza en el bloque {0} y ocupa {1} bytes - + Opción de arranque: {0} - + El programa de arranque reside en el fichero "{0}" - + El programa de arranque comienza en el sector {0} y ocupa {1} sectores ({2} bytes) - + El programa de arranque se cargará en la dirección {0:X4}h - + Sección de arranque {0}: - + El volumen de arranque es inconsistente. - + Sistema de ficheros UFS de BorderWare - + (bsdgroups): Emular el comportamiento de BSD al crear nuevos ficheros - + Sistema de ficheros B-tree - + Sistema de ficheros B-tree - + Directorios cacheados: {0} - + No se pudo encontrar el directorio raíz... - + No se puede montar la versión {0} de LisaFS - + No se pudo leer en Archivo de Catálogo, error {0} - + No puede haber ficheros de más de 2GiB - + No puede haber ficheros de más de 2TiB (ext4) - + Puede usar índices de hash en los directorios - + Moldeando la FAT - + El Archivo de Catálogo ocupa {0} bytes. - + El catálogo comienza en el sector {0} de la pista {1} - + Sistema de ficheros de Commodore - + Sistema de ficheros de CD-i - + Extensiones CD-ROM XA presentes. - + canal - + Checksums: 0x{0:X4} y 0x{1:X4} - + Checksum: 0x{0:X4} (calculado 0x{1:X4}) - + Checksum: 0x{0:X8} - + El árbol de pedazos comienza en el LBA {0} - + Las comprobaciones de clasificación están activadas - + Volumen limpio - + Nombre del fichero del portapeles: {0} - + La pila de clústeres comienza en el sector {0}, contiene {1} clústeres y está usada al {2}% - + Clúster del directorio raíz: {0} - + Clúster donde empieza $MFTMirr: {0} - + Clúster donde empieza $MFT: {0} - + cmdload se cargará con el valor {0:X4}h - + CNID del directorio de arranque de Mac OS 8 ó 9: {0} - + CNID del directorio de arranque de Mac OS X: {0} - + CNID del directorio de arranque del sistema: {0} - + CNID del directorio de la primera aplicación a ejecutar: {0} - + CNID del directorio anteriormente abierto: {0} - + Sistema de ficheros de Coherent UNIX - + Consola Virtual de Commodore 64 - + Sistema de ficheros de Commodore: - + Funciones compatibles…: - + Funciones compatibles en sólo lectura…: - + Banderas compatibles: 0x{0:X} - + El contenedor tiene {0} bytes en {1} bloques. - + Contiene Descriptor Mejorado de Volumen. - + Contiene Descriptor de Partición de Volumen. - + Copyright: {0} - + No se pudo leer el bloque cabecera de dump(8) - + Código de país: {0} - + Sistema de ficheros de CP/M - + Sistema de ficheros de CP/M - + Sistema de ficheros Cram - + Sistema de ficheros Cram - + Creado el {0} - + Creando bloques de asignación. - + Fecha de creación: - + Código del SO creador: {0} - + Bloque raíz actual: {0} - + Sector actual = {0} - + El orden por CILINDROS aún no ha sido implementado. - + LBA del bloque de cilindros: {0} - + Ajusta del grupo de cilindros en cilindros: {0} - + Tamaño del grupo de cilindros: {0} bloques básicos - + LBA del área de sumario del grupo de cilindros: {0} - + LBA del grupo de sumario de cilindros: {0} - + Los límites DASD estaban en uso - + Los límites DASD están operacionales - + datos - + Los datos pueden residir en la entrada del directorio (ext4) - + Tamaño del grupo del fork de datos: {0} bytes - + Identificador del preparador de los datos: {0} - + Los datos comienzan en el bloque {0} - + Fechado el {0} - + Campo de fecha: año {0}, mes {1}, día {2}, hora {3}, minuto {4}. - + Fecha de la última comprobación de integridad: {0} - + Fecha de la última optimización: {0} - + Los ACLs DCE están activos - + El descriptor del depurador comienza en el bloque {0} - + Nombre de fichero del depurador: {0} - + (debug): Activar código de depuración - + Asignación por defecto: {0} bloques - + Opciones de montaje por defecto…: - + Predeterminados UID: {0}, GID: {1} - + La definición "{0}" tiene un directorio correcto - + La definición contiene un campo PAR-IMPAR, cuyo significado es desconocido, así que la detección puede ser incorrecta. - + Desentrelazando el volumen completo. - + Demo - + Código de densidad: {0} - + Descripción: {0} - + ID del desarrollador: {0} - + El dispositivo es demasiado pequeño - + El dispositivo usa entrelazado {0} a 1 por hardware - + UUID del dispositivo: {0} - + Diagnóstico - + La banda de directorio termina en el sector {0} - + La banda de directorio ocupa {0} sectores - + La banda de directorio comienza en el sector {0} - + La caché de directorio comienza en el bloque {0} - + El directorio que contiene los nodos-i de los ficheros pendientes de eliminación reside en el bloque {0} del grupo de asignación {1} y ocupa {2} bloques ({3} bytes) - + Tamaño del directorio: {0} clústeres - + El directorio comienza en el clúster {0} - + El directorio comienza en la pista {0} sector {1} - + Volumen no desmontado - + Nombre de fichero del desensamblador: {0} - + El disco arranca siguiendo las especificaciones {0}. - + El ID del disco es {0} - + El disco es un disco {0} - + El disco está preparado para la transmisión de audio - + El disco es el número {0} de un conjunto de múltiples discos - + La región del disco es {0} - + El disco contiene sectores dañados - + Tipo DOS del disco: {0} - + Versión DOS del disco: {0} - + El disco tiene un mapa de bits dañado - + ID del disco: {0} - + El disco tiene 192 PPP - + El disco tiene 384 PPP - + El disco tiene 48 PPP - + El disco tiene 96 ó 135 PPP - + El disco es de doble densidad - + El disco es de doble cara - + El disco pertenece al grupo {0} usuario {1} - + El disco pertenece al usuario {0} - + El disco es de densidad sencilla - + El disco es de una cara - + Nombre del disco: {0} - + El disco rota {0} veces por segundo ({1}rpm) - + La superficie del disco debería comprobarse en el próximo montaje. - + Versión del disco: {0} - + Volumen del disco número {0} - + Desconocemos como gestionar el orden COLUMBIA, no procedemos con esta definición. - + Desconocemos como gestionar el orden EAGLE, no procedemos con esta definición. - + DOS (8.3 todo mayúsculas) - + Versión de DOS: {0} - + Número de la unidad: 0x{0:X2} - + Número de serie de la unidad: 0x{0:X8} - + DR-DOS arrancará este FAT32 usando CHS. - + DR-DOS arrancará este FAT32 usando LBA. - + Dispositivo volcado: {0} - + Nombre del sistema de ficheros volcado: {0} - + Volcado creado el {0} - + Nombre del host del volcado: {0} - + Etiqueta del volcado: {0} - + Nivel de volcado: {0} - + Extensión dump(8) - + Número del volumen volcado: {0} - + EBCDIC - + ECMA-67 - + ECMA-67 - + Extensión del Sistema de Ficheros de Extents (EFS) - + INFORMACIÓN DE EL TORITO: - + ------------------------- - + Entrada {0}: - + Época alta {0} - + Epoca baja {0} - + Error {0} leyendo el fichero de Registros-S - + ERROR: No se pudo encontrar el descriptor primario de volumen - + La recomendación de edad del ESRB es {0} - + Tamaño de la cola de eventos: {0} - + Excepción {0}, {1}, {2} - + Excepción leyendo archivo de audio de CD-i - + Tabla de Asignación de Archivos Extendida de Microsoft (exFAT) - + Sistemas de ficheros de Linux extendidos 2, 3 y 4 - + Sistema de ficheros ext2 - + Sistema de ficheros ext2 (antiguo) - + Sistema de ficheros ext3 - + Sistema de ficheros ext4 - + Los atributos extendidos puede residir en el nodo-i (ext4) - + Extensión: {0} - + El Archivo de Extents ocupa {0} bytes. - + Sistema de ficheros de Linux extendido - + Sistema de ficheros ext - + Sistema de ficheros F2FS - + Extensión F2FS - + Las FATs están desincronizadas. Se usará la FAT nº {0}. - + Sistema de ficheros FATX - + La FAT y el directorio se cachearan en la dirección {0:X4}h - + La FAT ocupa {0} sectores - + Tabla de Asignacion de Ficheros de Microsoft (FAT) - + FAT+ - + Sistema de Ficheros Rápido de BSD (o Sistema de Ficheros de UNIX, UFS) - + El sistema de ficheros contiene {0} "bloques grandes" ({1} bytes) - + Sistema de ficheros creado en Linux - + Endianada del sistema de ficheros: 0x{0:X8} (debería ser 0x42494745) - + El sistema de ficheros tiene {0} "bloques grandes" libres ({1} bytes) - + El sistema de ficheros tiene {0} nodos-i sin usar - + El sistema de ficheros ha sido montado por un IFS antigup - + El sistema de ficheros no ha sido optimizado nunca - + La integridad del sistema de ficheros nunca ha sido comprobada - + El sistema de ficheros usa big endian - + El sistema de ficheros está limpio. - + El sistema de ficheros no fue desmontado correctamente. - + El sistema de ficheros usa little endian - + El sistema de ficheros es de sólo lectura - + Nombre del sistema de ficheros: {0} - + Carga extra del sistema de ficheros: {0} - + Revisión del sistema de ficheros: {0}.{1} - + La revisión del sistema de ficheros es {0}.{1:D2} - + Tamaño del sistema de ficheros: {0} bloques básicos - + Estado del sistema de ficheros: {0:X4} - + Tipo del sistema de ficheros: {0} - + Sistema de ficheros versión {0} - + Versión del sistema de ficheros: {0}.{1}. - + La versión del sistema de ficheros es {0}. - + El sistema de ficheros se formateo rápidamente - + El sistema de ficheros minimizará el tiempo de asignación - + El sistema de ficheros minimizará la fragmentación del volumen - + Los ficheros deben ser borrados o sobrescritos cuando son eliminados - + Tipo de fichero en las entradas de directorio - + El fichero {0} queda truncado. - + Protección de fichero: 0x{0:X4} - + DESCRIPTOR DE INFORMACIÓN DE LA ESTRUCTURA DE FICHEROS DEL VOLUMEN: - + ------------------------------------------------------------------- - + El sistema de ficheros fue inicializado por la versión de DOS {0} - + Tipo del sistema de ficheros: "{0}" (debería ser "HPFS ") - + Fichero truncado en el bloque {0} - + Nombre de fichero del Finder: {0} - + Información del Finder: - + La recomendación de edad en Finlandia es {0} - + La primera partición {0} comienza en el sector {1} - + El primer bloque de asignación (nº 2) comienza en el sector {0}. - + El primer grupo de cilindros comienza en el bloque {0} - + LBA del primer bloque de datos: {0} - + Primera zona de datos: {0} - + La primera zona de datos es {0} - + El primer bloque del directorio parece correcto. - + Primer directorio del sector: {0} - + El segmento del directorio comienza en el bloque {0} - + El primer bloque erróneo es el {0} y el último es el {1} - + La primera función fallida es "{0}" y la última es "{1}" - + El primer nodo-i erróneo es el {0} y el último es el {1} - + El primer error ocurrió el {0}, el último el {1} - + La primera FAT empieza en el sector {0} y ocupa {1} sectores - + El primer bloque libre es el {0} - + El primer nodo-i libre es el {0} - + El primer nodo-i es el {0} - + Primera zona del núcleo: {0} - + El primer grupo de metabloques es el {0} - + Primer programa a ejecutar en el arranque: {0} - + El primer bloque usado es el {0} - + El primer búfer del volumen empieza en el {0} - + Banderas: - + Banderas: 0x{0:X} - + Banderas: 0x{0:X8} - + Banderas…: - + La localización del grupo de metadatos del bloque es flexible (ext4) - + Sistema de ficheros Fossil - + Extensión para el sistema de ficheros Fossil - + Encontrado superbloque Amstrad. - + Encontrado identificador de disquete de CP/M-86. - + Encontrado superbloque de disco duro de CP/M-86. - + Encontrado nombre de fichero vacío en {0} - + Encontrado nombre de fichero vacío en el directorio raíz - + Encontrado paramétro de tipo desconocido {0} - + Encontrado descriptor de volumen suplementario desconocido - + La cuarta partición {0} comienza en el sector {1} - + La lista de bloques libres está bloqueada - + fsck en progreso - + La FST comienza en el sector {0} y ocupa {1} bytes - + Versión funcional: {0} - + Gamecube - + La recomendación de edad en Alemania es {0} - + Número de Sistema de Ficheros Global: {0} - + Número de paquete de Sistema de Ficheros Global: {0} - + Tabla de grupo descriptor de checksums y nodos-i dispersos - + El descriptor de grupo ocupa {0} bytes - + Adivinado como 42BSD FFS - + Adivinado como 43BSD FFS - + Adivinado como 44BSD FFS - + Adivinado como SunOS FFS - + Adivinado como SunOS/x86 FFS - + Adivinado como UFS - + Sistema de ficheros HAMMER - + Sistema de ficheros HAMMER - + Entrelazado de sectores por hardware: {0} - + Semilla del hash: {0:X8}{1:X8}{2:X8}{3:X8}, versión {4} - + Tiene bloques de atributos extendidos - + Tiene registro (ext3) - + Tiene el registro en otro dispositivo (ext3) - + Tiene reservas de redimensionado en línea - + La cabeza cambia después de cada pista entera - + La cabeza cambia después de una cara completa - + Tamaño de la pila con 128KiB de RAM: {0} bytes - + Tamaño de la pila con 256KiB de RAM: {0} bytes - + Tamaño de la pila con 512KiB o más de RAM: {0} bytes - + Sistema de ficheros HFSX. - + Sistema de ficheros HFS. - + HFS usa 512 bytes por sector pero el dispostiivo usa 2048 bytes por sector. - + La estructura más alta del volumen tiene nivel {0}, revisión {1} - + La marca de nivel máximo se desactivará - + Sistema de ficheros del Formato High Sierra - + Hay revisiones en uso - + Sistema de ficheros de alto rendimiendo de OS/2 - + Versión HPFS: {0} - + Sistema de ficheros óptico de alto rendimiento - + Format de Intercambio Lógico de HP - + FAT12 de Human68k - + FAT16 de Human68k - + Identificado como {0} - + Identificador: {0} - + ID: {0}, versión {1} - + La imagen contiene controladores ATAPI - + La imagen contiene controladores SCSI - + La imagen emula un disquete de 3,5" de densidad extra (MF2ED, 2,88Mb) - + La imagen emula un disquete de 5,25" de alta densidad (MD2HD, 1,2Mb) - + La imagen emula un disquete de 3,5" de alta densidad (MF2HD, 1,44Mb) - + La imagen no usa emulación - + La imagen usa un tipo de emulación desconocido ({0}) - + Tiene un mapa entre nodos-i y AFS (tabla de nodos-i i-mágicos) - + Implementación que montó el volumen por última vez: "{0}". - + Funciones incompatibles…: - + Banderas incompatibles: 0x{0:X} - + Sistema de ficheros UFS en big-endian sin completar la inicialización - + Sistema de ficheros UFS sin completar la inicialización - + Tamaño incorrecto del dispositivo. - + MDDF incorrecto encontrado - + Tamaño del sector incorrecto - + Los índices de los nodos-i residen en el bloque {0} del grupo de asignación {1} y ocupan {2} bloques ({3} bytes) - + Tamaño de los índices de nodos-i: {0} bloques (debería ser 1) - + Entrada inicial: - + LBA del bloque de nodo-i: {0} - + La caché de nodo-i está bloqueada - + La lista de nodos-i ocupa {0} bloques - + INOPB: 0x{0:X8} - + Instalar límites DASD - + Sistema de ficheros ISO9660 - + Intentaré adivinar cuál es, pero si no es UFS2, probablemente me equivoque - + La recomendación de edad en Japón es {0} - + Sistema de ficheros JFS - + Extensión JFS - + Extensiones Joliet presentes. - + DESCRIPTOR JOLIET DE INFORMACIÓN DEL VOLUMEN: - + --------------------------------------------- - + Tipo de respaldo del registro: {0} - + (journal_data): Registrar datos y metadatos - + (journal_data_ordered): Escribir los datos antes de registrar los metadatos - + (journal_data_writeback): Escribir el registro antes que los datos - + El registro tiene el nodo-i {0} - + El registro está en el dispositivo {0} - + El registro necesita recuperación (ext3) - + El registro reside en el bloque {0} del grupo de asignación {1} y ocupa {2} bloques ({3} bytes) - + El registro comienza en el bloque de asignación {0}. - + El registro comienza en el byte {0} y termina en el byte {1} - + El registro comienza en el byte {0} y ocupa {1} bytes en {2} bloques - + UUID del registro: {0} - + La recomendación de edad en Corea es {0} - + Las etiquetas residen en el bloque {0} - + Último clúster asignado: {0} - + Fecha del último respaldo: {0} - + Comprobado por última vez el {0} - + Comprobado por última vez el {0} (debería comprobarse cada {1} segundos) - + Fecha de la última comprobación: {0} - + Último nodo-i asignado: {0} - + Fecha de la última modificación: {0} - + Montado por última vez en: "{0}" - + Montado por última vez el {0} - + El último nodo-i huérfano es el {0} - + Última copia del directorio raíz: {0} - + Último grupo de cilindros buscado: {0} - + Las opciones de montaje usadas por última vez fueron: {0} - + Escrito por última vez el {0} - + Identificador LIF: {0} - + Extensión del formato de intercambio lógico de HP - + Versión LIF: {0} - + Lista vinculada de sistemas de ficheros: 0x{0:X8} - + Little-endian - + BeFS little-endian - + Cargar {0} sectores a partir del sector {1} - + Cargar en 0x{0:X8} y saltar a 0x{1:X8} - + Sistema de ficheros Locus - + Sistema de ficheros Locus (antiguo) - + Extensión del sistema de ficheros Locus - + El árbol de registro comienza en el LBA {0} - + Tamaño de la zona de registro: {0} - + Nombres de archivo largos - + La estructura más baja en el volumen tiene nivel {0}, revisión 1} - + ID de Mac OS X del volumen: {0:X8}{1:X8} - + mágico: "{0}" - + mágico 0x{0:X8} (se esperaba 0x{1:X8}) - + mágico en {0} = 0x{1:X8} (se esperaba 0x{2:X8}) - + mágico en {0} = 0x{1:X8} (se esperaba 0x{2:X8} ó 0x{3:X8}) - + mágico en {0} = 0x{1:X8} ó 0x{2:X8} (se esperaba 0x{3:X8} ó 0x{4:X8}) - + mágico en 0x{0:X8} (se esperaba 0x{1:X8}) - + mágico en 0x{0:X3} = 0x{1:X8} (se esperaba 0x{2:X8}) - + mágico en 0x{0:X3} = 0x{1:X8} (se esperaba 0x{2:X8} ó 0x{3:X8}) - + mágico en {1} = 0x{0:X8} - + mágico = 0x{0:X16) (se esperaba 0x{1:X16}) - + Mágico 1: 0x{0:X8} (debería ser 0x42465331) - + Mágico 3: 0x{0:X8} (debería ser 0x15B6830E) - + Mágico 2: 0x{0:X8} (debería ser 0xDD121031) - + ID del creador: {0} - + Nombre del creado: {0} - + ID de la copia maestra: 0x{0:X8} - + Bloque del Directorio Maestro: - + Consola Virtual Master System - + El tamaño máximo del fichero es de {0} bytes ({1} MiB) - + Longitud máxima de un vínculo simbólico: {0} - + Número máximo de archivos abiertos: {0} - + Tamaño máximo de la zona: {0} - + El MDDF está en el bloque {0} - + Descriptor del medio: 0x{0:X2} - + Consola Virtual Mega Drive - + El registro de memoria comienza en {0} - + Sistema de ficheros MicroDOS - + Sistema de ficheros MicroDOS - + exFAT de Microsoft - + FAT12 de Microsoft - + FAT16 de Microsoft - + FAT32 de Microsoft - + Sistema de ficheros resiliente de Microsoft - + Sistema de ficheros Minix - + Sistema de ficheros Minix 3 v1 - + Sistema de ficheros Minix 3 v2 - + Sistema de ficheros Minix v1 - + Sistema de ficheros Minix v2 - + Sistema de ficheros Minix v3 - + Más de 32000 entradas de directorio (ext4) - + Montando LisaFS v1 - + Montando LisaFS v2 - + Montando LisaFS v3 - + Consola Virtual MSX o demo WiiWare - + Multimedia activo - + Protección multi-montaje (ext4) - + Sistema de ficheros jerárquico de Apple (HFS) - + Consola Virtual Neo-Geo - + Consola Virtual NES - + Nueva versión - + Siguiente bloque de asignación: {0}. - + La búsqueda del siguiente nodo-i libre comenzará en el nodo-i {0} - + Siguiente QID: {0} - + Siguiente bloque raíz: {0} - + Siguiente CNID sin usar: {0} - + Siguiente número de fichero sin usar: {0} - + Volumen NFS - + Sistemas de ficheros NILFS2 - + Extensión NILFS2 - + NINDIR: 0x{0:X8} - + Sistemas de ficheros ópticos de Nintendo - + cualquier región - + Australia - + Francia - + Alemania - + Italia - + Japón - + Corea - + PAL - + Rusia - + España - + Taiwán - + código desconocido de región '{0}' - + EEUU - + Consola Virtual Nintendo 64 - + Disco óptico de Nintendo GameCube - + Sistema de ficheros óptico de NIntendo - + Disco óptico de Nintendo Wii - + No es un sistema de ficheros ext2/3/4 - + No es un sistema de ficheros Lisa - + No es un sistema de ficheros UFS, ¡no debería haber llegado aquí! - + No es arrancable - + NSPF: 0x{0:X8} - + Sistema de ficheros de nueva tecnología (NTFS) - + Banderas NT: 0x{0:X2} - + Estructura en disco Ficheros-11 - + Nombre OEM: {0} - + Parámetros OEM: {0} - + Antiguo dump(8) de 16-bits - + Versión del sistema de ficheros en disco: {0} - + Ante los errores, continuar - + Ante los errores, entrar en pánico - + Ante los errores, remontar en sólo lectura - + Ante los errores el sistema de ficheros hará algo desconocido ({0}) - + Extensión del sistema de ficheros Opera - + Sistema de ficheros de un disco Opera. - + Atributo extendido .LONGNAME de OS/2 - + Fichero de bloques aleatorios de OS-9 - + Marca de sobremontaje: 0x{0:X16} - + Nombre de paquete: {0} - + Las particiones no están soportadas. - + Desplazamiento de la partición: {0} - + Sistema de ficheros U.C.S.D. Pascal - + Opciones del descriptor de ruta: {0} - + ¡La table de rutas y el DVP no apuntan al mismo lugar para el directorio raíz! - + Extension de PC Engine CD - + Extensión de PC-FX - + Ejecutable de PC-FX - + La recomendación de edad PEGI es {0} - + Sistema de ficheros profesional - + Nombre del volumen físico: {0} - + La recomendación de edad en Portugal es {0} - + Volcado anterior creado el {0} - + Pre-asignar directorios - + Procesando DV vuelta nº {0} - + Sistema de ficheros de Apple ProDOS - + ProDOS usa 512 bytes por sector y el dispositivo usa 2048. - + Se requiere al menos la versión 1 de ProDOS para leer este volumen. - + Se usó la versión 1 de ProDOS para crear este volumen. - + Sistema de ficheros profesional v1 - + Sistema de ficheros profesional v2 - + Sistema de ficheros profesional v3 - + Promocional o Consola Virtual TurboGrafx - + Publicado por {0} - + Identificador del publicador: {0} - + DVP no apunta a un directorio raíz correcto, comprobando tabla de rutas... - + Sistema de ficheros QNX4 - + Extensión QNX4 - + Sistema de ficheros QNX6 (Audi) - + Sistema de ficheros QNX6 - + Extensión QNX6 - + Paso RAID: {0} - + Extensión del archivo de acceso aleatorio de OS-9 - + Las lecturas deberían verificarse - + Leyendo BPB - + Leyendo directorio. - + Leyendo FAT12 - + Leyendo FAT16 - + Leyendo FAT32 - + Leyendo directorio raíz - + Leyendo sector {0} - + Leyendo superbloque - + Banderas compatibles en sólo lectura: 0x{0:X} - + Volumen de sólo lectura - + Protección de registro: 0x{0:X4} - + Volcados reducidos de grupos de bloques - + Número de superbloques reducidos - + Extensión del sistema de ficheros resiliente - + Extensión del sistema de ficheros Reiser 4 - + Sistema de ficheros Reiser 3.5 - + Sistema de ficheros Reiser 3.6 - + Sistema de ficheros Reiser 4 - + Sistema de ficheros Reiser Jr. - + Extensión del sistema de ficheros Reiser - + Volumen extraíble - + El superbloque de reemplazo reside en el bloque {0} - + Volumen replicado - + Atributos reservados establecidos: {0:X2} - + Tamaño del grupo del fork de recursos: {0} bytes - + Resincronizar límites DASD - + Protocolo de Intercambio Rock Ridge presente. - + El checksum del bloque raíz es 0x{0:X8} - + El bloque raíz de extensión reside en el bloque {0} - + Tamaño del bloque del directorio raíz: {0} bytes - + El descriptor del directorio raíz comienza en el bloque {0} - + Identificador del directorio raíz: 0x{0:X8} - + El directorio raíz reside en el bloque {0} - + El directorio raíz reside en el nodo-i {0} - + Tamaño del directorio raíz: {0} bloques, {1} bytes - + El directorio raíz comienza en el clúster {0} - + Tamaño del nodo-i de la carpeta raíz: {0} bloques (debería ser 1) - + El nodo-i del directorio raíz reside en el bloque {0} del grupo de asignación {1} y ocupa {2} bloques ({3} bytes) - + El nodo raíz del árbol-B de extents reside en el bloque {0} - + El nodo raíz del árbol-B de objetos reside en el bloque {0} - + El contenedor raíz de objetos empieza en el bloque {0} - + La raíz reside en el nodo-i {0} - + La raíz empieza en el fragmento {0} - + El árbol raíz empieza en el LBA {0} - + Novel RPS: {0} - + Sistema de ficheros RT-11 - + Código de resultado del carroñero: 0x{0:X8} - + Buscando el bloque raíz en el sector {0} - + El bloque hogar secundario está en el sector {0} (VBN {1}) - + La segunda partición {0} empieza en el sector {1} - + Se está usando la 2ª FAT - + La 2ª FAT comienza en {0} - + ID de sección: {0} - + Máximo de {0} sectores asginados en una pista - + Sector {0}, ID de fichero 0x{1:X4} - + Sector del directorio de ACL: {0} - + Sector del bloque de parámetros FAT32 de respaldo: {0} - + Sector de la lista de bloques dañados: {0} - + Sector del directorio de páginas de código: {0} - + Sector del mapa de bits de banda de directorio: {0} - + Sector del primer bloque de asignación: {0} - + Sector de los mapas de bits de espacio libre: {0} - + Sector de la estructura FSINFO: {0} - + Sector del directorio de revisiones: {0} - + Sector del nodo-F del directorio raíz: {0} - + Sesgo del sector 0: {0} por pista - + Máscara de seguridad: 0x{0:X8} - + Tipo de criterio de selección: {0} - + Serie: 0x{0:X16} - + Número de serie: 0x{0:X8} - + Número de serie del ordenador Lisa que puede usar el software de este volumen: {0} - + Número de serie del ordenador Lisa que creó este volumen: {0} - + Set-uid y set-gid están desactivados - + SmartFileSystem - + Sistema de ficheros de extents de SGI - + La cara 1 usa entrelzado {0} a 1 por software - + La cara 0 usa entrelzado {0} a 1 por software - + Firma: 0x{0:X2} - + El hash firmado de directorio está en uso - + Tamaño de los bloques de asignación: {0} bytes - + Sesgo: {0} - + SmartFileSystem - + Sistema de ficheros Solar_OS - + Sistema de ficheros Solar_OS - + Origen: {0} - + CRC32 del Bloque Reserva: {0:X8} - + Mágico 1 del Bloque Reserva: 0x{0:X8} (debería ser 0xF9911849) - + Mágico 2 del Bloque Reserva: 0x{0:X8} (debería ser 0xFA5229C5) - + Los bloques dispersos de directorio están en uso - + Sistema de ficheros Squash - + Sistema de ficheros Squash - + LBA del superbloque estándar: {0} - + Bloque de comienzo del volumen HFS+: {0} - + El archivo de arranque ocupa {0} bytes. - + Nombre de fichero de la pantalla de arranque: {0} - + CRC32 del SuperBloque: {0:X8} - + El superbloque ocupa {0} bytes - + El superbloque está siendo modificado - + El superbloque se modificó por última vez el {0} - + El superbloque se actualizó por última vez el {0} - + LBA del superbloque: {0} - + Mágica 1 del superbloque: 0x{0:X8} (debería ser 0xF995E849) - + Mágica 2 del superbloque: 0x{0:X8} (debería ser 0xFA53E9C5) - + El superbloque reside en el bloque {0} - + El superbloque parece corrupto, la siguiente información podría ser incorrecta - + Consola Virtual Super Nintendo - + Soporta marcas de tiempo al nanosegundo y tiempo de creación (ext4) - + Soporta volúmenes de más de 2^32 bloques (ext4) - + Nombre de fichero del sistema: {0} - + La pila del sistema se extenderá {0} bytes y una {1} fracción de la RAM disponible - + Identificador del sistema: - + Sistema, dueño, grupo, mundo - + Tipo de sistema: 0x{0:X2} - + INFORMACIÓN DEL PROTOCOLO DE USO COMPARTIDO DE SISTEMA: - + ------------------------------------------------------- - + El Procolo de Uso Compartido de Sistema está presente. - + Sistema de ficheros System V Release 2 - + Sistema de ficheros System V Release 4 - + Sistema de ficheros UNIX System V - + Los registros-S empiezan en el sector {0} y ocupan {1} bloques - + Hay {0} bloques reservados antes del volumen - + Hay un estimado de {0} nodos-i libres antes de comenzar la siguiente búsqueda - + Hay muchas variantes de UFS usando valores superpuestos en los mismos campos - + Hay bloques dañados en el archivo de extents. - + No hay nodos-i huérfanos. - + Hay CNIDs reutilizadas. - + La siguiente información podría ser incorrecta para este volumen. - + La tercera partición {0} empieza en el sector {1} - + El bloque hogar está en el sector {0} (VBN {1}) - + Este es un disco de SegaCD / MegaCD. - + Este es un disco de Sega Dreamcast. - + Este es un disco de Sega Saturn. - + Este es el paquete primario - + Puede no ser HPFS, la siguiente información podría no ser correcta. - + Este superbloque reside en el bloque físico {0}. - + Está versión no está soportada aún. - + Este volumen podría esta corrupto. - + Título: {0} - + Sector {0} ({1:X2}:{2:X2}:{3:X2}), sin procesar, modo {4} - + Sector {0} ({1:X2}:{2:X2}:{3:X2}), sin procesar, modo 2 forma 4}, fichero número {5}, canal número {6}, submodo {7}, información de codificación {8} - + Sector {0}, procesado, modo 2 forma {1}, fichero número {2}, canal número {3}, submodo {4}, información de codificación {5} - + Sector {0}, procesado, modo 2 forma 2 - + Sector {0}, procesado, modo 0, 1 ó 2 forma 1 - + Sector {0}, sin procesar, audio - + La asignación de pistas es hacia adelante - + La asignación de pistas es hacia atrás - + Recorriendo el directorio. - + Intentando todas las definiciones conocidas. - + Intentando definición "{0}" - + Intentando cargar las definicones. - + Consola Virtual TurboGrafx CD - + Formato de Disco Universal - + Sistema de ficheros UFS2 - + Sistema de ficheros UFS - + (uid16): Desactivar UIDs y GIDs de 32-bits - + La recomendación de edad en Reino Unido es {0} - + No se pudo cachear todos los ficheros. - + No se pudieron leer los bloques de arranque - + No se pudo leer el cargador de arranque - + No se pudo leer el catálogo. - + No se pudo leer el MDDF - + No se pudo leer el fichero de registros-S - + No se pudo leer el mapa de bits del volumen - + mágico sin alinear: "{0}" - + El dispositivo usado no soporta las etiquetas Lisa - + El medio usado tenía errores - + Sistema de ficheros UNICOS - + Extensión del sistema de ficheros UNICOS - + Formato de Disco Universal - + Sistema de ficheros de UNIX 7ª edición - + Sistema de ficheros de arranque de UNIX - + Código de arranque desconocido. - + Desconocida - + Funciones compatibles desconocidas: {0:X8} - + Banderas desconocidas: {0:X8} - + Bandera desconocida 0x40 en banderas 1 activa - + Bandera desconocida 0x40 en banderas 2 activa - + Bandera desconocida 0x80 en banderas 2 activa - + Desconocemos como funciona el orden de caras {0} - + Funciones incompatibles desconocidas: {0:X8} - + Versión de LisaFS desconocida: {0} - + Valor de optimización desconocido: 0x{0:X8} - + Tipo de orden "{0}" desconocido, no se procederá con esta definición. - + SO desconocido ({0}) - + tipo de partición desconocido ({0}) - + Se requiere al menos la versión desconocida de ProDOS con el campo {0} para leer este volumen. - + Este volumen fue creado con la versión desconocida de ProDOS con el campo {0}. - + Publicador desconocido '{0}' - + Funciones compatibles en sólo lectura desconocidas: {0:X8} - + Opciones por defecto de montaje desconocidas: {0:X8} - + Banderas activadas desconocidas: {0:X8} - + Desconocida - + Estructuras desconocidas: - + Valor de s_type desconocido: 0x{0:X8} - + tipo desconocido '{0}' - + Hash sin firmar de directorio en uso - + actualización - + Volumen replicado por el usuario - + (user_xattr): Activar atributos extendidos especificados por el usuario - + Usa árboles-B para los directorios - + Usa compresión - + Usar LFN si está disponible, si no usar .LONGNAME (por defecto) - + Usando BPB de Apricot - + Usando BPB de Atari - + Usando BPB forzado de DEC Rainbow - + Usando BPB de DOS 2.0 - + Usando BPB de DOS 3.0 - + Usando BPB de DOS 3.2 - + Usando BPB de DOS 3.3 - + Usando BPB de DOS 3.4 - + Usando BPB de DOS 4.0 - + Usando BPB de FAT32 - + Usando BPB forzado. - + Usando BPB forzado para 5,25" DSDD. - + Usando BPB forzado para 5,25" SSDD. - + Usando BPB de Human68k - + Usando BPB de MSX - + Usando BPB corto de FAT32 - + Utilidad - + UUID: {0} - + Sistema de ficheros Veritas - + Versión 1: 0x{0:X4} - + Versión 2: 0x{0:X4} - + Versión {0} - + Versión {0}.{1} - + Sistema de ficheros VMware - + Sistema de ficheros VMware - + Volumen {0} de {1} en este sistema de ficheros - + Atributos del volumen: {0:X2} - + Volumen respaldado el {0} - + El mapa de bits del volumen es válido - + El mapa de bits del volumen ocupa {0} sectores ({1} bytes) - + Sector (en 512-bytes) de comienzo del mapa de bits del volumen: {0} - + El mapa de bits del volumen empieza en el sector {0} (VBN {1}) - + El bloque del volumen ocupa {0} bytes - + El tamaño de bloque del volumen es {0} bytes - + El volumen no puede ser escrito por ninguna versión de UDF mayor que {0}.{1:X2} - + El volumen puede ser destruido - + El volumen se puede llenar hasta el {0}% - + El volumen se puede montar {0} veces antes de necesitar una comprobación - + El volumen se puede leer - + El volumen se puede renombrar - + El volumen se puede escribir - + El catálogo del volumen se creó el {0} - + Comentario del volumen: {0} - + El volumen graba en grupos de 1 - + El volumen graba vagamente - + El volumen expresa conformidad con {0} - + El volumen contiene {0} bloques ({1} bytes) - + El volumen contiene {0} entradas de directorio - + El volumen contiene {0} ficheros - + El volumen contiene {0} ficheros y {1} directorios - + El volumen contiene {0} particiones - + El volumen continúa ante los errores - + El volumen se copió el {0} - + El volumen se creó el {0} - + El volumen se creó usando el núcleo versión: {0} - + Fecha de creación del volumen: {0} - + INFORMACIÓN DEL DESCRIPTOR DEL VOLUMEN: - + --------------------------------------- - + Formato del disco del volumen: {0} - + El volumen no graba en el registro - + El volumen no caduca. - + El volumen no necesita caché. - + Volumen edición {0} - + Fecha efectiva del volumen: {0} - + El volumen termina en el {0} - + Fecha de expiración del volumen: {0} - + Banderas del volumen: 0x{0:X2} - + Banderas del volumen: 0x{0:X4} - + El formato del volumen es {0} - + El volume va desde el byte {0} hasta el byte {1}, ocupando {2} bytes - + El volumen tiene {0} bloques - + El volumen tiene {0} bloques ({1} bytes) - + El volumen tiene {0} bloques de {1} bytes cada uno - + El volumen tiene {0} bloques de {1} bytes cada uno ({2} bytes totales) - + El volumen tiene {0} bloques de {1} bytes para un total de {2} bytes - + El volumen tiene {0} bloques usados ({1} bytes) - + El volumen tiene {0} bloques con {1} libres - + El volumen tiene {0} bytes - + El volumen tiene {0} bytes en {1} zonas - + El volumen tiene {0} bytes por bloque - + El volumen tiene {0} bytes distribuidos en {1} dispositivos - + El volumen tiene {0} bytes usados - + El volumen tiene {0} ficheros - + El volumen tiene {0} bloques libres - + El volumen tiene {0} nodos-i libres - + El volumen tiene {0} sectores libres de {1} - + El volumen tiene {0} nodos-i - + El volumen tiene {0} nodos-i por bloque - + El volumen tiene {0} sectores ({1} bytes) - + El volumen tiene {0} sectores de {1} bytes cada uno para un total de {2} bytes - + El volumen siempre ha sido efectivo. - + El volumen tiene la AIT secundaria actual dañada - + El volumen ha sido modificado por el Gestor de Volúmenes de Windows 9x/Me. - + El volumen ha sido montado {0} veces de un máximo de {1} antes de ser comprobado - + El volumen ha sido montado {0} veces sin un nº máximo antes de ser comprobado - + El volumen ha sido montado para escritura {0} veces. - + El volumen tiene los límites DASD activados - + El volumen tiene las cuotas grupales activadas - + El volumen contiene el registro - + El volumen contiene el registro y lo está moviendo fuera - + El volumen nunca ha sido respaldado - + El volumen nunca ha sido comprobado - + El volumen nunca ha sido comprobado (debería serlo cada {0}) - + El volumen nunca ha sido comprobado - + El volumen nunca ha sido montado - + El volumen no ha sido desmontado limpiamente - + El volumen no ha sido modificado. - + El volumen no tiene un nº máximo de montajes antes de ser comprobado - + El volumen tiene índices persistentes - + El volumen tiene bloques dañados reasignados. - + El volumen tiene las cuotas de usuario activadas - + El bloque de identificación del volumen fue escrito por última vez el {0} - + Identificador del volumen: {0} - + Identificador del volumen: 0x{0:X8} - + ID del volumen: 0x{0:X16} - + ID del volumen: 0x{0:X4} - + ID del volumen: 0x{0:X8} - + ID del volumen: 0x{0:X8}{1:X8} - + El volumen inhibe el fsck automático - + El volumen es el {0} de {1} en el conjunto "{2}". - + El volumen es arrancable. - + El volumen es sensible a las mayúsculas. - + El volumen está limpio - + El volumen está comprimido usando GZIP - + El volumen está comprimido usando LZ4 - + El volumen está comprimido usando LZMA - + El volumen está comprimido usando LZO - + El volumen está comprimido usando el algoritmo desconocido {0} - + El volumen está comprimido usando XZ - + El volumen está comprimido usando Zstandard - + El volumen está sucio - + El volumen está sucio, código de error = 0x{0:X16} - + El volumen está en un estado desconocido ({0}) - + El volumen está en un sistema big-endian. - + El volumen usa un registro. - + El volumen tiene nivel {0} revisión {1} - + El volumen está bloqueado por hardware. - + El volumen está bloqueado por software. - + El volumen está montado. - + El volumen está montado en sólo lectura - + El volumen no es arrancable. - + El volumen no usa ningún registro - + El volumen es el nº {0} de {1} - + El volumen es de sólo lectura - + El volumen está recuperando ficheros huérfanos - + El volumen es seguro - + El volumen presenta inconsistencias serias. - + El volumen está probando código en desarrollo. - + El volumen está desmontado. - + El volumen está envuelto en un volumen HFS. - + Etiqueta del volumen: {0} - + El volumen fue accedido por última vez el {0:d} - + El volumen arrancó por última vez el {0} - + El volumen fue comprobado por última vez el {0} - + El volumen fue modificado por última vez el {0} - + El volumen fue montado por última vez en "{0}" - + El volumen fue montado por última vez el {0} - + El volumen fue montado por última vez por el núcleo versión {0} - + El volumen fue actualizado por última vez el {0} - + El volumen fue escrito por última vez el {0} - + Fecha de modificación del volumen: {0} - + El volumen mueve los archivos eliminados a una carpeta de reciclaje - + El volumen debe ser respaldado - + Nombre del volumen: {0} - + El nombre del volumen es {0} - + Número del volumen: {0} - + Dueño del volumen: {0} - + El dueño del volumen es "{0}" - + El dueño del volumen es "{0}" (ID 0x{1:X8}) - + Paquete del volumen: {0} - + El volumen entra en pánico ante un error - + Contraseña del volumen: "{0}" - + Permisos del volumen (r = lectura, w = escritura, c = creación, d = eliminación) - + El volumen prima DASD al arranque - + El registro del volumen se extiende sde el bloque {0} al {1} - + El volumen se remonta en sólo lectura ante un error - + El volumen requiere la versión {0}.{1:X2} de UDF para ser leído - + El volumen requiere la versión {0}.{1:X2} de UDF para ser escrito - + El volumen reserva {0} sectores para el sistema - + El volumen reserva {1} pistas ({0} sectores) para el sistema - + El directorio raíz del volumen fue modificado por últiva vez el {0} - + El volumen fue carroñeado el {0} - + El volumen envía comandos TRIM/UNMAP al dispositivo que lo contiene - + Serie del volumen: {0} - + Serie del volumen: {0:X8} - + El volumen debería comprobarse en el siguiente montaje. - + Identificador del conjunto del volumen: {0} - + Número de serie del volumen: {0:X8} - + Número de serie del volumen: {0:X16} - + Número de serie del volumen: {0} - + Tamaño del volumen: {0} bloques, {1} bytes - + El volumen ocupa {0} bytes - + El volumen empieza en el byte {0} del dispositivo y termina en el {1} - + El estado del volumen es inconsistente. - + Estado del volumen el {0} - + El volumen soporta AIX - + El volumen soporta DCE DFS LFS - + El volumen soporta Linux - + El volumen soporta OS/2 y es insensible a las mayúsculas - + El volumen soporta ficheros dispersos - + El volumen fue actualizado el {0} - + El volumen usa {0} bytes por bloque - + El volumen usa {0} bytes por sector - + El volumen usa la página de código {1} de tipo {0} - + El volumen usa {0} FATs - + El volumen usa {0} sectores por clúster ({1} bytes) - + El volumen usa clústeres de {0} sectores ({1} bytes) cada uno - + El volumen usa los estampados de fecha estándares de CP/M - + El volumen usa escrituras síncronas - + El volumen usa estampados de fechas de terceras partes - + El volumen usa Unicode para las entradas de directorio - + El volumen usa extents (ext4) - + UUID del volumen: {0} - + Volumen versión {0} - + Volumen versión {0}.{1} - + El volumen fue creado para {0} - + El volumen fue creado el {0} - + El volumen fue creado el {0} para {1} - + El volumen fue modificado por última vez el {0} - + El volumen fue actualizado por última vez el {0} - + El volumen fue escrito la última vez por: {0} - + El volumen fue desmontado - + El volumen fue escrito por última vez el {0} - + El volumen envuelve un volumen HFS+. - + Contador de escrituras del volumen: {0} - + Sistema de ficheros Veritas - + ¡Atención! Detectado sistema de ficheros ProDOS de una versión de ProDOS desconocida - + ATENCIÓN: El sistema de ficheros describe sectores de {0} bytes pero el dispositivo lo hace de {1} bytes - + ATENCIÓN: El sistema de ficheros describe un volumen de {0} sectores, más grande que el dispositivo ({1} sectores) - + ATENCIÓN: El sistema de ficheros describe bloques de {0} bytes pero el dispositivo lo hace de {1} bytes - + ATENCIÓN: El sistema de ficheros describe bloques de {0} bytes pero el disdasdas - + ATENCIÓN: El sistema de ficheros describe {0} bloques pero el dispositivo indica {1} - + Wii - + WiiFit - + WiiWare - + Respaldo de Wii - + Canal de Wii - + Windows NT (8.3 mayúsculas mezcladas) - + Ventana: {0} - + , con parches multi-usuario - + , con soporta multi-usuario - + Las escrituras se verificarán - + Extensión del sistema de ficheros FATX - + Sistema de ficheros de XENIX - + Sistema de ficheros XFS - + Extensión del sistema de ficheros XFS - + Sistema de ficheros Xia - + Sistema de ficheros ZFS - + Extensión del sistema de ficheros ZFS - + Compresión zisofs presente. - + {0}[{1}] = Tipo de datos desconocido {2} - + {0} bloques de asignación. - + {0} grupos de asignación en el volumen - + {0} bloques ({1} bytes) - + {0} bloques ({1} bytes) libres de {2} ({3} bytes) - + {0} bloques, {1} banderas y {2} nodos-i por grupo - + {0} bloques para el cargador de arranque ({1} bytes) - + {0} bloques libres - + {0} bloques libres ({1} bytes) - + {0} bloques en el cilindro 0 - + {0} bloques en el sistema de ficheros - + {0} bloques en el volumen - + {0} bloques en el volumen ({1} bytes) - + {0} bloques en la caché del mapa de bits del volumen - + {0} bloques en la caché del volumen - + {0} bloques en la caché común del volumen - + {0} bloques menos uno - + {0} bloques menos uno menos el desplazamiento del MDDF - + {0} bloques de {1} bytes - + {0} bloques en todos los discos de datos - + {0} bloques en la colección sumaria de clústeres - + {0} bloques en el mapa de nodos-i ({1} bytes) - + {0} bloques en el mapa de zona ({1} bytes) - + {0} bloques pendientes de ser liberados - + {0} bloques por grupo de asignación - + {0} bloques por grupo de asignación ({1} bytes) - + {0} bloques por clúster - + {0} bloques por cilindro - + {0} bloques por cilindro ({1} bytes) - + Máximo de {0} bloques por grupo de cilindro - + {0} bloques por separación ({1} bytes) - + {0} bloques por grupo - + {0} bloques por rotación - + {0} bloques por segmento - + {0} bytes por bloque - + {0} bytes en el mapa de bits de asignación - + {0} bytes en un bloque básico - + {0} bytes en un bloque de fragmento - + {0} bytes en un grupo de cilindro - + {0} bytes en el sumario de un grupo de cilindro - + {0} bytes en un bloque de borrado - + {0} bytes en LisaInfo - + {0} bytes en el árbol-B del catálogo - + {0} bytes en el árbol-B de extents - + {0} bytes en el volumen - + {0} bytes por hoja - + Máximo de {0} bytes por fichero - + {0} bytes por nodo - + {0} bytes en el mapa de bits - + {0} bytes por bloque de asignación. - + {0} bytes por bloque - + {0} bytes por entrada de directorio - + {0} bytes por fragmento - + {0} bytes por bloque índice - + {0} bytes por nodo-i - + {0} bytes por nodo-i - + {0} bytes por registro MFT - + {0} bytes por página - + {0} bytes por sector. - + {0} bytes por sector (sin procesar) - + {0} bytes por zona - + {0} bytes por sector - + {0} bytes por división - + {0} bytes para asignar. - + {0} bytes para asignar cuando se extiende un árbol-B de catálogo - + {0} bytes para asignar cuando se extiende un árbol-B de extents - + {0} bytes para asignar cuando se extiende un fichero. - + {0} caracteres en un nombre de fichero - + {0} clústeres en el volumen. - + {0} clústeres por bloque índice ({1} bytes) - + {0} clústeres por registro MFT ({1} bytes) - + {0} páginas de código usadas en el volumen - + {0} directorios asignados contiguamente - + Máximo de {0} bloques contiguos - + {0} cilindros - + {0} cilindros por grupo - + {0} cilindros en el volumen - + {0} grupos de cilindro - + {0} grupos de cilindro en el volumen - + {0} bloques de datos ({1} bytes) - + {0} bloques de datos en el volumen - + {0} bloques de datos en el volumen ({1} bytes) - + {0} bloques de datos en el volumen, {1} libres - + {0} zonas de datos ({1} bytes) - + {0} directorios - + {0} directorios en el directorio raíz - + {0} directorios en el volumen - + {0} entradas en el directorio raíz. - + {0} entradas por bloque de directorio - + {0} = nvlist[] de {1} elementos, no se puede mostrar - + {0} = Tipo de datos desconocido {1} - + {0} errores registrados - + {0} FATs - + {0} ficheros en el directorio raíz - + {0} ficheros en el volumen - + Tamaño del grupo FLEX_BG: {0} - + {0} fragmentos por bloque - + {0} bloques libres. - + {0} bloques libres ({1} bytes) - + {0} bloques libres en lista ({1} bytes) - + {0} clústeres libres - + {0} fragmentos libres - + {0} nodos-i libres - + {0} nodos-i libres en lista - + {0} nodos-i libres en el volumen - + {0} nodos-D alternativos libres - + {0} zonas libres en el volumen ({1} bytes) - + {0} cabezas. - + {0} cabezas por cilindro - + {0} sectores ocultos antes del BPB. - + {0} sectores ocultos antes del sistema de ficheros - + {0} zonas imap ({1} bytes) - + {0} nodos-i - + {0} nodos-i libres de {1} - + {0} nodos-i en el volumen - + {0} nodos-i en el volumen, {1} libres - + {0} nodos-i en el volumen, {1} libres ({2}%) - + {0} nodos-i pendientes de liberarse - + {0} nodos-i por grupo de cilindro - + {0} nodos-i con {1} libres ({2}%) - + {0} es el primer bloque de datos - + {0} no está establecido - + {0} KiB se han escrito en el volumen - + {0} sectores lógicos ({1} bytes) por sector físico - + Máximo de {0} ficheros en el volumen - + {0}ms para el siguiente bloque óptimo - + {0} nanosegundos para programar - + {0} nanosegundos para acceso aleatorio - + {0} nanosegundos para un ciclo de lectura - + {0} nanosegundos para un ciclo de escritura - + El {0}% de los bloques deben estár libres - + {0} bloques reservados y {1} libres - + {0} ficheros reservados - + {0} posiciones rotacionales - + {0} segundos para la espera de protección ante multi-montaje, en el bloque {1} - + {0} secciones - + {0} secciones por zona - + {0} sectores - + {0} sectores ({1} bytes) por bloque - + {0} sectores ({1} bytes) por clúster - + {0} sectores marcados dañados - + {0} sectores por cilindro - + {0} sectores ocultos antes del BPB - + {0} sectores en el directorio. - + {0} sectores en el volumen ({1} bytes). - + {0} sectores por clúster. - + {0} sectores por clúster ({1} bytes) - + {0} sectores por FAT. - + {0} sectores por pista. - + {0} sectores reservados entre el BPB y la FAT. - + {0} sectores por pista - + {0} segmentos - + {0} segmentos por sección - + {0} bloques de reserva - + {0} entradas de revisiones en total - + {0} nodos-D de reserva en total - + {0} pistas - + {0} pistas por cilindro - + {0} pistas en el volumen - + {0} bloques de asignación libres. - + {0} bloques usados ({1} bytes) - + {0} entradas de revisión usadas - + {0} sectores usados en el volumen - + {0} bloques de asignación en el volumen - + {0} zonas zmap ({1} bytes) - + {0} zonas en el volumen ({1} bytes) - + {0} zonas en el volumen - + {0} zonas reservadas para imágenes del núclero ({1} bytes) - + {0} µseg para cambiar la cabeza - + {0} µseg para posicionar de pista a pista - + 1024 bytes por bloque - + 2048 bytes por bloque - + 4096 bytes por bloque - + 512 bytes por bloque \ No newline at end of file diff --git a/Aaru.Filesystems/Localization/Localization.resx b/Aaru.Filesystems/Localization/Localization.resx index 8d796112a..c23a711fe 100644 --- a/Aaru.Filesystems/Localization/Localization.resx +++ b/Aaru.Filesystems/Localization/Localization.resx @@ -1,3689 +1,3692 @@ - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + Boot Block: - + Boot block is in new format. - + Boot block should be executed. - + System heap will be extended by {0} bytes and a {1} fraction of the available RAM - + Allocate secondary sound buffer at boot. - + Allocate secondary sound and video buffers at boot. - + System filename: {0} - + Finder filename: {0} - + Debugger filename: {0} - + Disassembler filename: {0} - + Startup screen filename: {0} - + First program to execute at boot: {0} - + Clipboard filename: {0} - + Maximum opened files: {0} - + Event queue size: {0} - + Heap size with 128KiB of RAM: {0} bytes - + Heap size with 256KiB of RAM: {0} bytes - + Heap size with 512KiB of RAM or more: {0} bytes - + Apple DOS File System - + Catalog starts at sector {0} of track {1} - + File system initialized by DOS release {0} - + Disk volume number {0} - + Sectors allocated at most in track {0} - + {0} tracks in volume - + {0} sectors per track. - + {0} bytes per sector. - + Track allocation is forward - + Track allocation is reverse - + Incorrect device size. - + Partitions are not supported. - + Incorrect sector size. - + Unable to read catalog. - + Unable cache all files. - + Apple Hierarchical File System - + HFS uses 512 bytes/sector while device uses 2048 bytes/sector. - + Master Directory Block: - + Creation date: {0} - + Last modification date: {0} - + Last backup date: {0} - + Backup sequence number: {0} - + Volume has never been backed up - + Volume is locked by hardware. - + Volume was unmonted. - + Volume is mounted. - + Volume has spared bad blocks. - + Volume does not need cache. - + Boot volume is inconsistent. - + There are reused CNIDs. - + Volume is journaled. - + Volume is seriously inconsistent. - + Volume is locked by software. - + {0} directories in root directory - + {0} directories in volume - + Volume write count: {0} - + Volume bitmap starting sector (in 512-bytes): {0} - + Next allocation block: {0}. - + {0} volume allocation blocks. - + {0} bytes per allocation block. - + {0} bytes to allocate when extending a file. - + {0} bytes to allocate when extending a Extents B-Tree. - + {0} bytes to allocate when extending a Catalog B-Tree. - + Sector of first allocation block: {0} - + Next unused CNID: {0} - + {0} unused allocation blocks. - + {0} bytes in the Extents B-Tree - + {0} bytes in the Catalog B-Tree - + Volume name: {0} - + Finder info: - + CNID of bootable system's directory: {0} - + CNID of first-run application's directory: {0} - + CNID of previously opened directory: {0} - + CNID of bootable Mac OS 8 or 9 directory: {0} - + CNID of bootable Mac OS X directory: {0} - + Mac OS X Volume ID: {0:X8}{1:X8} - + Volume wraps a HFS+ volume. - + Starting block of the HFS+ volume: {0} - + Allocations blocks of the HFS+ volume: {0} - + {0} blocks in volume cache - + {0} blocks in volume bitmap cache - + {0} blocks in volume common cache - + Volume is bootable. - + Volume is not bootable. - + File truncated at block {0} - + Apple Macintosh File System - + First directory sector: {0} - + {0} sectors in directory. - + Size of allocation blocks: {0} bytes - + {0} bytes to allocate. - + First allocation block (#2) starts in sector {0}. - + Next unused file number: {0} - + CP/M File System - + Found Amstrad superblock. - + Found CP/M-86 hard disk superblock. - + Found CP/M-86 floppy identifier. - + First directory block seems correct. - + Trying to load definitions. - + Trying all known definitions. - + Trying definition "{0}" - + Don't know how to handle COLUMBIA ordering, not proceeding with this definition. - + Don't know how to handle EAGLE ordering, not proceeding with this definition. - + Unknown order type "{0}", not proceeding with this definition. - + Definition contains EVEN-ODD field, with unknown meaning, detection may be wrong. - + Definition "{0}" has a correct directory - + Identified as {0} - + Volume block is {0} bytes - + Volume contains {0} blocks ({1} bytes) - + CP/M filesystem - + Volume contains {0} directory entries - + Volume reserves {0} sectors for system - + Volume reserves {1} tracks ({0} sectors) for system - + Side 0 uses {0}:1 software interleaving - + Side 1 uses {0}:1 software interleaving - + Head changes after each whole track - + Head changes after whole side - + Unknown how {0} side ordering works - + Device uses {0}:1 hardware interleaving - + Volume label: {0} - + Volume uses standard CP/M timestamps - + Volume uses third party timestamps - + Volume created on {0} - + Volume updated on {0} - + CYLINDERS ordering not yet implemented. - + Deinterleaving whole volume. - + Creating allocation blocks. - + Reading directory. - + Traversing directory. - + Using Human68k BPB - + Using FAT32 BPB - + Using short FAT32 BPB - + Using MSX BPB - + Using Apricot BPB - + Using DOS 4.0 BPB - + Using DOS 3.4 BPB - + Using DOS 3.3 BPB - + Using Atari BPB - + Using DOS 3.2 BPB - + Using DOS 3.0 BPB - + Using DOS 2.0 BPB - + Using DEC Rainbow hardcoded BPB. - + Using hardcoded BPB. - + Using hardcoded BPB for 5.25" SSDD. - + Using hardcoded BPB for 5.25" DSDD. - + Found empty filename in {0} - + Microsoft File Allocation Table - + DOS (8.3 all uppercase) - + Windows NT (8.3 mixed case) - + OS/2 .LONGNAME extended attribute - + Use LFN when available with fallback to .LONGNAME (default) - + Long file names - + 2nd fat starts at = {0} - + FAT+ - + Microsoft FAT32 - + Volume has been modified by Windows 9x/Me Volume Tracker. - + {0} sectors per cluster. - + {0} sectors reserved between BPB and FAT. - + {0} sectors on volume ({1} bytes). - + {0} clusters on volume. - + Media descriptor: 0x{0:X2} - + {0} sectors per FAT. - + {0} heads. - + {0} hidden sectors before BPB. - + Cluster of root directory: {0} - + Sector of FSINFO structure: {0} - + Sector of backup FAT32 parameter block: {0} - + Drive number: 0x{0:X2} - + Volume should be checked on next mount. - + Disk surface should be checked on next mount. - + FATs are out of sync. FAT #{0} is in use. - + All copies of FAT are the same. - + DR-DOS will boot this FAT32 using CHS. - + DR-DOS will boot this FAT32 using LBA. - + Filesystem type: {0} - + {0} free clusters - + Last allocated cluster {0} - + cmdload will be loaded with value {0:X4}h - + Boot program will be loaded at address {0:X4}h - + FAT and directory will be cached at address {0:X4}h - + Boot program resides in file "{0}" - + Boot program starts in sector {0} and is {1} sectors long ({2} bytes) - + Atari FAT12 - + Apricot FAT12 - + Human68k FAT12 - + Microsoft FAT12 - + Atari FAT16 - + Human68k FAT16 - + Microsoft FAT16 - + {0} FATs. - + {0} entries in root directory. - + Volume Serial Number: {0} - + Volume last modified on {0} - + Volume last accessed on {0:d} - + Boot code's SHA1: {0} - + Unknown boot code. - + Boot code corresponds to {0} - + Reading BPB - + Found empty filename in root directory - + Reading FAT12 - + Reading FAT16 - + Casting FAT - + FATX Filesystem Plugin - + FATX filesystem - + {0} logical sectors ({1} bytes) per physical sector - + {0} sectors ({1} bytes) per cluster - + Volume serial: {0:X8} - + Reading superblock - + Filesystem is little endian - + Filesystem is big endian - + Reading FAT32 - + FAT is {0} sectors - + Reading root directory - + High Performance Optical File System - + OEM name: {0} - + {0} sectors hidden before BPB - + Serial number: 0x{0:X8} - + Volume comment: {0} - + Volume owner: {0} - + Volume uses {0} codepage {1} - + EBCDIC - + ASCII - + Unknown - + RPS level: {0} - + Filesystem version: {0}.{1} - + Volume can be filled up to {0}% - + Exception reading CD-i audio file - + Processing VD loop no. {0} - + Reading sector {0} - + Unknown - + Found unknown supplementary volume descriptor - + ERROR: Could not find primary volume descriptor - + SYSTEM USE SHARING PROTOCOL INFORMATION: - + ---------------------------------------- - + Extension: {0} - + ID: {0}, version {1} - + Description: {0} - + Source: {0} - + High Sierra Format file system - + CD-i file system - + ISO9660 file system - + CD-ROM XA extensions present. - + Amiga extensions present. - + Apple extensions present. - + Joliet extensions present. - + System Use Sharing Protocol present. - + Rock Ridge Interchange Protocol present. - + Arbitrary Attribute Interchange Protocol present. - + zisofs compression present. - + Contains Enhanced Volume Descriptor. - + Contains Volume Partition Descriptor. - + Disc bootable following {0} specifications. - + This is a SegaCD / MegaCD disc. - + This is a Sega Saturn disc. - + This is a Sega Dreamcast disc. - + FILE STRUCTURE VOLUME DESCRIPTOR INFORMATION: - + --------------------------------------------- - + VOLUME DESCRIPTOR INFORMATION: - + ------------------------------ - + System identifier: {0} - + Volume identifier: {0} - + Volume set identifier: {0} - + Publisher identifier: {0} - + Data preparer identifier: {0} - + Application identifier: {0} - + Volume creation date: {0} - + Volume modification date: {0} - + Volume has not been modified. - + Volume expiration date: {0} - + Volume does not expire. - + Volume effective date: {0} - + Volume has always been effective. - + Volume has {0} blocks of {1} bytes each - + JOLIET VOLUME DESCRIPTOR INFORMATION: - + ------------------------------------- - + EL TORITO INFORMATION: - + ---------------------- - + Initial entry: - + Developer ID: {0} - + Bootable on {0} - + Bootable image starts at sector {0} and runs for {1} sectors - + Bootable image will be loaded at segment {0:X4}h - + Bootable image will be loaded at 0x{0:X8} - + Image uses no emulation - + Image emulates a 5.25" high-density (MD2HD, 1.2Mb) floppy - + Image emulates a 3.5" high-density (MF2HD, 1.44Mb) floppy - + Image emulates a 3.5" extra-density (MF2ED, 2.88Mb) floppy - + Image uses unknown emulation type {0} - + System type: 0x{0:X2} - + Bootable image's SHA1: {0} - + Not bootable - + Boot section {0}: - + Section ID: {0} - + Entry {0}: - + Selection criteria type: {0} - + Image contains ATAPI drivers - + Image contains SCSI drivers - + Sector {0}, Cooked, Mode 0/1 / Mode 2 Form 1 - + Sector {0}, Cooked, Mode 2 Form 2 - + Sector {0}, Cooked, Mode 2 Form {1}, File Number {2}, Channel Number {3}, Submode {4}, Coding Information {5} - + Sector {0}, Raw, Audio - + Sector {0} ({1:X2}:{2:X2}:{3:X2}), Raw, Mode {4} - + Sector {0} ({1:X2}:{2:X2}:{3:X2}), Raw, Mode 2 Form {4}, File Number {5}, Channel Number {6}, Submode {7}, Coding Information {8} - + Path table and PVD do not point to the same location for the root directory! - + PVD does not point to correct root directory, checking path table... - + Cannot find root directory... - + File {0} gets truncated. - + Sector {0}, file ID 0x{1:X4} - + Current sector = {0} - + Unknown LisaFS version {0} - + Volume password: "{0}" - + Volume ID: 0x{0:X16} - + Backup volume ID: 0x{0:X16} - + Master copy ID: 0x{0:X8} - + Volume is number {0} of {1} - + Serial number of Lisa computer that created this volume: {0} - + Serial number of Lisa computer that can use this volume's software {0} - + Volume's catalog created on {0} - + Volume backed up on {0} - + Volume scavenged on {0} - + MDDF is in block {0} - + There are {0} reserved blocks before volume - + {0} blocks minus one - + {0} blocks minus one minus MDDF offset - + {0} blocks in volume - + {0} bytes per sector (uncooked) - + {0} blocks per cluster - + {0} blocks in filesystem - + {0} files in volume - + {0} blocks free - + {0} bytes in LisaInfo - + Filesystem overhead: {0} - + Scavenger result code: 0x{0:X8} - + Boot code: 0x{0:X8} - + Boot environment: 0x{0:X8} - + Overmount stamp: 0x{0:X16} - + S-Records start at {0} and spans for {1} blocks - + Volume is clean - + Volume is dirty - + Underlying device does not support Lisa tags - + Device is too small - + Incorrect MDDF found - + Mounting LisaFS v1 - + Mounting LisaFS v2 - + Mounting LisaFS v3 - + Cannot mount LisaFS version {0} - + Error {0} reading S-Records file. - + Cannot read Catalog File, error {0} - + Unable to read boot blocks - + Unable to read boot loader - + Unable to read MDDF - + Unable to read volume bitmap - + Unable to read S-Records file - + Not a Lisa filesystem - + Exception {0}, {1}, {2} - + Opera Filesystem Plugin - + Opera filesystem disc. - + Volume identifier: 0x{0:X8} - + Block size: {0} bytes - + WARNING: Filesystem indicates {0} bytes/block while device indicates {1} bytes/block - + Volume size: {0} blocks, {1} bytes - + WARNING: Filesystem indicates {0} blocks while device indicates {1} blocks - + Root directory identifier: 0x{0:X8} - + Root directory block size: {0} bytes - + Root directory size: {0} blocks, {1} bytes - + Last root directory copy: {0} - + U.C.S.D. Pascal filesystem - + Volume record spans from block {0} to block {1} - + Volume has {0} blocks - + Volume has {0} files - + Volume last booted on {0} - + Acorn Advanced Disc Filing System - + Acorn Advanced Disc Filing System - + Volume has {0} bytes - + Volume ID: {0:X4} - + Version {0} - + Density code: {0} - + Skew: {0} - + Boot option: {0} - + Root starts at frag {0} - + Volume has {0} bytes in {1} zones - + Volume flags: 0x{0:X4} - + Amiga DOS filesystem - + Bootblock points to {0} as Rootblock - + Searching for Rootblock in sector {0} - + Amiga Original File System - + Amiga Fast File System - + Amiga Original File System with international characters - + Amiga Fast File System with international characters - + Amiga Original File System with directory cache - + Amiga Fast File System with directory cache - + Amiga Original File System with long filenames - + Amiga Fast File System with long filenames - + , with multi-user patches - + Volume bitmap is valid - + Bitmap extension at block {0} - + Directory cache starts at block {0} - + Volume block size is {0} bytes - + Volume root directory last modified on {0} - + Root block checksum is 0x{0:X8} - + Alexander Osipov DOS file system - + Alexander Osipov DOS file system - + {0} used sectors on volume - + Disk name: {0} - + Apple File System - + Apple File System - + {0} bytes per block - + Container has {0} bytes in {1} blocks - + Apple HFS+ filesystem - + HFS+ filesystem. - + HFSX filesystem. - + Volume is wrapped inside an HFS volume. - + Filesystem version is {0}. - + Volume is unmounted. - + There are bad blocks in the extents file. - + Volume state is inconsistent. - + Implementation that last mounted the volume: "{0}". - + Journal starts at allocation block {0}. - + Last check date: {0} - + Volume has never been checked up - + {0} allocation blocks. - + {0} free blocks. - + Resource fork clump size: {0} bytes. - + Data fork clump size: {0} bytes. - + Volume has been mounted writable {0} times. - + Allocation File is {0} bytes. - + Extents File is {0} bytes. - + Catalog File is {0} bytes. - + Attributes File is {0} bytes. - + Startup File is {0} bytes. - + This version is not supported yet. - + AtheOS Filesystem - + AtheOS filesystem - + Filesystem is read-only - + {0} blocks in volume ({1} bytes) - + {0} used blocks ({1} bytes) - + {0} bytes per i-node - + {0} blocks per allocation group ({1} bytes) - + {0} allocation groups in volume - + Journal resides in block {0} of allocation group {1} and runs for {2} blocks ({3} bytes) - + Journal starts in byte {0} and has {1} bytes in {2} blocks - + Root folder's i-node resides in block {0} of allocation group {1} and runs for {2} blocks ({3} bytes) - + Directory containing files scheduled for deletion's i-node resides in block {0} of allocation group {1} and runs for {2} blocks ({3} bytes) - + Indices' i-node resides in block {0} of allocation group {1} and runs for {2} blocks ({3} bytes) - + {0} blocks for bootloader ({1} bytes) - + Be Filesystem - + Little-endian BeFS - + Big-endian BeFS - + Superblock seems corrupt, following information may be incorrect - + Magic 1: 0x{0:X8} (Should be 0x42465331) - + Magic 2: 0x{0:X8} (Should be 0xDD121031) - + Magic 3: 0x{0:X8} (Should be 0x15B6830E) - + Filesystem endianness: 0x{0:X8} (Should be 0x42494745) - + Root folder's i-node size: {0} blocks (Should be 1) - + Indices' i-node size: {0} blocks (Should be 1) - + 1 << block_shift == block_size => 1 << {0} == {1} (Should be {2}) - + Unknown flags: {0:X8} - + Journal starts in byte {0} and ends in byte {1} - + B-tree file system - + B-tree filesystem - + UUID: {0} - + This superblock resides on physical block {0} - + Root tree starts at LBA {0} - + Chunk tree starts at LBA {0} - + Log tree starts at LBA {0} - + Volume has {0} bytes spanned in {1} devices - + Volume has {0} bytes used - + {0} bytes/sector - + {0} bytes/node - + {0} bytes/leaf - + {0} bytes/stripe - + Flags: 0x{0:X} - + Compatible flags: 0x{0:X} - + Read-only compatible flags: 0x{0:X} - + Incompatible flags: 0x{0:X} - + Device's UUID: {0} - + Commodore file system - + Commodore file system - + Directory starts at track {0} sector {1} - + Disk DOS Version: {0} - + DOS Version: {0} - + Disk Version: {0} - + Disk ID: {0} - + Disk DOS type: {0} - + Cram filesystem - + Cram file system - + Little-endian - + Big-endian - + Volume edition {0} - + dump(8) Plugin - + Could not read dump(8) header block - + Old 16-bit dump(8) - + Dump created on {0} - + Previous dump created on {0} - + Dump volume number: {0} - + Dump level: {0} - + Dump label: {0} - + Dumped filesystem name: {0} - + Dumped device: {0} - + Dump hostname: {0} - + ECMA-67 - + ECMA-67 - + Extent File System Plugin - + magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8}) - + magic at {0} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8}) - + SGI extent filesystem - + New version - + Filesystem size: {0} basic blocks - + First cylinder group starts at block {0} - + Cylinder group size: {0} basic blocks - + {0} inodes per cylinder group - + {0} heads per cylinder - + {0} cylinder groups - + {0} bytes on bitmap - + {0} free inodes - + Bitmap resides at block {0} - + Replacement superblock resides at block {0} - + Last inode allocated: {0} - + Checksum: 0x{0:X8} - + Volume pack: {0} - + Microsoft Extended File Allocation Table - + Microsoft exFAT - + Partition offset: {0} - + Volume has {0} sectors of {1} bytes each for a total of {2} bytes - + Volume uses clusters of {0} sectors ({1} bytes) each - + First FAT starts at sector {0} and runs for {1} sectors - + Volume uses {0} FATs - + Cluster heap starts at sector {0}, contains {1} clusters and is {2}% used - + Root directory starts at cluster {0} - + Filesystem revision is {0}.{1:D2} - + Volume serial number: {0:X8} - + BIOS drive is {0:X2}h - + 2nd FAT is in use - + Underlying media presented errors - + OEM Parameters: {0} - + {0} bytes in erase block - + {0} bytes per page - + {0} spare blocks - + {0} nanoseconds random access time - + {0} nanoseconds program time - + {0} nanoseconds read cycle time - + {0} nanoseconds write cycle time - + Found unknown parameter type {0} - + Linux extended Filesystem 2, 3 and 4 - + ext2 (old) filesystem - + ext2 filesystem - + ext3 filesystem - + ext4 filesystem - + Not an ext2/3/4 filesystem - + Unknown OS ({0}) - + Volume was created on {0} for {1} - + Volume was created for {0} - + Volume has {0} blocks of {1} bytes, for a total of {2} bytes - + Last mounted on {0} - + Volume has been mounted {0} times of a maximum of {1} mounts before checking - + Volume has been mounted {0} times with no maximum no. of mounts before checking - + Last mounted at: "{0}" - + Last used mount options were: {0} - + Volume has never been mounted - + Volume can be mounted {0} times before checking - + Volume has no maximum no. of mounts before checking - + Last checked on {0} (should check every {1} seconds) - + Last checked on {0} - + Volume has never been checked (should check every {0}) - + Volume has never been checked - + Last written on {0} - + Volume is recovering orphan files - + Volume is in an unknown state ({0}) - + On errors, filesystem should continue - + On errors, filesystem should remount read-only - + On errors, filesystem should panic - + On errors filesystem will do an unknown thing ({0}) - + Filesystem revision: {0}.{1} - + Volume UUID: {0} - + {0} KiB has been written on volume - + {0} reserved and {1} free blocks - + {0} inodes with {1} free inodes ({2}%) - + First inode is {0} - + {0} bytes per fragment - + {0} blocks, {1} flags and {2} inodes per group - + {0} is first data block - + Default UID: {0}, GID: {1} - + Block group number is {0} - + Group descriptor size is {0} bytes - + First metablock group is {0} - + RAID stride: {0} - + {0} blocks on all data disks - + {0} seconds for multi-mount protection wait, on block {1} - + {0} size of FLEX_BG group - + Hash seed: {0:X8}{1:X8}{2:X8}{3:X8}, version {4} - + Journal UUID: {0} - + Journal has inode {0} - + Journal is on device {0} - + Journal backup type: {0} - + Last orphaned inode is {0} - + There are no orphaned inodes - + Active snapshot has ID {0}, on inode {1}, with {2} blocks reserved, list starting on block {3} - + {0} errors registered - + First error occurred on {0}, last on {1} - + First error inode is {0}, last is {1} - + First error block is {0}, last is {1} - + First error function is "{0}", last is "{1}" - + Flags…: - + Signed directory hash is in use - + Unsigned directory hash is in use - + Volume is testing development code - + Unknown set flags: {0:X8} - + Default mount options…: - + (debug): Enable debugging code - + (bsdgroups): Emulate BSD behaviour when creating new files - + (user_xattr): Enable user-specified extended attributes - + (acl): Enable POSIX ACLs - + (uid16): Disable 32bit UIDs and GIDs - + (journal_data): Journal data and metadata - + (journal_data_ordered): Write data before journaling metadata - + (journal_data_writeback): Write journal before data - + Unknown set default mount options: {0:X8} - + Compatible features…: - + Pre-allocate directories - + Has mapping between inodes and AFS (imagic inodes table) - + Has journal (ext3) - + Has extended attribute blocks - + Has online filesystem resize reservations - + Can use hashed indexes on directories - + Unknown compatible features: {0:X8} - + Compatible features if read-only…: - + Reduced number of superblocks - + Can have files bigger than 2GiB - + Uses B-Tree for directories - + Can have files bigger than 2TiB (ext4) - + Group descriptor checksums and sparse inode table (ext4) - + More than 32000 directory entries (ext4) - + Supports nanosecond timestamps and creation time (ext4) - + Unknown read-only compatible features: {0:X8} - + Incompatible features…: - + Uses compression - + Filetype in directory entries - + Journal needs recovery (ext3) - + Has journal on another device (ext3) - + Reduced block group backups - + Volume use extents (ext4) - + Supports volumes bigger than 2^32 blocks (ext4) - + Multi-mount protection (ext4) - + Flexible block group metadata location (ext4) - + Extended attributes can reside in inode (ext4) - + Data can reside in directory entry (ext4) - + Unknown incompatible features: {0:X8} - + Linux extended Filesystem - + ext filesystem - + {0} zones in volume - + {0} free blocks ({1} bytes) - + {0} inodes in volume, {1} free ({2}%) - + First free inode is {0} - + First free block is {0} - + First data zone is {0} - + Log zone size: {0} - + Max zone size: {0} - + F2FS Plugin - + F2FS filesystem - + Version {0}.{1} - + {0} sectors ({1} bytes) per block - + {0} blocks per segment - + {0} segments per section - + {0} sections per zone - + {0} sections - + {0} segments - + Root directory resides on inode {0} - + Volume last mounted on kernel version: {0} - + Volume created on kernel version: {0} - + BSD Fast File System (aka UNIX File System, UFS) - + Not a UFS filesystem, I shouldn't have arrived here! - + UFS filesystem - + Big-endian UFS filesystem - + BorderWare UFS filesystem - + Big-endian BorderWare UFS filesystem - + UFS2 filesystem - + Big-endian UFS2 filesystem - + Incompletely initialized UFS filesystem - + BEWARE!!! Following information may be completely wrong! - + Incompletely initialized big-endian UFS filesystem - + There are a lot of variants of UFS using overlapped values on same fields - + I will try to guess which one it is, but unless it's UFS2, I may be surely wrong - + Guessed as 42BSD FFS - + Guessed as 43BSD FFS - + Guessed as 44BSD FFS - + Guessed as SunOS FFS - + Guessed as SunOS/x86 FFS - + Guessed as UFS - + Linked list of filesystems: 0x{0:X8} - + Superblock LBA: {0} - + Cylinder-block LBA: {0} - + inode-block LBA: {0} - + First data block LBA: {0} - + Cylinder group offset in cylinder: {0} - + Volume last written on {0} - + {0} data blocks in volume ({1} bytes) - + {0} cylinder groups in volume - + {0} bytes in a basic block - + {0} bytes in a frag block - + {0} frags in a block - + {0}% of blocks must be free - + {0}ms for optimal next block - + Disk rotates {0} times per second ({1}rpm) - + {0} contiguous blocks at maximum - + {0} blocks per cylinder group at maximum - + Superblock is {0} bytes - + NINDIR: 0x{0:X8} - + INOPB: 0x{0:X8} - + NSPF: 0x{0:X8} - + Filesystem will minimize allocation time - + Filesystem will minimize volume fragmentation - + Unknown optimization value: 0x{0:X8} - + {0} sectors/track - + Volume state on {0} - + Hardware sector interleave: {0} - + Sector 0 skew: {0}/track - + Volume ID: 0x{0:X8}{1:X8} - + {0} µsec for head switch - + {0} µsec for track-to-track seek - + Cylinder group summary LBA: {0} - + {0} bytes in cylinder group summary - + {0} bytes in cylinder group - + {0} tracks/cylinder - + {0} sectors/cylinder - + {0} cylinders in volume - + {0} cylinders/group - + {0} blocks per group - + {0} directories - + {0} free frags - + Volume is read-only - + Volume flags: 0x{0:X2} - + Volume last mounted at "{0}" - + Last searched cylinder group: {0} - + {0} contiguously allocated directories - + Standard superblock LBA: {0} - + {0} blocks ({1} bytes) - + {0} data blocks ({1} bytes) - + Cylinder group summary area LBA: {0} - + {0} blocks pending of being freed - + {0} inodes pending of being freed - + {0} blocks on cluster summary array - + Maximum length of a symbolic link: {0} - + A file can be {0} bytes at max - + {0} rotational positions - + {0} blocks per rotation - + Fossil Filesystem Plugin - + magic at 0x{0:X8} (expected 0x{1:X8}) - + Fossil filesystem - + Filesystem version {0} - + Superblock resides in block {0} - + Labels resides in block {0} - + Data starts at block {0} - + magic 0x{0:X8} (expected 0x{1:X8}) - + Epoch low {0} - + Epoch high {0} - + Next QID {0} - + Active root block {0} - + Next root block {0} - + Current root block {0} - + HAMMER Filesystem - + HAMMER filesystem - + Volume {0} of {1} on this filesystem - + Volume serial: {0} - + Boot area starts at {0} - + Memory log starts at {0} - + First volume buffer starts at {0} - + Volume ends at {0} - + Filesystem contains {0} "big-blocks" ({1} bytes) - + Filesystem has {0} "big-blocks" free ({1} bytes) - + Filesystem has {0} inodes used - + OS/2 High Performance File System - + This may not be HPFS, following information may be not correct. - + File system type: "{0}" (Should be "HPFS ") - + Superblock magic1: 0x{0:X8} (Should be 0xF995E849) - + Superblock magic2: 0x{0:X8} (Should be 0xFA53E9C5) - + Spareblock magic1: 0x{0:X8} (Should be 0xF9911849) - + Spareblock magic2: 0x{0:X8} (Should be 0xFA5229C5) - + NT Flags: 0x{0:X2} - + Signature: 0x{0:X2} - + HPFS version: {0} - + Functional version: {0} - + Sector of root directory FNode: {0} - + {0} sectors are marked bad - + Sector of free space bitmaps: {0} - + Sector of bad blocks list: {0} - + Date of last integrity check: {0} - + Filesystem integrity has never been checked - + Date of last optimization {0} - + Filesystem has never been optimized - + Directory band has {0} sectors - + Directory band starts at sector {0} - + Directory band ends at sector {0} - + Sector of directory band bitmap: {0} - + Sector of ACL directory: {0} - + Sector of Hotfix directory: {0} - + {0} used Hotfix entries - + {0} total Hotfix entries - + {0} free spare DNodes - + {0} total spare DNodes - + Sector of codepage directory: {0} - + {0} codepages used in the volume - + SuperBlock CRC32: {0:X8} - + SpareBlock CRC32: {0:X8} - + Flags: - + Filesystem is dirty. - + Filesystem is clean. - + Spare directory blocks are in use - + Hotfixes are in use - + Disk contains bad sectors - + Disk has a bad bitmap - + Filesystem was formatted fast - + Unknown flag 0x40 on flags1 is active - + Filesystem has been mounted by an old IFS - + Install DASD limits - + Resync DASD limits - + DASD limits are operational - + Multimedia is active - + DCE ACLs are active - + DASD limits are dirty - + Unknown flag 0x40 on flags2 is active - + Unknown flag 0x80 on flags2 is active - + JFS Plugin - + JFS filesystem - + {0} blocks of {1} bytes - + {0} blocks per allocation group - + Volume uses Unicode for directory entries - + Volume remounts read-only on error - + Volume continues on error - + Volume panics on error - + Volume has user quotas enabled - + Volume has group quotas enabled - + Volume is not using any journal - + Volume sends TRIM/UNMAP commands to underlying device - + Volume commits in groups of 1 - + Volume commits lazy - + Volume does not commit to log - + Volume has log within itself - + Volume has log within itself and is moving it out - + Volume supports sparse files - + Volume has bad current secondary ait - + Volume has DASD limits enabled - + Volume primes DASD on boot - + Volume is in a big-endian system - + Volume has persistent indexes - + Volume supports Linux - + Volume supports DCE DFS LFS - + Volume supports OS/2, and is case insensitive - + Volume supports AIX - + Volume was last updated on {0} - + HP Logical Interchange Format Plugin - + HP Logical Interchange Format - + Directory starts at cluster {0} - + LIF identifier: {0} - + Directory size: {0} clusters - + LIF version: {0} - + {0} tracks - + {0} sectors - + Locus Filesystem Plugin - + magic at {1} = 0x{0:X8} - + Locus filesystem (old) - + Locus filesystem - + Superblock last modified on {0} - + Volume has {0} blocks of {1} bytes each (total {2} bytes) - + {0} blocks free ({1} bytes) - + I-node list uses {0} blocks - + Next free inode search will start at inode {0} - + There are an estimate of {0} free inodes before next search start - + Read-only volume - + Clean volume - + Dirty volume - + Removable volume - + This is the primary pack - + Replicated volume - + User replicated volume - + Backbone volume - + NFS volume - + Volume inhibits automatic fsck - + Set-uid/set-gid is disabled - + Volume uses synchronous writes - + Physical volume name: {0} - + Global File System number: {0} - + Global File System pack number {0} - + MicroDOS file system - + MicroDOS filesystem - + Volume has {0} blocks ({1} bytes) - + Volume has {0} blocks used ({1} bytes) - + Volume contains {0} files - + First used block is {0} - + Minix Filesystem - + Minix v3 filesystem - + Minix 3 v2 filesystem - + Minix 3 v1 filesystem - + Minix v1 filesystem - + Minix v2 filesystem - + {0} chars in filename - + {0} zones in volume ({1} bytes) - + {0} bytes/block - + {0} blocks on inode map ({1} bytes) - + {0} blocks on zone map ({1} bytes) - + First data zone: {0} - + {0} bytes maximum per file - + On-disk filesystem version: {0} - + Filesystem state: {0:X4} - + NILFS2 Plugin - + NILFS2 filesystem - + {0} bytes in volume - + Filesystem created on Linux - + Creator OS code: {0} - + {0} bytes per inode - + Volume last mounted on {0} - + Nintendo optical filesystems - + Nintendo optical filesystem - + Nintendo Wii Optical Disc - + Nintendo GameCube Optical Disc - + Disc ID is {0} - + Disc is a {0} disc - + Disc region is {0} - + Published by {0} - + Disc number {0} of a multi-disc set - + Disc is prepared for audio streaming - + Audio streaming buffer size is {0} bytes - + Title: {0} - + First {0} partition starts at sector {1} - + Second {0} partition starts at sector {1} - + Third {0} partition starts at sector {1} - + Fourth {0} partition starts at sector {1} - + Japan age rating is {0} - + ESRB age rating is {0} - + German age rating is {0} - + PEGI age rating is {0} - + Finland age rating is {0} - + Portugal age rating is {0} - + UK age rating is {0} - + Australia age rating is {0} - + Korea age rating is {0} - + FST starts at {0} and has {1} bytes - + Commodore 64 Virtual Console - + Demo - + Neo-Geo Virtual Console - + NES Virtual Console - + Gamecube - + Wii channel - + Super Nintendo Virtual Console - + Master System Virtual Console - + Mega Drive Virtual Console - + Nintendo 64 Virtual Console - + Promotional or TurboGrafx Virtual Console - + TurboGrafx CD Virtual Console - + Wii - + Utility - + WiiWare - + MSX Virtual Console or WiiWare demo - + Diagnostic - + Wii Backup - + WiiFit - + unknown type '{0}' - + any region - + Germany - + USA - + France - + Italy - + Japan - + Korea - + PAL - + Russia - + Spain - + Taiwan - + Australia - + unknown region code '{0}' - + Unknown publisher '{0}' - + data - + update - + channel - + unknown partition type {0} - + New Technology File System (NTFS) - + {0} sectors per cluster ({1} bytes) - + {0} hidden sectors before filesystem - + BIOS drive number: 0x{0:X2} - + Cluster where $MFT starts: {0} - + Cluster where $MFTMirr starts: {0} - + {0} clusters per MFT record ({1} bytes) - + {0} bytes per MFT record - + {0} clusters per Index block ({1} bytes) - + {0} bytes per Index block - + Volume serial number: {0:X16} - + Files-11 On-Disk Structure - + magic: "{0}" - + unaligned magic: "{0}" - + The following information may be incorrect for this volume. - + This volume may be corrupted. - + Volume format is {0} - + Volume is Level {0} revision {1} - + Lowest structure in the volume is Level {0}, revision {1} - + Highest structure in the volume is Level {0}, revision {1} - + This home block is on sector {0} (VBN {1}) - + Secondary home block is on sector {0} (VBN {1}) - + Volume bitmap starts in sector {0} (VBN {1}) - + Volume bitmap runs for {0} sectors ({1} bytes) - + Backup INDEXF.SYS;1 is in sector {0} (VBN {1}) - + {0} maximum files on the volume - + {0} reserved files - + Volume is {0} of {1} in set "{2}". - + Volume owner is "{0}" (ID 0x{1:X8}) - + Drive serial number: 0x{0:X8} - + Volume was created on {0} - + Volume was last modified on {0} - + Volume copied on {0} - + Checksums: 0x{0:X4} and 0x{1:X4} - + Window: {0} - + Cached directories: {0} - + Default allocation: {0} blocks - + Readings should be verified - + Writings should be verified - + Files should be erased or overwritten when deleted - + Highwater mark is to be disabled - + Classification checks are enabled - + Volume permissions (r = read, w = write, c = create, d = delete) - Do not translate r, w, c or d letters + Do not translate r, w, c or d letters - + System, owner, group, world - + Unknown structures: - + Security mask: 0x{0:X8} - + File protection: 0x{0:X4} - + Record protection: 0x{0:X4} - + PC Engine CD Plugin - + PC-FX Plugin - + PC-FX executable: - + Identifier: {0} - + Copyright: {0} - + Maker ID: {0} - + Maker name: {0} - + Volume number: {0} - + Country code: {0} - + Dated {0} - + Load {0} sectors from sector {1} - + Load at 0x{0:X8} and jump to 0x{1:X8} - + Professional File System - + Professional File System v1 - + Professional File System v2 - + Professional File System v3 - + , with multi-user support - + Volume has {0} free sectors of {1} - + Root block extension resides at block {0} - + Apple ProDOS filesystem - + Datetime field year {0}, month {1}, day {2}, hour {3}, minute {4}. - + ProDOS uses 512 bytes/sector while device uses 2048 bytes/sector. - + Warning! Detected unknown ProDOS version ProDOS filesystem. - + All of the following information may be incorrect - + ProDOS version 1 used to create this volume. - + Unknown ProDOS version with field {0} used to create this volume. - + ProDOS version 1 at least required for reading this volume. - + Unknown ProDOS version with field {0} is at least required for reading this volume. - + Volume name is {0} - + {0} bytes per directory entry - + {0} entries per directory block - + {0} files in root directory - + Bitmap starts at block {0} - + Volume can be read - + Volume can be written - + Volume can be renamed - + Volume can be destroyed - + Volume must be backed up - + Reserved attributes are set: {0:X2} - + QNX4 Plugin - + QNX4 filesystem - + Created on {0} - + QNX6 Plugin - + QNX6 (Audi) filesystem - + Serial: 0x{0:X16} - + {0} inodes free of {1} - + {0} blocks ({1} bytes) free of {2} ({3} bytes) - + QNX6 filesystem - + Flags: 0x{0:X8} - + Version1: 0x{0:X4} - + Version2: 0x{0:X4} - + OS-9 Random Block File Plugin - + magic at {0} = 0x{1:X8} or 0x{2:X8} (expected 0x{3:X8} or 0x{4:X8}) - + OS-9 Random Block File - + Volume ID: {0:X8} - + {0} cylinders - + {0} blocks in cylinder 0 - + {0} blocks per cylinder - + Disk is double sided - + Disk is single sided - + Disk is double density - + Disk is single density - + Disk is 384 TPI - + Disk is 192 TPI - + Disk is 96 TPI or 135 TPI - + Disk is 48 TPI - + Allocation bitmap descriptor starts at block {0} - + Debugger descriptor starts at block {0} - + Boot file descriptor starts at block {0} - + Root directory descriptor starts at block {0} - + Disk is owned by group {0} user {1} - + Volume's identification block was last written on {0} - + {0} bytes in allocation bitmap - + Boot file starts at block {0} and has {1} bytes - + Disk is owned by user {0} - + Volume attributes: {0:X2} - + Path descriptor options: {0} - + Resilient File System plugin - + Microsoft Resilient File System - + Volume uses {0} bytes per sector - + Volume uses {0} sectors per cluster ({1} bytes) - + Volume has {0} sectors ({1} bytes) - + Reiser Filesystem Plugin - + Reiser 3.5 filesystem - + Reiser 3.6 filesystem - + Reiser Jr. filesystem - + Volume has {0} blocks with {1} blocks free - + Root directory resides on block {0} - + Volume has not been cleanly umounted - + Volume last checked on {0} - + Reiser4 Filesystem Plugin - + Reiser 4 filesystem - + Volume disk format: {0} - + RT-11 file system - + First directory segment starts at block {0} - + Volume owner is "{0}" - + Checksum: 0x{0:X4} (calculated 0x{1:X4}) - + SmartFileSystem - + SmartFileSystem - + Volume version {0} - + Volume starts on device byte {0} and ends on byte {1} - + Admin space container starts in block {0} - + Root object container starts in block {0} - + Root node of the extent B-tree resides in block {0} - + Root node of the object B-tree resides in block {0} - + Volume is case sensitive - + Volume moves deleted files to a recycled folder - + Solar_OS filesystem - + Solar_OS filesystem - + WARNING: Filesystem describes a {0} bytes/sector, while device describes a {1} bytes/sector - + WARNING: Filesystem describes a {0} sectors volume, bigger than device ({1} sectors) - + Squash filesystem - + Squash file system - + Volume version {0}.{1} - + Volume has {0} bytes per block - + Volume has {0} inodes - + Volume is compressed using LZ4 - + Volume is compressed using LZO - + Volume is compressed using LZMA - + Volume is compressed using XZ - + Volume is compressed using GZIP - + Volume is compressed using Zstandard - + Volume is compressed using unknown algorithm {0} - + UNIX System V filesystem - + XENIX filesystem - + 512 bytes per block - + 1024 bytes per block - + 2048 bytes per block - + Unknown s_type value: 0x{0:X8} - + {0} free zones on volume ({1} bytes) - + {0} free blocks on list ({1} bytes) - + {0} blocks per cylinder ({1} bytes) - + {0} blocks per gap ({1} bytes) - + {0} free inodes on volume - + {0} free inodes on list - + Free block list is locked - + inode cache is locked - + Superblock is being modified - + Volume is mounted read-only - + Superblock last updated on {0} - + Pack name: {0} - + System V Release 4 filesystem - + System V Release 2 filesystem - + Coherent UNIX filesystem - + UNIX 7th Edition filesystem - + Universal Disk Format - + Universal Disk Format - + Volume uses {0} bytes per block - + Volume was last written on {0} - + Volume contains {0} partitions - + Volume contains {0} files and {1} directories - + Volume conforms to {0} - + Volume was last written by: {0} - + Volume requires UDF version {0}.{1:X2} to be read - + Volume requires UDF version {0}.{1:X2} to be written to - + Volume cannot be written by any UDF version higher than {0}.{1:X2} - + UNICOS Filesystem Plugin - + magic = 0x{0:X16} (expected 0x{1:X16}) - + UNICOS filesystem - + Volume is secure - + 4096 bytes per block - + {0} data blocks in volume - + Root resides on inode {0} - + {0} inodes in volume - + Volume last updated on {0} - + Volume is dirty, error code = 0x{0:X16} - + UNIX Boot filesystem - + Volume goes from byte {0} to byte {1}, for {2} bytes - + Filesystem name: {0} - + UNIX Boot Filesystem - + VMware filesystem - + VMware file system - + Volume size {0} bytes - + Veritas filesystem - + Veritas file system - + Volume has {0} inodes per block - + Volume has {0} free inodes - + Volume has {0} free blocks - + XFS Filesystem Plugin - + magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8}) - + magic at {0} = 0x{1:X8} (expected 0x{2:X8}) - + XFS filesystem - + {0} data blocks in volume, {1} free - + {0} inodes in volume, {1} free - + fsck in progress - + Xia filesystem - + {0} bytes per zone - + {0} inodes - + {0} data zones ({1} bytes) - + {0} imap zones ({1} bytes) - + {0} zmap zones ({1} bytes) - + Maximum filesize is {0} bytes ({1} MiB) - + {0} zones reserved for kernel images ({1} bytes) - + First kernel zone: {0} - + ZFS Filesystem Plugin - + ZFS filesystem - + {0} is not set - + {0} = {1} elements nvlist[], unable to print - + {0}[{1}] = Unknown data type {2} - + {0} = Unknown data type {1} \ No newline at end of file diff --git a/Aaru.Filesystems/Locus/Consts.cs b/Aaru.Filesystems/Locus/Consts.cs index e3bc631fa..6e8bc0175 100644 --- a/Aaru.Filesystems/Locus/Consts.cs +++ b/Aaru.Filesystems/Locus/Consts.cs @@ -28,25 +28,25 @@ // Commit count -using commitcnt_t = System.Int32; +using commitcnt_t = int; // Disk address -using daddr_t = System.Int32; +using daddr_t = int; // Fstore -using fstore_t = System.Int32; +using fstore_t = int; // Global File System number -using gfs_t = System.Int32; +using gfs_t = int; // Inode number -using ino_t = System.Int32; +using ino_t = int; // Filesystem pack number -using pckno_t = System.Int16; +using pckno_t = short; // Timestamp -using time_t = System.Int32; +using time_t = int; // ReSharper disable UnusedMember.Local // ReSharper disable UnusedType.Local diff --git a/Aaru.Filesystems/Locus/Enums.cs b/Aaru.Filesystems/Locus/Enums.cs index 1f4659113..6b5b57d26 100644 --- a/Aaru.Filesystems/Locus/Enums.cs +++ b/Aaru.Filesystems/Locus/Enums.cs @@ -30,25 +30,25 @@ using System; using System.Diagnostics.CodeAnalysis; -using commitcnt_t = System.Int32; +using commitcnt_t = int; // Disk address -using daddr_t = System.Int32; +using daddr_t = int; // Fstore -using fstore_t = System.Int32; +using fstore_t = int; // Global File System number -using gfs_t = System.Int32; +using gfs_t = int; // Inode number -using ino_t = System.Int32; +using ino_t = int; // Filesystem pack number -using pckno_t = System.Int16; +using pckno_t = short; // Timestamp -using time_t = System.Int32; +using time_t = int; // ReSharper disable UnusedMember.Local // ReSharper disable UnusedType.Local @@ -59,26 +59,40 @@ namespace Aaru.Filesystems; /// Implements detection of the Locus filesystem public sealed partial class Locus { - [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle"), - Flags] +#region Nested type: Flags + + [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] + [Flags] enum Flags : ushort { - SB_RDONLY = 0x1, /* no writes on filesystem */ SB_CLEAN = 0x2, /* fs unmounted cleanly (or checks run) */ - SB_DIRTY = 0x4, /* fs mounted without CLEAN bit set */ SB_RMV = 0x8, /* fs is a removable file system */ - SB_PRIMPACK = 0x10, /* This is the primary pack of the filesystem */ - SB_REPLTYPE = 0x20, /* This is a replicated type filesystem. */ - SB_USER = 0x40, /* This is a "user" replicated filesystem. */ - SB_BACKBONE = 0x80, /* backbone pack ; complete copy of primary pack but not modifiable */ + SB_RDONLY = 0x1, /* no writes on filesystem */ + SB_CLEAN = 0x2, /* fs unmounted cleanly (or checks run) */ + SB_DIRTY = 0x4, /* fs mounted without CLEAN bit set */ + SB_RMV = 0x8, /* fs is a removable file system */ + SB_PRIMPACK = 0x10, /* This is the primary pack of the filesystem */ + SB_REPLTYPE = 0x20, /* This is a replicated type filesystem. */ + SB_USER = 0x40, /* This is a "user" replicated filesystem. */ + SB_BACKBONE = 0x80, /* backbone pack ; complete copy of primary pack but not modifiable */ SB_NFS = 0x100, /* This is a NFS type filesystem */ SB_BYHAND = 0x200, /* Inhibits automatic fscks on a mangled file system */ - SB_NOSUID = 0x400, /* Set-uid/Set-gid is disabled */ SB_SYNCW = 0x800 /* Synchronous Write */ + SB_NOSUID = 0x400, /* Set-uid/Set-gid is disabled */ + SB_SYNCW = 0x800 /* Synchronous Write */ } - [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle"), - Flags] +#endregion + +#region Nested type: Version + + [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] + [Flags] enum Version : byte { - SB_SB4096 = 1, /* smallblock filesys with 4096 byte blocks */ SB_B1024 = 2, /* 1024 byte block filesystem */ - NUMSCANDEV = 5 /* Used by scangfs(), refed in space.h */ + SB_SB4096 = 1, /* smallblock filesys with 4096 byte blocks */ + SB_B1024 = 2, /* 1024 byte block filesystem */ + NUMSCANDEV = 5 /* Used by scangfs(), refed in space.h */ } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Locus/Info.cs b/Aaru.Filesystems/Locus/Info.cs index 03aea8e07..439e2a3fe 100644 --- a/Aaru.Filesystems/Locus/Info.cs +++ b/Aaru.Filesystems/Locus/Info.cs @@ -34,26 +34,26 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Helpers; -using commitcnt_t = System.Int32; +using commitcnt_t = int; // Disk address -using daddr_t = System.Int32; +using daddr_t = int; // Fstore -using fstore_t = System.Int32; +using fstore_t = int; // Global File System number -using gfs_t = System.Int32; +using gfs_t = int; // Inode number -using ino_t = System.Int32; +using ino_t = int; using Partition = Aaru.CommonTypes.Partition; // Filesystem pack number -using pckno_t = System.Int16; +using pckno_t = short; // Timestamp -using time_t = System.Int32; +using time_t = int; // ReSharper disable UnusedMember.Local // ReSharper disable UnusedType.Local @@ -64,6 +64,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Locus filesystem public sealed partial class Locus { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -72,7 +74,7 @@ public sealed partial class Locus for(ulong location = 0; location <= 8; location++) { - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -115,7 +117,7 @@ public sealed partial class Locus for(ulong location = 0; location <= 8; location++) { - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -150,7 +152,8 @@ public sealed partial class Locus var sb = new StringBuilder(); - sb.AppendLine(locusSb.s_magic == LOCUS_MAGIC_OLD ? Localization.Locus_filesystem_old + sb.AppendLine(locusSb.s_magic == LOCUS_MAGIC_OLD + ? Localization.Locus_filesystem_old : Localization.Locus_filesystem); int blockSize = locusSb.s_version == Version.SB_SB4096 ? 4096 : 1024; @@ -162,26 +165,26 @@ public sealed partial class Locus string s_fpack = StringHandlers.CToString(locusSb.s_fpack, encoding); AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_magic = 0x{0:X8}", locusSb.s_magic); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_gfs = {0}", locusSb.s_gfs); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_fsize = {0}", locusSb.s_fsize); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_lwm = {0}", locusSb.s_lwm); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_hwm = {0}", locusSb.s_hwm); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_llst = {0}", locusSb.s_llst); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_fstore = {0}", locusSb.s_fstore); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_time = {0}", locusSb.s_time); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_tfree = {0}", locusSb.s_tfree); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_isize = {0}", locusSb.s_isize); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_nfree = {0}", locusSb.s_nfree); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_flags = {0}", locusSb.s_flags); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_tinode = {0}", locusSb.s_tinode); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_lasti = {0}", locusSb.s_lasti); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_nbehind = {0}", locusSb.s_nbehind); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_gfspack = {0}", locusSb.s_gfspack); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_ninode = {0}", locusSb.s_ninode); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_flock = {0}", locusSb.s_flock); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_ilock = {0}", locusSb.s_ilock); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_fmod = {0}", locusSb.s_fmod); - AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_version = {0}", locusSb.s_version); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_gfs = {0}", locusSb.s_gfs); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_fsize = {0}", locusSb.s_fsize); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_lwm = {0}", locusSb.s_lwm); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_hwm = {0}", locusSb.s_hwm); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_llst = {0}", locusSb.s_llst); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_fstore = {0}", locusSb.s_fstore); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_time = {0}", locusSb.s_time); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_tfree = {0}", locusSb.s_tfree); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_isize = {0}", locusSb.s_isize); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_nfree = {0}", locusSb.s_nfree); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_flags = {0}", locusSb.s_flags); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_tinode = {0}", locusSb.s_tinode); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_lasti = {0}", locusSb.s_lasti); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_nbehind = {0}", locusSb.s_nbehind); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_gfspack = {0}", locusSb.s_gfspack); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_ninode = {0}", locusSb.s_ninode); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_flock = {0}", locusSb.s_flock); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_ilock = {0}", locusSb.s_ilock); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_fmod = {0}", locusSb.s_fmod); + AaruConsole.DebugWriteLine(MODULE_NAME, "LocusSb.s_version = {0}", locusSb.s_version); sb.AppendFormat(Localization.Superblock_last_modified_on_0, DateHandlers.UnixToDateTime(locusSb.s_time)). AppendLine(); @@ -233,9 +236,9 @@ public sealed partial class Locus if(locusSb.s_flags.HasFlag(Flags.SB_SYNCW)) sb.AppendLine(Localization.Volume_uses_synchronous_writes); - sb.AppendFormat(Localization.Volume_label_0, s_fsmnt).AppendLine(); - sb.AppendFormat(Localization.Physical_volume_name_0, s_fpack).AppendLine(); - sb.AppendFormat(Localization.Global_File_System_number_0, locusSb.s_gfs).AppendLine(); + sb.AppendFormat(Localization.Volume_label_0, s_fsmnt).AppendLine(); + sb.AppendFormat(Localization.Physical_volume_name_0, s_fpack).AppendLine(); + sb.AppendFormat(Localization.Global_File_System_number_0, locusSb.s_gfs).AppendLine(); sb.AppendFormat(Localization.Global_File_System_pack_number_0, locusSb.s_gfspack).AppendLine(); information = sb.ToString(); @@ -253,4 +256,6 @@ public sealed partial class Locus FreeClusters = (ulong)locusSb.s_tfree }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Locus/Locus.cs b/Aaru.Filesystems/Locus/Locus.cs index 89d58aedd..fc6d020e9 100644 --- a/Aaru.Filesystems/Locus/Locus.cs +++ b/Aaru.Filesystems/Locus/Locus.cs @@ -30,25 +30,25 @@ using System; using Aaru.CommonTypes.Interfaces; -using commitcnt_t = System.Int32; +using commitcnt_t = int; // Disk address -using daddr_t = System.Int32; +using daddr_t = int; // Fstore -using fstore_t = System.Int32; +using fstore_t = int; // Global File System number -using gfs_t = System.Int32; +using gfs_t = int; // Inode number -using ino_t = System.Int32; +using ino_t = int; // Filesystem pack number -using pckno_t = System.Int16; +using pckno_t = short; // Timestamp -using time_t = System.Int32; +using time_t = int; // ReSharper disable UnusedMember.Local // ReSharper disable UnusedType.Local @@ -59,11 +59,18 @@ namespace Aaru.Filesystems; /// Implements detection of the Locus filesystem public sealed partial class Locus : IFilesystem { + const string MODULE_NAME = "Locus plugin"; + +#region IFilesystem Members + /// public string Name => Localization.Locus_Name; + /// public Guid Id => new("1A70B30A-437D-479A-88E1-D0C9C1797FF4"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "Locus plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Locus/Structs.cs b/Aaru.Filesystems/Locus/Structs.cs index 98daac0a0..797fff3b7 100644 --- a/Aaru.Filesystems/Locus/Structs.cs +++ b/Aaru.Filesystems/Locus/Structs.cs @@ -30,25 +30,25 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using commitcnt_t = System.Int32; +using commitcnt_t = int; // Disk address -using daddr_t = System.Int32; +using daddr_t = int; // Fstore -using fstore_t = System.Int32; +using fstore_t = int; // Global File System number -using gfs_t = System.Int32; +using gfs_t = int; // Inode number -using ino_t = System.Int32; +using ino_t = int; // Filesystem pack number -using pckno_t = System.Int16; +using pckno_t = short; // Timestamp -using time_t = System.Int32; +using time_t = int; // ReSharper disable UnusedMember.Local // ReSharper disable UnusedType.Local @@ -59,8 +59,71 @@ namespace Aaru.Filesystems; /// Implements detection of the Locus filesystem public sealed partial class Locus { - [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle"), - StructLayout(LayoutKind.Sequential, Pack = 1)] +#region Nested type: OldSuperblock + + [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct OldSuperblock + { + public readonly uint s_magic; /* identifies this as a locus filesystem */ + /* defined as a constant below */ + public readonly gfs_t s_gfs; /* global filesystem number */ + public readonly daddr_t s_fsize; /* size in blocks of entire volume */ + /* several ints for replicated filsystems */ + public readonly commitcnt_t s_lwm; /* all prior commits propagated */ + public readonly commitcnt_t s_hwm; /* highest commit propagated */ + /* oldest committed version in the list. + * llst mod NCMTLST is the offset of commit #llst in the list, + * which wraps around from there. + */ + public readonly commitcnt_t s_llst; + public readonly fstore_t s_fstore; /* filesystem storage bit mask; if the + filsys is replicated and this is not a + primary or backbone copy, this bit mask + determines which files are stored */ + + public readonly time_t s_time; /* last super block update */ + public readonly daddr_t s_tfree; /* total free blocks*/ + + public readonly ino_t s_isize; /* size in blocks of i-list */ + public readonly short s_nfree; /* number of addresses in s_free */ + public readonly Flags s_flags; /* filsys flags, defined below */ + public readonly ino_t s_tinode; /* total free inodes */ + public readonly ino_t s_lasti; /* start place for circular search */ + public readonly ino_t s_nbehind; /* est # free inodes before s_lasti */ + public readonly pckno_t s_gfspack; /* global filesystem pack number */ + public readonly short s_ninode; /* number of i-nodes in s_inode */ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly short[] s_dinfo; /* interleave stuff */ + + //#define s_m s_dinfo[0] + //#define s_skip s_dinfo[0] /* AIX defines */ + //#define s_n s_dinfo[1] + //#define s_cyl s_dinfo[1] /* AIX defines */ + public readonly byte s_flock; /* lock during free list manipulation */ + public readonly byte s_ilock; /* lock during i-list manipulation */ + public readonly byte s_fmod; /* super block modified flag */ + public readonly Version s_version; /* version of the data format in fs. */ + /* defined below. */ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] s_fsmnt; /* name of this file system */ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] s_fpack; /* name of this physical volume */ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = OLDNICINOD)] + public readonly ino_t[] s_inode; /* free i-node list */ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = OLDNICFREE)] + public readonly daddr_t[] su_free; /* free block list for non-replicated filsys */ + public readonly byte s_byteorder; /* byte order of integers */ + } + +#endregion + +#region Nested type: Superblock + + [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct Superblock { public readonly uint s_magic; /* identifies this as a locus filesystem */ @@ -114,58 +177,5 @@ public sealed partial class Locus public readonly byte s_byteorder; /* byte order of integers */ } - [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle"), - StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct OldSuperblock - { - public readonly uint s_magic; /* identifies this as a locus filesystem */ - /* defined as a constant below */ - public readonly gfs_t s_gfs; /* global filesystem number */ - public readonly daddr_t s_fsize; /* size in blocks of entire volume */ - /* several ints for replicated filsystems */ - public readonly commitcnt_t s_lwm; /* all prior commits propagated */ - public readonly commitcnt_t s_hwm; /* highest commit propagated */ - /* oldest committed version in the list. - * llst mod NCMTLST is the offset of commit #llst in the list, - * which wraps around from there. - */ - public readonly commitcnt_t s_llst; - public readonly fstore_t s_fstore; /* filesystem storage bit mask; if the - filsys is replicated and this is not a - primary or backbone copy, this bit mask - determines which files are stored */ - - public readonly time_t s_time; /* last super block update */ - public readonly daddr_t s_tfree; /* total free blocks*/ - - public readonly ino_t s_isize; /* size in blocks of i-list */ - public readonly short s_nfree; /* number of addresses in s_free */ - public readonly Flags s_flags; /* filsys flags, defined below */ - public readonly ino_t s_tinode; /* total free inodes */ - public readonly ino_t s_lasti; /* start place for circular search */ - public readonly ino_t s_nbehind; /* est # free inodes before s_lasti */ - public readonly pckno_t s_gfspack; /* global filesystem pack number */ - public readonly short s_ninode; /* number of i-nodes in s_inode */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly short[] s_dinfo; /* interleave stuff */ - - //#define s_m s_dinfo[0] - //#define s_skip s_dinfo[0] /* AIX defines */ - //#define s_n s_dinfo[1] - //#define s_cyl s_dinfo[1] /* AIX defines */ - public readonly byte s_flock; /* lock during free list manipulation */ - public readonly byte s_ilock; /* lock during i-list manipulation */ - public readonly byte s_fmod; /* super block modified flag */ - public readonly Version s_version; /* version of the data format in fs. */ - /* defined below. */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] s_fsmnt; /* name of this file system */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] s_fpack; /* name of this physical volume */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst = OLDNICINOD)] - public readonly ino_t[] s_inode; /* free i-node list */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst = OLDNICFREE)] - public readonly daddr_t[] su_free; /* free block list for non-replicated filsys */ - public readonly byte s_byteorder; /* byte order of integers */ - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/MicroDOS/Enums.cs b/Aaru.Filesystems/MicroDOS/Enums.cs index 19ea2646d..c2370c857 100644 --- a/Aaru.Filesystems/MicroDOS/Enums.cs +++ b/Aaru.Filesystems/MicroDOS/Enums.cs @@ -38,9 +38,16 @@ namespace Aaru.Filesystems; /// public sealed partial class MicroDOS { +#region Nested type: FileStatus + enum FileStatus : byte { - CommonFile = 0, Protected = 1, LogicalDisk = 2, - BadFile = 0x80, Deleted = 0xFF + CommonFile = 0, + Protected = 1, + LogicalDisk = 2, + BadFile = 0x80, + Deleted = 0xFF } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/MicroDOS/Info.cs b/Aaru.Filesystems/MicroDOS/Info.cs index 12ac05f1c..ac0c4d92b 100644 --- a/Aaru.Filesystems/MicroDOS/Info.cs +++ b/Aaru.Filesystems/MicroDOS/Info.cs @@ -45,6 +45,8 @@ namespace Aaru.Filesystems; /// public sealed partial class MicroDOS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -87,7 +89,7 @@ public sealed partial class MicroDOS AppendLine(); sb.AppendFormat(Localization.Volume_contains_0_files, block0.files).AppendLine(); - sb.AppendFormat(Localization.First_used_block_is_0, block0.firstUsedBlock).AppendLine(); + sb.AppendFormat(Localization.First_used_block_is_0, block0.firstUsedBlock).AppendLine(); metadata = new FileSystem { @@ -100,4 +102,6 @@ public sealed partial class MicroDOS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/MicroDOS/MicroDOS.cs b/Aaru.Filesystems/MicroDOS/MicroDOS.cs index d077a5d98..eb206002b 100644 --- a/Aaru.Filesystems/MicroDOS/MicroDOS.cs +++ b/Aaru.Filesystems/MicroDOS/MicroDOS.cs @@ -41,10 +41,16 @@ namespace Aaru.Filesystems; /// public sealed partial class MicroDOS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.MicroDOS_Name; + /// public Guid Id => new("9F9A364A-1A27-48A3-B730-7A7122000324"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/MicroDOS/Structs.cs b/Aaru.Filesystems/MicroDOS/Structs.cs index 1d7e77515..a2c82ca53 100644 --- a/Aaru.Filesystems/MicroDOS/Structs.cs +++ b/Aaru.Filesystems/MicroDOS/Structs.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// public sealed partial class MicroDOS { +#region Nested type: Block0 + // Followed by directory entries [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Block0 @@ -73,6 +75,10 @@ public sealed partial class MicroDOS public readonly byte[] unknown3; } +#endregion + +#region Nested type: DirectoryEntry + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct DirectoryEntry { @@ -92,4 +98,6 @@ public sealed partial class MicroDOS /// Length public readonly ushort length; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/MinixFS/Info.cs b/Aaru.Filesystems/MinixFS/Info.cs index d74c9e579..b72eebf76 100644 --- a/Aaru.Filesystems/MinixFS/Info.cs +++ b/Aaru.Filesystems/MinixFS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of the MINIX filesystem public sealed partial class MinixFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -64,15 +66,15 @@ public sealed partial class MinixFS // Optical media if(offset > 0) { - byte[] tmp = new byte[0x200]; + var tmp = new byte[0x200]; Array.Copy(minixSbSector, offset, tmp, 0, 0x200); minixSbSector = tmp; } - ushort magic = BitConverter.ToUInt16(minixSbSector, 0x010); + var magic = BitConverter.ToUInt16(minixSbSector, 0x010); if(magic is MINIX_MAGIC or MINIX_MAGIC2 or MINIX2_MAGIC or MINIX2_MAGIC2 or MINIX_CIGAM or MINIX_CIGAM2 - or MINIX2_CIGAM or MINIX2_CIGAM2) + or MINIX2_CIGAM or MINIX2_CIGAM2) return true; magic = BitConverter.ToUInt16(minixSbSector, 0x018); // Here should reside magic number on Minix v3 @@ -98,7 +100,7 @@ public sealed partial class MinixFS offset = 0x400; } - bool minix3 = false; + var minix3 = false; int filenamesize; string minixVersion; ErrorNumber errno = imagePlugin.ReadSector(sector + partition.Start, out byte[] minixSbSector); @@ -109,12 +111,12 @@ public sealed partial class MinixFS // Optical media if(offset > 0) { - byte[] tmp = new byte[0x200]; + var tmp = new byte[0x200]; Array.Copy(minixSbSector, offset, tmp, 0, 0x200); minixSbSector = tmp; } - ushort magic = BitConverter.ToUInt16(minixSbSector, 0x018); + var magic = BitConverter.ToUInt16(minixSbSector, 0x018); metadata = new FileSystem(); @@ -210,13 +212,15 @@ public sealed partial class MinixFS metadata.Type = FS_TYPE_V2; break; - default: return; + default: + return; } } if(minix3) { - SuperBlock3 mnxSb = littleEndian ? Marshal.ByteArrayToStructureLittleEndian(minixSbSector) + SuperBlock3 mnxSb = littleEndian + ? Marshal.ByteArrayToStructureLittleEndian(minixSbSector) : Marshal.ByteArrayToStructureBigEndian(minixSbSector); if(magic != MINIX3_MAGIC && @@ -227,13 +231,17 @@ public sealed partial class MinixFS sb.AppendFormat(Localization._0_chars_in_filename, filenamesize).AppendLine(); if(mnxSb.s_zones > 0) // On V2 + { sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, mnxSb.s_zones, mnxSb.s_zones * 1024). AppendLine(); + } else + { sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, mnxSb.s_nzones, mnxSb.s_nzones * 1024). AppendLine(); + } - sb.AppendFormat(Localization._0_bytes_block, mnxSb.s_blocksize).AppendLine(); + sb.AppendFormat(Localization._0_bytes_block, mnxSb.s_blocksize).AppendLine(); sb.AppendFormat(Localization._0_inodes_in_volume, mnxSb.s_ninodes).AppendLine(); sb.AppendFormat(Localization._0_blocks_on_inode_map_1_bytes, mnxSb.s_imap_blocks, @@ -245,7 +253,7 @@ public sealed partial class MinixFS sb.AppendFormat(Localization.First_data_zone_0, mnxSb.s_firstdatazone).AppendLine(); //sb.AppendFormat("log2 of blocks/zone: {0}", mnx_sb.s_log_zone_size).AppendLine(); // Apparently 0 - sb.AppendFormat(Localization._0_bytes_maximum_per_file, mnxSb.s_max_size).AppendLine(); + sb.AppendFormat(Localization._0_bytes_maximum_per_file, mnxSb.s_max_size).AppendLine(); sb.AppendFormat(Localization.On_disk_filesystem_version_0, mnxSb.s_disk_version).AppendLine(); metadata.ClusterSize = mnxSb.s_blocksize; @@ -253,18 +261,23 @@ public sealed partial class MinixFS } else { - SuperBlock mnxSb = littleEndian ? Marshal.ByteArrayToStructureLittleEndian(minixSbSector) + SuperBlock mnxSb = littleEndian + ? Marshal.ByteArrayToStructureLittleEndian(minixSbSector) : Marshal.ByteArrayToStructureBigEndian(minixSbSector); sb.AppendLine(minixVersion); sb.AppendFormat(Localization._0_chars_in_filename, filenamesize).AppendLine(); if(mnxSb.s_zones > 0) // On V2 + { sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, mnxSb.s_zones, mnxSb.s_zones * 1024). AppendLine(); + } else + { sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, mnxSb.s_nzones, mnxSb.s_nzones * 1024). AppendLine(); + } sb.AppendFormat(Localization._0_inodes_in_volume, mnxSb.s_ninodes).AppendLine(); @@ -278,11 +291,13 @@ public sealed partial class MinixFS //sb.AppendFormat("log2 of blocks/zone: {0}", mnx_sb.s_log_zone_size).AppendLine(); // Apparently 0 sb.AppendFormat(Localization._0_bytes_maximum_per_file, mnxSb.s_max_size).AppendLine(); - sb.AppendFormat(Localization.Filesystem_state_0, mnxSb.s_state).AppendLine(); + sb.AppendFormat(Localization.Filesystem_state_0, mnxSb.s_state).AppendLine(); metadata.ClusterSize = 1024; metadata.Clusters = mnxSb.s_zones > 0 ? mnxSb.s_zones : mnxSb.s_nzones; } information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/MinixFS/MinixFS.cs b/Aaru.Filesystems/MinixFS/MinixFS.cs index 4a22a4e54..1a10dd6b1 100644 --- a/Aaru.Filesystems/MinixFS/MinixFS.cs +++ b/Aaru.Filesystems/MinixFS/MinixFS.cs @@ -36,10 +36,16 @@ namespace Aaru.Filesystems; /// Implements detection of the MINIX filesystem public sealed partial class MinixFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.MinixFS_Name; + /// public Guid Id => new("FE248C3B-B727-4AE5-A39F-79EA9A07D4B3"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/MinixFS/Structs.cs b/Aaru.Filesystems/MinixFS/Structs.cs index 03b9d757e..bcf647769 100644 --- a/Aaru.Filesystems/MinixFS/Structs.cs +++ b/Aaru.Filesystems/MinixFS/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of the MINIX filesystem public sealed partial class MinixFS { +#region Nested type: SuperBlock + /// Superblock for Minix v1 and V2 filesystems [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock @@ -61,6 +63,10 @@ public sealed partial class MinixFS public readonly uint s_zones; } +#endregion + +#region Nested type: SuperBlock3 + /// Superblock for Minix v3 filesystems [StructLayout(LayoutKind.Sequential, Pack = 1)] struct SuperBlock3 @@ -92,4 +98,6 @@ public sealed partial class MinixFS /// 0x1E, on-disk structures version public readonly byte s_disk_version; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/NILFS2/Enums.cs b/Aaru.Filesystems/NILFS2/Enums.cs index 07e252336..92d223990 100644 --- a/Aaru.Filesystems/NILFS2/Enums.cs +++ b/Aaru.Filesystems/NILFS2/Enums.cs @@ -34,8 +34,14 @@ namespace Aaru.Filesystems; /// Implements detection of the New Implementation of a Log-structured File System v2 public sealed partial class NILFS2 { +#region Nested type: State + enum State : ushort { - Valid = 0x0001, Error = 0x0002, Resize = 0x0004 + Valid = 0x0001, + Error = 0x0002, + Resize = 0x0004 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/NILFS2/Info.cs b/Aaru.Filesystems/NILFS2/Info.cs index 930863559..992eea79f 100644 --- a/Aaru.Filesystems/NILFS2/Info.cs +++ b/Aaru.Filesystems/NILFS2/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of the New Implementation of a Log-structured File System v2 public sealed partial class NILFS2 { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -52,7 +54,7 @@ public sealed partial class NILFS2 if(sbAddr == 0) sbAddr = 1; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -89,7 +91,7 @@ public sealed partial class NILFS2 if(sbAddr == 0) sbAddr = 1; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -110,11 +112,11 @@ public sealed partial class NILFS2 var sb = new StringBuilder(); sb.AppendLine(Localization.NILFS2_filesystem); - sb.AppendFormat(Localization.Version_0_1, nilfsSb.rev_level, nilfsSb.minor_rev_level).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_block, 1 << (int)(nilfsSb.log_block_size + 10)).AppendLine(); - sb.AppendFormat(Localization._0_bytes_in_volume, nilfsSb.dev_size).AppendLine(); + sb.AppendFormat(Localization.Version_0_1, nilfsSb.rev_level, nilfsSb.minor_rev_level).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_block, 1 << (int)(nilfsSb.log_block_size + 10)).AppendLine(); + sb.AppendFormat(Localization._0_bytes_in_volume, nilfsSb.dev_size).AppendLine(); sb.AppendFormat(Localization._0_blocks_per_segment, nilfsSb.blocks_per_segment).AppendLine(); - sb.AppendFormat(Localization._0_segments, nilfsSb.nsegments).AppendLine(); + sb.AppendFormat(Localization._0_segments, nilfsSb.nsegments).AppendLine(); if(nilfsSb.creator_os == 0) sb.AppendLine(Localization.Filesystem_created_on_Linux); @@ -122,7 +124,7 @@ public sealed partial class NILFS2 sb.AppendFormat(Localization.Creator_OS_code_0, nilfsSb.creator_os).AppendLine(); sb.AppendFormat(Localization._0_bytes_per_inode, nilfsSb.inode_size).AppendLine(); - sb.AppendFormat(Localization.Volume_UUID_0, nilfsSb.uuid).AppendLine(); + sb.AppendFormat(Localization.Volume_UUID_0, nilfsSb.uuid).AppendLine(); sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(nilfsSb.volume_name, encoding)). AppendLine(); @@ -153,4 +155,6 @@ public sealed partial class NILFS2 metadata.Clusters = nilfsSb.dev_size / metadata.ClusterSize; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/NILFS2/NILFS2.cs b/Aaru.Filesystems/NILFS2/NILFS2.cs index d0debcef3..f0453af7f 100644 --- a/Aaru.Filesystems/NILFS2/NILFS2.cs +++ b/Aaru.Filesystems/NILFS2/NILFS2.cs @@ -37,10 +37,16 @@ namespace Aaru.Filesystems; /// Implements detection of the New Implementation of a Log-structured File System v2 public sealed partial class NILFS2 : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.NILFS2_Name; + /// public Guid Id => new("35224226-C5CC-48B5-8FFD-3781E91E86B6"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/NILFS2/Structs.cs b/Aaru.Filesystems/NILFS2/Structs.cs index ed14685e9..ebe0b4716 100644 --- a/Aaru.Filesystems/NILFS2/Structs.cs +++ b/Aaru.Filesystems/NILFS2/Structs.cs @@ -37,6 +37,8 @@ namespace Aaru.Filesystems; /// Implements detection of the New Implementation of a Log-structured File System v2 public sealed partial class NILFS2 { +#region Nested type: Superblock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Superblock { @@ -83,4 +85,6 @@ public sealed partial class NILFS2 public readonly ulong feature_compat_ro; public readonly ulong feature_incompat; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/NTFS/Info.cs b/Aaru.Filesystems/NTFS/Info.cs index 4cfbba84d..9ef2cbca6 100644 --- a/Aaru.Filesystems/NTFS/Info.cs +++ b/Aaru.Filesystems/NTFS/Info.cs @@ -42,13 +42,15 @@ namespace Aaru.Filesystems; /// Implements detection of the New Technology File System (NTFS) public sealed partial class NTFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; - byte[] eigthBytes = new byte[8]; + var eigthBytes = new byte[8]; ErrorNumber errno = imagePlugin.ReadSector(0 + partition.Start, out byte[] ntfsBpb); @@ -61,9 +63,9 @@ public sealed partial class NTFS if(oemName != "NTFS ") return false; - byte fatsNo = ntfsBpb[0x010]; - ushort spFat = BitConverter.ToUInt16(ntfsBpb, 0x016); - ushort signature = BitConverter.ToUInt16(ntfsBpb, 0x1FE); + byte fatsNo = ntfsBpb[0x010]; + var spFat = BitConverter.ToUInt16(ntfsBpb, 0x016); + var signature = BitConverter.ToUInt16(ntfsBpb, 0x1FE); if(fatsNo != 0) return false; @@ -90,7 +92,7 @@ public sealed partial class NTFS BiosParameterBlock ntfsBb = Marshal.ByteArrayToStructureLittleEndian(ntfsBpb); - sb.AppendFormat(Localization._0_bytes_per_sector, ntfsBb.bps).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_sector, ntfsBb.bps).AppendLine(); sb.AppendFormat(Localization._0_sectors_per_cluster_1_bytes, ntfsBb.spc, ntfsBb.spc * ntfsBb.bps).AppendLine(); // sb.AppendFormat("{0} reserved sectors", ntfs_bb.rsectors).AppendLine(); @@ -100,8 +102,8 @@ public sealed partial class NTFS sb.AppendFormat(Localization.Media_descriptor_0, ntfsBb.media).AppendLine(); // sb.AppendFormat("{0} sectors per FAT", ntfs_bb.spfat).AppendLine(); - sb.AppendFormat(Localization._0_sectors_per_track, ntfsBb.sptrk).AppendLine(); - sb.AppendFormat(Localization._0_heads, ntfsBb.heads).AppendLine(); + sb.AppendFormat(Localization._0_sectors_per_track, ntfsBb.sptrk).AppendLine(); + sb.AppendFormat(Localization._0_heads, ntfsBb.heads).AppendLine(); sb.AppendFormat(Localization._0_hidden_sectors_before_filesystem, ntfsBb.hsectors).AppendLine(); // sb.AppendFormat("{0} sectors on volume (big)", ntfs_bb.big_sectors).AppendLine(); @@ -112,18 +114,22 @@ public sealed partial class NTFS sb.AppendFormat(Localization._0_sectors_on_volume_1_bytes, ntfsBb.sectors, ntfsBb.sectors * ntfsBb.bps). AppendLine(); - sb.AppendFormat(Localization.Cluster_where_MFT_starts_0, ntfsBb.mft_lsn).AppendLine(); + sb.AppendFormat(Localization.Cluster_where_MFT_starts_0, ntfsBb.mft_lsn).AppendLine(); sb.AppendFormat(Localization.Cluster_where_MFTMirr_starts_0, ntfsBb.mftmirror_lsn).AppendLine(); if(ntfsBb.mft_rc_clusters > 0) + { sb.AppendFormat(Localization._0_clusters_per_MFT_record_1_bytes, ntfsBb.mft_rc_clusters, ntfsBb.mft_rc_clusters * ntfsBb.bps * ntfsBb.spc).AppendLine(); + } else sb.AppendFormat(Localization._0_bytes_per_MFT_record, 1 << -ntfsBb.mft_rc_clusters).AppendLine(); if(ntfsBb.index_blk_cts > 0) + { sb.AppendFormat(Localization._0_clusters_per_Index_block_1_bytes, ntfsBb.index_blk_cts, ntfsBb.index_blk_cts * ntfsBb.bps * ntfsBb.spc).AppendLine(); + } else sb.AppendFormat(Localization._0_bytes_per_Index_block, 1 << -ntfsBb.index_blk_cts).AppendLine(); @@ -151,4 +157,6 @@ public sealed partial class NTFS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/NTFS/NTFS.cs b/Aaru.Filesystems/NTFS/NTFS.cs index a42ae2542..8d0ac559f 100644 --- a/Aaru.Filesystems/NTFS/NTFS.cs +++ b/Aaru.Filesystems/NTFS/NTFS.cs @@ -36,10 +36,16 @@ namespace Aaru.Filesystems; /// Implements detection of the New Technology File System (NTFS) public sealed partial class NTFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.NTFS_Name; + /// public Guid Id => new("33513B2C-1e6d-4d21-a660-0bbc789c3871"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/NTFS/Structs.cs b/Aaru.Filesystems/NTFS/Structs.cs index 0d16f8dfd..e1af7c2ba 100644 --- a/Aaru.Filesystems/NTFS/Structs.cs +++ b/Aaru.Filesystems/NTFS/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of the New Technology File System (NTFS) public sealed partial class NTFS { +#region Nested type: BiosParameterBlock + /// NTFS $BOOT [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BiosParameterBlock @@ -108,4 +110,6 @@ public sealed partial class NTFS /// 0x1FE, 0xAA55 public readonly ushort signature2; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Nintendo/Helpers.cs b/Aaru.Filesystems/Nintendo/Helpers.cs index 2e260efde..e5ff1fae4 100644 --- a/Aaru.Filesystems/Nintendo/Helpers.cs +++ b/Aaru.Filesystems/Nintendo/Helpers.cs @@ -35,84 +35,107 @@ namespace Aaru.Filesystems; public sealed partial class NintendoPlugin { static string DiscTypeToString(string discType) => discType switch - { - "C" => Localization.Commodore_64_Virtual_Console, - "D" => Localization.Demo, - "E" => Localization.Neo_Geo_Virtual_Console, - "F" => Localization.NES_Virtual_Console, - "G" => Localization.Gamecube, - "H" => Localization.Wii_channel, - "J" => Localization.Super_Nintendo_Virtual_Console, - "L" => Localization.Master_System_Virtual_Console, - "M" => Localization.Megadrive_Virtual_Console, - "N" => Localization.Nintendo_64_Virtual_Console, - "P" => Localization.Promotional_or_TurboGrafx_Virtual_Console, - "Q" => Localization.TurboGrafx_CD_Virtual_Console, - "R" => Localization.Wii, - "S" => Localization.Wii, - "U" => Localization.Utility, - "W" => Localization.WiiWare, - "X" => Localization.MSX_Virtual_Console_or_WiiWare_demo, - "0" => Localization.Diagnostic, - "1" => Localization.Diagnostic, - "4" => Localization.Wii_Backup, - "_" => Localization.WiiFit, - _ => string.Format(Localization.unknown_type_0, discType) - }; + { + "C" => Localization.Commodore_64_Virtual_Console, + "D" => Localization.Demo, + "E" => Localization.Neo_Geo_Virtual_Console, + "F" => Localization.NES_Virtual_Console, + "G" => Localization.Gamecube, + "H" => Localization.Wii_channel, + "J" => Localization.Super_Nintendo_Virtual_Console, + "L" => Localization.Master_System_Virtual_Console, + "M" => Localization.Megadrive_Virtual_Console, + "N" => Localization.Nintendo_64_Virtual_Console, + "P" => Localization. + Promotional_or_TurboGrafx_Virtual_Console, + "Q" => Localization.TurboGrafx_CD_Virtual_Console, + "R" => Localization.Wii, + "S" => Localization.Wii, + "U" => Localization.Utility, + "W" => Localization.WiiWare, + "X" => Localization.MSX_Virtual_Console_or_WiiWare_demo, + "0" => Localization.Diagnostic, + "1" => Localization.Diagnostic, + "4" => Localization.Wii_Backup, + "_" => Localization.WiiFit, + _ => string.Format(Localization.unknown_type_0, discType) + }; static string RegionCodeToString(string regionCode) => regionCode switch - { - "A" => Localization.NintendoPlugin_RegionCodeToString_any_region, - "D" => Localization.NintendoPlugin_RegionCodeToString_Germany, - "N" => Localization.NintendoPlugin_RegionCodeToString_USA, - "E" => Localization.NintendoPlugin_RegionCodeToString_USA, - "F" => Localization.NintendoPlugin_RegionCodeToString_France, - "I" => Localization.NintendoPlugin_RegionCodeToString_Italy, - "J" => Localization.NintendoPlugin_RegionCodeToString_Japan, - "K" => Localization.NintendoPlugin_RegionCodeToString_Korea, - "Q" => Localization.NintendoPlugin_RegionCodeToString_Korea, - "L" => Localization.NintendoPlugin_RegionCodeToString_PAL, - "M" => Localization.NintendoPlugin_RegionCodeToString_PAL, - "P" => Localization.NintendoPlugin_RegionCodeToString_PAL, - "R" => Localization.NintendoPlugin_RegionCodeToString_Russia, - "S" => Localization.NintendoPlugin_RegionCodeToString_Spain, - "T" => Localization.NintendoPlugin_RegionCodeToString_Taiwan, - "U" => Localization.NintendoPlugin_RegionCodeToString_Australia, - _ => string.Format(Localization.NintendoPlugin_RegionCodeToString_unknown_region_code_0, regionCode) - }; + { + "A" => Localization. + NintendoPlugin_RegionCodeToString_any_region, + "D" => Localization. + NintendoPlugin_RegionCodeToString_Germany, + "N" => Localization. + NintendoPlugin_RegionCodeToString_USA, + "E" => Localization. + NintendoPlugin_RegionCodeToString_USA, + "F" => Localization. + NintendoPlugin_RegionCodeToString_France, + "I" => Localization. + NintendoPlugin_RegionCodeToString_Italy, + "J" => Localization. + NintendoPlugin_RegionCodeToString_Japan, + "K" => Localization. + NintendoPlugin_RegionCodeToString_Korea, + "Q" => Localization. + NintendoPlugin_RegionCodeToString_Korea, + "L" => Localization. + NintendoPlugin_RegionCodeToString_PAL, + "M" => Localization. + NintendoPlugin_RegionCodeToString_PAL, + "P" => Localization. + NintendoPlugin_RegionCodeToString_PAL, + "R" => Localization. + NintendoPlugin_RegionCodeToString_Russia, + "S" => Localization. + NintendoPlugin_RegionCodeToString_Spain, + "T" => Localization. + NintendoPlugin_RegionCodeToString_Taiwan, + "U" => Localization. + NintendoPlugin_RegionCodeToString_Australia, + _ => string.Format( + Localization. + NintendoPlugin_RegionCodeToString_unknown_region_code_0, + regionCode) + }; [SuppressMessage("ReSharper", "StringLiteralTypo")] static string PublisherCodeToString(string publisherCode) => publisherCode switch - { - "01" => "Nintendo", - "08" => "CAPCOM", - "41" => "Ubisoft", - "4F" => "Eidos", - "51" => "Acclaim", - "52" => "Activision", - "5D" => "Midway", - "5G" => "Hudson", - "64" => "LucasArts", - "69" => "Electronic Arts", - "6S" => "TDK Mediactive", - "8P" => "SEGA", - "A4" => "Mirage Studios", - "AF" => "Namco", - "B2" => "Bandai", - "DA" => "Tomy", - "EM" => "Konami", - "70" => "Atari", - "4Q" => "Disney Interactive", - "GD" => "Square Enix", - "7D" => "Sierra", - _ => string.Format(Localization.Unknown_publisher_0, publisherCode) - }; + { + "01" => "Nintendo", + "08" => "CAPCOM", + "41" => "Ubisoft", + "4F" => "Eidos", + "51" => "Acclaim", + "52" => "Activision", + "5D" => "Midway", + "5G" => "Hudson", + "64" => "LucasArts", + "69" => "Electronic Arts", + "6S" => "TDK Mediactive", + "8P" => "SEGA", + "A4" => "Mirage Studios", + "AF" => "Namco", + "B2" => "Bandai", + "DA" => "Tomy", + "EM" => "Konami", + "70" => "Atari", + "4Q" => "Disney Interactive", + "GD" => "Square Enix", + "7D" => "Sierra", + _ => string.Format( + Localization.Unknown_publisher_0, + publisherCode) + }; static string PartitionTypeToString(uint type) => type switch - { - 0 => Localization.data, - 1 => Localization.update, - 2 => Localization.channel, - _ => string.Format(Localization.unknown_partition_type_0, type) - }; + { + 0 => Localization.data, + 1 => Localization.update, + 2 => Localization.channel, + _ => string.Format( + Localization.unknown_partition_type_0, type) + }; } \ No newline at end of file diff --git a/Aaru.Filesystems/Nintendo/Info.cs b/Aaru.Filesystems/Nintendo/Info.cs index 8bcbc2efb..bc83af995 100644 --- a/Aaru.Filesystems/Nintendo/Info.cs +++ b/Aaru.Filesystems/Nintendo/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem used by Nintendo Gamecube and Wii discs public sealed partial class NintendoPlugin { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -55,8 +57,8 @@ public sealed partial class NintendoPlugin if(errno != ErrorNumber.NoError) return false; - uint magicGc = BigEndianBitConverter.ToUInt32(header, 0x1C); - uint magicWii = BigEndianBitConverter.ToUInt32(header, 0x18); + var magicGc = BigEndianBitConverter.ToUInt32(header, 0x1C); + var magicWii = BigEndianBitConverter.ToUInt32(header, 0x18); return magicGc == 0xC2339F3D || magicWii == 0x5D1C9EA3; } @@ -77,10 +79,10 @@ public sealed partial class NintendoPlugin if(errno != ErrorNumber.NoError) return; - bool wii = false; + var wii = false; - uint magicGc = BigEndianBitConverter.ToUInt32(header, 0x1C); - uint magicWii = BigEndianBitConverter.ToUInt32(header, 0x18); + var magicGc = BigEndianBitConverter.ToUInt32(header, 0x1C); + var magicWii = BigEndianBitConverter.ToUInt32(header, 0x18); if(magicWii == 0x5D1C9EA3) wii = true; @@ -96,7 +98,7 @@ public sealed partial class NintendoPlugin fields.DiscVersion = header[7]; fields.Streaming |= header[8] > 0; fields.StreamBufferSize = header[9]; - byte[] temp = new byte[64]; + var temp = new byte[64]; Array.Copy(header, 0x20, temp, 0, 64); fields.Title = StringHandlers.CToString(temp, encoding); @@ -122,45 +124,53 @@ public sealed partial class NintendoPlugin fields.ThirdPartitions = new NintendoPartition[BigEndianBitConverter.ToUInt32(header, 0x40010)]; fields.FourthPartitions = new NintendoPartition[BigEndianBitConverter.ToUInt32(header, 0x40018)]; - for(int i = 0; i < fields.FirstPartitions.Length; i++) - if(offset1 + (i * 8) + 8 < 0x50000) + for(var i = 0; i < fields.FirstPartitions.Length; i++) + { + if(offset1 + i * 8 + 8 < 0x50000) { fields.FirstPartitions[i].Offset = - BigEndianBitConverter.ToUInt32(header, (int)(offset1 + (i * 8) + 0)) << 2; + BigEndianBitConverter.ToUInt32(header, (int)(offset1 + i * 8 + 0)) << 2; fields.FirstPartitions[i].Type = - BigEndianBitConverter.ToUInt32(header, (int)(offset1 + (i * 8) + 4)); + BigEndianBitConverter.ToUInt32(header, (int)(offset1 + i * 8 + 4)); } + } - for(int i = 0; i < fields.SecondPartitions.Length; i++) - if(offset1 + (i * 8) + 8 < 0x50000) + for(var i = 0; i < fields.SecondPartitions.Length; i++) + { + if(offset1 + i * 8 + 8 < 0x50000) { fields.FirstPartitions[i].Offset = - BigEndianBitConverter.ToUInt32(header, (int)(offset2 + (i * 8) + 0)) << 2; + BigEndianBitConverter.ToUInt32(header, (int)(offset2 + i * 8 + 0)) << 2; fields.FirstPartitions[i].Type = - BigEndianBitConverter.ToUInt32(header, (int)(offset2 + (i * 8) + 4)); + BigEndianBitConverter.ToUInt32(header, (int)(offset2 + i * 8 + 4)); } + } - for(int i = 0; i < fields.ThirdPartitions.Length; i++) - if(offset1 + (i * 8) + 8 < 0x50000) + for(var i = 0; i < fields.ThirdPartitions.Length; i++) + { + if(offset1 + i * 8 + 8 < 0x50000) { fields.FirstPartitions[i].Offset = - BigEndianBitConverter.ToUInt32(header, (int)(offset3 + (i * 8) + 0)) << 2; + BigEndianBitConverter.ToUInt32(header, (int)(offset3 + i * 8 + 0)) << 2; fields.FirstPartitions[i].Type = - BigEndianBitConverter.ToUInt32(header, (int)(offset3 + (i * 8) + 4)); + BigEndianBitConverter.ToUInt32(header, (int)(offset3 + i * 8 + 4)); } + } - for(int i = 0; i < fields.FourthPartitions.Length; i++) - if(offset1 + (i * 8) + 8 < 0x50000) + for(var i = 0; i < fields.FourthPartitions.Length; i++) + { + if(offset1 + i * 8 + 8 < 0x50000) { fields.FirstPartitions[i].Offset = - BigEndianBitConverter.ToUInt32(header, (int)(offset4 + (i * 8) + 0)) << 2; + BigEndianBitConverter.ToUInt32(header, (int)(offset4 + i * 8 + 0)) << 2; fields.FirstPartitions[i].Type = - BigEndianBitConverter.ToUInt32(header, (int)(offset4 + (i * 8) + 4)); + BigEndianBitConverter.ToUInt32(header, (int)(offset4 + i * 8 + 4)); } + } fields.Region = header[0x4E000]; fields.JapanAge = header[0x4E010]; @@ -181,24 +191,24 @@ public sealed partial class NintendoPlugin fields.FourthPartitions = Array.Empty(); } - AaruConsole.DebugWriteLine(MODULE_NAME, "discType = {0}", fields.DiscType); - AaruConsole.DebugWriteLine(MODULE_NAME, "gameCode = {0}", fields.GameCode); - AaruConsole.DebugWriteLine(MODULE_NAME, "regionCode = {0}", fields.RegionCode); - AaruConsole.DebugWriteLine(MODULE_NAME, "publisherCode = {0}", fields.PublisherCode); - AaruConsole.DebugWriteLine(MODULE_NAME, "discID = {0}", fields.DiscId); - AaruConsole.DebugWriteLine(MODULE_NAME, "discNumber = {0}", fields.DiscNumber); - AaruConsole.DebugWriteLine(MODULE_NAME, "discVersion = {0}", fields.DiscVersion); - AaruConsole.DebugWriteLine(MODULE_NAME, "streaming = {0}", fields.Streaming); + AaruConsole.DebugWriteLine(MODULE_NAME, "discType = {0}", fields.DiscType); + AaruConsole.DebugWriteLine(MODULE_NAME, "gameCode = {0}", fields.GameCode); + AaruConsole.DebugWriteLine(MODULE_NAME, "regionCode = {0}", fields.RegionCode); + AaruConsole.DebugWriteLine(MODULE_NAME, "publisherCode = {0}", fields.PublisherCode); + AaruConsole.DebugWriteLine(MODULE_NAME, "discID = {0}", fields.DiscId); + AaruConsole.DebugWriteLine(MODULE_NAME, "discNumber = {0}", fields.DiscNumber); + AaruConsole.DebugWriteLine(MODULE_NAME, "discVersion = {0}", fields.DiscVersion); + AaruConsole.DebugWriteLine(MODULE_NAME, "streaming = {0}", fields.Streaming); AaruConsole.DebugWriteLine(MODULE_NAME, "streamBufferSize = {0}", fields.StreamBufferSize); - AaruConsole.DebugWriteLine(MODULE_NAME, "title = \"{0}\"", fields.Title); - AaruConsole.DebugWriteLine(MODULE_NAME, "debugOff = 0x{0:X8}", fields.DebugOff); - AaruConsole.DebugWriteLine(MODULE_NAME, "debugAddr = 0x{0:X8}", fields.DebugAddr); - AaruConsole.DebugWriteLine(MODULE_NAME, "dolOff = 0x{0:X8}", fields.DolOff); - AaruConsole.DebugWriteLine(MODULE_NAME, "fstOff = 0x{0:X8}", fields.FstOff); - AaruConsole.DebugWriteLine(MODULE_NAME, "fstSize = {0}", fields.FstSize); - AaruConsole.DebugWriteLine(MODULE_NAME, "fstMax = {0}", fields.FstMax); + AaruConsole.DebugWriteLine(MODULE_NAME, "title = \"{0}\"", fields.Title); + AaruConsole.DebugWriteLine(MODULE_NAME, "debugOff = 0x{0:X8}", fields.DebugOff); + AaruConsole.DebugWriteLine(MODULE_NAME, "debugAddr = 0x{0:X8}", fields.DebugAddr); + AaruConsole.DebugWriteLine(MODULE_NAME, "dolOff = 0x{0:X8}", fields.DolOff); + AaruConsole.DebugWriteLine(MODULE_NAME, "fstOff = 0x{0:X8}", fields.FstOff); + AaruConsole.DebugWriteLine(MODULE_NAME, "fstSize = {0}", fields.FstSize); + AaruConsole.DebugWriteLine(MODULE_NAME, "fstMax = {0}", fields.FstMax); - for(int i = 0; i < fields.FirstPartitions.Length; i++) + for(var i = 0; i < fields.FirstPartitions.Length; i++) { AaruConsole.DebugWriteLine(MODULE_NAME, "firstPartitions[{1}].offset = {0}", fields.FirstPartitions[i].Offset, i); @@ -207,7 +217,7 @@ public sealed partial class NintendoPlugin fields.FirstPartitions[i].Type, i); } - for(int i = 0; i < fields.SecondPartitions.Length; i++) + for(var i = 0; i < fields.SecondPartitions.Length; i++) { AaruConsole.DebugWriteLine(MODULE_NAME, "secondPartitions[{1}].offset = {0}", fields.SecondPartitions[i].Offset, i); @@ -216,7 +226,7 @@ public sealed partial class NintendoPlugin fields.SecondPartitions[i].Type, i); } - for(int i = 0; i < fields.ThirdPartitions.Length; i++) + for(var i = 0; i < fields.ThirdPartitions.Length; i++) { AaruConsole.DebugWriteLine(MODULE_NAME, "thirdPartitions[{1}].offset = {0}", fields.ThirdPartitions[i].Offset, i); @@ -225,7 +235,7 @@ public sealed partial class NintendoPlugin fields.ThirdPartitions[i].Type, i); } - for(int i = 0; i < fields.FourthPartitions.Length; i++) + for(var i = 0; i < fields.FourthPartitions.Length; i++) { AaruConsole.DebugWriteLine(MODULE_NAME, "fourthPartitions[{1}].offset = {0}", fields.FourthPartitions[i].Offset, i); @@ -234,23 +244,24 @@ public sealed partial class NintendoPlugin fields.FourthPartitions[i].Type, i); } - AaruConsole.DebugWriteLine(MODULE_NAME, "region = {0}", fields.Region); - AaruConsole.DebugWriteLine(MODULE_NAME, "japanAge = {0}", fields.JapanAge); - AaruConsole.DebugWriteLine(MODULE_NAME, "usaAge = {0}", fields.UsaAge); - AaruConsole.DebugWriteLine(MODULE_NAME, "germanAge = {0}", fields.GermanAge); - AaruConsole.DebugWriteLine(MODULE_NAME, "pegiAge = {0}", fields.PegiAge); - AaruConsole.DebugWriteLine(MODULE_NAME, "finlandAge = {0}", fields.FinlandAge); - AaruConsole.DebugWriteLine(MODULE_NAME, "portugalAge = {0}", fields.PortugalAge); - AaruConsole.DebugWriteLine(MODULE_NAME, "ukAge = {0}", fields.UkAge); + AaruConsole.DebugWriteLine(MODULE_NAME, "region = {0}", fields.Region); + AaruConsole.DebugWriteLine(MODULE_NAME, "japanAge = {0}", fields.JapanAge); + AaruConsole.DebugWriteLine(MODULE_NAME, "usaAge = {0}", fields.UsaAge); + AaruConsole.DebugWriteLine(MODULE_NAME, "germanAge = {0}", fields.GermanAge); + AaruConsole.DebugWriteLine(MODULE_NAME, "pegiAge = {0}", fields.PegiAge); + AaruConsole.DebugWriteLine(MODULE_NAME, "finlandAge = {0}", fields.FinlandAge); + AaruConsole.DebugWriteLine(MODULE_NAME, "portugalAge = {0}", fields.PortugalAge); + AaruConsole.DebugWriteLine(MODULE_NAME, "ukAge = {0}", fields.UkAge); AaruConsole.DebugWriteLine(MODULE_NAME, "australiaAge = {0}", fields.AustraliaAge); - AaruConsole.DebugWriteLine(MODULE_NAME, "koreaAge = {0}", fields.KoreaAge); + AaruConsole.DebugWriteLine(MODULE_NAME, "koreaAge = {0}", fields.KoreaAge); sbInformation.AppendLine(Localization.Nintendo_optical_filesystem); - sbInformation.AppendLine(wii ? Localization.Nintendo_Wii_Optical_Disc + sbInformation.AppendLine(wii + ? Localization.Nintendo_Wii_Optical_Disc : Localization.Nintendo_GameCube_Optical_Disc); - sbInformation.AppendFormat(Localization.Disc_ID_is_0, fields.DiscId).AppendLine(); + sbInformation.AppendFormat(Localization.Disc_ID_is_0, fields.DiscId).AppendLine(); sbInformation.AppendFormat(Localization.Disc_is_a_0_disc, DiscTypeToString(fields.DiscType)).AppendLine(); sbInformation.AppendFormat(Localization.Disc_region_is_0, RegionCodeToString(fields.RegionCode)).AppendLine(); @@ -258,39 +269,51 @@ public sealed partial class NintendoPlugin AppendLine(); if(fields.DiscNumber > 0) + { sbInformation.AppendFormat(Localization.Disc_number_0_of_a_multi_disc_set, fields.DiscNumber + 1). AppendLine(); + } if(fields.Streaming) sbInformation.AppendLine(Localization.Disc_is_prepared_for_audio_streaming); if(fields.StreamBufferSize > 0) + { sbInformation.AppendFormat(Localization.Audio_streaming_buffer_size_is_0_bytes, fields.StreamBufferSize). AppendLine(); + } sbInformation.AppendFormat(Localization.Title_0, fields.Title).AppendLine(); if(wii) { - for(int i = 0; i < fields.FirstPartitions.Length; i++) + for(var i = 0; i < fields.FirstPartitions.Length; i++) + { sbInformation.AppendFormat(Localization.First_0_partition_starts_at_sector_1, PartitionTypeToString(fields.FirstPartitions[i].Type), fields.FirstPartitions[i].Offset / 2048).AppendLine(); + } - for(int i = 0; i < fields.SecondPartitions.Length; i++) + for(var i = 0; i < fields.SecondPartitions.Length; i++) + { sbInformation.AppendFormat(Localization.Second_0_partition_starts_at_sector_1, PartitionTypeToString(fields.SecondPartitions[i].Type), fields.SecondPartitions[i].Offset / 2048).AppendLine(); + } - for(int i = 0; i < fields.ThirdPartitions.Length; i++) + for(var i = 0; i < fields.ThirdPartitions.Length; i++) + { sbInformation.AppendFormat(Localization.Third_0_partition_starts_at_sector_1, PartitionTypeToString(fields.ThirdPartitions[i].Type), fields.ThirdPartitions[i].Offset / 2048).AppendLine(); + } - for(int i = 0; i < fields.FourthPartitions.Length; i++) + for(var i = 0; i < fields.FourthPartitions.Length; i++) + { sbInformation.AppendFormat(Localization.Fourth_0_partition_starts_at_sector_1, PartitionTypeToString(fields.FourthPartitions[i].Type), fields.FourthPartitions[i].Offset / 2048).AppendLine(); + } // sbInformation.AppendFormat("Region byte is {0}", fields.region).AppendLine(); if((fields.JapanAge & 0x80) != 0x80) @@ -321,8 +344,10 @@ public sealed partial class NintendoPlugin sbInformation.AppendFormat(Localization.Korea_age_rating_is_0, fields.KoreaAge).AppendLine(); } else + { sbInformation.AppendFormat(Localization.FST_starts_at_0_and_has_1_bytes, fields.FstOff, fields.FstSize). AppendLine(); + } information = sbInformation.ToString(); metadata.Bootable = true; @@ -332,4 +357,6 @@ public sealed partial class NintendoPlugin metadata.VolumeName = fields.Title; metadata.VolumeSerial = fields.DiscId; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Nintendo/Nintendo.cs b/Aaru.Filesystems/Nintendo/Nintendo.cs index ad2c8dc1e..1b9b46797 100644 --- a/Aaru.Filesystems/Nintendo/Nintendo.cs +++ b/Aaru.Filesystems/Nintendo/Nintendo.cs @@ -35,11 +35,18 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem used by Nintendo Gamecube and Wii discs public sealed partial class NintendoPlugin : IFilesystem { + const string MODULE_NAME = "Nintendo plugin"; + +#region IFilesystem Members + /// public string Name => Localization.NintendoPlugin_Name; + /// public Guid Id => new("4675fcb4-4418-4288-9e4a-33d6a4ac1126"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "Nintendo plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Nintendo/Structs.cs b/Aaru.Filesystems/Nintendo/Structs.cs index 1a4f832b3..674002cf1 100644 --- a/Aaru.Filesystems/Nintendo/Structs.cs +++ b/Aaru.Filesystems/Nintendo/Structs.cs @@ -32,6 +32,8 @@ namespace Aaru.Filesystems; /// Implements detection of the filesystem used by Nintendo Gamecube and Wii discs public sealed partial class NintendoPlugin { +#region Nested type: NintendoFields + struct NintendoFields { public string DiscType; @@ -66,9 +68,15 @@ public sealed partial class NintendoPlugin public byte KoreaAge; } +#endregion + +#region Nested type: NintendoPartition + struct NintendoPartition { public uint Offset; public uint Type; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ODS/Info.cs b/Aaru.Filesystems/ODS/Info.cs index b67c3be93..e757fb1e2 100644 --- a/Aaru.Filesystems/ODS/Info.cs +++ b/Aaru.Filesystems/ODS/Info.cs @@ -54,6 +54,8 @@ namespace Aaru.Filesystems; /// Implements detection of DEC's On-Disk Structure, aka the ODS filesystem public sealed partial class ODS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -63,7 +65,7 @@ public sealed partial class ODS if(imagePlugin.Info.SectorSize < 512) return false; - byte[] magicB = new byte[12]; + var magicB = new byte[12]; ErrorNumber errno = imagePlugin.ReadSector(1 + partition.Start, out byte[] hbSector); if(errno != ErrorNumber.NoError) @@ -177,12 +179,14 @@ public sealed partial class ODS AppendLine(); sb.AppendFormat(Localization._0_maximum_files_on_the_volume, homeblock.maxfiles).AppendLine(); - sb.AppendFormat(Localization._0_reserved_files, homeblock.resfiles).AppendLine(); + sb.AppendFormat(Localization._0_reserved_files, homeblock.resfiles).AppendLine(); if(homeblock is { rvn: > 0, setcount: > 0 } && StringHandlers.CToString(homeblock.strucname) != " ") + { sb.AppendFormat(Localization.Volume_is_0_of_1_in_set_2, homeblock.rvn, homeblock.setcount, StringHandlers.SpacePaddedToString(homeblock.strucname, encoding)).AppendLine(); + } sb.AppendFormat(Localization.Volume_owner_is_0_ID_1, StringHandlers.SpacePaddedToString(homeblock.ownername, encoding), homeblock.volowner). @@ -197,17 +201,21 @@ public sealed partial class ODS AppendLine(); if(homeblock.revdate > 0) + { sb.AppendFormat(Localization.Volume_was_last_modified_on_0, DateHandlers.VmsToDateTime(homeblock.revdate)). AppendLine(); + } if(homeblock.copydate > 0) + { sb.AppendFormat(Localization.Volume_copied_on_0, DateHandlers.VmsToDateTime(homeblock.copydate)). AppendLine(); + } sb.AppendFormat(Localization.Checksums_0_and_1, homeblock.checksum1, homeblock.checksum2).AppendLine(); sb.AppendLine(Localization.Flags); - sb.AppendFormat(Localization.Window_0, homeblock.window).AppendLine(); - sb.AppendFormat(Localization.Cached_directories_0, homeblock.lru_lim).AppendLine(); + sb.AppendFormat(Localization.Window_0, homeblock.window).AppendLine(); + sb.AppendFormat(Localization.Cached_directories_0, homeblock.lru_lim).AppendLine(); sb.AppendFormat(Localization.Default_allocation_0_blocks, homeblock.extend).AppendLine(); if((homeblock.volchar & 0x01) == 0x01) @@ -255,8 +263,8 @@ public sealed partial class ODS sb.AppendLine(); sb.AppendLine(Localization.Unknown_structures); - sb.AppendFormat(Localization.Security_mask_0, homeblock.sec_mask).AppendLine(); - sb.AppendFormat(Localization.File_protection_0, homeblock.fileprot).AppendLine(); + sb.AppendFormat(Localization.Security_mask_0, homeblock.sec_mask).AppendLine(); + sb.AppendFormat(Localization.File_protection_0, homeblock.fileprot).AppendLine(); sb.AppendFormat(Localization.Record_protection_0, homeblock.recprot).AppendLine(); metadata = new FileSystem @@ -269,15 +277,13 @@ public sealed partial class ODS }; if(homeblock.credate > 0) - { metadata.CreationDate = DateHandlers.VmsToDateTime(homeblock.credate); - } if(homeblock.revdate > 0) - { metadata.ModificationDate = DateHandlers.VmsToDateTime(homeblock.revdate); - } information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ODS/ODS.cs b/Aaru.Filesystems/ODS/ODS.cs index 831ea0e7f..40314578c 100644 --- a/Aaru.Filesystems/ODS/ODS.cs +++ b/Aaru.Filesystems/ODS/ODS.cs @@ -48,11 +48,18 @@ namespace Aaru.Filesystems; /// Implements detection of DEC's On-Disk Structure, aka the ODS filesystem public sealed partial class ODS : IFilesystem { + const string MODULE_NAME = "Files-11 plugin"; + +#region IFilesystem Members + /// public string Name => Localization.ODS_Name; + /// public Guid Id => new("de20633c-8021-4384-aeb0-83b0df14491f"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "Files-11 plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ODS/Structs.cs b/Aaru.Filesystems/ODS/Structs.cs index 1a8741321..78d4d2020 100644 --- a/Aaru.Filesystems/ODS/Structs.cs +++ b/Aaru.Filesystems/ODS/Structs.cs @@ -47,6 +47,8 @@ namespace Aaru.Filesystems; /// Implements detection of DEC's On-Disk Structure, aka the ODS filesystem public sealed partial class ODS { +#region Nested type: HomeBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct HomeBlock { @@ -150,4 +152,6 @@ public sealed partial class ODS /// 0x1FE, Checksum of preceding 255 words (16 bit units) public readonly ushort checksum2; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Opera/Consts.cs b/Aaru.Filesystems/Opera/Consts.cs index a736e0a67..ed60b5555 100644 --- a/Aaru.Filesystems/Opera/Consts.cs +++ b/Aaru.Filesystems/Opera/Consts.cs @@ -44,13 +44,20 @@ public sealed partial class OperaFS const uint TYPE_LBL = 0x2A6C626C; /// Catapult const uint TYPE_ZAP = 0x2A7A6170; - static readonly int _directoryEntrySize = Marshal.SizeOf(); + + const string FS_TYPE = "opera"; + static readonly int _directoryEntrySize = Marshal.SizeOf(); + +#region Nested type: FileFlags enum FileFlags : uint { - File = 2, Special = 6, Directory = 7, - LastEntryInBlock = 0x40000000, LastEntry = 0x80000000 + File = 2, + Special = 6, + Directory = 7, + LastEntryInBlock = 0x40000000, + LastEntry = 0x80000000 } - const string FS_TYPE = "opera"; +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Opera/Dir.cs b/Aaru.Filesystems/Opera/Dir.cs index 6f450e19d..b49fcb190 100644 --- a/Aaru.Filesystems/Opera/Dir.cs +++ b/Aaru.Filesystems/Opera/Dir.cs @@ -38,6 +38,8 @@ namespace Aaru.Filesystems; public sealed partial class OperaFS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber OpenDir(string path, out IDirNode node) { @@ -75,10 +77,7 @@ public sealed partial class OperaFS return ErrorNumber.NoError; } - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); KeyValuePair entry = _rootDirectoryCache.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) == pieces[0]); @@ -93,7 +92,7 @@ public sealed partial class OperaFS currentDirectory = _rootDirectoryCache; - for(int p = 0; p < pieces.Length; p++) + for(var p = 0; p < pieces.Length; p++) { entry = currentDirectory.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) == pieces[p]); @@ -163,6 +162,8 @@ public sealed partial class OperaFS return ErrorNumber.NoError; } +#endregion + Dictionary DecodeDirectory(int firstBlock) { Dictionary entries = new(); @@ -182,7 +183,7 @@ public sealed partial class OperaFS header = Marshal.ByteArrayToStructureBigEndian(data); nextBlock = header.next_block + firstBlock; - int off = (int)header.first_used; + var off = (int)header.first_used; var entry = new DirectoryEntry(); @@ -197,9 +198,11 @@ public sealed partial class OperaFS Pointers = new uint[entry.last_copy + 1] }; - for(int i = 0; i <= entry.last_copy; i++) + for(var i = 0; i <= entry.last_copy; i++) + { entryWithPointers.Pointers[i] = - BigEndianBitConverter.ToUInt32(data, off + _directoryEntrySize + (i * 4)); + BigEndianBitConverter.ToUInt32(data, off + _directoryEntrySize + i * 4); + } entries.Add(name, entryWithPointers); @@ -207,7 +210,7 @@ public sealed partial class OperaFS (entry.flags & (uint)FileFlags.LastEntryInBlock) != 0) break; - off += (int)(_directoryEntrySize + ((entry.last_copy + 1) * 4)); + off += (int)(_directoryEntrySize + (entry.last_copy + 1) * 4); } if((entry.flags & (uint)FileFlags.LastEntry) != 0) diff --git a/Aaru.Filesystems/Opera/File.cs b/Aaru.Filesystems/Opera/File.cs index f86f930d5..edd8a12dd 100644 --- a/Aaru.Filesystems/Opera/File.cs +++ b/Aaru.Filesystems/Opera/File.cs @@ -38,6 +38,8 @@ namespace Aaru.Filesystems; public sealed partial class OperaFS { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -133,7 +135,7 @@ public sealed partial class OperaFS else fileBlockSizeRatio = mynode._dentry.Entry.block_size / _image.Info.SectorSize; - ErrorNumber errno = _image.ReadSectors((ulong)(mynode._dentry.Pointers[0] + (firstBlock * fileBlockSizeRatio)), + ErrorNumber errno = _image.ReadSectors((ulong)(mynode._dentry.Pointers[0] + firstBlock * fileBlockSizeRatio), (uint)(sizeInBlocks * fileBlockSizeRatio), out byte[] buf); if(errno != ErrorNumber.NoError) @@ -192,6 +194,8 @@ public sealed partial class OperaFS return ErrorNumber.NoError; } +#endregion + ErrorNumber GetFileEntry(string path, out DirectoryEntryWithPointers entry) { entry = null; @@ -200,15 +204,12 @@ public sealed partial class OperaFS ? path[1..].ToLower(CultureInfo.CurrentUICulture) : path.ToLower(CultureInfo.CurrentUICulture); - string[] pieces = cutPath.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pieces.Length == 0) return ErrorNumber.InvalidArgument; - string parentPath = string.Join("/", pieces, 0, pieces.Length - 1); + var parentPath = string.Join("/", pieces, 0, pieces.Length - 1); if(!_directoryCache.TryGetValue(parentPath, out _)) { diff --git a/Aaru.Filesystems/Opera/Info.cs b/Aaru.Filesystems/Opera/Info.cs index 1b8a3f222..9fc8d2fb7 100644 --- a/Aaru.Filesystems/Opera/Info.cs +++ b/Aaru.Filesystems/Opera/Info.cs @@ -38,6 +38,8 @@ namespace Aaru.Filesystems; public sealed partial class OperaFS { +#region IReadOnlyFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -49,7 +51,7 @@ public sealed partial class OperaFS if(errno != ErrorNumber.NoError) return false; - byte[] syncBytes = new byte[5]; + var syncBytes = new byte[5]; byte recordType = sbSector[0x000]; Array.Copy(sbSector, 0x001, syncBytes, 0, 5); @@ -89,40 +91,52 @@ public sealed partial class OperaFS superBlockmetadata.AppendFormat(Localization.Opera_filesystem_disc).AppendLine(); if(!string.IsNullOrEmpty(StringHandlers.CToString(sb.volume_label, encoding))) + { superBlockmetadata. AppendFormat(Localization.Volume_label_0, StringHandlers.CToString(sb.volume_label, encoding)). AppendLine(); + } if(!string.IsNullOrEmpty(StringHandlers.CToString(sb.volume_comment, encoding))) + { superBlockmetadata. AppendFormat(Localization.Volume_comment_0, StringHandlers.CToString(sb.volume_comment, encoding)). AppendLine(); + } superBlockmetadata.AppendFormat(Localization.Volume_identifier_0_X8, sb.volume_id).AppendLine(); - superBlockmetadata.AppendFormat(Localization.Block_size_0_bytes, sb.block_size).AppendLine(); + superBlockmetadata.AppendFormat(Localization.Block_size_0_bytes, sb.block_size).AppendLine(); if(imagePlugin.Info.SectorSize is 2336 or 2352 or 2448) { if(sb.block_size != 2048) + { superBlockmetadata. - AppendFormat(Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, - sb.block_size, 2048); + AppendFormat( + Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, + sb.block_size, 2048); + } } else if(imagePlugin.Info.SectorSize != sb.block_size) + { superBlockmetadata. - AppendFormat(Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, - sb.block_size, imagePlugin.Info.SectorSize); + AppendFormat( + Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, + sb.block_size, imagePlugin.Info.SectorSize); + } superBlockmetadata. AppendFormat(Localization.Volume_size_0_blocks_1_bytes, sb.block_count, sb.block_size * sb.block_count). AppendLine(); if(sb.block_count > imagePlugin.Info.Sectors) + { superBlockmetadata. AppendFormat(Localization.WARNING__Filesystem_indicates_0_blocks_while_device_indicates_1_blocks, sb.block_count, imagePlugin.Info.Sectors); + } - superBlockmetadata.AppendFormat(Localization.Root_directory_identifier_0, sb.root_dirid).AppendLine(); + superBlockmetadata.AppendFormat(Localization.Root_directory_identifier_0, sb.root_dirid).AppendLine(); superBlockmetadata.AppendFormat(Localization.Root_directory_block_size_0_bytes, sb.rootdir_bsize).AppendLine(); superBlockmetadata.AppendFormat(Localization.Root_directory_size_0_blocks_1_bytes, sb.rootdir_blocks, @@ -140,4 +154,6 @@ public sealed partial class OperaFS Clusters = sb.block_count }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Opera/Opera.cs b/Aaru.Filesystems/Opera/Opera.cs index 1f96ad3ae..ba2cfd5d1 100644 --- a/Aaru.Filesystems/Opera/Opera.cs +++ b/Aaru.Filesystems/Opera/Opera.cs @@ -42,19 +42,24 @@ public sealed partial class OperaFS : IReadOnlyFilesystem { bool _debug; Dictionary> _directoryCache; + Encoding _encoding; IMediaImage _image; bool _mounted; Dictionary _rootDirectoryCache; FileSystemInfo _statfs; uint _volumeBlockSizeRatio; - Encoding _encoding; + +#region IReadOnlyFilesystem Members /// public FileSystem Metadata { get; private set; } + /// public string Name => Localization.OperaFS_Name; + /// public Guid Id => new("0ec84ec7-eae6-4196-83fe-943b3fe46dbd"); + /// public string Author => Authors.NataliaPortillo; @@ -84,10 +89,10 @@ public sealed partial class OperaFS : IReadOnlyFilesystem /// public Dictionary Namespaces => null; +#endregion + static Dictionary GetDefaultOptions() => new() { - { - "debug", false.ToString() - } + { "debug", false.ToString() } }; } \ No newline at end of file diff --git a/Aaru.Filesystems/Opera/Structs.cs b/Aaru.Filesystems/Opera/Structs.cs index e213e6321..8d8c6d3f3 100644 --- a/Aaru.Filesystems/Opera/Structs.cs +++ b/Aaru.Filesystems/Opera/Structs.cs @@ -33,6 +33,106 @@ namespace Aaru.Filesystems; public sealed partial class OperaFS { +#region Nested type: DirectoryEntry + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryEntry + { + /// File flags, see + public readonly uint flags; + /// Unique file identifier + public readonly uint id; + /// Entry type + public readonly uint type; + /// Block size + public readonly uint block_size; + /// Size in bytes + public readonly uint byte_count; + /// Block count + public readonly uint block_count; + /// Unknown + public readonly uint burst; + /// Unknown + public readonly uint gap; + /// Filename + [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_NAME)] + public readonly byte[] name; + /// Last copy + public readonly uint last_copy; + } + +#endregion + +#region Nested type: DirectoryEntryWithPointers + + sealed class DirectoryEntryWithPointers + { + public DirectoryEntry Entry; + public uint[] Pointers; + } + +#endregion + +#region Nested type: DirectoryHeader + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryHeader + { + /// Next block from this directory, -1 if last + public readonly int next_block; + /// Previous block from this directory, -1 if first + public readonly int prev_block; + /// Directory flags + public readonly uint flags; + /// Offset to first free unused byte in the directory + public readonly uint first_free; + /// Offset to first directory entry + public readonly uint first_used; + } + +#endregion + +#region Nested type: OperaDirNode + + sealed class OperaDirNode : IDirNode + { + internal string[] _contents; + internal int _position; + + #region IDirNode Members + + /// + public string Path { get; init; } + + #endregion + } + +#endregion + +#region Nested type: OperaFileNode + + sealed class OperaFileNode : IFileNode + { + internal DirectoryEntryWithPointers _dentry; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: SuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock { @@ -67,69 +167,5 @@ public sealed partial class OperaFS public readonly uint last_root_copy; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryHeader - { - /// Next block from this directory, -1 if last - public readonly int next_block; - /// Previous block from this directory, -1 if first - public readonly int prev_block; - /// Directory flags - public readonly uint flags; - /// Offset to first free unused byte in the directory - public readonly uint first_free; - /// Offset to first directory entry - public readonly uint first_used; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryEntry - { - /// File flags, see - public readonly uint flags; - /// Unique file identifier - public readonly uint id; - /// Entry type - public readonly uint type; - /// Block size - public readonly uint block_size; - /// Size in bytes - public readonly uint byte_count; - /// Block count - public readonly uint block_count; - /// Unknown - public readonly uint burst; - /// Unknown - public readonly uint gap; - /// Filename - [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_NAME)] - public readonly byte[] name; - /// Last copy - public readonly uint last_copy; - } - - sealed class DirectoryEntryWithPointers - { - public DirectoryEntry Entry; - public uint[] Pointers; - } - - sealed class OperaFileNode : IFileNode - { - internal DirectoryEntryWithPointers _dentry; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } - - sealed class OperaDirNode : IDirNode - { - internal string[] _contents; - internal int _position; - /// - public string Path { get; init; } - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Opera/Super.cs b/Aaru.Filesystems/Opera/Super.cs index 545a60c9b..e833d9869 100644 --- a/Aaru.Filesystems/Opera/Super.cs +++ b/Aaru.Filesystems/Opera/Super.cs @@ -39,9 +39,11 @@ namespace Aaru.Filesystems; public sealed partial class OperaFS { +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { // TODO: Find correct default encoding _encoding = Encoding.ASCII; @@ -95,7 +97,7 @@ public sealed partial class OperaFS }; _image = imagePlugin; - int firstRootBlock = BigEndianBitConverter.ToInt32(sbSector, Marshal.SizeOf()); + var firstRootBlock = BigEndianBitConverter.ToInt32(sbSector, Marshal.SizeOf()); _rootDirectoryCache = DecodeDirectory(firstRootBlock); _directoryCache = new Dictionary>(); _mounted = true; @@ -126,4 +128,6 @@ public sealed partial class OperaFS return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/PCEngine/Info.cs b/Aaru.Filesystems/PCEngine/Info.cs index 028731b33..b08a57420 100644 --- a/Aaru.Filesystems/PCEngine/Info.cs +++ b/Aaru.Filesystems/PCEngine/Info.cs @@ -43,13 +43,15 @@ namespace Aaru.Filesystems; /// Implements detection of the PC-Engine CD file headers public sealed partial class PCEnginePlugin { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; - byte[] systemDescriptor = new byte[23]; + var systemDescriptor = new byte[23]; ErrorNumber errno = imagePlugin.ReadSector(1 + partition.Start, out byte[] sector); if(errno != ErrorNumber.NoError) @@ -73,4 +75,6 @@ public sealed partial class PCEnginePlugin ClusterSize = 2048 }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/PCEngine/PCEngine.cs b/Aaru.Filesystems/PCEngine/PCEngine.cs index 22bb6c435..70de9b4da 100644 --- a/Aaru.Filesystems/PCEngine/PCEngine.cs +++ b/Aaru.Filesystems/PCEngine/PCEngine.cs @@ -39,10 +39,16 @@ namespace Aaru.Filesystems; /// Implements detection of the PC-Engine CD file headers public sealed partial class PCEnginePlugin : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.PCEnginePlugin_Name; + /// public Guid Id => new("e5ee6d7c-90fa-49bd-ac89-14ef750b8af3"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/PCFX/Info.cs b/Aaru.Filesystems/PCFX/Info.cs index 815fe85e2..680ffc2b2 100644 --- a/Aaru.Filesystems/PCFX/Info.cs +++ b/Aaru.Filesystems/PCFX/Info.cs @@ -45,6 +45,8 @@ namespace Aaru.Filesystems; /// Implements detection of NEC PC-FX headers public sealed partial class PCFX { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -84,9 +86,9 @@ public sealed partial class PCFX try { date = encoding.GetString(header.date); - int year = int.Parse(date[..4]); - int month = int.Parse(date.Substring(4, 2)); - int day = int.Parse(date.Substring(6, 2)); + var year = int.Parse(date[..4]); + var month = int.Parse(date.Substring(4, 2)); + var day = int.Parse(date.Substring(6, 2)); dateTime = new DateTime(year, month, day); } catch @@ -122,8 +124,10 @@ public sealed partial class PCFX Bootable = true, CreationDate = date != null ? dateTime : null, PublisherIdentifier = StringHandlers.CToString(header.makerName, encoding), - VolumeName = StringHandlers.CToString(header.title, encoding), + VolumeName = StringHandlers.CToString(header.title, encoding), SystemIdentifier = "PC-FX" }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/PCFX/PCFX.cs b/Aaru.Filesystems/PCFX/PCFX.cs index b9cbaf7c8..8d92ccf91 100644 --- a/Aaru.Filesystems/PCFX/PCFX.cs +++ b/Aaru.Filesystems/PCFX/PCFX.cs @@ -40,10 +40,16 @@ namespace Aaru.Filesystems; /// Implements detection of NEC PC-FX headers public sealed partial class PCFX : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.PCFX_Name; + /// public Guid Id => new("8BC27CCE-D9E9-48F8-BA93-C66A86EB565A"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/PCFX/Structs.cs b/Aaru.Filesystems/PCFX/Structs.cs index a5c566463..eb44350e8 100644 --- a/Aaru.Filesystems/PCFX/Structs.cs +++ b/Aaru.Filesystems/PCFX/Structs.cs @@ -39,6 +39,8 @@ namespace Aaru.Filesystems; /// Implements detection of NEC PC-FX headers public sealed partial class PCFX { +#region Nested type: Header + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Header { @@ -65,4 +67,6 @@ public sealed partial class PCFX [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public readonly byte[] date; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/PFS/Info.cs b/Aaru.Filesystems/PFS/Info.cs index f457d63ee..8f9f39b8d 100644 --- a/Aaru.Filesystems/PFS/Info.cs +++ b/Aaru.Filesystems/PFS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Professional File System public sealed partial class PFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -52,7 +54,7 @@ public sealed partial class PFS if(errno != ErrorNumber.NoError) return false; - uint magic = BigEndianBitConverter.ToUInt32(sector, 0x00); + var magic = BigEndianBitConverter.ToUInt32(sector, 0x00); return magic is AFS_DISK or PFS2_DISK or PFS_DISK or MUAF_DISK or MUPFS_DISK; } @@ -113,8 +115,10 @@ public sealed partial class PFS rootBlock.creationtick)).AppendLine(); if(rootBlock.extension > 0) + { sbInformation.AppendFormat(Localization.Root_block_extension_resides_at_block_0, rootBlock.extension). AppendLine(); + } information = sbInformation.ToString(); @@ -126,4 +130,6 @@ public sealed partial class PFS metadata.ClusterSize = imagePlugin.Info.SectorSize; metadata.VolumeName = StringHandlers.PascalToString(rootBlock.diskname, encoding); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/PFS/PFS.cs b/Aaru.Filesystems/PFS/PFS.cs index 4c2d87542..a93bbc196 100644 --- a/Aaru.Filesystems/PFS/PFS.cs +++ b/Aaru.Filesystems/PFS/PFS.cs @@ -37,10 +37,16 @@ namespace Aaru.Filesystems; /// Implements detection of the Professional File System public sealed partial class PFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.PFS_Name; + /// public Guid Id => new("68DE769E-D957-406A-8AE4-3781CA8CDA77"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/PFS/Structs.cs b/Aaru.Filesystems/PFS/Structs.cs index 51da1ecc0..bd9d29051 100644 --- a/Aaru.Filesystems/PFS/Structs.cs +++ b/Aaru.Filesystems/PFS/Structs.cs @@ -36,6 +36,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Professional File System public sealed partial class PFS { +#region Nested type: BootBlock + /// Boot block, first 2 sectors [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BootBlock @@ -46,6 +48,10 @@ public sealed partial class PFS public readonly byte[] bootCode; } +#endregion + +#region Nested type: RootBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct RootBlock { @@ -91,4 +97,6 @@ public sealed partial class PFS /// Unused public readonly uint unused; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ProDOS/Consts.cs b/Aaru.Filesystems/ProDOS/Consts.cs index b35b7d00c..682c066f1 100644 --- a/Aaru.Filesystems/ProDOS/Consts.cs +++ b/Aaru.Filesystems/ProDOS/Consts.cs @@ -35,7 +35,8 @@ namespace Aaru.Filesystems; // Information from Apple ProDOS 8 Technical Reference /// /// Implements detection of Apple ProDOS filesystem -[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class ProDOSPlugin { const byte EMPTY_STORAGE_TYPE = 0x00; diff --git a/Aaru.Filesystems/ProDOS/Info.cs b/Aaru.Filesystems/ProDOS/Info.cs index 87505586d..06fadf034 100644 --- a/Aaru.Filesystems/ProDOS/Info.cs +++ b/Aaru.Filesystems/ProDOS/Info.cs @@ -45,25 +45,28 @@ namespace Aaru.Filesystems; // Information from Apple ProDOS 8 Technical Reference /// /// Implements detection of Apple ProDOS filesystem -[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class ProDOSPlugin { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Length < 3) return false; - uint multiplier = (uint)(imagePlugin.Info.SectorSize == 256 ? 2 : 1); + var multiplier = (uint)(imagePlugin.Info.SectorSize == 256 ? 2 : 1); // Blocks 0 and 1 are boot code - ErrorNumber errno = imagePlugin.ReadSectors((2 * multiplier) + partition.Start, multiplier, + ErrorNumber errno = imagePlugin.ReadSectors(2 * multiplier + partition.Start, multiplier, out byte[] rootDirectoryKeyBlock); if(errno != ErrorNumber.NoError) return false; - bool apmFromHddOnCd = false; + var apmFromHddOnCd = false; if(imagePlugin.Info.SectorSize is 2352 or 2448 or 2048) { @@ -72,12 +75,10 @@ public sealed partial class ProDOSPlugin if(errno != ErrorNumber.NoError) return false; - foreach(int offset in new[] - { - 0, 0x200, 0x400, 0x600, 0x800, 0xA00 - }.Where(offset => tmp.Length > offset + 0x200 && BitConverter.ToUInt16(tmp, offset) == 0 && - (byte)((tmp[offset + 0x04] & STORAGE_TYPE_MASK) >> 4) == ROOT_DIRECTORY_TYPE && - tmp[offset + 0x23] == ENTRY_LENGTH && tmp[offset + 0x24] == ENTRIES_PER_BLOCK)) + foreach(int offset in new[] { 0, 0x200, 0x400, 0x600, 0x800, 0xA00 }.Where( + offset => tmp.Length > offset + 0x200 && BitConverter.ToUInt16(tmp, offset) == 0 && + (byte)((tmp[offset + 0x04] & STORAGE_TYPE_MASK) >> 4) == ROOT_DIRECTORY_TYPE && + tmp[offset + 0x23] == ENTRY_LENGTH && tmp[offset + 0x24] == ENTRIES_PER_BLOCK)) { Array.Copy(tmp, offset, rootDirectoryKeyBlock, 0, 0x200); apmFromHddOnCd = true; @@ -86,13 +87,13 @@ public sealed partial class ProDOSPlugin } } - ushort prePointer = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0); + var prePointer = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0); AaruConsole.DebugWriteLine(MODULE_NAME, "prePointer = {0}", prePointer); if(prePointer != 0) return false; - byte storageType = (byte)((rootDirectoryKeyBlock[0x04] & STORAGE_TYPE_MASK) >> 4); + var storageType = (byte)((rootDirectoryKeyBlock[0x04] & STORAGE_TYPE_MASK) >> 4); AaruConsole.DebugWriteLine(MODULE_NAME, "storage_type = {0}", storageType); if(storageType != ROOT_DIRECTORY_TYPE) @@ -110,13 +111,13 @@ public sealed partial class ProDOSPlugin if(entriesPerBlock != ENTRIES_PER_BLOCK) return false; - ushort bitMapPointer = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0x27); + var bitMapPointer = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0x27); AaruConsole.DebugWriteLine(MODULE_NAME, "bit_map_pointer = {0}", bitMapPointer); if(bitMapPointer > partition.End) return false; - ushort totalBlocks = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0x29); + var totalBlocks = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0x29); if(apmFromHddOnCd) totalBlocks /= 4; @@ -134,17 +135,17 @@ public sealed partial class ProDOSPlugin encoding ??= new Apple2c(); information = ""; metadata = new FileSystem(); - var sbInformation = new StringBuilder(); - uint multiplier = (uint)(imagePlugin.Info.SectorSize == 256 ? 2 : 1); + var sbInformation = new StringBuilder(); + var multiplier = (uint)(imagePlugin.Info.SectorSize == 256 ? 2 : 1); // Blocks 0 and 1 are boot code - ErrorNumber errno = imagePlugin.ReadSectors((2 * multiplier) + partition.Start, multiplier, + ErrorNumber errno = imagePlugin.ReadSectors(2 * multiplier + partition.Start, multiplier, out byte[] rootDirectoryKeyBlockBytes); if(errno != ErrorNumber.NoError) return; - bool apmFromHddOnCd = false; + var apmFromHddOnCd = false; if(imagePlugin.Info.SectorSize is 2352 or 2448 or 2048) { @@ -153,12 +154,10 @@ public sealed partial class ProDOSPlugin if(errno != ErrorNumber.NoError) return; - foreach(int offset in new[] - { - 0, 0x200, 0x400, 0x600, 0x800, 0xA00 - }.Where(offset => BitConverter.ToUInt16(tmp, offset) == 0 && - (byte)((tmp[offset + 0x04] & STORAGE_TYPE_MASK) >> 4) == ROOT_DIRECTORY_TYPE && - tmp[offset + 0x23] == ENTRY_LENGTH && tmp[offset + 0x24] == ENTRIES_PER_BLOCK)) + foreach(int offset in new[] { 0, 0x200, 0x400, 0x600, 0x800, 0xA00 }.Where( + offset => BitConverter.ToUInt16(tmp, offset) == 0 && + (byte)((tmp[offset + 0x04] & STORAGE_TYPE_MASK) >> 4) == ROOT_DIRECTORY_TYPE && + tmp[offset + 0x23] == ENTRY_LENGTH && tmp[offset + 0x24] == ENTRIES_PER_BLOCK)) { Array.Copy(tmp, offset, rootDirectoryKeyBlockBytes, 0, 0x200); apmFromHddOnCd = true; @@ -177,32 +176,32 @@ public sealed partial class ProDOSPlugin rootDirectoryKeyBlock.header.storage_type = (byte)((rootDirectoryKeyBlockBytes[0x04] & STORAGE_TYPE_MASK) >> 4); rootDirectoryKeyBlock.header.name_length = (byte)(rootDirectoryKeyBlockBytes[0x04] & NAME_LENGTH_MASK); - byte[] temporal = new byte[rootDirectoryKeyBlock.header.name_length]; + var temporal = new byte[rootDirectoryKeyBlock.header.name_length]; Array.Copy(rootDirectoryKeyBlockBytes, 0x05, temporal, 0, rootDirectoryKeyBlock.header.name_length); rootDirectoryKeyBlock.header.volume_name = encoding.GetString(temporal); rootDirectoryKeyBlock.header.reserved = BitConverter.ToUInt64(rootDirectoryKeyBlockBytes, 0x14); - ushort tempTimestampLeft = BitConverter.ToUInt16(rootDirectoryKeyBlockBytes, 0x1C); - ushort tempTimestampRight = BitConverter.ToUInt16(rootDirectoryKeyBlockBytes, 0x1E); + var tempTimestampLeft = BitConverter.ToUInt16(rootDirectoryKeyBlockBytes, 0x1C); + var tempTimestampRight = BitConverter.ToUInt16(rootDirectoryKeyBlockBytes, 0x1E); bool dateCorrect; try { - uint tempTimestamp = (uint)((tempTimestampLeft << 16) + tempTimestampRight); - int year = (int)((tempTimestamp & YEAR_MASK) >> 25); - int month = (int)((tempTimestamp & MONTH_MASK) >> 21); - int day = (int)((tempTimestamp & DAY_MASK) >> 16); - int hour = (int)((tempTimestamp & HOUR_MASK) >> 8); - int minute = (int)(tempTimestamp & MINUTE_MASK); + var tempTimestamp = (uint)((tempTimestampLeft << 16) + tempTimestampRight); + var year = (int)((tempTimestamp & YEAR_MASK) >> 25); + var month = (int)((tempTimestamp & MONTH_MASK) >> 21); + var day = (int)((tempTimestamp & DAY_MASK) >> 16); + var hour = (int)((tempTimestamp & HOUR_MASK) >> 8); + var minute = (int)(tempTimestamp & MINUTE_MASK); year += 1900; if(year < 1940) year += 100; - AaruConsole.DebugWriteLine(MODULE_NAME, "temp_timestamp_left = 0x{0:X4}", tempTimestampLeft); + AaruConsole.DebugWriteLine(MODULE_NAME, "temp_timestamp_left = 0x{0:X4}", tempTimestampLeft); AaruConsole.DebugWriteLine(MODULE_NAME, "temp_timestamp_right = 0x{0:X4}", tempTimestampRight); - AaruConsole.DebugWriteLine(MODULE_NAME, "temp_timestamp = 0x{0:X8}", tempTimestamp); + AaruConsole.DebugWriteLine(MODULE_NAME, "temp_timestamp = 0x{0:X8}", tempTimestamp); AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Datetime_field_year_0_month_1_day_2_hour_3_minute_4, year, month, @@ -227,8 +226,10 @@ public sealed partial class ProDOSPlugin rootDirectoryKeyBlock.header.total_blocks = BitConverter.ToUInt16(rootDirectoryKeyBlockBytes, 0x29); if(apmFromHddOnCd) + { sbInformation.AppendLine(Localization.ProDOS_uses_512_bytes_sector_while_device_uses_2048_bytes_sector). AppendLine(); + } if(rootDirectoryKeyBlock.header.version != VERSION1 || rootDirectoryKeyBlock.header.min_version != VERSION1) @@ -240,22 +241,29 @@ public sealed partial class ProDOSPlugin if(rootDirectoryKeyBlock.header.version == VERSION1) sbInformation.AppendLine(Localization.ProDOS_version_one_used_to_create_this_volume); else + { sbInformation.AppendFormat(Localization.Unknown_ProDOS_version_with_field_0_used_to_create_this_volume, rootDirectoryKeyBlock.header.version).AppendLine(); + } if(rootDirectoryKeyBlock.header.min_version == VERSION1) sbInformation.AppendLine(Localization.ProDOS_version_one_at_least_required_for_reading_this_volume); else + { sbInformation. - AppendFormat(Localization.Unknown_ProDOS_version_with_field_0_is_at_least_required_for_reading_this_volume, - rootDirectoryKeyBlock.header.min_version).AppendLine(); + AppendFormat( + Localization.Unknown_ProDOS_version_with_field_0_is_at_least_required_for_reading_this_volume, + rootDirectoryKeyBlock.header.min_version).AppendLine(); + } sbInformation.AppendFormat(Localization.Volume_name_is_0, rootDirectoryKeyBlock.header.volume_name). AppendLine(); if(dateCorrect) + { sbInformation.AppendFormat(Localization.Volume_created_on_0, rootDirectoryKeyBlock.header.creation_time). AppendLine(); + } sbInformation. AppendFormat(Localization._0_bytes_per_directory_entry, rootDirectoryKeyBlock.header.entry_length). @@ -291,8 +299,10 @@ public sealed partial class ProDOSPlugin // TODO: Fix mask if((rootDirectoryKeyBlock.header.access & RESERVED_ATTRIBUTE_MASK) != 0) + { AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Reserved_attributes_are_set_0, rootDirectoryKeyBlock.header.access); + } information = sbInformation.ToString(); @@ -312,4 +322,6 @@ public sealed partial class ProDOSPlugin metadata.CreationDate = rootDirectoryKeyBlock.header.creation_time; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ProDOS/ProDOS.cs b/Aaru.Filesystems/ProDOS/ProDOS.cs index 8590fe2b5..623e2a725 100644 --- a/Aaru.Filesystems/ProDOS/ProDOS.cs +++ b/Aaru.Filesystems/ProDOS/ProDOS.cs @@ -37,14 +37,22 @@ namespace Aaru.Filesystems; // Information from Apple ProDOS 8 Technical Reference /// /// Implements detection of Apple ProDOS filesystem -[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class ProDOSPlugin : IFilesystem { + const string MODULE_NAME = "ProDOS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.ProDOSPlugin_Name; + /// public Guid Id => new("43874265-7B8A-4739-BCF7-07F80D5932BF"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "ProDOS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ProDOS/Structs.cs b/Aaru.Filesystems/ProDOS/Structs.cs index e4fa8ff3d..356e6e6b6 100644 --- a/Aaru.Filesystems/ProDOS/Structs.cs +++ b/Aaru.Filesystems/ProDOS/Structs.cs @@ -36,9 +36,81 @@ namespace Aaru.Filesystems; // Information from Apple ProDOS 8 Technical Reference /// /// Implements detection of Apple ProDOS filesystem -[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class ProDOSPlugin { +#region Nested type: DirectoryBlock + + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct DirectoryBlock + { + /// Pointer to previous directory block Offset 0x00, 2 bytes + public ushort zero; + /// Pointer to next directory block, 0 if last Offset 0x02, 2 bytes + public ushort next_pointer; + /// Directory entries Offset 0x2F, 39 bytes each, 13 entries + public Entry[] entries; + } + +#endregion + +#region Nested type: DirectoryHeader + + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct DirectoryHeader + { + /// Constant 0x0E Offset 0x04, mask 0xF0 + public byte storage_type; + /// Length of volume_name pascal string Offset 0x04, mask 0x0F + public byte name_length; + /// The name of the directory. Offset 0x05, 15 bytes + public string directory_name; + /// Reserved for future expansion Offset 0x14, 8 bytes + public ulong reserved; + /// Creation time of the volume Offset 0x1C, 4 bytes + public DateTime creation_time; + /// Version number of the volume format Offset 0x20, 1 byte + public byte version; + /// Reserved for future use Offset 0x21, 1 byte + public byte min_version; + /// Permissions for the volume Offset 0x22, 1 byte + public byte access; + /// Length of an entry in this directory Const 0x27 Offset 0x23, 1 byte + public byte entry_length; + /// Number of entries per block Const 0x0D Offset 0x24, 1 byte + public byte entries_per_block; + /// Number of active files in this directory Offset 0x25, 2 bytes + public ushort file_count; + /// Block address of parent directory block that contains this entry Offset 0x27, 2 bytes + public ushort parent_pointer; + /// Entry number within the block indicated in parent_pointer Offset 0x29, 1 byte + public byte parent_entry_number; + /// Length of the entry that holds this directory, in the parent entry Const 0x27 Offset 0x2A, 1 byte + public byte parent_entry_length; + } + +#endregion + +#region Nested type: DirectoryKeyBlock + + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct DirectoryKeyBlock + { + /// Always 0 Offset 0x00, 2 bytes + public ushort zero; + /// Pointer to next directory block, 0 if last Offset 0x02, 2 bytes + public ushort next_pointer; + /// Directory header Offset 0x04, 39 bytes + public DirectoryHeader header; + /// Directory entries Offset 0x2F, 39 bytes each, 12 entries + public Entry[] entries; + } + +#endregion + +#region Nested type: Entry + /// ProDOS directory entry, decoded structure [SuppressMessage("ReSharper", "InconsistentNaming")] struct Entry @@ -76,6 +148,32 @@ public sealed partial class ProDOSPlugin public ushort header_pointer; } +#endregion + +#region Nested type: IndexBlock + + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct IndexBlock + { + /// Up to 256 pointers to blocks, 0 to indicate the block is sparsed (non-allocated) + public ushort[] block_pointer; + } + +#endregion + +#region Nested type: MasterIndexBlock + + [SuppressMessage("ReSharper", "InconsistentNaming")] + struct MasterIndexBlock + { + /// Up to 128 pointers to index blocks + public ushort[] index_block_pointer; + } + +#endregion + +#region Nested type: RootDirectoryHeader + [SuppressMessage("ReSharper", "InconsistentNaming")] struct RootDirectoryHeader { @@ -110,51 +208,9 @@ public sealed partial class ProDOSPlugin public ushort total_blocks; } - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct DirectoryHeader - { - /// Constant 0x0E Offset 0x04, mask 0xF0 - public byte storage_type; - /// Length of volume_name pascal string Offset 0x04, mask 0x0F - public byte name_length; - /// The name of the directory. Offset 0x05, 15 bytes - public string directory_name; - /// Reserved for future expansion Offset 0x14, 8 bytes - public ulong reserved; - /// Creation time of the volume Offset 0x1C, 4 bytes - public DateTime creation_time; - /// Version number of the volume format Offset 0x20, 1 byte - public byte version; - /// Reserved for future use Offset 0x21, 1 byte - public byte min_version; - /// Permissions for the volume Offset 0x22, 1 byte - public byte access; - /// Length of an entry in this directory Const 0x27 Offset 0x23, 1 byte - public byte entry_length; - /// Number of entries per block Const 0x0D Offset 0x24, 1 byte - public byte entries_per_block; - /// Number of active files in this directory Offset 0x25, 2 bytes - public ushort file_count; - /// Block address of parent directory block that contains this entry Offset 0x27, 2 bytes - public ushort parent_pointer; - /// Entry number within the block indicated in parent_pointer Offset 0x29, 1 byte - public byte parent_entry_number; - /// Length of the entry that holds this directory, in the parent entry Const 0x27 Offset 0x2A, 1 byte - public byte parent_entry_length; - } +#endregion - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct DirectoryKeyBlock - { - /// Always 0 Offset 0x00, 2 bytes - public ushort zero; - /// Pointer to next directory block, 0 if last Offset 0x02, 2 bytes - public ushort next_pointer; - /// Directory header Offset 0x04, 39 bytes - public DirectoryHeader header; - /// Directory entries Offset 0x2F, 39 bytes each, 12 entries - public Entry[] entries; - } +#region Nested type: RootDirectoryKeyBlock [SuppressMessage("ReSharper", "InconsistentNaming")] struct RootDirectoryKeyBlock @@ -169,28 +225,5 @@ public sealed partial class ProDOSPlugin public Entry[] entries; } - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct DirectoryBlock - { - /// Pointer to previous directory block Offset 0x00, 2 bytes - public ushort zero; - /// Pointer to next directory block, 0 if last Offset 0x02, 2 bytes - public ushort next_pointer; - /// Directory entries Offset 0x2F, 39 bytes each, 13 entries - public Entry[] entries; - } - - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct IndexBlock - { - /// Up to 256 pointers to blocks, 0 to indicate the block is sparsed (non-allocated) - public ushort[] block_pointer; - } - - [SuppressMessage("ReSharper", "InconsistentNaming")] - struct MasterIndexBlock - { - /// Up to 128 pointers to index blocks - public ushort[] index_block_pointer; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/QNX4/Consts.cs b/Aaru.Filesystems/QNX4/Consts.cs index 1c5c78ab8..afd4e93ac 100644 --- a/Aaru.Filesystems/QNX4/Consts.cs +++ b/Aaru.Filesystems/QNX4/Consts.cs @@ -35,10 +35,9 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class QNX4 { + const string FS_TYPE = "qnx4"; readonly byte[] _rootDirFname = { 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - - const string FS_TYPE = "qnx4"; } \ No newline at end of file diff --git a/Aaru.Filesystems/QNX4/Info.cs b/Aaru.Filesystems/QNX4/Info.cs index 306b09c6d..c0da96083 100644 --- a/Aaru.Filesystems/QNX4/Info.cs +++ b/Aaru.Filesystems/QNX4/Info.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class QNX4 { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -189,4 +191,6 @@ public sealed partial class QNX4 metadata.Bootable |= qnxSb.boot.di_size != 0 || qnxSb.altBoot.di_size != 0; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/QNX4/QNX4.cs b/Aaru.Filesystems/QNX4/QNX4.cs index b846b74fd..d05cbd81b 100644 --- a/Aaru.Filesystems/QNX4/QNX4.cs +++ b/Aaru.Filesystems/QNX4/QNX4.cs @@ -37,11 +37,18 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class QNX4 : IFilesystem { + const string MODULE_NAME = "QNX4 plugin"; + +#region IFilesystem Members + /// public string Name => Localization.QNX4_Name; + /// public Guid Id => new("E73A63FA-B5B0-48BF-BF82-DA5F0A8170D2"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "QNX4 plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/QNX4/Structs.cs b/Aaru.Filesystems/QNX4/Structs.cs index 7b8d02274..75da2ce1b 100644 --- a/Aaru.Filesystems/QNX4/Structs.cs +++ b/Aaru.Filesystems/QNX4/Structs.cs @@ -36,12 +36,38 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class QNX4 { +#region Nested type: Extent + struct Extent { public uint Block; public uint Length; } +#endregion + +#region Nested type: ExtentBlock + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ExtentBlock + { + public readonly uint next_xblk; + public readonly uint prev_xblk; + public readonly byte num_xtnts; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public readonly byte[] spare; + public readonly uint num_blocks; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 60)] + public readonly Extent[] xtnts; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] signature; + public readonly Extent first_xtnt; + } + +#endregion + +#region Nested type: Inode + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Inode { @@ -64,6 +90,10 @@ public sealed partial class QNX4 public readonly byte di_status; } +#endregion + +#region Nested type: LinkInfo + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct LinkInfo { @@ -76,21 +106,9 @@ public sealed partial class QNX4 public readonly byte dl_status; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ExtentBlock - { - public readonly uint next_xblk; - public readonly uint prev_xblk; - public readonly byte num_xtnts; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public readonly byte[] spare; - public readonly uint num_blocks; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 60)] - public readonly Extent[] xtnts; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] signature; - public readonly Extent first_xtnt; - } +#endregion + +#region Nested type: Superblock [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Superblock @@ -100,4 +118,6 @@ public sealed partial class QNX4 public readonly Inode boot; public readonly Inode altBoot; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/QNX6/Info.cs b/Aaru.Filesystems/QNX6/Info.cs index 3149a3042..12bbe45f7 100644 --- a/Aaru.Filesystems/QNX6/Info.cs +++ b/Aaru.Filesystems/QNX6/Info.cs @@ -39,6 +39,8 @@ namespace Aaru.Filesystems; /// Implements detection of QNX 6 filesystem public sealed partial class QNX6 { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -100,9 +102,9 @@ public sealed partial class QNX6 if(audi) { sb.AppendLine(Localization.QNX6_Audi_filesystem); - sb.AppendFormat(Localization.Checksum_0_X8, audiSb.checksum).AppendLine(); - sb.AppendFormat(Localization.Serial_0_X16, audiSb.checksum).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_block, audiSb.blockSize).AppendLine(); + sb.AppendFormat(Localization.Checksum_0_X8, audiSb.checksum).AppendLine(); + sb.AppendFormat(Localization.Serial_0_X16, audiSb.checksum).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_block, audiSb.blockSize).AppendLine(); sb.AppendFormat(Localization._0_inodes_free_of_1, audiSb.freeInodes, audiSb.numInodes).AppendLine(); sb.AppendFormat(Localization._0_blocks_1_bytes_free_of_2_3_bytes, audiSb.freeBlocks, @@ -128,16 +130,16 @@ public sealed partial class QNX6 } sb.AppendLine(Localization.QNX6_filesystem); - sb.AppendFormat(Localization.Checksum_0_X8, qnxSb.checksum).AppendLine(); - sb.AppendFormat(Localization.Serial_0_X16, qnxSb.checksum).AppendLine(); - sb.AppendFormat(Localization.Created_on_0, DateHandlers.UnixUnsignedToDateTime(qnxSb.ctime)).AppendLine(); + sb.AppendFormat(Localization.Checksum_0_X8, qnxSb.checksum).AppendLine(); + sb.AppendFormat(Localization.Serial_0_X16, qnxSb.checksum).AppendLine(); + sb.AppendFormat(Localization.Created_on_0, DateHandlers.UnixUnsignedToDateTime(qnxSb.ctime)).AppendLine(); sb.AppendFormat(Localization.Last_mounted_on_0, DateHandlers.UnixUnsignedToDateTime(qnxSb.atime)).AppendLine(); - sb.AppendFormat(Localization.Flags_0_X8, qnxSb.flags).AppendLine(); - sb.AppendFormat(Localization.Version1_0_X4, qnxSb.version1).AppendLine(); - sb.AppendFormat(Localization.Version2_0_X4, qnxSb.version2).AppendLine(); + sb.AppendFormat(Localization.Flags_0_X8, qnxSb.flags).AppendLine(); + sb.AppendFormat(Localization.Version1_0_X4, qnxSb.version1).AppendLine(); + sb.AppendFormat(Localization.Version2_0_X4, qnxSb.version2).AppendLine(); //sb.AppendFormat("Volume ID: \"{0}\"", CurrentEncoding.GetString(qnxSb.volumeid)).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_block, qnxSb.blockSize).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_block, qnxSb.blockSize).AppendLine(); sb.AppendFormat(Localization._0_inodes_free_of_1, qnxSb.freeInodes, qnxSb.numInodes).AppendLine(); sb.AppendFormat(Localization._0_blocks_1_bytes_free_of_2_3_bytes, qnxSb.freeBlocks, @@ -161,4 +163,6 @@ public sealed partial class QNX6 information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/QNX6/QNX6.cs b/Aaru.Filesystems/QNX6/QNX6.cs index fcaa4379a..4c1f774d8 100644 --- a/Aaru.Filesystems/QNX6/QNX6.cs +++ b/Aaru.Filesystems/QNX6/QNX6.cs @@ -35,10 +35,16 @@ namespace Aaru.Filesystems; /// Implements detection of QNX 6 filesystem public sealed partial class QNX6 : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.QNX6_Name; + /// public Guid Id => new("3E610EA2-4D08-4D70-8947-830CD4C74FC0"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/QNX6/Structs.cs b/Aaru.Filesystems/QNX6/Structs.cs index 4609148f9..d4e659e2a 100644 --- a/Aaru.Filesystems/QNX6/Structs.cs +++ b/Aaru.Filesystems/QNX6/Structs.cs @@ -34,6 +34,34 @@ namespace Aaru.Filesystems; /// Implements detection of QNX 6 filesystem public sealed partial class QNX6 { +#region Nested type: AudiSuperBlock + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct AudiSuperBlock + { + public readonly uint magic; + public readonly uint checksum; + public readonly ulong serial; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + public readonly byte[] spare1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + public readonly byte[] id; + public readonly uint blockSize; + public readonly uint numInodes; + public readonly uint freeInodes; + public readonly uint numBlocks; + public readonly uint freeBlocks; + public readonly uint spare2; + public readonly RootNode inode; + public readonly RootNode bitmap; + public readonly RootNode longfile; + public readonly RootNode unknown; + } + +#endregion + +#region Nested type: RootNode + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct RootNode { @@ -46,6 +74,10 @@ public sealed partial class QNX6 public readonly byte[] spare; } +#endregion + +#region Nested type: SuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock { @@ -71,25 +103,5 @@ public sealed partial class QNX6 public readonly RootNode unknown; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct AudiSuperBlock - { - public readonly uint magic; - public readonly uint checksum; - public readonly ulong serial; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] - public readonly byte[] spare1; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] - public readonly byte[] id; - public readonly uint blockSize; - public readonly uint numInodes; - public readonly uint freeInodes; - public readonly uint numBlocks; - public readonly uint freeBlocks; - public readonly uint spare2; - public readonly RootNode inode; - public readonly RootNode bitmap; - public readonly RootNode longfile; - public readonly RootNode unknown; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/RBF/Info.cs b/Aaru.Filesystems/RBF/Info.cs index cfcef9d6c..dea4028bc 100644 --- a/Aaru.Filesystems/RBF/Info.cs +++ b/Aaru.Filesystems/RBF/Info.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Locus filesystem public sealed partial class RBF : IFilesystem { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -49,14 +51,11 @@ public sealed partial class RBF : IFilesystem // Documentation says ID should be sector 0 // I've found that OS-9/X68000 has it on sector 4 // I've read OS-9/Apple2 has it on sector 15 - foreach(int i in new[] - { - 0, 4, 15 - }) + foreach(int i in new[] { 0, 4, 15 }) { - ulong location = (ulong)i; + var location = (ulong)i; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -100,13 +99,10 @@ public sealed partial class RBF : IFilesystem var rbfSb = new IdSector(); var rbf9000Sb = new NewIdSector(); - foreach(int i in new[] - { - 0, 4, 15 - }) + foreach(int i in new[] { 0, 4, 15 }) { - ulong location = (ulong)i; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var location = (ulong)i; + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -144,19 +140,21 @@ public sealed partial class RBF : IFilesystem if(rbf9000Sb.rid_sync == RBF_SYNC) { - sb.AppendFormat(Localization.Volume_ID_0_X8, rbf9000Sb.rid_diskid).AppendLine(); - sb.AppendFormat(Localization._0_blocks_in_volume, rbf9000Sb.rid_totblocks).AppendLine(); - sb.AppendFormat(Localization._0_cylinders, rbf9000Sb.rid_cylinders).AppendLine(); + sb.AppendFormat(Localization.Volume_ID_0_X8, rbf9000Sb.rid_diskid).AppendLine(); + sb.AppendFormat(Localization._0_blocks_in_volume, rbf9000Sb.rid_totblocks).AppendLine(); + sb.AppendFormat(Localization._0_cylinders, rbf9000Sb.rid_cylinders).AppendLine(); sb.AppendFormat(Localization._0_blocks_in_cylinder_zero, rbf9000Sb.rid_cyl0size).AppendLine(); - sb.AppendFormat(Localization._0_blocks_per_cylinder, rbf9000Sb.rid_cylsize).AppendLine(); - sb.AppendFormat(Localization._0_heads, rbf9000Sb.rid_heads).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_block, rbf9000Sb.rid_blocksize).AppendLine(); + sb.AppendFormat(Localization._0_blocks_per_cylinder, rbf9000Sb.rid_cylsize).AppendLine(); + sb.AppendFormat(Localization._0_heads, rbf9000Sb.rid_heads).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_block, rbf9000Sb.rid_blocksize).AppendLine(); // TODO: Convert to flags? - sb.AppendLine((rbf9000Sb.rid_format & 0x01) == 0x01 ? Localization.Disk_is_double_sided + sb.AppendLine((rbf9000Sb.rid_format & 0x01) == 0x01 + ? Localization.Disk_is_double_sided : Localization.Disk_is_single_sided); - sb.AppendLine((rbf9000Sb.rid_format & 0x02) == 0x02 ? Localization.Disk_is_double_density + sb.AppendLine((rbf9000Sb.rid_format & 0x02) == 0x02 + ? Localization.Disk_is_double_density : Localization.Disk_is_single_density); if((rbf9000Sb.rid_format & 0x10) == 0x10) @@ -172,12 +170,16 @@ public sealed partial class RBF : IFilesystem rbf9000Sb.rid_bitmap == 0 ? 1 : rbf9000Sb.rid_bitmap).AppendLine(); if(rbf9000Sb.rid_firstboot > 0) + { sb.AppendFormat(Localization.Debugger_descriptor_starts_at_block_0, rbf9000Sb.rid_firstboot). AppendLine(); + } if(rbf9000Sb.rid_bootfile > 0) + { sb.AppendFormat(Localization.Boot_file_descriptor_starts_at_block_0, rbf9000Sb.rid_bootfile). AppendLine(); + } sb.AppendFormat(Localization.Root_directory_descriptor_starts_at_block_0, rbf9000Sb.rid_rootdir). AppendLine(); @@ -208,20 +210,22 @@ public sealed partial class RBF : IFilesystem } else { - sb.AppendFormat(Localization.Volume_ID_0_X4, rbfSb.dd_dsk).AppendLine(); - sb.AppendFormat(Localization._0_blocks_in_volume, LSNToUInt32(rbfSb.dd_tot)).AppendLine(); - sb.AppendFormat(Localization._0_tracks, rbfSb.dd_tks).AppendLine(); + sb.AppendFormat(Localization.Volume_ID_0_X4, rbfSb.dd_dsk).AppendLine(); + sb.AppendFormat(Localization._0_blocks_in_volume, LSNToUInt32(rbfSb.dd_tot)).AppendLine(); + sb.AppendFormat(Localization._0_tracks, rbfSb.dd_tks).AppendLine(); sb.AppendFormat(Localization._0_sectors_per_track, rbfSb.dd_spt).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_sector, 256 << rbfSb.dd_lsnsize).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_sector, 256 << rbfSb.dd_lsnsize).AppendLine(); sb.AppendFormat(Localization._0_sectors_per_cluster_1_bytes, rbfSb.dd_bit, rbfSb.dd_bit * (256 << rbfSb.dd_lsnsize)).AppendLine(); // TODO: Convert to flags? - sb.AppendLine((rbfSb.dd_fmt & 0x01) == 0x01 ? Localization.Disk_is_double_sided + sb.AppendLine((rbfSb.dd_fmt & 0x01) == 0x01 + ? Localization.Disk_is_double_sided : Localization.Disk_is_single_sided); - sb.AppendLine((rbfSb.dd_fmt & 0x02) == 0x02 ? Localization.Disk_is_double_density + sb.AppendLine((rbfSb.dd_fmt & 0x02) == 0x02 + ? Localization.Disk_is_double_density : Localization.Disk_is_single_density); if((rbfSb.dd_fmt & 0x10) == 0x10) @@ -240,8 +244,10 @@ public sealed partial class RBF : IFilesystem if(LSNToUInt32(rbfSb.dd_bt) > 0 && rbfSb.dd_bsz > 0) + { sb.AppendFormat(Localization.Boot_file_starts_at_block_0_and_has_1_bytes, LSNToUInt32(rbfSb.dd_bt), rbfSb.dd_bsz).AppendLine(); + } sb.AppendFormat(Localization.Root_directory_descriptor_starts_at_block_0, LSNToUInt32(rbfSb.dd_dir)). AppendLine(); @@ -271,4 +277,6 @@ public sealed partial class RBF : IFilesystem information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/RBF/RBF.cs b/Aaru.Filesystems/RBF/RBF.cs index b29c8a886..62562c11b 100644 --- a/Aaru.Filesystems/RBF/RBF.cs +++ b/Aaru.Filesystems/RBF/RBF.cs @@ -35,11 +35,18 @@ namespace Aaru.Filesystems; /// Implements detection of the Locus filesystem public sealed partial class RBF : IFilesystem { + const string MODULE_NAME = "RBF plugin"; + +#region IFilesystem Members + /// public string Name => Localization.RBF_Name; + /// public Guid Id => new("E864E45B-0B52-4D29-A858-7BDFA9199FB2"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "RBF plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/RBF/Structs.cs b/Aaru.Filesystems/RBF/Structs.cs index 9cf6ce9f0..3c68a03e7 100644 --- a/Aaru.Filesystems/RBF/Structs.cs +++ b/Aaru.Filesystems/RBF/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Locus filesystem public sealed partial class RBF { +#region Nested type: IdSector + /// Identification sector. Wherever the sector this resides on, becomes LSN 0. [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct IdSector @@ -88,6 +90,10 @@ public sealed partial class RBF public readonly ushort dd_versid; } +#endregion + +#region Nested type: NewIdSector + /// /// Identification sector. Wherever the sector this resides on, becomes LSN 0. Introduced on OS-9000, this can be /// big or little endian. @@ -144,4 +150,6 @@ public sealed partial class RBF /// Parity public readonly uint rid_parity; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/RT11/Info.cs b/Aaru.Filesystems/RT11/Info.cs index 2cbdf85be..900cddcac 100644 --- a/Aaru.Filesystems/RT11/Info.cs +++ b/Aaru.Filesystems/RT11/Info.cs @@ -47,13 +47,15 @@ namespace Aaru.Filesystems; /// Implements detection of the DEC RT-11 filesystem public sealed partial class RT11 { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { if(1 + partition.Start >= partition.End) return false; - byte[] magicB = new byte[12]; + var magicB = new byte[12]; ErrorNumber errno = imagePlugin.ReadSector(1 + partition.Start, out byte[] hbSector); if(errno != ErrorNumber.NoError) @@ -96,7 +98,7 @@ public sealed partial class RT11 */ ushort check = 0; - for(int i = 0; i < 512; i += 2) + for(var i = 0; i < 512; i += 2) check += BitConverter.ToUInt16(hbSector, i); sb.AppendFormat(Localization.Volume_format_is_0, @@ -123,4 +125,6 @@ public sealed partial class RT11 information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/RT11/RT11.cs b/Aaru.Filesystems/RT11/RT11.cs index 11f88f5e8..9b1d1d6fb 100644 --- a/Aaru.Filesystems/RT11/RT11.cs +++ b/Aaru.Filesystems/RT11/RT11.cs @@ -40,10 +40,16 @@ namespace Aaru.Filesystems; /// Implements detection of the DEC RT-11 filesystem public sealed partial class RT11 : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.RT11_Name; + /// public Guid Id => new("DB3E2F98-8F98-463C-8126-E937843DA024"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/RT11/Structs.cs b/Aaru.Filesystems/RT11/Structs.cs index 742e69c54..9890e2f08 100644 --- a/Aaru.Filesystems/RT11/Structs.cs +++ b/Aaru.Filesystems/RT11/Structs.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// Implements detection of the DEC RT-11 filesystem public sealed partial class RT11 : IFilesystem { +#region Nested type: HomeBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct HomeBlock { @@ -87,4 +89,6 @@ public sealed partial class RT11 : IFilesystem /// Checksum of preceding 255 words (16 bit units) public readonly ushort checksum; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ReFS/Consts.cs b/Aaru.Filesystems/ReFS/Consts.cs index 93d775c6b..d96e3767c 100644 --- a/Aaru.Filesystems/ReFS/Consts.cs +++ b/Aaru.Filesystems/ReFS/Consts.cs @@ -34,9 +34,6 @@ public sealed partial class ReFS { const uint FSRS = 0x53525346; - const string FS_TYPE = "refs"; - readonly byte[] _signature = - { - 0x52, 0x65, 0x46, 0x53, 0x00, 0x00, 0x00, 0x00 - }; + const string FS_TYPE = "refs"; + readonly byte[] _signature = { 0x52, 0x65, 0x46, 0x53, 0x00, 0x00, 0x00, 0x00 }; } \ No newline at end of file diff --git a/Aaru.Filesystems/ReFS/Info.cs b/Aaru.Filesystems/ReFS/Info.cs index e9d417072..b221d3dae 100644 --- a/Aaru.Filesystems/ReFS/Info.cs +++ b/Aaru.Filesystems/ReFS/Info.cs @@ -42,10 +42,12 @@ namespace Aaru.Filesystems; /// Implements detection of Microsoft's Resilient filesystem (ReFS) public sealed partial class ReFS : IFilesystem { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -74,7 +76,7 @@ public sealed partial class ReFS : IFilesystem information = ""; metadata = new FileSystem(); - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -104,9 +106,9 @@ public sealed partial class ReFS : IFilesystem AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.identifier = {0}", StringHandlers.CToString(BitConverter.GetBytes(vhdr.identifier))); - AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.length = {0}", vhdr.length); - AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.checksum = 0x{0:X4}", vhdr.checksum); - AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.sectors = {0}", vhdr.sectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.length = {0}", vhdr.length); + AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.checksum = 0x{0:X4}", vhdr.checksum); + AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.sectors = {0}", vhdr.sectors); AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.bytesPerSector = {0}", vhdr.bytesPerSector); AaruConsole.DebugWriteLine(MODULE_NAME, "VolumeHeader.sectorsPerCluster = {0}", vhdr.sectorsPerCluster); @@ -144,4 +146,6 @@ public sealed partial class ReFS : IFilesystem Clusters = vhdr.sectors / vhdr.sectorsPerCluster }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ReFS/ReFS.cs b/Aaru.Filesystems/ReFS/ReFS.cs index 422f76cba..40f377549 100644 --- a/Aaru.Filesystems/ReFS/ReFS.cs +++ b/Aaru.Filesystems/ReFS/ReFS.cs @@ -35,11 +35,18 @@ namespace Aaru.Filesystems; /// Implements detection of Microsoft's Resilient filesystem (ReFS) public sealed partial class ReFS : IFilesystem { + const string MODULE_NAME = "ReFS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.ReFS_Name; + /// public Guid Id => new("37766C4E-EBF5-4113-A712-B758B756ABD6"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "ReFS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ReFS/Structs.cs b/Aaru.Filesystems/ReFS/Structs.cs index c0690bcb1..2e60629f3 100644 --- a/Aaru.Filesystems/ReFS/Structs.cs +++ b/Aaru.Filesystems/ReFS/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; /// Implements detection of Microsoft's Resilient filesystem (ReFS) public sealed partial class ReFS { +#region Nested type: VolumeHeader + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct VolumeHeader { @@ -56,4 +58,6 @@ public sealed partial class ReFS [MarshalAs(UnmanagedType.ByValArray, SizeConst = 15872)] public readonly byte[] unknown5; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser/Consts.cs b/Aaru.Filesystems/Reiser/Consts.cs index 8609e02d8..1bc191a35 100644 --- a/Aaru.Filesystems/Reiser/Consts.cs +++ b/Aaru.Filesystems/Reiser/Consts.cs @@ -36,16 +36,7 @@ public sealed partial class Reiser const string FS_TYPE = "reiserfs"; - readonly byte[] _magic35 = - { - 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x46, 0x73, 0x00, 0x00 - }; - readonly byte[] _magic36 = - { - 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x32, 0x46, 0x73, 0x00 - }; - readonly byte[] _magicJr = - { - 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x33, 0x46, 0x73, 0x00 - }; + readonly byte[] _magic35 = { 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x46, 0x73, 0x00, 0x00 }; + readonly byte[] _magic36 = { 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x32, 0x46, 0x73, 0x00 }; + readonly byte[] _magicJr = { 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x33, 0x46, 0x73, 0x00 }; } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser/Info.cs b/Aaru.Filesystems/Reiser/Info.cs index e9e7756c7..94d8725df 100644 --- a/Aaru.Filesystems/Reiser/Info.cs +++ b/Aaru.Filesystems/Reiser/Info.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Reiser v3 filesystem public sealed partial class Reiser : IFilesystem { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -51,7 +53,7 @@ public sealed partial class Reiser : IFilesystem if(sbAddr == 0) sbAddr = 1; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -89,7 +91,7 @@ public sealed partial class Reiser : IFilesystem if(sbAddr == 0) sbAddr = 1; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -121,7 +123,7 @@ public sealed partial class Reiser : IFilesystem sb.AppendFormat(Localization.Volume_has_0_blocks_with_1_blocks_free, reiserSb.block_count, reiserSb.free_blocks).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_block, reiserSb.blocksize).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_block, reiserSb.blocksize).AppendLine(); sb.AppendFormat(Localization.Root_directory_resides_on_block_0, reiserSb.root_block).AppendLine(); if(reiserSb.umount_state == 2) @@ -153,4 +155,6 @@ public sealed partial class Reiser : IFilesystem metadata.VolumeName = StringHandlers.CToString(reiserSb.label, encoding); metadata.VolumeSerial = reiserSb.uuid.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser/Reiser.cs b/Aaru.Filesystems/Reiser/Reiser.cs index f502d1515..5c379aa66 100644 --- a/Aaru.Filesystems/Reiser/Reiser.cs +++ b/Aaru.Filesystems/Reiser/Reiser.cs @@ -35,10 +35,16 @@ namespace Aaru.Filesystems; /// Implements detection of the Reiser v3 filesystem public sealed partial class Reiser : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.Reiser_Name; + /// public Guid Id => new("1D8CD8B8-27E6-410F-9973-D16409225FBA"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser/Structs.cs b/Aaru.Filesystems/Reiser/Structs.cs index 4406fa82e..0cc41b409 100644 --- a/Aaru.Filesystems/Reiser/Structs.cs +++ b/Aaru.Filesystems/Reiser/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Reiser v3 filesystem public sealed partial class Reiser { +#region Nested type: JournalParameters + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct JournalParameters { @@ -48,6 +50,10 @@ public sealed partial class Reiser public readonly uint journal_max_trans_age; } +#endregion + +#region Nested type: Superblock + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct Superblock { @@ -79,4 +85,6 @@ public sealed partial class Reiser [MarshalAs(UnmanagedType.ByValArray, SizeConst = 76)] public readonly byte[] unused; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser4/Info.cs b/Aaru.Filesystems/Reiser4/Info.cs index 93ce469ed..bf52b25de 100644 --- a/Aaru.Filesystems/Reiser4/Info.cs +++ b/Aaru.Filesystems/Reiser4/Info.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Reiser v4 filesystem public sealed partial class Reiser4 { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -51,7 +53,7 @@ public sealed partial class Reiser4 if(sbAddr == 0) sbAddr = 1; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -88,7 +90,7 @@ public sealed partial class Reiser4 if(sbAddr == 0) sbAddr = 1; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -125,4 +127,6 @@ public sealed partial class Reiser4 VolumeSerial = reiserSb.uuid.ToString() }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser4/Reiser4.cs b/Aaru.Filesystems/Reiser4/Reiser4.cs index 4b593d43d..864615e66 100644 --- a/Aaru.Filesystems/Reiser4/Reiser4.cs +++ b/Aaru.Filesystems/Reiser4/Reiser4.cs @@ -35,10 +35,16 @@ namespace Aaru.Filesystems; /// Implements detection of the Reiser v4 filesystem public sealed partial class Reiser4 : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.Reiser4_Name; + /// public Guid Id => new("301F2D00-E8D5-4F04-934E-81DFB21D15BA"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser4/Structs.cs b/Aaru.Filesystems/Reiser4/Structs.cs index e65fcdd46..590252a20 100644 --- a/Aaru.Filesystems/Reiser4/Structs.cs +++ b/Aaru.Filesystems/Reiser4/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Reiser v4 filesystem public sealed partial class Reiser4 { +#region Nested type: Superblock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Superblock { @@ -46,4 +48,6 @@ public sealed partial class Reiser4 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public readonly byte[] label; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SFS/Enums.cs b/Aaru.Filesystems/SFS/Enums.cs index d618ab88e..3c93baeba 100644 --- a/Aaru.Filesystems/SFS/Enums.cs +++ b/Aaru.Filesystems/SFS/Enums.cs @@ -34,9 +34,14 @@ namespace Aaru.Filesystems; /// Implements detection of the Smart File System public sealed partial class SFS { +#region Nested type: Flags + [Flags] enum Flags : byte { - RecycledFolder = 64, CaseSensitive = 128 + RecycledFolder = 64, + CaseSensitive = 128 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SFS/Info.cs b/Aaru.Filesystems/SFS/Info.cs index 0a91c62e9..f8dde3225 100644 --- a/Aaru.Filesystems/SFS/Info.cs +++ b/Aaru.Filesystems/SFS/Info.cs @@ -39,6 +39,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Smart File System public sealed partial class SFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -50,7 +52,7 @@ public sealed partial class SFS if(errno != ErrorNumber.NoError) return false; - uint magic = BigEndianBitConverter.ToUInt32(sector, 0x00); + var magic = BigEndianBitConverter.ToUInt32(sector, 0x00); return magic is SFS_MAGIC or SFS2_MAGIC; } @@ -115,4 +117,6 @@ public sealed partial class SFS Type = FS_TYPE }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SFS/SFS.cs b/Aaru.Filesystems/SFS/SFS.cs index 825cf3076..cdf409026 100644 --- a/Aaru.Filesystems/SFS/SFS.cs +++ b/Aaru.Filesystems/SFS/SFS.cs @@ -35,10 +35,16 @@ namespace Aaru.Filesystems; /// Implements detection of the Smart File System public sealed partial class SFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.SFS_Name; + /// public Guid Id => new("26550C19-3671-4A2D-BC2F-F20CEB7F48DC"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SFS/Structs.cs b/Aaru.Filesystems/SFS/Structs.cs index b0d9bf904..84053dd35 100644 --- a/Aaru.Filesystems/SFS/Structs.cs +++ b/Aaru.Filesystems/SFS/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Smart File System public sealed partial class SFS : IFilesystem { +#region Nested type: RootBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct RootBlock { @@ -65,4 +67,6 @@ public sealed partial class SFS : IFilesystem [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public readonly uint[] reserved4; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SolarFS/Info.cs b/Aaru.Filesystems/SolarFS/Info.cs index bfd2a22c4..a08a5f183 100644 --- a/Aaru.Filesystems/SolarFS/Info.cs +++ b/Aaru.Filesystems/SolarFS/Info.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Solar OS filesystem public sealed partial class SolarFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -53,7 +55,7 @@ public sealed partial class SolarFS if(errno != ErrorNumber.NoError) return false; - byte[] fsTypeB = new byte[8]; + var fsTypeB = new byte[8]; byte signature = bpb[0x25]; Array.Copy(bpb, 0x35, fsTypeB, 0, 8); @@ -88,7 +90,7 @@ public sealed partial class SolarFS signature = bpbSector[0x25] }; - byte[] bpbStrings = new byte[8]; + var bpbStrings = new byte[8]; Array.Copy(bpbSector, 0x03, bpbStrings, 0, 8); bpb.OEMName = StringHandlers.CToString(bpbStrings); bpbStrings = new byte[8]; @@ -110,15 +112,15 @@ public sealed partial class SolarFS bpb.x86_jump[1], bpb.x86_jump[2]); AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.OEMName: \"{0}\"", bpb.OEMName); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.bps: {0}", bpb.bps); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.unk1: 0x{0:X2}", bpb.unk1); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.unk2: 0x{0:X4}", bpb.unk2); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.root_ent: {0}", bpb.root_ent); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.sectors: {0}", bpb.sectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.media: 0x{0:X2}", bpb.media); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.spfat: {0}", bpb.spfat); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.sptrk: {0}", bpb.sptrk); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.heads: {0}", bpb.heads); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.bps: {0}", bpb.bps); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.unk1: 0x{0:X2}", bpb.unk1); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.unk2: 0x{0:X4}", bpb.unk2); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.root_ent: {0}", bpb.root_ent); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.sectors: {0}", bpb.sectors); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.media: 0x{0:X2}", bpb.media); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.spfat: {0}", bpb.spfat); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.sptrk: {0}", bpb.sptrk); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.heads: {0}", bpb.heads); AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.unk3: 0x{0:X2}{1:X2}{2:X2}{3:X2}{4:X2}{5:X2}{6:X2}{7:X2}{8:X2}{9:X2}", @@ -126,35 +128,44 @@ public sealed partial class SolarFS bpb.unk3[6], bpb.unk3[7], bpb.unk3[8], bpb.unk3[9]); AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.signature: 0x{0:X2}", bpb.signature); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.unk4: 0x{0:X8}", bpb.unk4); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.vol_name: \"{0}\"", bpb.vol_name); - AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.fs_type: \"{0}\"", bpb.fs_type); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.unk4: 0x{0:X8}", bpb.unk4); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.vol_name: \"{0}\"", bpb.vol_name); + AaruConsole.DebugWriteLine(MODULE_NAME, "BPB.fs_type: \"{0}\"", bpb.fs_type); sb.AppendLine(Localization.Solar_OS_filesystem); - sb.AppendFormat(Localization.Media_descriptor_0, bpb.media).AppendLine(); + sb.AppendFormat(Localization.Media_descriptor_0, bpb.media).AppendLine(); sb.AppendFormat(Localization._0_bytes_per_sector, bpb.bps).AppendLine(); if(imagePlugin.Info.SectorSize is 2336 or 2352 or 2448) { if(bpb.bps != imagePlugin.Info.SectorSize) + { sb. - AppendFormat(Localization.WARNING_Filesystem_describes_a_0_bytes_sector_while_device_describes_a_1_bytes_sector, - bpb.bps, 2048).AppendLine(); + AppendFormat( + Localization. + WARNING_Filesystem_describes_a_0_bytes_sector_while_device_describes_a_1_bytes_sector, + bpb.bps, 2048).AppendLine(); + } } else if(bpb.bps != imagePlugin.Info.SectorSize) + { sb. - AppendFormat(Localization.WARNING_Filesystem_describes_a_0_bytes_sector_while_device_describes_a_1_bytes_sector, - bpb.bps, imagePlugin.Info.SectorSize).AppendLine(); + AppendFormat( + Localization.WARNING_Filesystem_describes_a_0_bytes_sector_while_device_describes_a_1_bytes_sector, + bpb.bps, imagePlugin.Info.SectorSize).AppendLine(); + } sb.AppendFormat(Localization._0_sectors_on_volume_1_bytes, bpb.sectors, bpb.sectors * bpb.bps).AppendLine(); if(bpb.sectors > imagePlugin.Info.Sectors) + { sb.AppendFormat(Localization.WARNING_Filesystem_describes_a_0_sectors_volume_bigger_than_device_1_sectors, bpb.sectors, imagePlugin.Info.Sectors); + } - sb.AppendFormat(Localization._0_heads, bpb.heads).AppendLine(); + sb.AppendFormat(Localization._0_heads, bpb.heads).AppendLine(); sb.AppendFormat(Localization._0_sectors_per_track, bpb.sptrk).AppendLine(); - sb.AppendFormat(Localization.Volume_name_0, bpb.vol_name).AppendLine(); + sb.AppendFormat(Localization.Volume_name_0, bpb.vol_name).AppendLine(); metadata = new FileSystem { @@ -166,4 +177,6 @@ public sealed partial class SolarFS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SolarFS/SolarFS.cs b/Aaru.Filesystems/SolarFS/SolarFS.cs index 94d00c83b..fc06debf4 100644 --- a/Aaru.Filesystems/SolarFS/SolarFS.cs +++ b/Aaru.Filesystems/SolarFS/SolarFS.cs @@ -36,11 +36,18 @@ namespace Aaru.Filesystems; /// Implements detection of the Solar OS filesystem public sealed partial class SolarFS : IFilesystem { + const string MODULE_NAME = "SolarFS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.SolarFS_Name; + /// public Guid Id => new("EA3101C1-E777-4B4F-B5A3-8C57F50F6E65"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "SolarFS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SolarFS/Structs.cs b/Aaru.Filesystems/SolarFS/Structs.cs index 20ceae513..b8ab90b76 100644 --- a/Aaru.Filesystems/SolarFS/Structs.cs +++ b/Aaru.Filesystems/SolarFS/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Solar OS filesystem public sealed partial class SolarFS { +#region Nested type: BiosParameterBlock + [SuppressMessage("ReSharper", "InconsistentNaming")] struct BiosParameterBlock { @@ -71,4 +73,6 @@ public sealed partial class SolarFS /// 0x35, 8 bytes, "SOL_FS " public string fs_type; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Squash/Enums.cs b/Aaru.Filesystems/Squash/Enums.cs index 9def15b15..d5ab1764b 100644 --- a/Aaru.Filesystems/Squash/Enums.cs +++ b/Aaru.Filesystems/Squash/Enums.cs @@ -32,9 +32,17 @@ namespace Aaru.Filesystems; /// Implements detection of the squash filesystem public sealed partial class Squash { +#region Nested type: SquashCompression + enum SquashCompression : ushort { - Zlib = 1, Lzma = 2, Lzo = 3, - Xz = 4, Lz4 = 5, Zstd = 6 + Zlib = 1, + Lzma = 2, + Lzo = 3, + Xz = 4, + Lz4 = 5, + Zstd = 6 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Squash/Info.cs b/Aaru.Filesystems/Squash/Info.cs index 14c41a3b6..8e9168b8b 100644 --- a/Aaru.Filesystems/Squash/Info.cs +++ b/Aaru.Filesystems/Squash/Info.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// Implements detection of the squash filesystem public sealed partial class Squash { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -51,7 +53,7 @@ public sealed partial class Squash if(errno != ErrorNumber.NoError) return false; - uint magic = BitConverter.ToUInt32(sector, 0x00); + var magic = BitConverter.ToUInt32(sector, 0x00); return magic is SQUASH_MAGIC or SQUASH_CIGAM; } @@ -67,10 +69,10 @@ public sealed partial class Squash if(errno != ErrorNumber.NoError) return; - uint magic = BitConverter.ToUInt32(sector, 0x00); + var magic = BitConverter.ToUInt32(sector, 0x00); - var sqSb = new SuperBlock(); - bool littleEndian = true; + var sqSb = new SuperBlock(); + var littleEndian = true; switch(magic) { @@ -89,8 +91,8 @@ public sealed partial class Squash sbInformation.AppendLine(Localization.Squash_file_system); sbInformation.AppendLine(littleEndian ? Localization.Little_endian : Localization.Big_endian); - sbInformation.AppendFormat(Localization.Volume_version_0_1, sqSb.s_major, sqSb.s_minor).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_bytes, sqSb.bytes_used).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_version_0_1, sqSb.s_major, sqSb.s_minor).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_bytes, sqSb.bytes_used).AppendLine(); sbInformation.AppendFormat(Localization.Volume_has_0_bytes_per_block, sqSb.block_size).AppendLine(); sbInformation. @@ -145,4 +147,6 @@ public sealed partial class Squash FreeClusters = 0 }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Squash/Squash.cs b/Aaru.Filesystems/Squash/Squash.cs index 4a66ee673..241388121 100644 --- a/Aaru.Filesystems/Squash/Squash.cs +++ b/Aaru.Filesystems/Squash/Squash.cs @@ -35,10 +35,16 @@ namespace Aaru.Filesystems; /// Implements detection of the squash filesystem public sealed partial class Squash : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.Squash_Name; + /// public Guid Id => new("F8F6E46F-7A2A-48E3-9C0A-46AF4DC29E09"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Squash/Structs.cs b/Aaru.Filesystems/Squash/Structs.cs index b66df6da1..75d8bd2c5 100644 --- a/Aaru.Filesystems/Squash/Structs.cs +++ b/Aaru.Filesystems/Squash/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; /// Implements detection of the squash filesystem public sealed partial class Squash { +#region Nested type: SuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock { @@ -57,4 +59,6 @@ public sealed partial class Squash public readonly ulong fragment_table_start; public readonly ulong lookup_table_start; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Symbian.cs b/Aaru.Filesystems/Symbian.cs index cb86335d5..feb04258c 100644 --- a/Aaru.Filesystems/Symbian.cs +++ b/Aaru.Filesystems/Symbian.cs @@ -36,326 +36,326 @@ namespace Aaru.Plugins { - class SymbianIS : Plugin - { - // Magics - private const uint SymbianMagic = 0x10000419; - private const uint EPOCMagic = 0x1000006D; - private const uint EPOC6Magic = 0x10003A12; - private const uint Symbian9Magic = 0x10201A7A; + class SymbianIS : Plugin + { + // Magics + private const uint SymbianMagic = 0x10000419; + private const uint EPOCMagic = 0x1000006D; + private const uint EPOC6Magic = 0x10003A12; + private const uint Symbian9Magic = 0x10201A7A; - // Options - private const ushort IsUnicode = 0x0001; - private const ushort IsDistributable = 0x0002; - private const ushort NoCompress = 0x0008; - private const ushort ShutdownApps = 0x0010; + // Options + private const ushort IsUnicode = 0x0001; + private const ushort IsDistributable = 0x0002; + private const ushort NoCompress = 0x0008; + private const ushort ShutdownApps = 0x0010; - // Types - private const ushort SISApp = 0x0000; // Application - private const ushort SISSystem = 0x0001; // System component (library) - private const ushort SISOption = 0x0002; // Optional component - private const ushort SISConfig = 0x0003; // Configures an application - private const ushort SISPatch = 0x0004; // Patch - private const ushort SISUpgrade = 0x0005; // Upgrade + // Types + private const ushort SISApp = 0x0000; // Application + private const ushort SISSystem = 0x0001; // System component (library) + private const ushort SISOption = 0x0002; // Optional component + private const ushort SISConfig = 0x0003; // Configures an application + private const ushort SISPatch = 0x0004; // Patch + private const ushort SISUpgrade = 0x0005; // Upgrade - private enum LanguageCodes - { - Test, - EN, - FR, - GE, - SP, - IT, - SW, - DA, - NO, - FI, - AM, - SF, - SG, - PO, - TU, - IC, - RU, - HU, - DU, - BL, - AU, - BF, - AS, - NZ, - IF, - CS, - SK, - PL, - SL, - TC, - HK, - ZH, - JA, - TH, - AF, - SQ, - AH, - AR, - HY, - TL, - BE, - BN, - BG, - MY, - CA, - HR, - CE, - IE, - ZA, - ET, - FA, - CF, - GD, - KA, - EL, - CG, - GU, - HE, - HI, - IN, - GA, - SZ, - KN, - KK, - KM, - KO, - LO, - LV, - LT, - MK, - MS, - ML, - MR, - MO, - MN, - NN, - BP, - PA, - RO, - SR, - SI, - SO, - OS, - LS, - SH, - FS, - TA, - TE, - BO, - TI, - CT, - TK, - UK, - UR, - VI, - CY, - ZU - }; + private enum LanguageCodes + { + Test, + EN, + FR, + GE, + SP, + IT, + SW, + DA, + NO, + FI, + AM, + SF, + SG, + PO, + TU, + IC, + RU, + HU, + DU, + BL, + AU, + BF, + AS, + NZ, + IF, + CS, + SK, + PL, + SL, + TC, + HK, + ZH, + JA, + TH, + AF, + SQ, + AH, + AR, + HY, + TL, + BE, + BN, + BG, + MY, + CA, + HR, + CE, + IE, + ZA, + ET, + FA, + CF, + GD, + KA, + EL, + CG, + GU, + HE, + HI, + IN, + GA, + SZ, + KN, + KK, + KM, + KO, + LO, + LV, + LT, + MK, + MS, + ML, + MR, + MO, + MN, + NN, + BP, + PA, + RO, + SR, + SI, + SO, + OS, + LS, + SH, + FS, + TA, + TE, + BO, + TI, + CT, + TK, + UK, + UR, + VI, + CY, + ZU + }; - public SymbianIS() + public SymbianIS() { base.Name = "Symbian Installation File Plugin"; base.PluginUUID = new Guid("0ec84ec7-eae6-4196-83fe-943b3fe48dbd"); } - public override bool Identify(FileStream fileStream, long offset) - { - uint uid1, uid2, uid3; - BinaryReader br = new BinaryReader(fileStream); + public override bool Identify(FileStream fileStream, long offset) + { + uint uid1, uid2, uid3; + BinaryReader br = new BinaryReader(fileStream); br.BaseStream.Seek(0 + offset, SeekOrigin.Begin); - uid1 = br.Readuint(); - uid2 = br.Readuint(); - uid3 = br.Readuint(); + uid1 = br.Readuint(); + uid2 = br.Readuint(); + uid3 = br.Readuint(); - if(uid1 == Symbian9Magic) - return true; - else if(uid3 == SymbianMagic) - { - if(uid2 == EPOCMagic || uid2 == EPOC6Magic) - return true; - else - return false; - } + if(uid1 == Symbian9Magic) + return true; + else if(uid3 == SymbianMagic) + { + if(uid2 == EPOCMagic || uid2 == EPOC6Magic) + return true; + else + return false; + } - return false; - } + return false; + } - public override void GetInformation (FileStream fileStream, long offset, out string information) - { - information = ""; + public override void GetInformation (FileStream fileStream, long offset, out string information) + { + information = ""; StringBuilder description = new StringBuilder(); - List languages = new List(); - Dictionary capabilities = new Dictionary(); - int ENpos = 0; - uint comp_len; - uint comp_name_ptr; - byte[] ComponentName_b; - string ComponentName = ""; + List languages = new List(); + Dictionary capabilities = new Dictionary(); + int ENpos = 0; + uint comp_len; + uint comp_name_ptr; + byte[] ComponentName_b; + string ComponentName = ""; - SymbianHeader sh = new SymbianHeader(); - BinaryReader br = new BinaryReader(fileStream); + SymbianHeader sh = new SymbianHeader(); + BinaryReader br = new BinaryReader(fileStream); br.BaseStream.Seek(0 + offset, SeekOrigin.Begin); - sh.uid1 = br.Readuint(); - sh.uid2 = br.Readuint(); - sh.uid3 = br.Readuint(); - sh.uid4 = br.Readuint(); - sh.crc16 = br.Readushort(); - sh.languages = br.Readushort(); - sh.files = br.Readushort(); - sh.requisites = br.Readushort(); - sh.inst_lang = br.Readushort(); - sh.inst_files = br.Readushort(); - sh.inst_drive = br.Readushort(); - sh.capabilities = br.Readushort(); - sh.inst_version = br.Readuint(); - sh.options = br.Readushort(); - sh.type = br.Readushort(); - sh.major = br.Readushort(); - sh.minor = br.Readushort(); - sh.variant = br.Readuint(); - sh.lang_ptr = br.Readuint(); - sh.files_ptr = br.Readuint(); - sh.reqs_ptr = br.Readuint(); - sh.certs_ptr = br.Readuint(); - sh.comp_ptr = br.Readuint(); - sh.sig_ptr = br.Readuint(); - sh.caps_ptr = br.Readuint(); - sh.instspace = br.Readuint(); - sh.maxinsspc = br.Readuint(); - sh.reserved1 = br.Readulong(); - sh.reserved2 = br.Readulong(); + sh.uid1 = br.Readuint(); + sh.uid2 = br.Readuint(); + sh.uid3 = br.Readuint(); + sh.uid4 = br.Readuint(); + sh.crc16 = br.Readushort(); + sh.languages = br.Readushort(); + sh.files = br.Readushort(); + sh.requisites = br.Readushort(); + sh.inst_lang = br.Readushort(); + sh.inst_files = br.Readushort(); + sh.inst_drive = br.Readushort(); + sh.capabilities = br.Readushort(); + sh.inst_version = br.Readuint(); + sh.options = br.Readushort(); + sh.type = br.Readushort(); + sh.major = br.Readushort(); + sh.minor = br.Readushort(); + sh.variant = br.Readuint(); + sh.lang_ptr = br.Readuint(); + sh.files_ptr = br.Readuint(); + sh.reqs_ptr = br.Readuint(); + sh.certs_ptr = br.Readuint(); + sh.comp_ptr = br.Readuint(); + sh.sig_ptr = br.Readuint(); + sh.caps_ptr = br.Readuint(); + sh.instspace = br.Readuint(); + sh.maxinsspc = br.Readuint(); + sh.reserved1 = br.Readulong(); + sh.reserved2 = br.Readulong(); - // Go to enumerate languages - br.BaseStream.Seek(sh.lang_ptr + offset, SeekOrigin.Begin); - for(int i = 0; i < sh.languages; i++) - { - ushort language = br.Readushort(); - if(language == 0x0001) - ENpos = i; - languages.Add(((LanguageCodes)language).ToString("G")); - } + // Go to enumerate languages + br.BaseStream.Seek(sh.lang_ptr + offset, SeekOrigin.Begin); + for(int i = 0; i < sh.languages; i++) + { + ushort language = br.Readushort(); + if(language == 0x0001) + ENpos = i; + languages.Add(((LanguageCodes)language).ToString("G")); + } - // Go to component record - br.BaseStream.Seek(sh.comp_ptr + offset, SeekOrigin.Begin); - for(int i = 0; i < sh.languages; i++) - { - comp_len = br.Readuint(); - comp_name_ptr = br.Readuint(); - if(i == ENpos) - { - br.BaseStream.Seek(comp_name_ptr + offset, SeekOrigin.Begin); - ComponentName_b = new byte[comp_len]; - ComponentName_b = br.ReadBytes((int)comp_len); - ComponentName = Encoding.ASCII.GetString(ComponentName_b); - break; - } - } + // Go to component record + br.BaseStream.Seek(sh.comp_ptr + offset, SeekOrigin.Begin); + for(int i = 0; i < sh.languages; i++) + { + comp_len = br.Readuint(); + comp_name_ptr = br.Readuint(); + if(i == ENpos) + { + br.BaseStream.Seek(comp_name_ptr + offset, SeekOrigin.Begin); + ComponentName_b = new byte[comp_len]; + ComponentName_b = br.ReadBytes((int)comp_len); + ComponentName = Encoding.ASCII.GetString(ComponentName_b); + break; + } + } - // Go to capabilities (???) - br.BaseStream.Seek(sh.caps_ptr + offset, SeekOrigin.Begin); - for(int i = 0; i < sh.capabilities; i++) - { - uint cap_key = br.Readuint(); - uint cap_value = br.Readuint(); - capabilities.Add(cap_key, cap_value); - } + // Go to capabilities (???) + br.BaseStream.Seek(sh.caps_ptr + offset, SeekOrigin.Begin); + for(int i = 0; i < sh.capabilities; i++) + { + uint cap_key = br.Readuint(); + uint cap_value = br.Readuint(); + capabilities.Add(cap_key, cap_value); + } - if(sh.uid1 == Symbian9Magic) - { - description.AppendLine("Symbian Installation File"); - description.AppendLine("SymbianOS 9.1 or later"); - description.AppendFormat("Application ID: 0x{0:X8}", sh.uid3).AppendLine(); - description.AppendFormat("UIDs checksum: 0x{0:X8}", sh.uid4).AppendLine(); - } - else if(sh.uid3 == SymbianMagic) - { - description.AppendLine("Symbian Installation File"); + if(sh.uid1 == Symbian9Magic) + { + description.AppendLine("Symbian Installation File"); + description.AppendLine("SymbianOS 9.1 or later"); + description.AppendFormat("Application ID: 0x{0:X8}", sh.uid3).AppendLine(); + description.AppendFormat("UIDs checksum: 0x{0:X8}", sh.uid4).AppendLine(); + } + else if(sh.uid3 == SymbianMagic) + { + description.AppendLine("Symbian Installation File"); - if(sh.uid2 == EPOCMagic) - description.AppendLine("SymbianOS 3 or later"); - else if (sh.uid2 == EPOC6Magic) - description.AppendLine("SymbianOS 6 or later"); - else - description.AppendFormat("Unknown EPOC magic 0x{0:X8}", sh.uid2).AppendLine(); + if(sh.uid2 == EPOCMagic) + description.AppendLine("SymbianOS 3 or later"); + else if (sh.uid2 == EPOC6Magic) + description.AppendLine("SymbianOS 6 or later"); + else + description.AppendFormat("Unknown EPOC magic 0x{0:X8}", sh.uid2).AppendLine(); - description.AppendFormat("Application ID: 0x{0:X8}", sh.uid1).AppendLine(); - description.AppendFormat("UIDs checksum: 0x{0:X8}", sh.uid4).AppendLine(); - description.AppendFormat("CRC16 of header: 0x{0:X4}", sh.crc16).AppendLine(); - description.AppendLine(); + description.AppendFormat("Application ID: 0x{0:X8}", sh.uid1).AppendLine(); + description.AppendFormat("UIDs checksum: 0x{0:X8}", sh.uid4).AppendLine(); + description.AppendFormat("CRC16 of header: 0x{0:X4}", sh.crc16).AppendLine(); + description.AppendLine(); - switch(sh.type) - { - case SISApp: - description.AppendLine("SIS contains an application"); - break; - } + switch(sh.type) + { + case SISApp: + description.AppendLine("SIS contains an application"); + break; + } - description.AppendFormat("Component: {0} v{1}.{2}", ComponentName, sh.major, sh.minor).AppendLine(); + description.AppendFormat("Component: {0} v{1}.{2}", ComponentName, sh.major, sh.minor).AppendLine(); - description.AppendFormat("File contains {0} languages:", sh.languages).AppendLine(); - for(int i = 0; i < languages.Count; i++) - { - if(i>0) - description.Append(", "); - description.AppendFormat("{0}", languages[i]); - } - description.AppendLine(); + description.AppendFormat("File contains {0} languages:", sh.languages).AppendLine(); + for(int i = 0; i < languages.Count; i++) + { + if(i>0) + description.Append(", "); + description.AppendFormat("{0}", languages[i]); + } + description.AppendLine(); - description.AppendFormat("File contains {0} files (pointer: {1})", sh.files, sh.files_ptr).AppendLine(); - description.AppendFormat("File contains {0} requisites", sh.requisites).AppendLine(); + description.AppendFormat("File contains {0} files (pointer: {1})", sh.files, sh.files_ptr).AppendLine(); + description.AppendFormat("File contains {0} requisites", sh.requisites).AppendLine(); // description.AppendLine("Capabilities:"); // foreach(KeyValuePair kvp in capabilities) // description.AppendFormat("{0} = {1}", kvp.Key, kvp.Value).AppendLine(); - } + } information = description.ToString(); - } + } - private struct SymbianHeader - { - public uint uid1; // Application UID before SymbianOS 9, magic after - public uint uid2; // EPOC release magic before SOS 9, NULLs after - public uint uid3; // Application UID after SOS 9, magic before - public uint uid4; // Checksum of UIDs 1 to 3 - public ushort crc16; // CRC16 of all header - public ushort languages; // Number of languages - public ushort files; // Number of files - public ushort requisites; // Number of requisites - public ushort inst_lang; // Installed language (only residual SIS) - public ushort inst_files; // Installed files (only residual SIS) - public ushort inst_drive; // Installed drive (only residual SIS), NULL or 0x0021 - public ushort capabilities; // Number of capabilities - public uint inst_version; // Version of Symbian Installer required - public ushort options; // Option flags - public ushort type; // Type - public ushort major; // Major version of application - public ushort minor; // Minor version of application - public uint variant; // Variant when SIS is a prerequisite for other SISs - public uint lang_ptr; // Pointer to language records - public uint files_ptr; // Pointer to file records - public uint reqs_ptr; // Pointer to requisite records - public uint certs_ptr; // Pointer to certificate records - public uint comp_ptr; // Pointer to component name record - // From EPOC Release 6 - public uint sig_ptr; // Pointer to signature record - public uint caps_ptr; // Pointer to capability records - public uint instspace; // Installed space (only residual SIS) - public uint maxinsspc; // Space required - public ulong reserved1; // Reserved - public ulong reserved2; // Reserved - } - } + private struct SymbianHeader + { + public uint uid1; // Application UID before SymbianOS 9, magic after + public uint uid2; // EPOC release magic before SOS 9, NULLs after + public uint uid3; // Application UID after SOS 9, magic before + public uint uid4; // Checksum of UIDs 1 to 3 + public ushort crc16; // CRC16 of all header + public ushort languages; // Number of languages + public ushort files; // Number of files + public ushort requisites; // Number of requisites + public ushort inst_lang; // Installed language (only residual SIS) + public ushort inst_files; // Installed files (only residual SIS) + public ushort inst_drive; // Installed drive (only residual SIS), NULL or 0x0021 + public ushort capabilities; // Number of capabilities + public uint inst_version; // Version of Symbian Installer required + public ushort options; // Option flags + public ushort type; // Type + public ushort major; // Major version of application + public ushort minor; // Minor version of application + public uint variant; // Variant when SIS is a prerequisite for other SISs + public uint lang_ptr; // Pointer to language records + public uint files_ptr; // Pointer to file records + public uint reqs_ptr; // Pointer to requisite records + public uint certs_ptr; // Pointer to certificate records + public uint comp_ptr; // Pointer to component name record + // From EPOC Release 6 + public uint sig_ptr; // Pointer to signature record + public uint caps_ptr; // Pointer to capability records + public uint instspace; // Installed space (only residual SIS) + public uint maxinsspc; // Space required + public ulong reserved1; // Reserved + public ulong reserved2; // Reserved + } + } } */ diff --git a/Aaru.Filesystems/SysV/Consts.cs b/Aaru.Filesystems/SysV/Consts.cs index b88ec929b..8847a462a 100644 --- a/Aaru.Filesystems/SysV/Consts.cs +++ b/Aaru.Filesystems/SysV/Consts.cs @@ -35,8 +35,9 @@ namespace Aaru.Filesystems; // Information from the Linux kernel /// /// Implements detection of the UNIX System V filesystem -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local"), - SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class SysVfs { const uint XENIX_MAGIC = 0x002B5544; diff --git a/Aaru.Filesystems/SysV/Info.cs b/Aaru.Filesystems/SysV/Info.cs index 6c5bb8adb..e01e2810a 100644 --- a/Aaru.Filesystems/SysV/Info.cs +++ b/Aaru.Filesystems/SysV/Info.cs @@ -43,10 +43,13 @@ namespace Aaru.Filesystems; // Information from the Linux kernel /// /// Implements detection of the UNIX System V filesystem -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local"), - SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class SysVfs { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -62,12 +65,12 @@ public sealed partial class SysVfs sb_size_in_sectors = 1; // If not a single sector can store it if(partition.End <= - partition.Start + (4 * (ulong)sb_size_in_sectors) + + partition.Start + 4 * (ulong)sb_size_in_sectors + sb_size_in_sectors) // Device must be bigger than SB location + SB size + offset return false; // Sectors in a cylinder - int spc = (int)(imagePlugin.Info.Heads * imagePlugin.Info.SectorsPerTrack); + var spc = (int)(imagePlugin.Info.Heads * imagePlugin.Info.SectorsPerTrack); // Superblock can start on 0x000, 0x200, 0x600 and 0x800, not aligned, so we assume 16 (128 bytes/sector) sectors as a safe value int[] locations = @@ -88,7 +91,7 @@ public sealed partial class SysVfs sb_sector.Length < 0x400) continue; - uint magic = BitConverter.ToUInt32(sb_sector, 0x3F8); + var magic = BitConverter.ToUInt32(sb_sector, 0x3F8); if(magic is XENIX_MAGIC or XENIX_CIGAM or SYSV_MAGIC or SYSV_CIGAM) return true; @@ -103,21 +106,21 @@ public sealed partial class SysVfs if(magic is XENIX_MAGIC or XENIX_CIGAM) return true; - byte[] coherent_string = new byte[6]; + var coherent_string = new byte[6]; Array.Copy(sb_sector, 0x1E4, coherent_string, 0, 6); // Coherent UNIX s_fname location string s_fname = StringHandlers.CToString(coherent_string); Array.Copy(sb_sector, 0x1EA, coherent_string, 0, 6); // Coherent UNIX s_fpack location string s_fpack = StringHandlers.CToString(coherent_string); - if((s_fname == COH_FNAME && s_fpack == COH_FPACK) || - (s_fname == COH_XXXXX && s_fpack == COH_XXXXX) || - (s_fname == COH_XXXXS && s_fpack == COH_XXXXN)) + if(s_fname == COH_FNAME && s_fpack == COH_FPACK || + s_fname == COH_XXXXX && s_fpack == COH_XXXXX || + s_fname == COH_XXXXS && s_fpack == COH_XXXXN) return true; // Now try to identify 7th edition - uint s_fsize = BitConverter.ToUInt32(sb_sector, 0x002); - ushort s_nfree = BitConverter.ToUInt16(sb_sector, 0x006); - ushort s_ninode = BitConverter.ToUInt16(sb_sector, 0x0D0); + var s_fsize = BitConverter.ToUInt32(sb_sector, 0x002); + var s_nfree = BitConverter.ToUInt16(sb_sector, 0x006); + var s_ninode = BitConverter.ToUInt16(sb_sector, 0x0D0); if(s_fsize is <= 0 or >= 0xFFFFFFFF || s_nfree is <= 0 or >= 0xFFFF || @@ -163,16 +166,16 @@ public sealed partial class SysVfs metadata = new FileSystem(); var sb = new StringBuilder(); - bool bigEndian = false; // Start in little endian until we know what are we handling here - int start = 0; - bool xenix = false; - bool sysv = false; - bool sys7th = false; - bool coherent = false; - bool xenix3 = false; + var bigEndian = false; // Start in little endian until we know what are we handling here + var start = 0; + var xenix = false; + var sysv = false; + var sys7th = false; + var coherent = false; + var xenix3 = false; byte[] sb_sector; byte sb_size_in_sectors; - int offset = 0; + var offset = 0; if(imagePlugin.Info.SectorSize <= 0x400) // Check if underlying device sector size is smaller than SuperBlock size @@ -181,7 +184,7 @@ public sealed partial class SysVfs sb_size_in_sectors = 1; // If not a single sector can store it // Sectors in a cylinder - int spc = (int)(imagePlugin.Info.Heads * imagePlugin.Info.SectorsPerTrack); + var spc = (int)(imagePlugin.Info.Heads * imagePlugin.Info.SectorsPerTrack); // Superblock can start on 0x000, 0x200, 0x600 and 0x800, not aligned, so we assume 16 (128 bytes/sector) sectors as a safe value int[] locations = @@ -201,7 +204,7 @@ public sealed partial class SysVfs if(errno != ErrorNumber.NoError) continue; - uint magic = BitConverter.ToUInt32(sb_sector, 0x3F8); + var magic = BitConverter.ToUInt32(sb_sector, 0x3F8); if(magic is XENIX_MAGIC or SYSV_MAGIC) { @@ -273,15 +276,15 @@ public sealed partial class SysVfs break; } - byte[] coherent_string = new byte[6]; + var coherent_string = new byte[6]; Array.Copy(sb_sector, 0x1E4, coherent_string, 0, 6); // Coherent UNIX s_fname location string s_fname = StringHandlers.CToString(coherent_string, encoding); Array.Copy(sb_sector, 0x1EA, coherent_string, 0, 6); // Coherent UNIX s_fpack location string s_fpack = StringHandlers.CToString(coherent_string, encoding); - if((s_fname == COH_FNAME && s_fpack == COH_FPACK) || - (s_fname == COH_XXXXX && s_fpack == COH_XXXXX) || - (s_fname == COH_XXXXS && s_fpack == COH_XXXXN)) + if(s_fname == COH_FNAME && s_fpack == COH_FPACK || + s_fname == COH_XXXXX && s_fpack == COH_XXXXX || + s_fname == COH_XXXXS && s_fpack == COH_XXXXN) { coherent = true; start = i; @@ -290,9 +293,9 @@ public sealed partial class SysVfs } // Now try to identify 7th edition - uint s_fsize = BitConverter.ToUInt32(sb_sector, 0x002); - ushort s_nfree = BitConverter.ToUInt16(sb_sector, 0x006); - ushort s_ninode = BitConverter.ToUInt16(sb_sector, 0x0D0); + var s_fsize = BitConverter.ToUInt32(sb_sector, 0x002); + var s_nfree = BitConverter.ToUInt16(sb_sector, 0x006); + var s_ninode = BitConverter.ToUInt16(sb_sector, 0x0D0); if(s_fsize is <= 0 or >= 0xFFFFFFFF || s_nfree is <= 0 or >= 0xFFFF || @@ -342,8 +345,8 @@ public sealed partial class SysVfs if(xenix || xenix3) { - byte[] xenix_strings = new byte[6]; - var xnx_sb = new XenixSuperBlock(); + var xenix_strings = new byte[6]; + var xnx_sb = new XenixSuperBlock(); errno = imagePlugin.ReadSectors((ulong)start + partition.Start, sb_size_in_sectors, out sb_sector); if(errno != ErrorNumber.NoError) @@ -449,16 +452,24 @@ public sealed partial class SysVfs if(imagePlugin.Info.SectorSize is 2336 or 2352 or 2448) { if(bs != 2048) + { sb. - AppendFormat(Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, - bs, 2048).AppendLine(); + AppendFormat( + Localization. + WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, + bs, 2048).AppendLine(); + } } else { if(bs != imagePlugin.Info.SectorSize) + { sb. - AppendFormat(Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, - bs, imagePlugin.Info.SectorSize).AppendLine(); + AppendFormat( + Localization. + WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, + bs, imagePlugin.Info.SectorSize).AppendLine(); + } } sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, xnx_sb.s_fsize, xnx_sb.s_fsize * bs).AppendLine(); @@ -475,9 +486,9 @@ public sealed partial class SysVfs sb.AppendFormat(Localization._0_blocks_per_gap_1_bytes, xnx_sb.s_gapblks, xnx_sb.s_gapblks * bs). AppendLine(); - sb.AppendFormat(Localization.First_data_zone_0, xnx_sb.s_isize).AppendLine(); + sb.AppendFormat(Localization.First_data_zone_0, xnx_sb.s_isize).AppendLine(); sb.AppendFormat(Localization._0_free_inodes_on_volume, xnx_sb.s_tinode).AppendLine(); - sb.AppendFormat(Localization._0_free_inodes_on_list, xnx_sb.s_ninode).AppendLine(); + sb.AppendFormat(Localization._0_free_inodes_on_list, xnx_sb.s_ninode).AppendLine(); if(xnx_sb.s_flock > 0) sb.AppendLine(Localization.Free_block_list_is_locked); @@ -495,9 +506,7 @@ public sealed partial class SysVfs AppendLine(); if(xnx_sb.s_time != 0) - { metadata.ModificationDate = DateHandlers.UnixToDateTime(xnx_sb.s_time); - } sb.AppendFormat(Localization.Volume_name_0, xnx_sb.s_fname).AppendLine(); metadata.VolumeName = xnx_sb.s_fname; @@ -519,7 +528,7 @@ public sealed partial class SysVfs if(errno != ErrorNumber.NoError) return; - byte[] sysv_strings = new byte[6]; + var sysv_strings = new byte[6]; var sysv_sb = new SystemVRelease4SuperBlock { @@ -649,9 +658,9 @@ public sealed partial class SysVfs sb.AppendFormat(Localization._0_blocks_per_gap_1_bytes, sysv_sb.s_gapblks, sysv_sb.s_gapblks * bs). AppendLine(); - sb.AppendFormat(Localization.First_data_zone_0, sysv_sb.s_isize).AppendLine(); + sb.AppendFormat(Localization.First_data_zone_0, sysv_sb.s_isize).AppendLine(); sb.AppendFormat(Localization._0_free_inodes_on_volume, sysv_sb.s_tinode).AppendLine(); - sb.AppendFormat(Localization._0_free_inodes_on_list, sysv_sb.s_ninode).AppendLine(); + sb.AppendFormat(Localization._0_free_inodes_on_list, sysv_sb.s_ninode).AppendLine(); if(sysv_sb.s_flock > 0) sb.AppendLine(Localization.Free_block_list_is_locked); @@ -669,9 +678,7 @@ public sealed partial class SysVfs DateHandlers.UnixUnsignedToDateTime(sysv_sb.s_time)).AppendLine(); if(sysv_sb.s_time != 0) - { metadata.ModificationDate = DateHandlers.UnixUnsignedToDateTime(sysv_sb.s_time); - } sb.AppendFormat(Localization.Volume_name_0, sysv_sb.s_fname).AppendLine(); metadata.VolumeName = sysv_sb.s_fname; @@ -693,8 +700,8 @@ public sealed partial class SysVfs if(errno != ErrorNumber.NoError) return; - var coh_sb = new CoherentSuperBlock(); - byte[] coh_strings = new byte[6]; + var coh_sb = new CoherentSuperBlock(); + var coh_strings = new byte[6]; coh_sb.s_isize = BitConverter.ToUInt16(sb_sector, 0x000); coh_sb.s_fsize = Swapping.PDPFromLittleEndian(BitConverter.ToUInt32(sb_sector, 0x002)); @@ -721,9 +728,12 @@ public sealed partial class SysVfs sb.AppendLine(Localization.Coherent_UNIX_filesystem); if(imagePlugin.Info.SectorSize != 512) + { sb. - AppendFormat(Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, - 512, 2048).AppendLine(); + AppendFormat( + Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, + 512, 2048).AppendLine(); + } sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, coh_sb.s_fsize, coh_sb.s_fsize * 512).AppendLine(); @@ -733,9 +743,9 @@ public sealed partial class SysVfs sb.AppendFormat(Localization._0_free_blocks_on_list_1_bytes, coh_sb.s_nfree, coh_sb.s_nfree * 512). AppendLine(); - sb.AppendFormat(Localization.First_data_zone_0, coh_sb.s_isize).AppendLine(); + sb.AppendFormat(Localization.First_data_zone_0, coh_sb.s_isize).AppendLine(); sb.AppendFormat(Localization._0_free_inodes_on_volume, coh_sb.s_tinode).AppendLine(); - sb.AppendFormat(Localization._0_free_inodes_on_list, coh_sb.s_ninode).AppendLine(); + sb.AppendFormat(Localization._0_free_inodes_on_list, coh_sb.s_ninode).AppendLine(); if(coh_sb.s_flock > 0) sb.AppendLine(Localization.Free_block_list_is_locked); @@ -753,9 +763,7 @@ public sealed partial class SysVfs DateHandlers.UnixUnsignedToDateTime(coh_sb.s_time)).AppendLine(); if(coh_sb.s_time != 0) - { metadata.ModificationDate = DateHandlers.UnixUnsignedToDateTime(coh_sb.s_time); - } sb.AppendFormat(Localization.Volume_name_0, coh_sb.s_fname).AppendLine(); metadata.VolumeName = coh_sb.s_fname; @@ -769,8 +777,8 @@ public sealed partial class SysVfs if(errno != ErrorNumber.NoError) return; - var v7_sb = new UNIX7thEditionSuperBlock(); - byte[] sys7_strings = new byte[6]; + var v7_sb = new UNIX7thEditionSuperBlock(); + var sys7_strings = new byte[6]; v7_sb.s_isize = BitConverter.ToUInt16(sb_sector, 0x000); v7_sb.s_fsize = BitConverter.ToUInt32(sb_sector, 0x002); @@ -796,9 +804,12 @@ public sealed partial class SysVfs sb.AppendLine(Localization.UNIX_7th_Edition_filesystem); if(imagePlugin.Info.SectorSize != 512) + { sb. - AppendFormat(Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, - 512, 2048).AppendLine(); + AppendFormat( + Localization.WARNING_Filesystem_indicates_0_bytes_block_while_device_indicates_1_bytes_block, + 512, 2048).AppendLine(); + } sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, v7_sb.s_fsize, v7_sb.s_fsize * 512).AppendLine(); @@ -808,9 +819,9 @@ public sealed partial class SysVfs sb.AppendFormat(Localization._0_free_blocks_on_list_1_bytes, v7_sb.s_nfree, v7_sb.s_nfree * 512). AppendLine(); - sb.AppendFormat(Localization.First_data_zone_0, v7_sb.s_isize).AppendLine(); + sb.AppendFormat(Localization.First_data_zone_0, v7_sb.s_isize).AppendLine(); sb.AppendFormat(Localization._0_free_inodes_on_volume, v7_sb.s_tinode).AppendLine(); - sb.AppendFormat(Localization._0_free_inodes_on_list, v7_sb.s_ninode).AppendLine(); + sb.AppendFormat(Localization._0_free_inodes_on_list, v7_sb.s_ninode).AppendLine(); if(v7_sb.s_flock > 0) sb.AppendLine(Localization.Free_block_list_is_locked); @@ -828,9 +839,7 @@ public sealed partial class SysVfs DateHandlers.UnixUnsignedToDateTime(v7_sb.s_time)).AppendLine(); if(v7_sb.s_time != 0) - { metadata.ModificationDate = DateHandlers.UnixUnsignedToDateTime(v7_sb.s_time); - } sb.AppendFormat(Localization.Volume_name_0, v7_sb.s_fname).AppendLine(); metadata.VolumeName = v7_sb.s_fname; @@ -839,4 +848,6 @@ public sealed partial class SysVfs information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SysV/Structs.cs b/Aaru.Filesystems/SysV/Structs.cs index bf3cd90f1..03f819a76 100644 --- a/Aaru.Filesystems/SysV/Structs.cs +++ b/Aaru.Filesystems/SysV/Structs.cs @@ -35,13 +35,15 @@ namespace Aaru.Filesystems; // Information from the Linux kernel /// /// Implements detection of the UNIX System V filesystem -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local"), - SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class SysVfs { - // Old XENIX use different offsets - #pragma warning disable CS0649 - struct XenixSuperBlock +#region Nested type: CoherentSuperBlock + +#pragma warning disable CS0649 + struct CoherentSuperBlock { /// 0x000, index of first data zone public ushort s_isize; @@ -51,52 +53,106 @@ public sealed partial class SysVfs // the start of the free block list: /// 0x006, blocks in s_free, <=100 public ushort s_nfree; - /// 0x008, 100 entries, 50 entries for Xenix 3, first free block list chunk + /// 0x008, 64 entries, first free block list chunk public uint[] s_free; // the cache of free inodes: - /// 0x198 (0xD0), number of inodes in s_inode, <= 100 + /// 0x108, number of inodes in s_inode, <= 100 public ushort s_ninode; - /// 0x19A (0xD2), 100 entries, some free inodes + /// 0x10A, 100 entries, some free inodes public ushort[] s_inode; - /// 0x262 (0x19A), free block list manipulation lock + /// 0x1D2, free block list manipulation lock public byte s_flock; - /// 0x263 (0x19B), inode cache manipulation lock + /// 0x1D3, inode cache manipulation lock public byte s_ilock; - /// 0x264 (0x19C), superblock modification flag + /// 0x1D4, superblock modification flag public byte s_fmod; - /// 0x265 (0x19D), read-only mounted flag + /// 0x1D5, read-only mounted flag public byte s_ronly; - /// 0x266 (0x19E), time of last superblock update - public int s_time; - /// 0x26A (0x1A2), total number of free zones + /// 0x1D6, time of last superblock update + public uint s_time; + /// 0x1DE, total number of free zones public uint s_tfree; - /// 0x26E (0x1A6), total number of free inodes + /// 0x1E2, total number of free inodes public ushort s_tinode; - /// 0x270 (0x1A8), blocks per cylinder - public ushort s_cylblks; - /// 0x272 (0x1AA), blocks per gap - public ushort s_gapblks; - /// 0x274 (0x1AC), device information ?? - public ushort s_dinfo0; - /// 0x276 (0x1AE), device information ?? - public ushort s_dinfo1; - /// 0x278 (0x1B0), 6 bytes, volume name + /// 0x1E4, interleave factor + public ushort s_int_m; + /// 0x1E6, interleave factor + public ushort s_int_n; + /// 0x1E8, 6 bytes, volume name public string s_fname; - /// 0x27E (0x1B6), 6 bytes, pack name + /// 0x1EE, 6 bytes, pack name public string s_fpack; - /// 0x284 (0x1BC), 0x46 if volume is clean - public byte s_clean; - /// 0x285 (0x1BD), 371 bytes, 51 bytes for Xenix 3 + /// 0x1F4, zero-filled + public uint s_unique; + } +#pragma warning restore CS0649 + +#endregion + +#region Nested type: SystemVRelease2SuperBlock + +#pragma warning disable CS0649 + struct SystemVRelease2SuperBlock + { + /// 0x000, index of first data zone + public ushort s_isize; + /// 0x002, total number of zones of this volume + public uint s_fsize; + + // the start of the free block list: + /// 0x006, blocks in s_free, <=100 + public ushort s_nfree; + /// 0x008, 50 entries, first free block list chunk + public uint[] s_free; + + // the cache of free inodes: + /// 0x0D0, number of inodes in s_inode, <= 100 + public ushort s_ninode; + /// 0x0D2, 100 entries, some free inodes + public ushort[] s_inode; + /// 0x19A, free block list manipulation lock + public byte s_flock; + /// 0x19B, inode cache manipulation lock + public byte s_ilock; + /// 0x19C, superblock modification flag + public byte s_fmod; + /// 0x19D, read-only mounted flag + public byte s_ronly; + /// 0x19E, time of last superblock update + public uint s_time; + /// 0x1A2, blocks per cylinder + public ushort s_cylblks; + /// 0x1A4, blocks per gap + public ushort s_gapblks; + /// 0x1A6, device information ?? + public ushort s_dinfo0; + /// 0x1A8, device information ?? + public ushort s_dinfo1; + /// 0x1AA, total number of free zones + public uint s_tfree; + /// 0x1AE, total number of free inodes + public ushort s_tinode; + /// 0x1B0, 6 bytes, volume name + public string s_fname; + /// 0x1B6, 6 bytes, pack name + public string s_fpack; + /// 0x1BC, 56 bytes public byte[] s_fill; - /// 0x3F8 (0x1F0), magic + /// 0x1F4, if s_state == (0x7C269D38 - s_time) then filesystem is clean + public uint s_state; + /// 0x1F8, magic public uint s_magic; - /// 0x3FC (0x1F4), filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk, 3 = 2048 bytes/blk) + /// 0x1FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk) public uint s_type; } - #pragma warning restore CS0649 +#pragma warning restore CS0649 - #pragma warning disable CS0649 +#endregion + +#region Nested type: SystemVRelease4SuperBlock + +#pragma warning disable CS0649 struct SystemVRelease4SuperBlock { /// 0x000, index of first data zone @@ -158,65 +214,13 @@ public sealed partial class SysVfs /// 0x1FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk) public uint s_type; } - #pragma warning restore CS0649 +#pragma warning restore CS0649 - #pragma warning disable CS0649 - struct SystemVRelease2SuperBlock - { - /// 0x000, index of first data zone - public ushort s_isize; - /// 0x002, total number of zones of this volume - public uint s_fsize; +#endregion - // the start of the free block list: - /// 0x006, blocks in s_free, <=100 - public ushort s_nfree; - /// 0x008, 50 entries, first free block list chunk - public uint[] s_free; +#region Nested type: UNIX7thEditionSuperBlock - // the cache of free inodes: - /// 0x0D0, number of inodes in s_inode, <= 100 - public ushort s_ninode; - /// 0x0D2, 100 entries, some free inodes - public ushort[] s_inode; - /// 0x19A, free block list manipulation lock - public byte s_flock; - /// 0x19B, inode cache manipulation lock - public byte s_ilock; - /// 0x19C, superblock modification flag - public byte s_fmod; - /// 0x19D, read-only mounted flag - public byte s_ronly; - /// 0x19E, time of last superblock update - public uint s_time; - /// 0x1A2, blocks per cylinder - public ushort s_cylblks; - /// 0x1A4, blocks per gap - public ushort s_gapblks; - /// 0x1A6, device information ?? - public ushort s_dinfo0; - /// 0x1A8, device information ?? - public ushort s_dinfo1; - /// 0x1AA, total number of free zones - public uint s_tfree; - /// 0x1AE, total number of free inodes - public ushort s_tinode; - /// 0x1B0, 6 bytes, volume name - public string s_fname; - /// 0x1B6, 6 bytes, pack name - public string s_fpack; - /// 0x1BC, 56 bytes - public byte[] s_fill; - /// 0x1F4, if s_state == (0x7C269D38 - s_time) then filesystem is clean - public uint s_state; - /// 0x1F8, magic - public uint s_magic; - /// 0x1FC, filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk) - public uint s_type; - } - #pragma warning restore CS0649 - - #pragma warning disable CS0649 +#pragma warning disable CS0649 struct UNIX7thEditionSuperBlock { /// 0x000, index of first data zone @@ -258,10 +262,15 @@ public sealed partial class SysVfs /// 0x1B2, 6 bytes, pack name public string s_fpack; } - #pragma warning restore CS0649 +#pragma warning restore CS0649 - #pragma warning disable CS0649 - struct CoherentSuperBlock +#endregion + +#region Nested type: XenixSuperBlock + + // Old XENIX use different offsets +#pragma warning disable CS0649 + struct XenixSuperBlock { /// 0x000, index of first data zone public ushort s_isize; @@ -271,38 +280,50 @@ public sealed partial class SysVfs // the start of the free block list: /// 0x006, blocks in s_free, <=100 public ushort s_nfree; - /// 0x008, 64 entries, first free block list chunk + /// 0x008, 100 entries, 50 entries for Xenix 3, first free block list chunk public uint[] s_free; // the cache of free inodes: - /// 0x108, number of inodes in s_inode, <= 100 + /// 0x198 (0xD0), number of inodes in s_inode, <= 100 public ushort s_ninode; - /// 0x10A, 100 entries, some free inodes + /// 0x19A (0xD2), 100 entries, some free inodes public ushort[] s_inode; - /// 0x1D2, free block list manipulation lock + /// 0x262 (0x19A), free block list manipulation lock public byte s_flock; - /// 0x1D3, inode cache manipulation lock + /// 0x263 (0x19B), inode cache manipulation lock public byte s_ilock; - /// 0x1D4, superblock modification flag + /// 0x264 (0x19C), superblock modification flag public byte s_fmod; - /// 0x1D5, read-only mounted flag + /// 0x265 (0x19D), read-only mounted flag public byte s_ronly; - /// 0x1D6, time of last superblock update - public uint s_time; - /// 0x1DE, total number of free zones + /// 0x266 (0x19E), time of last superblock update + public int s_time; + /// 0x26A (0x1A2), total number of free zones public uint s_tfree; - /// 0x1E2, total number of free inodes + /// 0x26E (0x1A6), total number of free inodes public ushort s_tinode; - /// 0x1E4, interleave factor - public ushort s_int_m; - /// 0x1E6, interleave factor - public ushort s_int_n; - /// 0x1E8, 6 bytes, volume name + /// 0x270 (0x1A8), blocks per cylinder + public ushort s_cylblks; + /// 0x272 (0x1AA), blocks per gap + public ushort s_gapblks; + /// 0x274 (0x1AC), device information ?? + public ushort s_dinfo0; + /// 0x276 (0x1AE), device information ?? + public ushort s_dinfo1; + /// 0x278 (0x1B0), 6 bytes, volume name public string s_fname; - /// 0x1EE, 6 bytes, pack name + /// 0x27E (0x1B6), 6 bytes, pack name public string s_fpack; - /// 0x1F4, zero-filled - public uint s_unique; + /// 0x284 (0x1BC), 0x46 if volume is clean + public byte s_clean; + /// 0x285 (0x1BD), 371 bytes, 51 bytes for Xenix 3 + public byte[] s_fill; + /// 0x3F8 (0x1F0), magic + public uint s_magic; + /// 0x3FC (0x1F4), filesystem type (1 = 512 bytes/blk, 2 = 1024 bytes/blk, 3 = 2048 bytes/blk) + public uint s_type; } - #pragma warning restore CS0649 +#pragma warning restore CS0649 + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/SysV/SysV.cs b/Aaru.Filesystems/SysV/SysV.cs index c33c1fddb..3534e389c 100644 --- a/Aaru.Filesystems/SysV/SysV.cs +++ b/Aaru.Filesystems/SysV/SysV.cs @@ -37,14 +37,21 @@ namespace Aaru.Filesystems; // Information from the Linux kernel /// /// Implements detection of the UNIX System V filesystem -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local"), - SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class SysVfs : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.SysVfs_Name; + /// public Guid Id => new("9B8D016A-8561-400E-A12A-A198283C211D"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UCSDPascal/Consts.cs b/Aaru.Filesystems/UCSDPascal/Consts.cs index 82ebc3fb0..29d7f323f 100644 --- a/Aaru.Filesystems/UCSDPascal/Consts.cs +++ b/Aaru.Filesystems/UCSDPascal/Consts.cs @@ -38,6 +38,10 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class PascalPlugin { + const string FS_TYPE = "ucsd"; + +#region Nested type: PascalFileKind + enum PascalFileKind : short { /// Disk volume entry @@ -60,5 +64,5 @@ public sealed partial class PascalPlugin Secure } - const string FS_TYPE = "ucsd"; +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UCSDPascal/Dir.cs b/Aaru.Filesystems/UCSDPascal/Dir.cs index f75a7e246..ba006d099 100644 --- a/Aaru.Filesystems/UCSDPascal/Dir.cs +++ b/Aaru.Filesystems/UCSDPascal/Dir.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.Linq; using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; @@ -42,6 +41,8 @@ namespace Aaru.Filesystems; // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure public sealed partial class PascalPlugin { +#region IReadOnlyFilesystem Members + /// public ErrorNumber OpenDir(string path, out IDirNode node) { @@ -54,8 +55,8 @@ public sealed partial class PascalPlugin string.Compare(path, "/", StringComparison.OrdinalIgnoreCase) != 0) return ErrorNumber.NotSupported; - List contents = _fileEntries.Select(ent => StringHandlers.PascalToString(ent.Filename, _encoding)). - ToList(); + var contents = _fileEntries.Select(ent => StringHandlers.PascalToString(ent.Filename, _encoding)). + ToList(); if(_debug) { @@ -108,4 +109,6 @@ public sealed partial class PascalPlugin return ErrorNumber.NoError; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UCSDPascal/File.cs b/Aaru.Filesystems/UCSDPascal/File.cs index eef523e01..7e8a0b378 100644 --- a/Aaru.Filesystems/UCSDPascal/File.cs +++ b/Aaru.Filesystems/UCSDPascal/File.cs @@ -38,6 +38,8 @@ namespace Aaru.Filesystems; // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure public sealed partial class PascalPlugin { +#region IReadOnlyFilesystem Members + /// public ErrorNumber GetAttributes(string path, out FileAttributes attributes) { @@ -46,10 +48,7 @@ public sealed partial class PascalPlugin if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; @@ -72,17 +71,14 @@ public sealed partial class PascalPlugin if(!_mounted) return ErrorNumber.AccessDenied; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; byte[] file; - if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0)) file = string.Compare(path, "$", StringComparison.InvariantCulture) == 0 ? _catalogBlocks : _bootBlocks; else @@ -98,7 +94,7 @@ public sealed partial class PascalPlugin if(error != ErrorNumber.NoError) return error; - file = new byte[((entry.LastBlock - entry.FirstBlock - 1) * _device.Info.SectorSize * _multiplier) + + file = new byte[(entry.LastBlock - entry.FirstBlock - 1) * _device.Info.SectorSize * _multiplier + entry.LastBytes]; Array.Copy(tmp, 0, file, 0, file.Length); @@ -160,16 +156,14 @@ public sealed partial class PascalPlugin { stat = null; - string[] pathElements = path.Split(new[] - { - '/' - }, StringSplitOptions.RemoveEmptyEntries); + string[] pathElements = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if(pathElements.Length != 1) return ErrorNumber.NotSupported; if(_debug) - if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || + { + if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || string.Compare(path, "$Boot", StringComparison.InvariantCulture) == 0) { stat = new FileEntryInfo @@ -181,18 +175,19 @@ public sealed partial class PascalPlugin if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0) { - stat.Blocks = (_catalogBlocks.Length / stat.BlockSize) + (_catalogBlocks.Length % stat.BlockSize); + stat.Blocks = _catalogBlocks.Length / stat.BlockSize + _catalogBlocks.Length % stat.BlockSize; stat.Length = _catalogBlocks.Length; } else { - stat.Blocks = (_bootBlocks.Length / stat.BlockSize) + (_catalogBlocks.Length % stat.BlockSize); + stat.Blocks = _bootBlocks.Length / stat.BlockSize + _catalogBlocks.Length % stat.BlockSize; stat.Length = _bootBlocks.Length; } return ErrorNumber.NoError; } + } ErrorNumber error = GetFileEntry(path, out PascalFileEntry entry); @@ -205,13 +200,15 @@ public sealed partial class PascalPlugin Blocks = entry.LastBlock - entry.FirstBlock, BlockSize = _device.Info.SectorSize * _multiplier, LastWriteTimeUtc = DateHandlers.UcsdPascalToDateTime(entry.ModificationTime), - Length = ((entry.LastBlock - entry.FirstBlock) * _device.Info.SectorSize * _multiplier) + entry.LastBytes, + Length = (entry.LastBlock - entry.FirstBlock) * _device.Info.SectorSize * _multiplier + entry.LastBytes, Links = 1 }; return ErrorNumber.NoError; } +#endregion + ErrorNumber GetFileEntry(string path, out PascalFileEntry entry) { entry = new PascalFileEntry(); diff --git a/Aaru.Filesystems/UCSDPascal/Info.cs b/Aaru.Filesystems/UCSDPascal/Info.cs index 3be97af81..e81c51d27 100644 --- a/Aaru.Filesystems/UCSDPascal/Info.cs +++ b/Aaru.Filesystems/UCSDPascal/Info.cs @@ -46,6 +46,8 @@ namespace Aaru.Filesystems; // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure public sealed partial class PascalPlugin { +#region IReadOnlyFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -56,7 +58,7 @@ public sealed partial class PascalPlugin // Blocks 0 and 1 are boot code ErrorNumber errno = - imagePlugin.ReadSectors((_multiplier * 2) + partition.Start, _multiplier, out byte[] volBlock); + imagePlugin.ReadSectors(_multiplier * 2 + partition.Start, _multiplier, out byte[] volBlock); if(errno != ErrorNumber.NoError) return false; @@ -82,15 +84,15 @@ public sealed partial class PascalPlugin Array.Copy(volBlock, 0x06, volEntry.VolumeName, 0, 8); AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.firstBlock = {0}", volEntry.FirstBlock); - AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.lastBlock = {0}", volEntry.LastBlock); - AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.entryType = {0}", volEntry.EntryType); + AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.lastBlock = {0}", volEntry.LastBlock); + AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.entryType = {0}", volEntry.EntryType); // AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.volumeName = {0}", volEntry.VolumeName); - AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.blocks = {0}", volEntry.Blocks); - AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.files = {0}", volEntry.Files); - AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.dummy = {0}", volEntry.Dummy); + AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.blocks = {0}", volEntry.Blocks); + AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.files = {0}", volEntry.Files); + AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.dummy = {0}", volEntry.Dummy); AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.lastBoot = {0}", volEntry.LastBoot); - AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.tail = {0}", volEntry.Tail); + AaruConsole.DebugWriteLine(MODULE_NAME, "volEntry.tail = {0}", volEntry.Tail); // First block is always 0 (even is it's sector 2) if(volEntry.FirstBlock != 0) @@ -98,7 +100,7 @@ public sealed partial class PascalPlugin // Last volume record block must be after first block, and before end of device if(volEntry.LastBlock <= volEntry.FirstBlock || - (ulong)volEntry.LastBlock > (imagePlugin.Info.Sectors / _multiplier) - 2) + (ulong)volEntry.LastBlock > imagePlugin.Info.Sectors / _multiplier - 2) return false; // Volume record entry type must be volume or secure @@ -134,7 +136,7 @@ public sealed partial class PascalPlugin // Blocks 0 and 1 are boot code ErrorNumber errno = - imagePlugin.ReadSectors((_multiplier * 2) + partition.Start, _multiplier, out byte[] volBlock); + imagePlugin.ReadSectors(_multiplier * 2 + partition.Start, _multiplier, out byte[] volBlock); if(errno != ErrorNumber.NoError) return; @@ -165,7 +167,7 @@ public sealed partial class PascalPlugin // Last volume record block must be after first block, and before end of device if(volEntry.LastBlock <= volEntry.FirstBlock || - (ulong)volEntry.LastBlock > (imagePlugin.Info.Sectors / _multiplier) - 2) + (ulong)volEntry.LastBlock > imagePlugin.Info.Sectors / _multiplier - 2) return; // Volume record entry type must be volume or secure @@ -194,7 +196,7 @@ public sealed partial class PascalPlugin AppendLine(); sbInformation.AppendFormat(Localization.Volume_has_0_blocks, volEntry.Blocks).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_files, volEntry.Files).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_files, volEntry.Files).AppendLine(); sbInformation. AppendFormat(Localization.Volume_last_booted_on_0, DateHandlers.UcsdPascalToDateTime(volEntry.LastBoot)). @@ -214,4 +216,6 @@ public sealed partial class PascalPlugin VolumeName = StringHandlers.PascalToString(volEntry.VolumeName, encoding) }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UCSDPascal/Structs.cs b/Aaru.Filesystems/UCSDPascal/Structs.cs index 150572bd8..5639a66a6 100644 --- a/Aaru.Filesystems/UCSDPascal/Structs.cs +++ b/Aaru.Filesystems/UCSDPascal/Structs.cs @@ -39,6 +39,67 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class PascalPlugin { +#region Nested type: PascalDirNode + + sealed class PascalDirNode : IDirNode + { + internal string[] _contents; + internal int _position; + + #region IDirNode Members + + /// + public string Path { get; init; } + + #endregion + } + +#endregion + +#region Nested type: PascalFileEntry + + struct PascalFileEntry + { + /// 0x00, first block of file + public short FirstBlock; + /// 0x02, last block of file + public short LastBlock; + /// 0x04, entry type + public PascalFileKind EntryType; + /// 0x06, file name + public byte[] Filename; + /// 0x16, bytes used in last block + public short LastBytes; + /// 0x18, modification time + public short ModificationTime; + } + +#endregion + +#region Nested type: PascalFileNode + + sealed class PascalFileNode : IFileNode + { + internal byte[] _cache; + + #region IFileNode Members + + /// + public string Path { get; init; } + + /// + public long Length { get; init; } + + /// + public long Offset { get; set; } + + #endregion + } + +#endregion + +#region Nested type: PascalVolumeEntry + struct PascalVolumeEntry { /// 0x00, first block of volume entry @@ -61,38 +122,5 @@ public sealed partial class PascalPlugin public int Tail; } - struct PascalFileEntry - { - /// 0x00, first block of file - public short FirstBlock; - /// 0x02, last block of file - public short LastBlock; - /// 0x04, entry type - public PascalFileKind EntryType; - /// 0x06, file name - public byte[] Filename; - /// 0x16, bytes used in last block - public short LastBytes; - /// 0x18, modification time - public short ModificationTime; - } - - sealed class PascalFileNode : IFileNode - { - internal byte[] _cache; - /// - public string Path { get; init; } - /// - public long Length { get; init; } - /// - public long Offset { get; set; } - } - - sealed class PascalDirNode : IDirNode - { - internal string[] _contents; - internal int _position; - /// - public string Path { get; init; } - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UCSDPascal/Super.cs b/Aaru.Filesystems/UCSDPascal/Super.cs index 84d6d6356..f17d0f871 100644 --- a/Aaru.Filesystems/UCSDPascal/Super.cs +++ b/Aaru.Filesystems/UCSDPascal/Super.cs @@ -46,9 +46,11 @@ namespace Aaru.Filesystems; // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure public sealed partial class PascalPlugin { +#region IReadOnlyFilesystem Members + /// - public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, - Dictionary options, string @namespace) + public ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace) { _device = imagePlugin; _encoding = encoding ?? new Apple2(); @@ -85,11 +87,11 @@ public sealed partial class PascalPlugin _mountedVolEntry.LastBoot = BigEndianBitConverter.ToInt16(_catalogBlocks, 0x14); _mountedVolEntry.Tail = BigEndianBitConverter.ToInt32(_catalogBlocks, 0x16); - if(_mountedVolEntry.FirstBlock != 0 || - _mountedVolEntry.LastBlock <= _mountedVolEntry.FirstBlock || - (ulong)_mountedVolEntry.LastBlock > (_device.Info.Sectors / _multiplier) - 2 || - (_mountedVolEntry.EntryType != PascalFileKind.Volume && - _mountedVolEntry.EntryType != PascalFileKind.Secure) || + if(_mountedVolEntry.FirstBlock != 0 || + _mountedVolEntry.LastBlock <= _mountedVolEntry.FirstBlock || + (ulong)_mountedVolEntry.LastBlock > _device.Info.Sectors / _multiplier - 2 || + _mountedVolEntry.EntryType != PascalFileKind.Volume && + _mountedVolEntry.EntryType != PascalFileKind.Secure || _mountedVolEntry.VolumeName[0] > 7 || _mountedVolEntry.Blocks < 0 || (ulong)_mountedVolEntry.Blocks != _device.Info.Sectors / _multiplier || @@ -103,7 +105,7 @@ public sealed partial class PascalPlugin if(errno != ErrorNumber.NoError) return errno; - int offset = 26; + var offset = 26; _fileEntries = new List(); @@ -177,4 +179,6 @@ public sealed partial class PascalPlugin return ErrorNumber.NotImplemented; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UCSDPascal/UCSDPascal.cs b/Aaru.Filesystems/UCSDPascal/UCSDPascal.cs index 9dfd26ed2..d539a5358 100644 --- a/Aaru.Filesystems/UCSDPascal/UCSDPascal.cs +++ b/Aaru.Filesystems/UCSDPascal/UCSDPascal.cs @@ -44,23 +44,29 @@ namespace Aaru.Filesystems; /// Implements the U.C.S.D. Pascal filesystem public sealed partial class PascalPlugin : IReadOnlyFilesystem { + const string MODULE_NAME = "U.C.S.D. Pascal Plugin"; byte[] _bootBlocks; byte[] _catalogBlocks; bool _debug; IMediaImage _device; + Encoding _encoding; List _fileEntries; bool _mounted; PascalVolumeEntry _mountedVolEntry; - Encoding _encoding; /// Apple II disks use 256 bytes / sector, but filesystem assumes it's 512 bytes / sector uint _multiplier; +#region IReadOnlyFilesystem Members + /// public string Name => Localization.PascalPlugin_Name; + /// public FileSystem Metadata { get; private set; } + /// public Guid Id => new("B0AC2CB5-72AA-473A-9200-270B5A2C2D53"); + /// public string Author => Authors.NataliaPortillo; @@ -90,12 +96,10 @@ public sealed partial class PascalPlugin : IReadOnlyFilesystem /// public Dictionary Namespaces => null; +#endregion + static Dictionary GetDefaultOptions() => new() { - { - "debug", false.ToString() - } + { "debug", false.ToString() } }; - - const string MODULE_NAME = "U.C.S.D. Pascal Plugin"; } \ No newline at end of file diff --git a/Aaru.Filesystems/UDF/Consts.cs b/Aaru.Filesystems/UDF/Consts.cs index dd12e5b2a..795ad2004 100644 --- a/Aaru.Filesystems/UDF/Consts.cs +++ b/Aaru.Filesystems/UDF/Consts.cs @@ -36,11 +36,10 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class UDF { + const string FS_TYPE = "udf"; readonly byte[] _magic = { 0x2A, 0x4F, 0x53, 0x54, 0x41, 0x20, 0x55, 0x44, 0x46, 0x20, 0x43, 0x6F, 0x6D, 0x70, 0x6C, 0x69, 0x61, 0x6E, 0x74, 0x00, 0x00, 0x00, 0x00 }; - - const string FS_TYPE = "udf"; } \ No newline at end of file diff --git a/Aaru.Filesystems/UDF/Enums.cs b/Aaru.Filesystems/UDF/Enums.cs index 8f53056ef..f6bbbf0a0 100644 --- a/Aaru.Filesystems/UDF/Enums.cs +++ b/Aaru.Filesystems/UDF/Enums.cs @@ -37,9 +37,14 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class UDF { +#region Nested type: EntityFlags + [Flags] enum EntityFlags : byte { - Dirty = 0x01, Protected = 0x02 + Dirty = 0x01, + Protected = 0x02 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UDF/Info.cs b/Aaru.Filesystems/UDF/Info.cs index 1e9f78cb2..55344d074 100644 --- a/Aaru.Filesystems/UDF/Info.cs +++ b/Aaru.Filesystems/UDF/Info.cs @@ -45,6 +45,8 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class UDF { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -62,50 +64,23 @@ public sealed partial class UDF // All positions where anchor may reside, with the ratio between 512 and 2048bps ulong[][] positions = { - new ulong[] - { - 256, 1 - }, - new ulong[] - { - 512, 1 - }, - new ulong[] - { - partition.End - 256, 1 - }, - new ulong[] - { - partition.End, 1 - }, - new ulong[] - { - 1024, 4 - }, - new ulong[] - { - 2048, 4 - }, - new ulong[] - { - partition.End - 1024, 4 - }, - new ulong[] - { - partition.End - 4, 4 - } + new ulong[] { 256, 1 }, new ulong[] { 512, 1 }, new ulong[] { partition.End - 256, 1 }, + new ulong[] { partition.End, 1 }, new ulong[] { 1024, 4 }, new ulong[] { 2048, 4 }, + new ulong[] { partition.End - 1024, 4 }, new ulong[] { partition.End - 4, 4 } }; - bool anchorFound = false; + var anchorFound = false; uint ratio = 1; sector = null; foreach(ulong[] position in from position in positions.Where(position => position[0] + partition.Start + position[1] <= - partition.End && position[0] < partition.End) let errno = + partition.End && position[0] < partition.End) + let errno = imagePlugin.ReadSectors(position[0], (uint)position[1], out sector) - where errno == ErrorNumber.NoError select position) + where errno == ErrorNumber.NoError + select position) { anchor = Marshal.ByteArrayToStructureLittleEndian(sector); @@ -115,7 +90,7 @@ public sealed partial class UDF anchor.tag.descriptorVersion); AaruConsole.DebugWriteLine(MODULE_NAME, "anchor.tag.tagChecksum = 0x{0:X2}", anchor.tag.tagChecksum); - AaruConsole.DebugWriteLine(MODULE_NAME, "anchor.tag.reserved = {0}", anchor.tag.reserved); + AaruConsole.DebugWriteLine(MODULE_NAME, "anchor.tag.reserved = {0}", anchor.tag.reserved); AaruConsole.DebugWriteLine(MODULE_NAME, "anchor.tag.tagSerialNumber = {0}", anchor.tag.tagSerialNumber); @@ -140,7 +115,7 @@ public sealed partial class UDF if(anchor.tag.tagIdentifier != TagIdentifier.AnchorVolumeDescriptorPointer || anchor.tag.tagLocation != position[0] / position[1] || - (anchor.mainVolumeDescriptorSequenceExtent.location * position[1]) + partition.Start >= partition.End) + anchor.mainVolumeDescriptorSequenceExtent.location * position[1] + partition.Start >= partition.End) continue; anchorFound = true; @@ -158,8 +133,9 @@ public sealed partial class UDF { ErrorNumber errno = imagePlugin. - ReadSectors(partition.Start + (anchor.mainVolumeDescriptorSequenceExtent.location * ratio) + (count * ratio), - ratio, out sector); + ReadSectors( + partition.Start + anchor.mainVolumeDescriptorSequenceExtent.location * ratio + count * ratio, + ratio, out sector); if(errno != ErrorNumber.NoError) { @@ -168,10 +144,10 @@ public sealed partial class UDF continue; } - var tagId = (TagIdentifier)BitConverter.ToUInt16(sector, 0); - uint location = BitConverter.ToUInt32(sector, 0x0C); + var tagId = (TagIdentifier)BitConverter.ToUInt16(sector, 0); + var location = BitConverter.ToUInt32(sector, 0x0C); - if(location == (partition.Start / ratio) + anchor.mainVolumeDescriptorSequenceExtent.location + count) + if(location == partition.Start / ratio + anchor.mainVolumeDescriptorSequenceExtent.location + count) { if(tagId == TagIdentifier.TerminatingDescriptor) break; @@ -214,38 +190,9 @@ public sealed partial class UDF // All positions where anchor may reside, with the ratio between 512 and 2048bps ulong[][] positions = { - new ulong[] - { - 256, 1 - }, - new ulong[] - { - 512, 1 - }, - new ulong[] - { - partition.End - 256, 1 - }, - new ulong[] - { - partition.End, 1 - }, - new ulong[] - { - 1024, 4 - }, - new ulong[] - { - 2048, 4 - }, - new ulong[] - { - partition.End - 1024, 4 - }, - new ulong[] - { - partition.End - 4, 4 - } + new ulong[] { 256, 1 }, new ulong[] { 512, 1 }, new ulong[] { partition.End - 256, 1 }, + new ulong[] { partition.End, 1 }, new ulong[] { 1024, 4 }, new ulong[] { 2048, 4 }, + new ulong[] { partition.End - 1024, 4 }, new ulong[] { partition.End - 4, 4 } }; uint ratio = 1; @@ -279,16 +226,17 @@ public sealed partial class UDF { errno = imagePlugin. - ReadSectors(partition.Start + (anchor.mainVolumeDescriptorSequenceExtent.location * ratio) + (count * ratio), - ratio, out sector); + ReadSectors( + partition.Start + anchor.mainVolumeDescriptorSequenceExtent.location * ratio + count * ratio, + ratio, out sector); if(errno != ErrorNumber.NoError) continue; - var tagId = (TagIdentifier)BitConverter.ToUInt16(sector, 0); - uint location = BitConverter.ToUInt32(sector, 0x0C); + var tagId = (TagIdentifier)BitConverter.ToUInt16(sector, 0); + var location = BitConverter.ToUInt32(sector, 0x0C); - if(location == (partition.Start / ratio) + anchor.mainVolumeDescriptorSequenceExtent.location + count) + if(location == partition.Start / ratio + anchor.mainVolumeDescriptorSequenceExtent.location + count) { if(tagId == TagIdentifier.TerminatingDescriptor) break; @@ -321,10 +269,12 @@ public sealed partial class UDF if(lvid.tag.tagIdentifier == TagIdentifier.LogicalVolumeIntegrityDescriptor && lvid.tag.tagLocation == lvd.integritySequenceExtent.location) + { lvidiu = Marshal.ByteArrayToStructureLittleEndian(sector, - (int)((lvid.numberOfPartitions * 8) + 80), + (int)(lvid.numberOfPartitions * 8 + 80), System.Runtime.InteropServices.Marshal.SizeOf(lvidiu)); + } else lvid = new LogicalVolumeIntegrityDescriptor(); @@ -358,15 +308,15 @@ public sealed partial class UDF sbInformation.AppendFormat(Localization.Volume_requires_UDF_version_0_1_to_be_read, Convert.ToInt32($"{(lvidiu.minimumReadUDF & 0xFF00) >> 8}", 10), - Convert.ToInt32($"{lvidiu.minimumReadUDF & 0xFF}", 10)).AppendLine(); + Convert.ToInt32($"{lvidiu.minimumReadUDF & 0xFF}", 10)).AppendLine(); sbInformation.AppendFormat(Localization.Volume_requires_UDF_version_0_1_to_be_written_to, Convert.ToInt32($"{(lvidiu.minimumWriteUDF & 0xFF00) >> 8}", 10), - Convert.ToInt32($"{lvidiu.minimumWriteUDF & 0xFF}", 10)).AppendLine(); + Convert.ToInt32($"{lvidiu.minimumWriteUDF & 0xFF}", 10)).AppendLine(); sbInformation.AppendFormat(Localization.Volume_cannot_be_written_by_any_UDF_version_higher_than_0_1, Convert.ToInt32($"{(lvidiu.maximumWriteUDF & 0xFF00) >> 8}", 10), - Convert.ToInt32($"{lvidiu.maximumWriteUDF & 0xFF}", 10)).AppendLine(); + Convert.ToInt32($"{lvidiu.maximumWriteUDF & 0xFF}", 10)).AppendLine(); metadata = new FileSystem { @@ -385,4 +335,6 @@ public sealed partial class UDF information = sbInformation.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UDF/Structs.cs b/Aaru.Filesystems/UDF/Structs.cs index 4b417956b..4e0719de1 100644 --- a/Aaru.Filesystems/UDF/Structs.cs +++ b/Aaru.Filesystems/UDF/Structs.cs @@ -37,41 +37,34 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class UDF { - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct EntityIdentifier - { - /// Entity flags - public readonly EntityFlags flags; - /// Structure identifier - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 23)] - public readonly byte[] identifier; - /// Structure data - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public readonly byte[] identifierSuffix; - } +#region Nested type: AnchorVolumeDescriptorPointer [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct Timestamp + readonly struct AnchorVolumeDescriptorPointer { - public readonly ushort typeAndZone; - public readonly short year; - public readonly byte month; - public readonly byte day; - public readonly byte hour; - public readonly byte minute; - public readonly byte second; - public readonly byte centiseconds; - public readonly byte hundredsMicroseconds; - public readonly byte microseconds; + public readonly DescriptorTag tag; + public readonly ExtentDescriptor mainVolumeDescriptorSequenceExtent; + public readonly ExtentDescriptor reserveVolumeDescriptorSequenceExtent; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 480)] + public readonly byte[] reserved; } - enum TagIdentifier : ushort +#endregion + +#region Nested type: CharacterSpecification + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct CharacterSpecification { - PrimaryVolumeDescriptor = 1, AnchorVolumeDescriptorPointer = 2, VolumeDescriptorPointer = 3, - ImplementationUseVolumeDescriptor = 4, PartitionDescriptor = 5, LogicalVolumeDescriptor = 6, - UnallocatedSpaceDescriptor = 7, TerminatingDescriptor = 8, LogicalVolumeIntegrityDescriptor = 9 + public readonly byte type; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 63)] + public readonly byte[] information; } +#endregion + +#region Nested type: DescriptorTag + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct DescriptorTag { @@ -85,6 +78,27 @@ public sealed partial class UDF public readonly uint tagLocation; } +#endregion + +#region Nested type: EntityIdentifier + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct EntityIdentifier + { + /// Entity flags + public readonly EntityFlags flags; + /// Structure identifier + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 23)] + public readonly byte[] identifier; + /// Structure data + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public readonly byte[] identifierSuffix; + } + +#endregion + +#region Nested type: ExtentDescriptor + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct ExtentDescriptor { @@ -92,24 +106,70 @@ public sealed partial class UDF public readonly uint location; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct CharacterSpecification - { - public readonly byte type; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 63)] - public readonly byte[] information; - } +#endregion + +#region Nested type: LogicalVolumeDescriptor [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct AnchorVolumeDescriptorPointer + readonly struct LogicalVolumeDescriptor + { + public readonly DescriptorTag tag; + public readonly uint volumeDescriptorSequenceNumber; + public readonly CharacterSpecification descriptorCharacterSet; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + public readonly byte[] logicalVolumeIdentifier; + public readonly uint logicalBlockSize; + public readonly EntityIdentifier domainIdentifier; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] + public readonly byte[] logicalVolumeContentsUse; + public readonly uint mapTableLength; + public readonly uint numberOfPartitionMaps; + public readonly EntityIdentifier implementationIdentifier; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + public readonly byte[] implementationUse; + public readonly ExtentDescriptor integritySequenceExtent; + } + +#endregion + +#region Nested type: LogicalVolumeIntegrityDescriptor + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct LogicalVolumeIntegrityDescriptor { public readonly DescriptorTag tag; - public readonly ExtentDescriptor mainVolumeDescriptorSequenceExtent; - public readonly ExtentDescriptor reserveVolumeDescriptorSequenceExtent; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 480)] - public readonly byte[] reserved; + public readonly Timestamp recordingDateTime; + public readonly uint integrityType; + public readonly ExtentDescriptor nextIntegrityExtent; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] logicalVolumeContentsUse; + public readonly uint numberOfPartitions; + public readonly uint lengthOfImplementationUse; + + // Follows uint[numberOfPartitions] freeSpaceTable; + // Follows uint[numberOfPartitions] sizeTable; + // Follows byte[lengthOfImplementationUse] implementationUse; } +#endregion + +#region Nested type: LogicalVolumeIntegrityDescriptorImplementationUse + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct LogicalVolumeIntegrityDescriptorImplementationUse + { + public readonly EntityIdentifier implementationId; + public readonly uint files; + public readonly uint directories; + public readonly ushort minimumReadUDF; + public readonly ushort minimumWriteUDF; + public readonly ushort maximumWriteUDF; + } + +#endregion + +#region Nested type: PrimaryVolumeDescriptor + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct PrimaryVolumeDescriptor { @@ -141,51 +201,41 @@ public sealed partial class UDF public readonly byte[] reserved; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct LogicalVolumeDescriptor +#endregion + +#region Nested type: TagIdentifier + + enum TagIdentifier : ushort { - public readonly DescriptorTag tag; - public readonly uint volumeDescriptorSequenceNumber; - public readonly CharacterSpecification descriptorCharacterSet; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] - public readonly byte[] logicalVolumeIdentifier; - public readonly uint logicalBlockSize; - public readonly EntityIdentifier domainIdentifier; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] - public readonly byte[] logicalVolumeContentsUse; - public readonly uint mapTableLength; - public readonly uint numberOfPartitionMaps; - public readonly EntityIdentifier implementationIdentifier; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] - public readonly byte[] implementationUse; - public readonly ExtentDescriptor integritySequenceExtent; + PrimaryVolumeDescriptor = 1, + AnchorVolumeDescriptorPointer = 2, + VolumeDescriptorPointer = 3, + ImplementationUseVolumeDescriptor = 4, + PartitionDescriptor = 5, + LogicalVolumeDescriptor = 6, + UnallocatedSpaceDescriptor = 7, + TerminatingDescriptor = 8, + LogicalVolumeIntegrityDescriptor = 9 } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct LogicalVolumeIntegrityDescriptor - { - public readonly DescriptorTag tag; - public readonly Timestamp recordingDateTime; - public readonly uint integrityType; - public readonly ExtentDescriptor nextIntegrityExtent; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] logicalVolumeContentsUse; - public readonly uint numberOfPartitions; - public readonly uint lengthOfImplementationUse; +#endregion - // Follows uint[numberOfPartitions] freeSpaceTable; - // Follows uint[numberOfPartitions] sizeTable; - // Follows byte[lengthOfImplementationUse] implementationUse; - } +#region Nested type: Timestamp [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct LogicalVolumeIntegrityDescriptorImplementationUse + readonly struct Timestamp { - public readonly EntityIdentifier implementationId; - public readonly uint files; - public readonly uint directories; - public readonly ushort minimumReadUDF; - public readonly ushort minimumWriteUDF; - public readonly ushort maximumWriteUDF; + public readonly ushort typeAndZone; + public readonly short year; + public readonly byte month; + public readonly byte day; + public readonly byte hour; + public readonly byte minute; + public readonly byte second; + public readonly byte centiseconds; + public readonly byte hundredsMicroseconds; + public readonly byte microseconds; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UDF/UDF.cs b/Aaru.Filesystems/UDF/UDF.cs index 55592c0c3..d6c043fad 100644 --- a/Aaru.Filesystems/UDF/UDF.cs +++ b/Aaru.Filesystems/UDF/UDF.cs @@ -38,11 +38,18 @@ namespace Aaru.Filesystems; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class UDF : IFilesystem { + const string MODULE_NAME = "UDF Plugin"; + +#region IFilesystem Members + /// public string Name => Localization.UDF_Name; + /// public Guid Id => new("83976FEC-A91B-464B-9293-56C719461BAB"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "UDF Plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UNICOS/Consts.cs b/Aaru.Filesystems/UNICOS/Consts.cs index dfa66b668..104b1ebc7 100644 --- a/Aaru.Filesystems/UNICOS/Consts.cs +++ b/Aaru.Filesystems/UNICOS/Consts.cs @@ -28,12 +28,12 @@ // UNICOS is ILP64 so let's think everything is 64-bit -using blkno_t = System.Int64; -using daddr_t = System.Int64; -using dev_t = System.Int64; -using extent_t = System.Int64; -using ino_t = System.Int64; -using time_t = System.Int64; +using blkno_t = long; +using daddr_t = long; +using dev_t = long; +using extent_t = long; +using ino_t = long; +using time_t = long; namespace Aaru.Filesystems; diff --git a/Aaru.Filesystems/UNICOS/Info.cs b/Aaru.Filesystems/UNICOS/Info.cs index 42693f720..9f3ecd3da 100644 --- a/Aaru.Filesystems/UNICOS/Info.cs +++ b/Aaru.Filesystems/UNICOS/Info.cs @@ -34,13 +34,13 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Helpers; -using blkno_t = System.Int64; -using daddr_t = System.Int64; -using dev_t = System.Int64; -using extent_t = System.Int64; -using ino_t = System.Int64; +using blkno_t = long; +using daddr_t = long; +using dev_t = long; +using extent_t = long; +using ino_t = long; using Partition = Aaru.CommonTypes.Partition; -using time_t = System.Int64; +using time_t = long; namespace Aaru.Filesystems; @@ -48,13 +48,15 @@ namespace Aaru.Filesystems; /// Implements detection for the Cray UNICOS filesystem public sealed partial class UNICOS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -89,7 +91,7 @@ public sealed partial class UNICOS if(imagePlugin.Info.SectorSize < 512) return; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -115,11 +117,11 @@ public sealed partial class UNICOS sb.AppendLine(Localization.Volume_is_secure); sb.AppendFormat(Localization.Volume_contains_0_partitions, unicosSb.s_npart).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_sector, unicosSb.s_iounit).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_sector, unicosSb.s_iounit).AppendLine(); sb.AppendLine(Localization._4096_bytes_per_block); sb.AppendFormat(Localization._0_data_blocks_in_volume, unicosSb.s_fsize).AppendLine(); - sb.AppendFormat(Localization.Root_resides_on_inode_0, unicosSb.s_root).AppendLine(); - sb.AppendFormat(Localization._0_inodes_in_volume, unicosSb.s_isize).AppendLine(); + sb.AppendFormat(Localization.Root_resides_on_inode_0, unicosSb.s_root).AppendLine(); + sb.AppendFormat(Localization._0_inodes_in_volume, unicosSb.s_isize).AppendLine(); sb.AppendFormat(Localization.Volume_last_updated_on_0, DateHandlers.UnixToDateTime(unicosSb.s_time)). AppendLine(); @@ -142,4 +144,6 @@ public sealed partial class UNICOS metadata.Dirty |= unicosSb.s_error > 0; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UNICOS/Structs.cs b/Aaru.Filesystems/UNICOS/Structs.cs index 252e59c5e..495081a9e 100644 --- a/Aaru.Filesystems/UNICOS/Structs.cs +++ b/Aaru.Filesystems/UNICOS/Structs.cs @@ -30,12 +30,12 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using blkno_t = System.Int64; -using daddr_t = System.Int64; -using dev_t = System.Int64; -using extent_t = System.Int64; -using ino_t = System.Int64; -using time_t = System.Int64; +using blkno_t = long; +using daddr_t = long; +using dev_t = long; +using extent_t = long; +using ino_t = long; +using time_t = long; namespace Aaru.Filesystems; @@ -43,15 +43,10 @@ namespace Aaru.Filesystems; /// Implements detection for the Cray UNICOS filesystem public sealed partial class UNICOS { - [StructLayout(LayoutKind.Sequential, Pack = 1), SuppressMessage("ReSharper", "InconsistentNaming")] - readonly struct nc1ireg_sb - { - public readonly ushort i_unused; /* reserved */ - public readonly ushort i_nblk; /* number of blocks */ - public readonly uint i_sblk; /* start block number */ - } +#region Nested type: nc1fdev_sb - [StructLayout(LayoutKind.Sequential, Pack = 1), SuppressMessage("ReSharper", "InconsistentNaming")] + [StructLayout(LayoutKind.Sequential, Pack = 1)] + [SuppressMessage("ReSharper", "InconsistentNaming")] readonly struct nc1fdev_sb { public readonly long fd_name; /* Physical device name */ @@ -61,8 +56,26 @@ public sealed partial class UNICOS public readonly nc1ireg_sb[] fd_ireg; /* Inode regions */ } - [StructLayout(LayoutKind.Sequential, Pack = 1), SuppressMessage("ReSharper", "InconsistentNaming"), - SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] +#endregion + +#region Nested type: nc1ireg_sb + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + [SuppressMessage("ReSharper", "InconsistentNaming")] + readonly struct nc1ireg_sb + { + public readonly ushort i_unused; /* reserved */ + public readonly ushort i_nblk; /* number of blocks */ + public readonly uint i_sblk; /* start block number */ + } + +#endregion + +#region Nested type: Superblock + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + [SuppressMessage("ReSharper", "InconsistentNaming")] + [SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle")] readonly struct Superblock { public readonly ulong s_magic; /* magic number to indicate file system type */ @@ -124,4 +137,6 @@ public sealed partial class UNICOS [MarshalAs(UnmanagedType.ByValArray, SizeConst = 91)] public readonly long[] s_fill; /* reserved */ } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UNICOS/UNICOS.cs b/Aaru.Filesystems/UNICOS/UNICOS.cs index 6d3147b61..63ef5a58f 100644 --- a/Aaru.Filesystems/UNICOS/UNICOS.cs +++ b/Aaru.Filesystems/UNICOS/UNICOS.cs @@ -30,12 +30,12 @@ using System; using Aaru.CommonTypes.Interfaces; -using blkno_t = System.Int64; -using daddr_t = System.Int64; -using dev_t = System.Int64; -using extent_t = System.Int64; -using ino_t = System.Int64; -using time_t = System.Int64; +using blkno_t = long; +using daddr_t = long; +using dev_t = long; +using extent_t = long; +using ino_t = long; +using time_t = long; namespace Aaru.Filesystems; @@ -43,11 +43,18 @@ namespace Aaru.Filesystems; /// Implements detection for the Cray UNICOS filesystem public sealed partial class UNICOS : IFilesystem { + const string MODULE_NAME = "UNICOS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.UNICOS_Name; + /// public Guid Id => new("61712F04-066C-44D5-A2A0-1E44C66B33F0"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "UNICOS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UNIXBFS/Info.cs b/Aaru.Filesystems/UNIXBFS/Info.cs index 14eae1da5..14335c184 100644 --- a/Aaru.Filesystems/UNIXBFS/Info.cs +++ b/Aaru.Filesystems/UNIXBFS/Info.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; /// Implements detection of the UNIX boot filesystem public sealed partial class BFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -53,7 +55,7 @@ public sealed partial class BFS if(errno != ErrorNumber.NoError) return false; - uint magic = BitConverter.ToUInt32(tmp, 0); + var magic = BitConverter.ToUInt32(tmp, 0); return magic == BFS_MAGIC; } @@ -72,7 +74,7 @@ public sealed partial class BFS if(errno != ErrorNumber.NoError) return; - byte[] sbStrings = new byte[6]; + var sbStrings = new byte[6]; var bfsSb = new SuperBlock { @@ -92,13 +94,13 @@ public sealed partial class BFS AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_magic: 0x{0:X8}", bfsSb.s_magic); AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_start: 0x{0:X8}", bfsSb.s_start); - AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_end: 0x{0:X8}", bfsSb.s_end); - AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_from: 0x{0:X8}", bfsSb.s_from); - AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_to: 0x{0:X8}", bfsSb.s_to); + AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_end: 0x{0:X8}", bfsSb.s_end); + AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_from: 0x{0:X8}", bfsSb.s_from); + AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_to: 0x{0:X8}", bfsSb.s_to); AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_bfrom: 0x{0:X8}", bfsSb.s_bfrom); - AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_bto: 0x{0:X8}", bfsSb.s_bto); - AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_fsname: 0x{0}", bfsSb.s_fsname); - AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_volume: 0x{0}", bfsSb.s_volume); + AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_bto: 0x{0:X8}", bfsSb.s_bto); + AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_fsname: 0x{0}", bfsSb.s_fsname); + AaruConsole.DebugWriteLine(MODULE_NAME, "bfs_sb.s_volume: 0x{0}", bfsSb.s_volume); sb.AppendLine(Localization.UNIX_Boot_Filesystem); @@ -106,7 +108,7 @@ public sealed partial class BFS bfsSb.s_end - bfsSb.s_start).AppendLine(); sb.AppendFormat(Localization.Filesystem_name_0, bfsSb.s_fsname).AppendLine(); - sb.AppendFormat(Localization.Volume_name_0, bfsSb.s_volume).AppendLine(); + sb.AppendFormat(Localization.Volume_name_0, bfsSb.s_volume).AppendLine(); metadata = new FileSystem { @@ -118,4 +120,6 @@ public sealed partial class BFS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UNIXBFS/Structs.cs b/Aaru.Filesystems/UNIXBFS/Structs.cs index 846b7c35f..4013bc70b 100644 --- a/Aaru.Filesystems/UNIXBFS/Structs.cs +++ b/Aaru.Filesystems/UNIXBFS/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of the UNIX boot filesystem public sealed partial class BFS { +#region Nested type: SuperBlock + [SuppressMessage("ReSharper", "InconsistentNaming")] struct SuperBlock { @@ -57,4 +59,6 @@ public sealed partial class BFS /// 0x22, 6 bytes, volume name public string s_volume; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/UNIXBFS/UNIXBFS.cs b/Aaru.Filesystems/UNIXBFS/UNIXBFS.cs index 271511f7f..b49800a82 100644 --- a/Aaru.Filesystems/UNIXBFS/UNIXBFS.cs +++ b/Aaru.Filesystems/UNIXBFS/UNIXBFS.cs @@ -36,11 +36,18 @@ namespace Aaru.Filesystems; /// Implements detection of the UNIX boot filesystem public sealed partial class BFS : IFilesystem { + const string MODULE_NAME = "BFS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.BFS_Name; + /// public Guid Id => new("1E6E0DA6-F7E4-494C-80C6-CB5929E96155"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "BFS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/VMfs/Consts.cs b/Aaru.Filesystems/VMfs/Consts.cs index ffe9379f9..11982bec9 100644 --- a/Aaru.Filesystems/VMfs/Consts.cs +++ b/Aaru.Filesystems/VMfs/Consts.cs @@ -32,8 +32,9 @@ namespace Aaru.Filesystems; /// /// Implements detection of the VMware filesystem -[SuppressMessage("ReSharper", "UnusedType.Local"), SuppressMessage("ReSharper", "IdentifierTypo"), - SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "IdentifierTypo")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class VMfs { /// Identifier for VMfs diff --git a/Aaru.Filesystems/VMfs/Info.cs b/Aaru.Filesystems/VMfs/Info.cs index edeb6dd63..3dde32e8c 100644 --- a/Aaru.Filesystems/VMfs/Info.cs +++ b/Aaru.Filesystems/VMfs/Info.cs @@ -39,10 +39,15 @@ namespace Aaru.Filesystems; /// /// Implements detection of the VMware filesystem -[SuppressMessage("ReSharper", "UnusedType.Local"), SuppressMessage("ReSharper", "IdentifierTypo"), - SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "IdentifierTypo")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class VMfs { + const string FS_TYPE = "vmfs"; + +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -59,13 +64,11 @@ public sealed partial class VMfs if(errno != ErrorNumber.NoError) return false; - uint magic = BitConverter.ToUInt32(sector, 0x00); + var magic = BitConverter.ToUInt32(sector, 0x00); return magic == VMFS_MAGIC; } - const string FS_TYPE = "vmfs"; - /// public void GetInformation(IMediaImage imagePlugin, Partition partition, Encoding encoding, out string information, out FileSystem metadata) @@ -85,10 +88,10 @@ public sealed partial class VMfs sbInformation.AppendLine(Localization.VMware_file_system); - uint ctimeSecs = (uint)(volInfo.ctime / 1000000); - uint ctimeNanoSecs = (uint)(volInfo.ctime % 1000000); - uint mtimeSecs = (uint)(volInfo.mtime / 1000000); - uint mtimeNanoSecs = (uint)(volInfo.mtime % 1000000); + var ctimeSecs = (uint)(volInfo.ctime / 1000000); + var ctimeNanoSecs = (uint)(volInfo.ctime % 1000000); + var mtimeSecs = (uint)(volInfo.mtime / 1000000); + var mtimeNanoSecs = (uint)(volInfo.mtime % 1000000); sbInformation.AppendFormat(Localization.Volume_version_0, volInfo.version).AppendLine(); @@ -96,7 +99,7 @@ public sealed partial class VMfs AppendLine(); sbInformation.AppendFormat(Localization.Volume_size_0_bytes, volInfo.size * 256).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_UUID_0, volInfo.uuid).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_UUID_0, volInfo.uuid).AppendLine(); sbInformation.AppendFormat(Localization.Volume_created_on_0, DateHandlers.UnixUnsignedToDateTime(ctimeSecs, ctimeNanoSecs)).AppendLine(); @@ -116,4 +119,6 @@ public sealed partial class VMfs VolumeSerial = volInfo.uuid.ToString() }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/VMfs/Structs.cs b/Aaru.Filesystems/VMfs/Structs.cs index b12fe3750..4cfe8ce2c 100644 --- a/Aaru.Filesystems/VMfs/Structs.cs +++ b/Aaru.Filesystems/VMfs/Structs.cs @@ -34,10 +34,13 @@ namespace Aaru.Filesystems; /// /// Implements detection of the VMware filesystem -[SuppressMessage("ReSharper", "UnusedType.Local"), SuppressMessage("ReSharper", "IdentifierTypo"), - SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "IdentifierTypo")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class VMfs { +#region Nested type: VolumeInfo + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct VolumeInfo { @@ -59,4 +62,6 @@ public sealed partial class VMfs public readonly ulong ctime; public readonly ulong mtime; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/VMfs/VMfs.cs b/Aaru.Filesystems/VMfs/VMfs.cs index 338c91f1f..845eacba3 100644 --- a/Aaru.Filesystems/VMfs/VMfs.cs +++ b/Aaru.Filesystems/VMfs/VMfs.cs @@ -34,14 +34,21 @@ namespace Aaru.Filesystems; /// /// Implements detection of the VMware filesystem -[SuppressMessage("ReSharper", "UnusedType.Local"), SuppressMessage("ReSharper", "IdentifierTypo"), - SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "IdentifierTypo")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class VMfs : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.VMfs_Name; + /// public Guid Id => new("EE52BDB8-B49C-4122-A3DA-AD21CBE79843"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/VxFS/Info.cs b/Aaru.Filesystems/VxFS/Info.cs index e33f22cec..b99ac6cde 100644 --- a/Aaru.Filesystems/VxFS/Info.cs +++ b/Aaru.Filesystems/VxFS/Info.cs @@ -40,6 +40,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Veritas filesystem public sealed partial class VxFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -53,7 +55,7 @@ public sealed partial class VxFS if(errno != ErrorNumber.NoError) return false; - uint magic = BitConverter.ToUInt32(sector, 0x00); + var magic = BitConverter.ToUInt32(sector, 0x00); return magic == VXFS_MAGIC; } @@ -86,8 +88,8 @@ public sealed partial class VxFS AppendLine(); sbInformation.AppendFormat(Localization.Volume_has_0_inodes_per_block, vxSb.vs_inopb).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_free_inodes, vxSb.vs_ifree).AppendLine(); - sbInformation.AppendFormat(Localization.Volume_has_0_free_blocks, vxSb.vs_free).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_free_inodes, vxSb.vs_ifree).AppendLine(); + sbInformation.AppendFormat(Localization.Volume_has_0_free_blocks, vxSb.vs_free).AppendLine(); sbInformation.AppendFormat(Localization.Volume_created_on_0, DateHandlers.UnixUnsignedToDateTime(vxSb.vs_ctime, vxSb.vs_cutime)).AppendLine(); @@ -111,4 +113,6 @@ public sealed partial class VxFS FreeClusters = (ulong)vxSb.vs_free }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/VxFS/Structs.cs b/Aaru.Filesystems/VxFS/Structs.cs index 49beed50e..9bdb958e2 100644 --- a/Aaru.Filesystems/VxFS/Structs.cs +++ b/Aaru.Filesystems/VxFS/Structs.cs @@ -34,6 +34,8 @@ namespace Aaru.Filesystems; /// Implements detection of the Veritas filesystem public sealed partial class VxFS { +#region Nested type: SuperBlock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock { @@ -180,4 +182,6 @@ public sealed partial class VxFS /// checksum of V2 RO public readonly int vs_checksum2; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/VxFS/VxFS.cs b/Aaru.Filesystems/VxFS/VxFS.cs index a32840a90..f49ba7436 100644 --- a/Aaru.Filesystems/VxFS/VxFS.cs +++ b/Aaru.Filesystems/VxFS/VxFS.cs @@ -35,10 +35,16 @@ namespace Aaru.Filesystems; /// Implements detection of the Veritas filesystem public sealed partial class VxFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.VxFS_Name; + /// public Guid Id => new("EC372605-7687-453C-8BEA-7E0DFF79CB03"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/XFS/Info.cs b/Aaru.Filesystems/XFS/Info.cs index fdd831c15..c9a28aaf5 100644 --- a/Aaru.Filesystems/XFS/Info.cs +++ b/Aaru.Filesystems/XFS/Info.cs @@ -41,6 +41,8 @@ namespace Aaru.Filesystems; /// Implements detection of SGI's XFS public sealed partial class XFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -50,7 +52,7 @@ public sealed partial class XFS // Misaligned if(imagePlugin.Info.MetadataMediaType == MetadataMediaType.OpticalDisc) { - uint sbSize = (uint)((Marshal.SizeOf() + 0x400) / imagePlugin.Info.SectorSize); + var sbSize = (uint)((Marshal.SizeOf() + 0x400) / imagePlugin.Info.SectorSize); if((Marshal.SizeOf() + 0x400) % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -63,12 +65,9 @@ public sealed partial class XFS if(sector.Length < Marshal.SizeOf()) return false; - byte[] sbpiece = new byte[Marshal.SizeOf()]; + var sbpiece = new byte[Marshal.SizeOf()]; - foreach(int location in new[] - { - 0, 0x200, 0x400 - }) + foreach(int location in new[] { 0, 0x200, 0x400 }) { Array.Copy(sector, location, sbpiece, 0, Marshal.SizeOf()); @@ -82,14 +81,12 @@ public sealed partial class XFS } } else - foreach(int i in new[] - { - 0, 1, 2 - }) + { + foreach(int i in new[] { 0, 1, 2 }) { - ulong location = (ulong)i; + var location = (ulong)i; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -110,6 +107,7 @@ public sealed partial class XFS if(xfsSb.magicnum == XFS_MAGIC) return true; } + } return false; } @@ -130,7 +128,7 @@ public sealed partial class XFS // Misaligned if(imagePlugin.Info.MetadataMediaType == MetadataMediaType.OpticalDisc) { - uint sbSize = (uint)((Marshal.SizeOf() + 0x400) / imagePlugin.Info.SectorSize); + var sbSize = (uint)((Marshal.SizeOf() + 0x400) / imagePlugin.Info.SectorSize); if((Marshal.SizeOf() + 0x400) % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -141,12 +139,9 @@ public sealed partial class XFS sector.Length < Marshal.SizeOf()) return; - byte[] sbpiece = new byte[Marshal.SizeOf()]; + var sbpiece = new byte[Marshal.SizeOf()]; - foreach(int location in new[] - { - 0, 0x200, 0x400 - }) + foreach(int location in new[] { 0, 0x200, 0x400 }) { Array.Copy(sector, location, sbpiece, 0, Marshal.SizeOf()); @@ -160,13 +155,11 @@ public sealed partial class XFS } } else - foreach(int i in new[] - { - 0, 1, 2 - }) + { + foreach(int i in new[] { 0, 1, 2 }) { - ulong location = (ulong)i; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var location = (ulong)i; + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -185,6 +178,7 @@ public sealed partial class XFS if(xfsSb.magicnum == XFS_MAGIC) break; } + } if(xfsSb.magicnum != XFS_MAGIC) return; @@ -192,14 +186,14 @@ public sealed partial class XFS var sb = new StringBuilder(); sb.AppendLine(Localization.XFS_filesystem); - sb.AppendFormat(Localization.Filesystem_version_0, xfsSb.version & 0xF).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_sector, xfsSb.sectsize).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_block, xfsSb.blocksize).AppendLine(); - sb.AppendFormat(Localization._0_bytes_per_inode, xfsSb.inodesize).AppendLine(); + sb.AppendFormat(Localization.Filesystem_version_0, xfsSb.version & 0xF).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_sector, xfsSb.sectsize).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_block, xfsSb.blocksize).AppendLine(); + sb.AppendFormat(Localization._0_bytes_per_inode, xfsSb.inodesize).AppendLine(); sb.AppendFormat(Localization._0_data_blocks_in_volume_1_free, xfsSb.dblocks, xfsSb.fdblocks).AppendLine(); - sb.AppendFormat(Localization._0_blocks_per_allocation_group, xfsSb.agblocks).AppendLine(); - sb.AppendFormat(Localization._0_allocation_groups_in_volume, xfsSb.agcount).AppendLine(); - sb.AppendFormat(Localization._0_inodes_in_volume_1_free, xfsSb.icount, xfsSb.ifree).AppendLine(); + sb.AppendFormat(Localization._0_blocks_per_allocation_group, xfsSb.agblocks).AppendLine(); + sb.AppendFormat(Localization._0_allocation_groups_in_volume, xfsSb.agcount).AppendLine(); + sb.AppendFormat(Localization._0_inodes_in_volume_1_free, xfsSb.icount, xfsSb.ifree).AppendLine(); if(xfsSb.inprogress > 0) sb.AppendLine(Localization.fsck_in_progress); @@ -221,4 +215,6 @@ public sealed partial class XFS VolumeSerial = xfsSb.uuid.ToString() }; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/XFS/Structs.cs b/Aaru.Filesystems/XFS/Structs.cs index 57365b137..85368fe27 100644 --- a/Aaru.Filesystems/XFS/Structs.cs +++ b/Aaru.Filesystems/XFS/Structs.cs @@ -35,6 +35,8 @@ namespace Aaru.Filesystems; /// Implements detection of SGI's XFS public sealed partial class XFS { +#region Nested type: Superblock + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct Superblock { @@ -97,4 +99,6 @@ public sealed partial class XFS public readonly ulong lsn; public readonly Guid meta_uuid; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/XFS/XFS.cs b/Aaru.Filesystems/XFS/XFS.cs index 6cd5a72fe..8aa39b8f0 100644 --- a/Aaru.Filesystems/XFS/XFS.cs +++ b/Aaru.Filesystems/XFS/XFS.cs @@ -35,11 +35,18 @@ namespace Aaru.Filesystems; /// Implements detection of SGI's XFS public sealed partial class XFS : IFilesystem { + const string MODULE_NAME = "XFS plugin"; + +#region IFilesystem Members + /// public string Name => Localization.XFS_Name; + /// public Guid Id => new("1D8CD8B8-27E6-410F-9973-D16409225FBA"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "XFS plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Xia/Consts.cs b/Aaru.Filesystems/Xia/Consts.cs index fc6c73d11..4b8ca25f7 100644 --- a/Aaru.Filesystems/Xia/Consts.cs +++ b/Aaru.Filesystems/Xia/Consts.cs @@ -33,7 +33,8 @@ namespace Aaru.Filesystems; // Information from the Linux kernel /// /// Implements detection for the Xia filesystem -[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Xia { const uint XIAFS_SUPER_MAGIC = 0x012FD16D; diff --git a/Aaru.Filesystems/Xia/Info.cs b/Aaru.Filesystems/Xia/Info.cs index aa4475fa9..afa5e2321 100644 --- a/Aaru.Filesystems/Xia/Info.cs +++ b/Aaru.Filesystems/Xia/Info.cs @@ -39,14 +39,19 @@ namespace Aaru.Filesystems; // Information from the Linux kernel /// /// Implements detection for the Xia filesystem -[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Xia { + const string FS_TYPE = "xia"; + +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { - int sbSizeInBytes = Marshal.SizeOf(); - uint sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); + int sbSizeInBytes = Marshal.SizeOf(); + var sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); if(sbSizeInBytes % imagePlugin.Info.SectorSize > 0) sbSizeInSectors++; @@ -64,8 +69,6 @@ public sealed partial class Xia return supblk.s_magic == XIAFS_SUPER_MAGIC; } - const string FS_TYPE = "xia"; - /// public void GetInformation(IMediaImage imagePlugin, Partition partition, Encoding encoding, out string information, out FileSystem metadata) @@ -75,8 +78,8 @@ public sealed partial class Xia var sb = new StringBuilder(); - int sbSizeInBytes = Marshal.SizeOf(); - uint sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); + int sbSizeInBytes = Marshal.SizeOf(); + var sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); if(sbSizeInBytes % imagePlugin.Info.SectorSize > 0) sbSizeInSectors++; @@ -124,4 +127,6 @@ public sealed partial class Xia information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Xia/Structs.cs b/Aaru.Filesystems/Xia/Structs.cs index 75d53912c..dcbda8b59 100644 --- a/Aaru.Filesystems/Xia/Structs.cs +++ b/Aaru.Filesystems/Xia/Structs.cs @@ -34,9 +34,47 @@ namespace Aaru.Filesystems; // Information from the Linux kernel /// /// Implements detection for the Xia filesystem -[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Xia { +#region Nested type: DirectoryEntry + + /// Xia directory entry + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct DirectoryEntry + { + public readonly uint d_ino; + public readonly ushort d_rec_len; + public readonly byte d_name_len; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = XIAFS_NAME_LEN + 1)] + public readonly byte[] d_name; + } + +#endregion + +#region Nested type: Inode + + /// Xia inode + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct Inode + { + public readonly ushort i_mode; + public readonly ushort i_nlinks; + public readonly ushort i_uid; + public readonly ushort i_gid; + public readonly uint i_size; + public readonly uint i_ctime; + public readonly uint i_atime; + public readonly uint i_mtime; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = XIAFS_NUM_BLOCK_POINTERS)] + public readonly uint[] i_zone; + } + +#endregion + +#region Nested type: SuperBlock + /// Xia superblock [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct SuperBlock @@ -78,30 +116,5 @@ public sealed partial class Xia public readonly uint s_magic; } - /// Xia directory entry - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct DirectoryEntry - { - public readonly uint d_ino; - public readonly ushort d_rec_len; - public readonly byte d_name_len; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = XIAFS_NAME_LEN + 1)] - public readonly byte[] d_name; - } - - /// Xia inode - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct Inode - { - public readonly ushort i_mode; - public readonly ushort i_nlinks; - public readonly ushort i_uid; - public readonly ushort i_gid; - public readonly uint i_size; - public readonly uint i_ctime; - public readonly uint i_atime; - public readonly uint i_mtime; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = XIAFS_NUM_BLOCK_POINTERS)] - public readonly uint[] i_zone; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/Xia/Xia.cs b/Aaru.Filesystems/Xia/Xia.cs index ca6109362..1f83ef7d1 100644 --- a/Aaru.Filesystems/Xia/Xia.cs +++ b/Aaru.Filesystems/Xia/Xia.cs @@ -35,13 +35,20 @@ namespace Aaru.Filesystems; // Information from the Linux kernel /// /// Implements detection for the Xia filesystem -[SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Xia : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.Xia_Name; + /// public Guid Id => new("169E1DE5-24F2-4EF6-A04D-A4B2CA66DE9D"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ZFS/Consts.cs b/Aaru.Filesystems/ZFS/Consts.cs index 852a5c96f..4b8755346 100644 --- a/Aaru.Filesystems/ZFS/Consts.cs +++ b/Aaru.Filesystems/ZFS/Consts.cs @@ -51,8 +51,10 @@ namespace Aaru.Filesystems; */ /// /// Implements detection for the Zettabyte File System (ZFS) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedType.Local"), - SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "NotAccessedField.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class ZFS { const ulong ZEC_MAGIC = 0x0210DA7AB10C7A11; diff --git a/Aaru.Filesystems/ZFS/Enums.cs b/Aaru.Filesystems/ZFS/Enums.cs index ee5afdb5c..df78ee8d5 100644 --- a/Aaru.Filesystems/ZFS/Enums.cs +++ b/Aaru.Filesystems/ZFS/Enums.cs @@ -51,21 +51,45 @@ namespace Aaru.Filesystems; */ /// /// Implements detection for the Zettabyte File System (ZFS) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedType.Local"), - SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "NotAccessedField.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class ZFS { +#region Nested type: NVS_DataTypes + enum NVS_DataTypes : uint { - DATA_TYPE_UNKNOWN = 0, DATA_TYPE_BOOLEAN, DATA_TYPE_BYTE, - DATA_TYPE_INT16, DATA_TYPE_UINT16, DATA_TYPE_INT32, - DATA_TYPE_UINT32, DATA_TYPE_INT64, DATA_TYPE_UINT64, - DATA_TYPE_STRING, DATA_TYPE_BYTE_ARRAY, DATA_TYPE_INT16_ARRAY, - DATA_TYPE_UINT16_ARRAY, DATA_TYPE_INT32_ARRAY, DATA_TYPE_UINT32_ARRAY, - DATA_TYPE_INT64_ARRAY, DATA_TYPE_UINT64_ARRAY, DATA_TYPE_STRING_ARRAY, - DATA_TYPE_HRTIME, DATA_TYPE_NVLIST, DATA_TYPE_NVLIST_ARRAY, - DATA_TYPE_BOOLEAN_VALUE, DATA_TYPE_INT8, DATA_TYPE_UINT8, - DATA_TYPE_BOOLEAN_ARRAY, DATA_TYPE_INT8_ARRAY, DATA_TYPE_UINT8_ARRAY, + DATA_TYPE_UNKNOWN = 0, + DATA_TYPE_BOOLEAN, + DATA_TYPE_BYTE, + DATA_TYPE_INT16, + DATA_TYPE_UINT16, + DATA_TYPE_INT32, + DATA_TYPE_UINT32, + DATA_TYPE_INT64, + DATA_TYPE_UINT64, + DATA_TYPE_STRING, + DATA_TYPE_BYTE_ARRAY, + DATA_TYPE_INT16_ARRAY, + DATA_TYPE_UINT16_ARRAY, + DATA_TYPE_INT32_ARRAY, + DATA_TYPE_UINT32_ARRAY, + DATA_TYPE_INT64_ARRAY, + DATA_TYPE_UINT64_ARRAY, + DATA_TYPE_STRING_ARRAY, + DATA_TYPE_HRTIME, + DATA_TYPE_NVLIST, + DATA_TYPE_NVLIST_ARRAY, + DATA_TYPE_BOOLEAN_VALUE, + DATA_TYPE_INT8, + DATA_TYPE_UINT8, + DATA_TYPE_BOOLEAN_ARRAY, + DATA_TYPE_INT8_ARRAY, + DATA_TYPE_UINT8_ARRAY, DATA_TYPE_DOUBLE } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ZFS/Helpers.cs b/Aaru.Filesystems/ZFS/Helpers.cs index 63f0525c7..cb3f1ccb5 100644 --- a/Aaru.Filesystems/ZFS/Helpers.cs +++ b/Aaru.Filesystems/ZFS/Helpers.cs @@ -55,13 +55,15 @@ namespace Aaru.Filesystems; */ /// /// Implements detection for the Zettabyte File System (ZFS) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedType.Local"), - SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "NotAccessedField.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class ZFS { static bool DecodeNvList(byte[] nvlist, out Dictionary decodedNvList) { - byte[] tmp = new byte[nvlist.Length - 4]; + var tmp = new byte[nvlist.Length - 4]; Array.Copy(nvlist, 4, tmp, 0, nvlist.Length - 4); bool xdr = nvlist[0] == 1; bool littleEndian = nvlist[1] == 1; @@ -81,7 +83,7 @@ public sealed partial class ZFS if(!xdr) return false; - int offset = 8; + var offset = 8; while(offset < nvlist.Length) { @@ -97,13 +99,13 @@ public sealed partial class ZFS offset += 4; item.decodedSize = BigEndianBitConverter.ToUInt32(nvlist, offset); offset += 4; - uint nameLength = BigEndianBitConverter.ToUInt32(nvlist, offset); + var nameLength = BigEndianBitConverter.ToUInt32(nvlist, offset); offset += 4; if(nameLength % 4 > 0) - nameLength += 4 - (nameLength % 4); + nameLength += 4 - nameLength % 4; - byte[] nameBytes = new byte[nameLength]; + var nameBytes = new byte[nameLength]; Array.Copy(nvlist, offset, nameBytes, 0, nameLength); item.name = StringHandlers.CToString(nameBytes); offset += (int)nameLength; @@ -126,11 +128,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_BOOLEAN_VALUE: if(item.elements > 1) { - bool[] boolArray = new bool[item.elements]; + var boolArray = new bool[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - uint temp = BigEndianBitConverter.ToUInt32(nvlist, offset); + var temp = BigEndianBitConverter.ToUInt32(nvlist, offset); boolArray[i] = temp > 0; offset += 4; } @@ -139,7 +141,7 @@ public sealed partial class ZFS } else { - uint temp = BigEndianBitConverter.ToUInt32(nvlist, offset); + var temp = BigEndianBitConverter.ToUInt32(nvlist, offset); item.value = temp > 0; offset += 4; } @@ -151,7 +153,7 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_UINT8_ARRAY: if(item.elements > 1) { - byte[] byteArray = new byte[item.elements]; + var byteArray = new byte[item.elements]; Array.Copy(nvlist, offset, byteArray, 0, item.elements); offset += (int)item.elements; @@ -170,11 +172,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_DOUBLE: if(item.elements > 1) { - double[] doubleArray = new double[item.elements]; + var doubleArray = new double[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - double temp = BigEndianBitConverter.ToDouble(nvlist, offset); + var temp = BigEndianBitConverter.ToDouble(nvlist, offset); doubleArray[i] = temp; offset += 8; } @@ -191,9 +193,9 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_HRTIME: if(item.elements > 1) { - DateTime[] hrtimeArray = new DateTime[item.elements]; + var hrtimeArray = new DateTime[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { DateTime temp = DateHandlers.UnixHrTimeToDateTime(BigEndianBitConverter.ToUInt64(nvlist, offset)); @@ -216,11 +218,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_INT16_ARRAY: if(item.elements > 1) { - short[] shortArray = new short[item.elements]; + var shortArray = new short[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - short temp = BigEndianBitConverter.ToInt16(nvlist, offset); + var temp = BigEndianBitConverter.ToInt16(nvlist, offset); shortArray[i] = temp; offset += 4; } @@ -238,11 +240,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_INT32_ARRAY: if(item.elements > 1) { - int[] intArray = new int[item.elements]; + var intArray = new int[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - int temp = BigEndianBitConverter.ToInt32(nvlist, offset); + var temp = BigEndianBitConverter.ToInt32(nvlist, offset); intArray[i] = temp; offset += 4; } @@ -260,11 +262,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_INT64_ARRAY: if(item.elements > 1) { - long[] longArray = new long[item.elements]; + var longArray = new long[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - long temp = BigEndianBitConverter.ToInt64(nvlist, offset); + var temp = BigEndianBitConverter.ToInt64(nvlist, offset); longArray[i] = temp; offset += 8; } @@ -282,11 +284,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_INT8_ARRAY: if(item.elements > 1) { - sbyte[] sbyteArray = new sbyte[item.elements]; + var sbyteArray = new sbyte[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - sbyte temp = (sbyte)nvlist[offset]; + var temp = (sbyte)nvlist[offset]; sbyteArray[i] = temp; offset++; } @@ -294,7 +296,7 @@ public sealed partial class ZFS item.value = sbyteArray; if(sbyteArray.Length % 4 > 0) - offset += 4 - (sbyteArray.Length % 4); + offset += 4 - sbyteArray.Length % 4; } else { @@ -307,13 +309,13 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_STRING_ARRAY: if(item.elements > 1) { - string[] stringArray = new string[item.elements]; + var stringArray = new string[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - uint strLength = BigEndianBitConverter.ToUInt32(nvlist, offset); + var strLength = BigEndianBitConverter.ToUInt32(nvlist, offset); offset += 4; - byte[] strBytes = new byte[strLength]; + var strBytes = new byte[strLength]; Array.Copy(nvlist, offset, strBytes, 0, strLength); stringArray[i] = StringHandlers.CToString(strBytes); offset += (int)strLength; @@ -326,9 +328,9 @@ public sealed partial class ZFS } else { - uint strLength = BigEndianBitConverter.ToUInt32(nvlist, offset); + var strLength = BigEndianBitConverter.ToUInt32(nvlist, offset); offset += 4; - byte[] strBytes = new byte[strLength]; + var strBytes = new byte[strLength]; Array.Copy(nvlist, offset, strBytes, 0, strLength); item.value = StringHandlers.CToString(strBytes); offset += (int)strLength; @@ -342,11 +344,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_UINT16_ARRAY: if(item.elements > 1) { - ushort[] ushortArray = new ushort[item.elements]; + var ushortArray = new ushort[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - ushort temp = BigEndianBitConverter.ToUInt16(nvlist, offset); + var temp = BigEndianBitConverter.ToUInt16(nvlist, offset); ushortArray[i] = temp; offset += 4; } @@ -364,11 +366,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_UINT32_ARRAY: if(item.elements > 1) { - uint[] uintArray = new uint[item.elements]; + var uintArray = new uint[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - uint temp = BigEndianBitConverter.ToUInt32(nvlist, offset); + var temp = BigEndianBitConverter.ToUInt32(nvlist, offset); uintArray[i] = temp; offset += 4; } @@ -386,11 +388,11 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_UINT64_ARRAY: if(item.elements > 1) { - ulong[] ulongArray = new ulong[item.elements]; + var ulongArray = new ulong[item.elements]; - for(int i = 0; i < item.elements; i++) + for(var i = 0; i < item.elements; i++) { - ulong temp = BigEndianBitConverter.ToUInt64(nvlist, offset); + var temp = BigEndianBitConverter.ToUInt64(nvlist, offset); ulongArray[i] = temp; offset += 8; } @@ -408,7 +410,7 @@ public sealed partial class ZFS if(item.elements > 1) goto default; - byte[] subListBytes = new byte[item.encodedSize - (offset - currOff)]; + var subListBytes = new byte[item.encodedSize - (offset - currOff)]; Array.Copy(nvlist, offset, subListBytes, 0, subListBytes.Length); if(DecodeNvList(subListBytes, out Dictionary subList, true, littleEndian)) @@ -420,7 +422,7 @@ public sealed partial class ZFS break; default: - byte[] unknown = new byte[item.encodedSize - (offset - currOff)]; + var unknown = new byte[item.encodedSize - (offset - currOff)]; Array.Copy(nvlist, offset, unknown, 0, unknown.Length); item.value = unknown; offset = (int)(currOff + item.encodedSize); @@ -453,8 +455,10 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_BOOLEAN_ARRAY: case NVS_DataTypes.DATA_TYPE_BOOLEAN_VALUE: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((bool[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (bool)item.value).AppendLine(); @@ -464,24 +468,30 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_UINT8: case NVS_DataTypes.DATA_TYPE_UINT8_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((byte[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (byte)item.value).AppendLine(); break; case NVS_DataTypes.DATA_TYPE_DOUBLE: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((double[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (double)item.value).AppendLine(); break; case NVS_DataTypes.DATA_TYPE_HRTIME: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((DateTime[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (DateTime)item.value).AppendLine(); @@ -489,8 +499,10 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_INT16: case NVS_DataTypes.DATA_TYPE_INT16_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((short[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (short)item.value).AppendLine(); @@ -498,8 +510,10 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_INT32: case NVS_DataTypes.DATA_TYPE_INT32_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((int[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (int)item.value).AppendLine(); @@ -507,8 +521,10 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_INT64: case NVS_DataTypes.DATA_TYPE_INT64_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((long[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (long)item.value).AppendLine(); @@ -516,8 +532,10 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_INT8: case NVS_DataTypes.DATA_TYPE_INT8_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((sbyte[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (sbyte)item.value).AppendLine(); @@ -525,8 +543,10 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_STRING: case NVS_DataTypes.DATA_TYPE_STRING_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((string[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (string)item.value).AppendLine(); @@ -534,8 +554,10 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_UINT16: case NVS_DataTypes.DATA_TYPE_UINT16_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((ushort[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (ushort)item.value).AppendLine(); @@ -543,8 +565,10 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_UINT32: case NVS_DataTypes.DATA_TYPE_UINT32_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((uint[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (uint)item.value).AppendLine(); @@ -552,29 +576,41 @@ public sealed partial class ZFS case NVS_DataTypes.DATA_TYPE_UINT64: case NVS_DataTypes.DATA_TYPE_UINT64_ARRAY: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) sb.AppendFormat("{0}[{1}] = {2}", item.name, i, ((ulong[])item.value)[i]).AppendLine(); + } else sb.AppendFormat("{0} = {1}", item.name, (ulong)item.value).AppendLine(); break; case NVS_DataTypes.DATA_TYPE_NVLIST: if(item.elements == 1) + { sb.AppendFormat("{0} =\n{1}", item.name, PrintNvList((Dictionary)item.value)). AppendLine(); + } else + { sb.AppendFormat(Localization._0_equals_1_elements_nvlist_array_unable_to_print, item.name, item.elements).AppendLine(); + } break; default: if(item.elements > 1) - for(int i = 0; i < item.elements; i++) + { + for(var i = 0; i < item.elements; i++) + { sb.AppendFormat(Localization._0_1_equals_unknown_data_type_2, item.name, i, item.dataType). AppendLine(); + } + } else + { sb.AppendFormat(Localization._0_equals_unknown_data_type_1, item.name, item.dataType). AppendLine(); + } break; } diff --git a/Aaru.Filesystems/ZFS/Info.cs b/Aaru.Filesystems/ZFS/Info.cs index b7d6325ce..b819e1fc1 100644 --- a/Aaru.Filesystems/ZFS/Info.cs +++ b/Aaru.Filesystems/ZFS/Info.cs @@ -58,10 +58,14 @@ namespace Aaru.Filesystems; */ /// /// Implements detection for the Zettabyte File System (ZFS) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedType.Local"), - SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "NotAccessedField.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class ZFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -150,7 +154,8 @@ public sealed partial class ZFS if(errno != ErrorNumber.NoError) return; - sb.AppendLine(!DecodeNvList(nvlist, out Dictionary decodedNvList) ? "Could not decode nvlist" + sb.AppendLine(!DecodeNvList(nvlist, out Dictionary decodedNvList) + ? "Could not decode nvlist" : PrintNvList(decodedNvList)); information = sb.ToString(); @@ -169,4 +174,6 @@ public sealed partial class ZFS if(decodedNvList.TryGetValue("pool_guid", out tmpObj)) metadata.VolumeSetIdentifier = $"{(ulong)tmpObj.value}"; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ZFS/Structs.cs b/Aaru.Filesystems/ZFS/Structs.cs index 80bbb2d8b..02b4faa9c 100644 --- a/Aaru.Filesystems/ZFS/Structs.cs +++ b/Aaru.Filesystems/ZFS/Structs.cs @@ -52,47 +52,24 @@ namespace Aaru.Filesystems; */ /// /// Implements detection for the Zettabyte File System (ZFS) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedType.Local"), - SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "NotAccessedField.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class ZFS { - struct ZIO_Checksum +#region Nested type: DVA + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct DVA { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public ulong[] word; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public readonly ulong[] word; } - /// - /// There is an empty ZIO at sector 16 or sector 31, with magic and checksum, to detect it is really ZFS I - /// suppose. - /// - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct ZIO_Empty - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 472)] - public readonly byte[] empty; - public readonly ulong magic; - public readonly ZIO_Checksum checksum; - } +#endregion - /// This structure indicates which encoding method and endianness is used to encode the nvlist - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct NVS_Method - { - public readonly byte encoding; - public readonly byte endian; - public readonly byte reserved1; - public readonly byte reserved2; - } - - /// This structure gives information about the encoded nvlist - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct NVS_XDR_Header - { - public readonly NVS_Method encodingAndEndian; - public readonly uint version; - public readonly uint flags; - } +#region Nested type: NVS_Item /// This represent an encoded nvpair (an item of an nvlist) struct NVS_Item @@ -111,13 +88,37 @@ public sealed partial class ZFS public object value; } +#endregion + +#region Nested type: NVS_Method + + /// This structure indicates which encoding method and endianness is used to encode the nvlist [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct DVA + struct NVS_Method { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public readonly ulong[] word; + public readonly byte encoding; + public readonly byte endian; + public readonly byte reserved1; + public readonly byte reserved2; } +#endregion + +#region Nested type: NVS_XDR_Header + + /// This structure gives information about the encoded nvlist + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct NVS_XDR_Header + { + public readonly NVS_Method encodingAndEndian; + public readonly uint version; + public readonly uint flags; + } + +#endregion + +#region Nested type: SPA_BlockPointer + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct SPA_BlockPointer { @@ -137,6 +138,10 @@ public sealed partial class ZFS public readonly ZIO_Checksum checksum; } +#endregion + +#region Nested type: ZFS_Uberblock + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct ZFS_Uberblock { @@ -148,4 +153,33 @@ public sealed partial class ZFS public readonly SPA_BlockPointer mosPtr; public readonly ulong softwareVersion; } + +#endregion + +#region Nested type: ZIO_Checksum + + struct ZIO_Checksum + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public ulong[] word; + } + +#endregion + +#region Nested type: ZIO_Empty + + /// + /// There is an empty ZIO at sector 16 or sector 31, with magic and checksum, to detect it is really ZFS I + /// suppose. + /// + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct ZIO_Empty + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 472)] + public readonly byte[] empty; + public readonly ulong magic; + public readonly ZIO_Checksum checksum; + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ZFS/ZFS.cs b/Aaru.Filesystems/ZFS/ZFS.cs index a18b79cb6..c281a1c98 100644 --- a/Aaru.Filesystems/ZFS/ZFS.cs +++ b/Aaru.Filesystems/ZFS/ZFS.cs @@ -53,14 +53,22 @@ namespace Aaru.Filesystems; */ /// /// Implements detection for the Zettabyte File System (ZFS) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedType.Local"), - SuppressMessage("ReSharper", "UnusedMember.Local"), SuppressMessage("ReSharper", "NotAccessedField.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedType.Local")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "NotAccessedField.Local")] public sealed partial class ZFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.ZFS_Name; + /// public Guid Id => new("0750014F-A714-4692-A369-E23F6EC3659C"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/dump/Consts.cs b/Aaru.Filesystems/dump/Consts.cs index 9daf42192..658ffad06 100644 --- a/Aaru.Filesystems/dump/Consts.cs +++ b/Aaru.Filesystems/dump/Consts.cs @@ -31,13 +31,14 @@ // ****************************************************************************/ using System.Diagnostics.CodeAnalysis; -using ufs_daddr_t = System.Int32; +using ufs_daddr_t = int; namespace Aaru.Filesystems; /// /// Implements identification of a dump(8) image (virtual filesystem on a file) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class dump { /// Magic number for old dump diff --git a/Aaru.Filesystems/dump/Info.cs b/Aaru.Filesystems/dump/Info.cs index 03b4b5d1d..186bb4b55 100644 --- a/Aaru.Filesystems/dump/Info.cs +++ b/Aaru.Filesystems/dump/Info.cs @@ -38,15 +38,18 @@ using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Helpers; using Partition = Aaru.CommonTypes.Partition; -using ufs_daddr_t = System.Int32; +using ufs_daddr_t = int; namespace Aaru.Filesystems; /// /// Implements identification of a dump(8) image (virtual filesystem on a file) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class dump { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -57,7 +60,7 @@ public sealed partial class dump if(partition.Start != 0) return false; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -96,7 +99,7 @@ public sealed partial class dump if(partition.Start != 0) return; - uint sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); + var sbSize = (uint)(Marshal.SizeOf() / imagePlugin.Info.SectorSize); if(Marshal.SizeOf() % imagePlugin.Info.SectorSize != 0) sbSize++; @@ -113,8 +116,8 @@ public sealed partial class dump spcl_aix aixHdr = Marshal.ByteArrayToStructureLittleEndian(sector); s_spcl newHdr = Marshal.ByteArrayToStructureLittleEndian(sector); - bool useOld = false; - bool useAix = false; + var useOld = false; + var useAix = false; if(newHdr.c_magic == OFS_MAGIC || newHdr.c_magic == NFS_MAGIC || @@ -227,7 +230,7 @@ public sealed partial class dump } sb.AppendFormat(Localization.Dump_volume_number_0, newHdr.c_volume).AppendLine(); - sb.AppendFormat(Localization.Dump_level_0, newHdr.c_level).AppendLine(); + sb.AppendFormat(Localization.Dump_level_0, newHdr.c_level).AppendLine(); string dumpname = StringHandlers.CToString(newHdr.c_label); if(!string.IsNullOrEmpty(dumpname)) @@ -254,4 +257,6 @@ public sealed partial class dump information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/dump/Structs.cs b/Aaru.Filesystems/dump/Structs.cs index 687708502..281be61a4 100644 --- a/Aaru.Filesystems/dump/Structs.cs +++ b/Aaru.Filesystems/dump/Structs.cs @@ -32,71 +32,47 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using ufs_daddr_t = System.Int32; +using ufs_daddr_t = int; namespace Aaru.Filesystems; /// /// Implements identification of a dump(8) image (virtual filesystem on a file) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class dump { - // Old 16-bit format record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - struct spcl16 - { - /// Record type - public readonly short c_type; - /// Dump date - public int c_date; - /// Previous dump date - public int c_ddate; - /// Dump volume number - public readonly short c_volume; - /// Logical block of this record - public readonly int c_tapea; - /// Inode number - public readonly ushort c_inumber; - /// Magic number - public readonly ushort c_magic; - /// Record checksum - public readonly int c_checksum; +#region Nested type: dinode - // Unneeded for now - /* - struct dinode c_dinode; - int c_count; - char c_addr[BSIZE]; - */ + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct dinode + { + public readonly ushort di_mode; /* 0: IFMT, permissions; see below. */ + public readonly short di_nlink; /* 2: File link count. */ + public readonly int inumber; /* 4: Lfs: inode number. */ + public readonly ulong di_size; /* 8: File byte count. */ + public readonly int di_atime; /* 16: Last access time. */ + public readonly int di_atimensec; /* 20: Last access time. */ + public readonly int di_mtime; /* 24: Last modified time. */ + public readonly int di_mtimensec; /* 28: Last modified time. */ + public readonly int di_ctime; /* 32: Last inode change time. */ + public readonly int di_ctimensec; /* 36: Last inode change time. */ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = NDADDR)] + public readonly int[] di_db; /* 40: Direct disk blocks. */ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = NIADDR)] + public readonly int[] di_ib; /* 88: Indirect disk blocks. */ + public readonly uint di_flags; /* 100: Status flags (chflags). */ + public readonly uint di_blocks; /* 104: Blocks actually held. */ + public readonly int di_gen; /* 108: Generation number. */ + public readonly uint di_uid; /* 112: File owner. */ + public readonly uint di_gid; /* 116: File group. */ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public readonly int[] di_spare; /* 120: Reserved; currently unused */ } - // 32-bit AIX format record - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct spcl_aix - { - /// Record type - public readonly int c_type; - /// Dump date - public readonly int c_date; - /// Previous dump date - public readonly int c_ddate; - /// Dump volume number - public readonly int c_volume; - /// Logical block of this record - public readonly int c_tapea; - public readonly uint c_inumber; - public readonly uint c_magic; - public readonly int c_checksum; +#endregion - // Unneeded for now - /* - public bsd_dinode bsd_c_dinode; - public int c_count; - public char c_addr[TP_NINDIR]; - public int xix_flag; - public dinode xix_dinode; - */ - } +#region Nested type: s_spcl [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct s_spcl @@ -132,29 +108,70 @@ public sealed partial class dump public readonly int[] c_spare; /* reserved for future uses */ } +#endregion + +#region Nested type: spcl_aix + + // 32-bit AIX format record [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct dinode + readonly struct spcl_aix { - public readonly ushort di_mode; /* 0: IFMT, permissions; see below. */ - public readonly short di_nlink; /* 2: File link count. */ - public readonly int inumber; /* 4: Lfs: inode number. */ - public readonly ulong di_size; /* 8: File byte count. */ - public readonly int di_atime; /* 16: Last access time. */ - public readonly int di_atimensec; /* 20: Last access time. */ - public readonly int di_mtime; /* 24: Last modified time. */ - public readonly int di_mtimensec; /* 28: Last modified time. */ - public readonly int di_ctime; /* 32: Last inode change time. */ - public readonly int di_ctimensec; /* 36: Last inode change time. */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst = NDADDR)] - public readonly int[] di_db; /* 40: Direct disk blocks. */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst = NIADDR)] - public readonly int[] di_ib; /* 88: Indirect disk blocks. */ - public readonly uint di_flags; /* 100: Status flags (chflags). */ - public readonly uint di_blocks; /* 104: Blocks actually held. */ - public readonly int di_gen; /* 108: Generation number. */ - public readonly uint di_uid; /* 112: File owner. */ - public readonly uint di_gid; /* 116: File group. */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public readonly int[] di_spare; /* 120: Reserved; currently unused */ + /// Record type + public readonly int c_type; + /// Dump date + public readonly int c_date; + /// Previous dump date + public readonly int c_ddate; + /// Dump volume number + public readonly int c_volume; + /// Logical block of this record + public readonly int c_tapea; + public readonly uint c_inumber; + public readonly uint c_magic; + public readonly int c_checksum; + + // Unneeded for now + /* + public bsd_dinode bsd_c_dinode; + public int c_count; + public char c_addr[TP_NINDIR]; + public int xix_flag; + public dinode xix_dinode; + */ } + +#endregion + +#region Nested type: spcl16 + + // Old 16-bit format record + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct spcl16 + { + /// Record type + public readonly short c_type; + /// Dump date + public int c_date; + /// Previous dump date + public int c_ddate; + /// Dump volume number + public readonly short c_volume; + /// Logical block of this record + public readonly int c_tapea; + /// Inode number + public readonly ushort c_inumber; + /// Magic number + public readonly ushort c_magic; + /// Record checksum + public readonly int c_checksum; + + // Unneeded for now + /* + struct dinode c_dinode; + int c_count; + char c_addr[BSIZE]; + */ + } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/dump/dump.cs b/Aaru.Filesystems/dump/dump.cs index 512e6bc5f..1a488152d 100644 --- a/Aaru.Filesystems/dump/dump.cs +++ b/Aaru.Filesystems/dump/dump.cs @@ -33,20 +33,28 @@ using System; using System.Diagnostics.CodeAnalysis; using Aaru.CommonTypes.Interfaces; -using ufs_daddr_t = System.Int32; +using ufs_daddr_t = int; namespace Aaru.Filesystems; /// /// Implements identification of a dump(8) image (virtual filesystem on a file) -[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "UnusedMember.Local")] +[SuppressMessage("ReSharper", "InconsistentNaming")] +[SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class dump : IFilesystem { + const string MODULE_NAME = "dump(8) plugin"; + +#region IFilesystem Members + /// public string Name => Localization.dump_Name; + /// public Guid Id => new("E53B4D28-C858-4800-B092-DDAE80D361B9"); + /// public string Author => Authors.NataliaPortillo; - const string MODULE_NAME = "dump(8) plugin"; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/exFAT/Consts.cs b/Aaru.Filesystems/exFAT/Consts.cs index 6773477c8..70178be5a 100644 --- a/Aaru.Filesystems/exFAT/Consts.cs +++ b/Aaru.Filesystems/exFAT/Consts.cs @@ -39,7 +39,7 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class exFAT { + const string FS_TYPE = "exfat"; readonly Guid _oemFlashParameterGuid = new("0A0C7E46-3399-4021-90C8-FA6D389C4BA2"); readonly byte[] _signature = "EXFAT "u8.ToArray(); - const string FS_TYPE = "exfat"; } \ No newline at end of file diff --git a/Aaru.Filesystems/exFAT/Enums.cs b/Aaru.Filesystems/exFAT/Enums.cs index fb6debcef..0f2a6c2dc 100644 --- a/Aaru.Filesystems/exFAT/Enums.cs +++ b/Aaru.Filesystems/exFAT/Enums.cs @@ -39,10 +39,16 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class exFAT { +#region Nested type: VolumeFlags + [Flags] enum VolumeFlags : ushort { - SecondFatActive = 1, VolumeDirty = 2, MediaFailure = 4, + SecondFatActive = 1, + VolumeDirty = 2, + MediaFailure = 4, ClearToZero = 8 } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/exFAT/Info.cs b/Aaru.Filesystems/exFAT/Info.cs index d4f7072ce..dd02327da 100644 --- a/Aaru.Filesystems/exFAT/Info.cs +++ b/Aaru.Filesystems/exFAT/Info.cs @@ -46,6 +46,8 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class exFAT { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -119,7 +121,7 @@ public sealed partial class exFAT AppendLine(); sb.AppendFormat(Localization.Volume_serial_number_0_X8, vbr.volumeSerial).AppendLine(); - sb.AppendFormat(Localization.BIOS_drive_is_0, vbr.drive).AppendLine(); + sb.AppendFormat(Localization.BIOS_drive_is_0, vbr.drive).AppendLine(); if(vbr.flags.HasFlag(VolumeFlags.SecondFatActive)) sb.AppendLine(Localization.Second_FAT_is_in_use); @@ -130,16 +132,16 @@ public sealed partial class exFAT if(vbr.flags.HasFlag(VolumeFlags.MediaFailure)) sb.AppendLine(Localization.Underlying_media_presented_errors); - int count = 1; + var count = 1; foreach(OemParameter parameter in parametersTable.parameters) { if(parameter.OemParameterType == _oemFlashParameterGuid) { - sb.AppendFormat(Localization.OEM_Parameters_0, count).AppendLine(); + sb.AppendFormat(Localization.OEM_Parameters_0, count).AppendLine(); sb.AppendFormat("\t" + Localization._0_bytes_in_erase_block, parameter.eraseBlockSize).AppendLine(); - sb.AppendFormat("\t" + Localization._0_bytes_per_page, parameter.pageSize).AppendLine(); - sb.AppendFormat("\t" + Localization._0_spare_blocks, parameter.spareBlocks).AppendLine(); + sb.AppendFormat("\t" + Localization._0_bytes_per_page, parameter.pageSize).AppendLine(); + sb.AppendFormat("\t" + Localization._0_spare_blocks, parameter.spareBlocks).AppendLine(); sb.AppendFormat("\t" + Localization._0_nanoseconds_random_access_time, parameter.randomAccessTime). AppendLine(); @@ -168,4 +170,6 @@ public sealed partial class exFAT information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/exFAT/Structs.cs b/Aaru.Filesystems/exFAT/Structs.cs index 76f967917..c213bd74d 100644 --- a/Aaru.Filesystems/exFAT/Structs.cs +++ b/Aaru.Filesystems/exFAT/Structs.cs @@ -40,6 +40,51 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class exFAT { +#region Nested type: ChecksumSector + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct ChecksumSector + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + public readonly uint[] checksum; + } + +#endregion + +#region Nested type: OemParameter + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct OemParameter + { + public readonly Guid OemParameterType; + public readonly uint eraseBlockSize; + public readonly uint pageSize; + public readonly uint spareBlocks; + public readonly uint randomAccessTime; + public readonly uint programTime; + public readonly uint readCycleTime; + public readonly uint writeCycleTime; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public readonly byte[] reserved; + } + +#endregion + +#region Nested type: OemParameterTable + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + readonly struct OemParameterTable + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] + public readonly OemParameter[] parameters; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public readonly byte[] padding; + } + +#endregion + +#region Nested type: VolumeBootRecord + [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct VolumeBootRecord { @@ -71,34 +116,5 @@ public sealed partial class exFAT public readonly ushort bootSignature; } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct OemParameter - { - public readonly Guid OemParameterType; - public readonly uint eraseBlockSize; - public readonly uint pageSize; - public readonly uint spareBlocks; - public readonly uint randomAccessTime; - public readonly uint programTime; - public readonly uint readCycleTime; - public readonly uint writeCycleTime; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public readonly byte[] reserved; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct OemParameterTable - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] - public readonly OemParameter[] parameters; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public readonly byte[] padding; - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - readonly struct ChecksumSector - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] - public readonly uint[] checksum; - } +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/exFAT/exFAT.cs b/Aaru.Filesystems/exFAT/exFAT.cs index 4c7b78707..7183b48d0 100644 --- a/Aaru.Filesystems/exFAT/exFAT.cs +++ b/Aaru.Filesystems/exFAT/exFAT.cs @@ -40,10 +40,16 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class exFAT : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.exFAT_Name; + /// public Guid Id => new("8271D088-1533-4CB3-AC28-D802B68BB95C"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ext2FS/Info.cs b/Aaru.Filesystems/ext2FS/Info.cs index 0b6ac7241..65cb4cfe1 100644 --- a/Aaru.Filesystems/ext2FS/Info.cs +++ b/Aaru.Filesystems/ext2FS/Info.cs @@ -49,6 +49,8 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class ext2FS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -58,8 +60,8 @@ public sealed partial class ext2FS if(sbSectorOff + partition.Start >= partition.End) return false; - int sbSizeInBytes = Marshal.SizeOf(); - uint sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); + int sbSizeInBytes = Marshal.SizeOf(); + var sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); if(sbSizeInBytes % imagePlugin.Info.SectorSize > 0) sbSizeInSectors++; @@ -70,14 +72,14 @@ public sealed partial class ext2FS if(errno != ErrorNumber.NoError) return false; - byte[] sb = new byte[sbSizeInBytes]; + var sb = new byte[sbSizeInBytes]; if(sbOff + sbSizeInBytes > sbSector.Length) return false; Array.Copy(sbSector, sbOff, sb, 0, sbSizeInBytes); - ushort magic = BitConverter.ToUInt16(sb, 0x038); + var magic = BitConverter.ToUInt16(sb, 0x038); return magic is EXT2_MAGIC or EXT2_MAGIC_OLD; } @@ -92,12 +94,12 @@ public sealed partial class ext2FS var sb = new StringBuilder(); - bool newExt2 = false; - bool ext3 = false; - bool ext4 = false; + var newExt2 = false; + var ext3 = false; + var ext4 = false; - int sbSizeInBytes = Marshal.SizeOf(); - uint sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); + int sbSizeInBytes = Marshal.SizeOf(); + var sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); if(sbSizeInBytes % imagePlugin.Info.SectorSize > 0) sbSizeInSectors++; @@ -111,7 +113,7 @@ public sealed partial class ext2FS if(errno != ErrorNumber.NoError) return; - byte[] sblock = new byte[sbSizeInBytes]; + var sblock = new byte[sbSizeInBytes]; Array.Copy(sbSector, sbOff, sblock, 0, sbSizeInBytes); SuperBlock supblk = Marshal.ByteArrayToStructureLittleEndian(sblock); @@ -171,14 +173,14 @@ public sealed partial class ext2FS } string extOs = supblk.creator_os switch - { - EXT2_OS_FREEBSD => "FreeBSD", - EXT2_OS_HURD => "Hurd", - EXT2_OS_LINUX => "Linux", - EXT2_OS_LITES => "Lites", - EXT2_OS_MASIX => "MasIX", - _ => string.Format(Localization.Unknown_OS_0, supblk.creator_os) - }; + { + EXT2_OS_FREEBSD => "FreeBSD", + EXT2_OS_HURD => "Hurd", + EXT2_OS_LINUX => "Linux", + EXT2_OS_LITES => "Lites", + EXT2_OS_MASIX => "MasIX", + _ => string.Format(Localization.Unknown_OS_0, supblk.creator_os) + }; metadata.SystemIdentifier = extOs; @@ -192,8 +194,8 @@ public sealed partial class ext2FS else sb.AppendFormat(Localization.Volume_was_created_for_0, extOs).AppendLine(); - byte[] tempBytes = new byte[8]; - ulong blocks, reserved, free; + var tempBytes = new byte[8]; + ulong blocks, reserved, free; if((supblk.ftr_incompat & EXT4_FEATURE_INCOMPAT_64BIT) == EXT4_FEATURE_INCOMPAT_64BIT) { @@ -253,48 +255,69 @@ public sealed partial class ext2FS supblk.mount_c > 0) { if(supblk.mount_t > 0) + { sb.AppendFormat(Localization.Last_mounted_on_0, DateHandlers.UnixUnsignedToDateTime(supblk.mount_t)). AppendLine(); + } if(supblk.max_mount_c != -1) + { sb.AppendFormat(Localization.Volume_has_been_mounted_0_times_of_a_maximum_of_1_mounts_before_checking, supblk.mount_c, supblk.max_mount_c).AppendLine(); + } else + { sb. - AppendFormat(Localization.Volume_has_been_mounted_0_times_with_no_maximum_no_of_mounts_before_checking, - supblk.mount_c).AppendLine(); + AppendFormat( + Localization.Volume_has_been_mounted_0_times_with_no_maximum_no_of_mounts_before_checking, + supblk.mount_c).AppendLine(); + } if(!string.IsNullOrEmpty(StringHandlers.CToString(supblk.last_mount_dir, encoding))) + { sb.AppendFormat(Localization.Last_mounted_at_0, StringHandlers.CToString(supblk.last_mount_dir, encoding)).AppendLine(); + } if(!string.IsNullOrEmpty(StringHandlers.CToString(supblk.mount_options, encoding))) + { sb.AppendFormat(Localization.Last_used_mount_options_were_0, StringHandlers.CToString(supblk.mount_options, encoding)).AppendLine(); + } } else { sb.AppendLine(Localization.Volume_has_never_been_mounted); if(supblk.max_mount_c != -1) + { sb.AppendFormat(Localization.Volume_can_be_mounted_0_times_before_checking, supblk.max_mount_c). AppendLine(); + } else sb.AppendLine(Localization.Volume_has_no_maximum_no_of_mounts_before_checking); } if(supblk.check_t > 0) + { if(supblk.check_inv > 0) + { sb.AppendFormat(Localization.Last_checked_on_0_should_check_every_1_seconds, DateHandlers.UnixUnsignedToDateTime(supblk.check_t), supblk.check_inv).AppendLine(); + } else + { sb.AppendFormat(Localization.Last_checked_on_0, DateHandlers.UnixUnsignedToDateTime(supblk.check_t)). AppendLine(); + } + } else { if(supblk.check_inv > 0) + { sb.AppendFormat(Localization.Volume_has_never_been_checked_should_check_every_0_, supblk.check_inv). AppendLine(); + } else sb.AppendLine(Localization.Volume_has_never_been_checked); } @@ -387,8 +410,10 @@ public sealed partial class ext2FS if(supblk.blocks_per_grp > 0 && supblk is { flags_per_grp: > 0, inodes_per_grp: > 0 }) + { sb.AppendFormat(Localization._0_blocks_1_flags_and_2_inodes_per_group, supblk.blocks_per_grp, supblk.flags_per_grp, supblk.inodes_per_grp).AppendLine(); + } if(supblk.first_block > 0) sb.AppendFormat(Localization._0_is_first_data_block, supblk.first_block).AppendLine(); @@ -411,15 +436,19 @@ public sealed partial class ext2FS sb.AppendFormat(Localization._0_blocks_on_all_data_disks, supblk.raid_stripe_width).AppendLine(); if(supblk is { mmp_interval: > 0, mmp_block: > 0 }) + { sb.AppendFormat(Localization._0_seconds_for_multi_mount_protection_wait_on_block_1, supblk.mmp_interval, supblk.mmp_block).AppendLine(); + } if(supblk.flex_bg_grp_size > 0) sb.AppendFormat(Localization._0_Flexible_block_group_size, supblk.flex_bg_grp_size).AppendLine(); if(supblk is { hash_seed_1: > 0, hash_seed_2: > 0 } and { hash_seed_3: > 0, hash_seed_4: > 0 }) + { sb.AppendFormat(Localization.Hash_seed_0_1_2_3_version_4, supblk.hash_seed_1, supblk.hash_seed_2, supblk.hash_seed_3, supblk.hash_seed_4, supblk.hash_version).AppendLine(); + } if((supblk.ftr_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) == EXT3_FEATURE_COMPAT_HAS_JOURNAL || (supblk.ftr_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) == EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) @@ -447,10 +476,14 @@ public sealed partial class ext2FS if(ext4) { if(supblk.snapshot_id > 0) + { sb. - AppendFormat(Localization.Active_snapshot_has_ID_0_on_inode_1_with_2_blocks_reserved_list_starting_on_block_3, - supblk.snapshot_id, supblk.snapshot_inum, supblk.snapshot_blocks, - supblk.snapshot_list).AppendLine(); + AppendFormat( + Localization. + Active_snapshot_has_ID_0_on_inode_1_with_2_blocks_reserved_list_starting_on_block_3, + supblk.snapshot_id, supblk.snapshot_inum, supblk.snapshot_blocks, + supblk.snapshot_list).AppendLine(); + } if(supblk.error_count > 0) { @@ -611,4 +644,6 @@ public sealed partial class ext2FS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ext2FS/Structs.cs b/Aaru.Filesystems/ext2FS/Structs.cs index 7a5beedc2..7efd4848c 100644 --- a/Aaru.Filesystems/ext2FS/Structs.cs +++ b/Aaru.Filesystems/ext2FS/Structs.cs @@ -44,8 +44,11 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class ext2FS { +#region Nested type: SuperBlock + /// ext2/3/4 superblock - [StructLayout(LayoutKind.Sequential, Pack = 1), SuppressMessage("ReSharper", "InconsistentNaming")] + [StructLayout(LayoutKind.Sequential, Pack = 1)] + [SuppressMessage("ReSharper", "InconsistentNaming")] struct SuperBlock { /// 0x000, inodes on volume @@ -273,4 +276,6 @@ public sealed partial class ext2FS /// crc32c(superblock) public readonly uint checksum; } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/ext2FS/ext2FS.cs b/Aaru.Filesystems/ext2FS/ext2FS.cs index 169286ed3..ac93425fd 100644 --- a/Aaru.Filesystems/ext2FS/ext2FS.cs +++ b/Aaru.Filesystems/ext2FS/ext2FS.cs @@ -44,10 +44,16 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class ext2FS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.ext2FS_Name_Linux_extended_Filesystem_2_3_and_4; + /// public Guid Id => new("6AA91B88-150B-4A7B-AD56-F84FB2DF4184"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/extFS/Info.cs b/Aaru.Filesystems/extFS/Info.cs index 6871fa68e..9637360cb 100644 --- a/Aaru.Filesystems/extFS/Info.cs +++ b/Aaru.Filesystems/extFS/Info.cs @@ -42,6 +42,8 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class extFS { +#region IFilesystem Members + /// public bool Identify(IMediaImage imagePlugin, Partition partition) { @@ -59,14 +61,14 @@ public sealed partial class extFS if(errno != ErrorNumber.NoError) return false; - byte[] sb = new byte[512]; + var sb = new byte[512]; if(sbOff + 512 > sbSector.Length) return false; Array.Copy(sbSector, sbOff, sb, 0, 512); - ushort magic = BitConverter.ToUInt16(sb, 0x038); + var magic = BitConverter.ToUInt16(sb, 0x038); return magic == EXT_MAGIC; } @@ -94,7 +96,7 @@ public sealed partial class extFS if(errno != ErrorNumber.NoError) return; - byte[] sbSector = new byte[512]; + var sbSector = new byte[512]; Array.Copy(sblock, sbOff, sbSector, 0, 512); var extSb = new SuperBlock @@ -111,7 +113,7 @@ public sealed partial class extFS }; sb.AppendLine(Localization.ext_filesystem); - sb.AppendFormat(Localization._0_zones_in_volume, extSb.zones); + sb.AppendFormat(Localization._0_zones_in_volume, extSb.zones); sb.AppendFormat(Localization._0_free_blocks_1_bytes, extSb.freecountblk, extSb.freecountblk * 1024); sb.AppendFormat(Localization._0_inodes_in_volume_1_free_2, extSb.inodes, extSb.freecountind, @@ -119,9 +121,9 @@ public sealed partial class extFS sb.AppendFormat(Localization.First_free_inode_is_0, extSb.firstfreeind); sb.AppendFormat(Localization.First_free_block_is_0, extSb.firstfreeblk); - sb.AppendFormat(Localization.First_data_zone_is_0, extSb.firstdatazone); - sb.AppendFormat(Localization.Log_zone_size_0, extSb.logzonesize); - sb.AppendFormat(Localization.Max_zone_size_0, extSb.maxsize); + sb.AppendFormat(Localization.First_data_zone_is_0, extSb.firstdatazone); + sb.AppendFormat(Localization.Log_zone_size_0, extSb.logzonesize); + sb.AppendFormat(Localization.Max_zone_size_0, extSb.maxsize); metadata = new FileSystem { @@ -133,4 +135,6 @@ public sealed partial class extFS information = sb.ToString(); } + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/extFS/Structs.cs b/Aaru.Filesystems/extFS/Structs.cs index 7e59521c3..e1fb8a84e 100644 --- a/Aaru.Filesystems/extFS/Structs.cs +++ b/Aaru.Filesystems/extFS/Structs.cs @@ -37,8 +37,10 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class extFS { +#region Nested type: SuperBlock + /// ext superblock - #pragma warning disable CS0649 +#pragma warning disable CS0649 [SuppressMessage("ReSharper", "InconsistentNaming")] struct SuperBlock { @@ -73,5 +75,7 @@ public sealed partial class extFS /// 0x038, 0x137D (little endian) public ushort magic; } - #pragma warning restore CS0649 +#pragma warning restore CS0649 + +#endregion } \ No newline at end of file diff --git a/Aaru.Filesystems/extFS/extFS.cs b/Aaru.Filesystems/extFS/extFS.cs index 677daf9e3..f4f52fba5 100644 --- a/Aaru.Filesystems/extFS/extFS.cs +++ b/Aaru.Filesystems/extFS/extFS.cs @@ -38,10 +38,16 @@ namespace Aaru.Filesystems; // ReSharper disable once InconsistentNaming public sealed partial class extFS : IFilesystem { +#region IFilesystem Members + /// public string Name => Localization.extFS_Name; + /// public Guid Id => new("076CB3A2-08C2-4D69-BC8A-FCAA2E502BE2"); + /// public string Author => Authors.NataliaPortillo; + +#endregion } \ No newline at end of file