From 89999a4801331282436014bac5edde5b9b2675b1 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 17 Mar 2026 19:14:37 +0000 Subject: [PATCH] Add support for Nintendo Wii U compressed disc images (WUX format) --- Aaru.Images/Aaru.Images.csproj.DotSettings | 1 + Aaru.Images/WUX/Constants.cs | 42 +++ Aaru.Images/WUX/Identify.cs | 63 +++++ Aaru.Images/WUX/Properties.cs | 80 ++++++ Aaru.Images/WUX/Read.cs | 310 +++++++++++++++++++++ Aaru.Images/WUX/Structs.cs | 60 ++++ Aaru.Images/WUX/Verify.cs | 62 +++++ Aaru.Images/WUX/WUX.cs | 76 +++++ README.md | 1 + 9 files changed, 695 insertions(+) create mode 100644 Aaru.Images/WUX/Constants.cs create mode 100644 Aaru.Images/WUX/Identify.cs create mode 100644 Aaru.Images/WUX/Properties.cs create mode 100644 Aaru.Images/WUX/Read.cs create mode 100644 Aaru.Images/WUX/Structs.cs create mode 100644 Aaru.Images/WUX/Verify.cs create mode 100644 Aaru.Images/WUX/WUX.cs diff --git a/Aaru.Images/Aaru.Images.csproj.DotSettings b/Aaru.Images/Aaru.Images.csproj.DotSettings index b5dc535c8..69e8a5cfb 100644 --- a/Aaru.Images/Aaru.Images.csproj.DotSettings +++ b/Aaru.Images/Aaru.Images.csproj.DotSettings @@ -61,4 +61,5 @@ True True True + True True \ No newline at end of file diff --git a/Aaru.Images/WUX/Constants.cs b/Aaru.Images/WUX/Constants.cs new file mode 100644 index 000000000..7a8c114b5 --- /dev/null +++ b/Aaru.Images/WUX/Constants.cs @@ -0,0 +1,42 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Constants.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains constants for Nintendo Wii U compressed disc images (WUX format). +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2026 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.Images; + +public sealed partial class Wux +{ + const uint WUX_MAGIC = 0x30585557U; + const uint WUX_HEADER_SIZE = 0x20; + const uint WIIU_PHYSICAL_SECTOR = 0x8000; + const uint WIIU_LOGICAL_SECTOR = 2048; + const uint LOGICAL_PER_PHYSICAL = WIIU_PHYSICAL_SECTOR / WIIU_LOGICAL_SECTOR; +} \ No newline at end of file diff --git a/Aaru.Images/WUX/Identify.cs b/Aaru.Images/WUX/Identify.cs new file mode 100644 index 000000000..4d15bb2cb --- /dev/null +++ b/Aaru.Images/WUX/Identify.cs @@ -0,0 +1,63 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Identify.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Identifies Nintendo Wii U compressed disc images (WUX format). +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2026 Natalia Portillo +// ****************************************************************************/ + +using System.IO; +using Aaru.CommonTypes.Interfaces; +using Aaru.Helpers; + +namespace Aaru.Images; + +public sealed partial class Wux +{ +#region IOpticalMediaImage Members + + /// + public bool Identify(IFilter imageFilter) + { + Stream stream = imageFilter.GetDataForkStream(); + + if(stream.Length < WUX_HEADER_SIZE) return false; + + stream.Seek(0, SeekOrigin.Begin); + + var headerBytes = new byte[WUX_HEADER_SIZE]; + stream.EnsureRead(headerBytes, 0, (int)WUX_HEADER_SIZE); + + WuxHeader header = Marshal.SpanToStructureLittleEndian(headerBytes); + + if(header.Magic != WUX_MAGIC) return false; + + return header.SectorSize == WIIU_PHYSICAL_SECTOR; + } + +#endregion +} \ No newline at end of file diff --git a/Aaru.Images/WUX/Properties.cs b/Aaru.Images/WUX/Properties.cs new file mode 100644 index 000000000..8b8d41696 --- /dev/null +++ b/Aaru.Images/WUX/Properties.cs @@ -0,0 +1,80 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Properties.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains properties for Nintendo Wii U compressed disc images (WUX format). +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2026 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using Aaru.CommonTypes.AaruMetadata; +using Aaru.CommonTypes.Structs; +using Partition = Aaru.CommonTypes.Partition; +using Track = Aaru.CommonTypes.Structs.Track; +using Session = Aaru.CommonTypes.Structs.Session; + +namespace Aaru.Images; + +public sealed partial class Wux +{ +#region IOpticalMediaImage Members + + /// + + // ReSharper disable once ConvertToAutoProperty + public ImageInfo Info => _imageInfo; + + /// + public string Name => "Nintendo Wii U WUX"; + + /// + public Guid Id => new("A8B84E3D-6F8C-4F82-B5E0-1C5A7F4A9D2E"); + + /// + public string Author => Authors.NataliaPortillo; + + /// + public string Format => "Nintendo Wii U WUX"; + + /// + public List Partitions { get; private set; } + + /// + public List Tracks { get; private set; } + + /// + public List Sessions { get; private set; } + + /// + public List DumpHardware => null; + + /// + public Metadata AaruMetadata => null; + +#endregion +} \ No newline at end of file diff --git a/Aaru.Images/WUX/Read.cs b/Aaru.Images/WUX/Read.cs new file mode 100644 index 000000000..d7b58cf0e --- /dev/null +++ b/Aaru.Images/WUX/Read.cs @@ -0,0 +1,310 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Read.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Reads Nintendo Wii U compressed disc images (WUX format). +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2026 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.IO; +using Aaru.CommonTypes; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Interfaces; +using Aaru.Helpers; +using Aaru.Logging; +using Track = Aaru.CommonTypes.Structs.Track; +using TrackType = Aaru.CommonTypes.Enums.TrackType; +using Session = Aaru.CommonTypes.Structs.Session; + +namespace Aaru.Images; + +public sealed partial class Wux +{ +#region IOpticalMediaImage Members + + /// + public ErrorNumber Open(IFilter imageFilter) + { + Stream stream = imageFilter.GetDataForkStream(); + + if(stream.Length < WUX_HEADER_SIZE) return ErrorNumber.InvalidArgument; + + stream.Seek(0, SeekOrigin.Begin); + + var headerBytes = new byte[WUX_HEADER_SIZE]; + stream.EnsureRead(headerBytes, 0, (int)WUX_HEADER_SIZE); + + WuxHeader header = Marshal.SpanToStructureLittleEndian(headerBytes); + + if(header.Magic != WUX_MAGIC) return ErrorNumber.InvalidArgument; + + if(header.SectorSize != WIIU_PHYSICAL_SECTOR) return ErrorNumber.InvalidArgument; + + _sectorCount = (uint)(header.UncompressedSize / WIIU_PHYSICAL_SECTOR); + + AaruLogging.Debug(MODULE_NAME, "WUX uncompressed size: {0} bytes", header.UncompressedSize); + AaruLogging.Debug(MODULE_NAME, "WUX physical sector count: {0}", _sectorCount); + + // Read sector index table + var indexBytes = new byte[_sectorCount * 4]; + stream.EnsureRead(indexBytes, 0, indexBytes.Length); + + _sectorIndex = new uint[_sectorCount]; + + for(uint i = 0; i < _sectorCount; i++) _sectorIndex[i] = BitConverter.ToUInt32(indexBytes, (int)(i * 4)); + + // Data starts at next sector-aligned offset after header + index table + ulong rawDataOffset = WUX_HEADER_SIZE + (ulong)indexBytes.Length; + _dataOffset = rawDataOffset + WIIU_PHYSICAL_SECTOR - 1 & ~((ulong)WIIU_PHYSICAL_SECTOR - 1); + + AaruLogging.Debug(MODULE_NAME, "WUX data offset: 0x{0:X}", _dataOffset); + + _imageFilter = imageFilter; + + _imageInfo.MediaType = MediaType.WUOD; + _imageInfo.SectorSize = WIIU_LOGICAL_SECTOR; + _imageInfo.Sectors = (ulong)_sectorCount * LOGICAL_PER_PHYSICAL; + _imageInfo.ImageSize = header.UncompressedSize; + _imageInfo.CreationTime = imageFilter.CreationTime; + _imageInfo.LastModificationTime = imageFilter.LastWriteTime; + _imageInfo.MediaTitle = Path.GetFileNameWithoutExtension(imageFilter.Filename); + _imageInfo.MetadataMediaType = MetadataMediaType.OpticalDisc; + _imageInfo.HasPartitions = true; + _imageInfo.HasSessions = true; + + // Load .key sidecar + _mediaTags = new Dictionary(); + string basename = imageFilter.BasePath; + string extension = Path.GetExtension(imageFilter.Filename)?.ToLower(); + basename = basename[..^(extension?.Length ?? basename.Length)]; + + string keyPath = basename + ".key"; + + if(File.Exists(keyPath)) + { + byte[] keyData = File.ReadAllBytes(keyPath); + + if(keyData.Length == 16) + { + _mediaTags[MediaTagType.WiiUDiscKey] = keyData; + AaruLogging.Debug(MODULE_NAME, "Found Wii U disc key sidecar"); + } + } + + _imageInfo.ReadableMediaTags = [.._mediaTags.Keys]; + + // Set up single track covering the entire disc + Tracks = + [ + new Track + { + Sequence = 1, + Session = 1, + Type = TrackType.Data, + StartSector = 0, + EndSector = _imageInfo.Sectors - 1, + Pregap = 0, + FileType = "BINARY", + Filter = imageFilter, + File = imageFilter.Filename + } + ]; + + Sessions = + [ + new Session + { + Sequence = 1, + StartSector = 0, + EndSector = _imageInfo.Sectors - 1, + StartTrack = 1, + EndTrack = 1 + } + ]; + + Partitions = + [ + new Partition + { + Sequence = 0, + Start = 0, + Length = _imageInfo.Sectors, + Size = _imageInfo.Sectors * _imageInfo.SectorSize, + Offset = 0, + Type = "Nintendo Wii U Optical Disc" + } + ]; + + return ErrorNumber.NoError; + } + + /// + public ErrorNumber ReadMediaTag(MediaTagType tag, out byte[] buffer) + { + buffer = null; + + if(!_mediaTags.TryGetValue(tag, out byte[] data)) return ErrorNumber.NoData; + + buffer = new byte[data.Length]; + Array.Copy(data, buffer, data.Length); + + return ErrorNumber.NoError; + } + + /// + public ErrorNumber ReadSector(ulong sectorAddress, bool negative, out byte[] buffer, out SectorStatus sectorStatus) + { + buffer = null; + sectorStatus = SectorStatus.NotDumped; + + if(negative) return ErrorNumber.InvalidArgument; + + if(sectorAddress >= _imageInfo.Sectors) return ErrorNumber.OutOfRange; + + // Map logical sector to position within WUX + var physicalSector = (uint)(sectorAddress / LOGICAL_PER_PHYSICAL); + var sectorOffset = (uint)(sectorAddress % LOGICAL_PER_PHYSICAL); + + if(physicalSector >= _sectorCount) return ErrorNumber.OutOfRange; + + uint mappedSector = _sectorIndex[physicalSector]; + + ulong fileOffset = _dataOffset + + (ulong)mappedSector * WIIU_PHYSICAL_SECTOR + + (ulong)sectorOffset * WIIU_LOGICAL_SECTOR; + + buffer = new byte[WIIU_LOGICAL_SECTOR]; + + Stream stream = _imageFilter.GetDataForkStream(); + stream.Seek((long)fileOffset, SeekOrigin.Begin); + stream.EnsureRead(buffer, 0, (int)WIIU_LOGICAL_SECTOR); + + sectorStatus = SectorStatus.Dumped; + + return ErrorNumber.NoError; + } + + /// + public ErrorNumber ReadSectorLong(ulong sectorAddress, bool negative, out byte[] buffer, + out SectorStatus sectorStatus) => + ReadSector(sectorAddress, negative, out buffer, out sectorStatus); + + /// + public ErrorNumber ReadSectors(ulong sectorAddress, bool negative, uint length, out byte[] buffer, + out SectorStatus[] sectorStatus) + { + buffer = null; + sectorStatus = null; + + if(negative) return ErrorNumber.InvalidArgument; + + if(sectorAddress + length > _imageInfo.Sectors) return ErrorNumber.OutOfRange; + + buffer = new byte[length * WIIU_LOGICAL_SECTOR]; + sectorStatus = new SectorStatus[length]; + + for(uint i = 0; i < length; i++) + { + ErrorNumber errno = ReadSector(sectorAddress + i, false, out byte[] sector, out SectorStatus status); + + if(errno != ErrorNumber.NoError) return errno; + + Array.Copy(sector, 0, buffer, i * WIIU_LOGICAL_SECTOR, WIIU_LOGICAL_SECTOR); + sectorStatus[i] = status; + } + + return ErrorNumber.NoError; + } + + /// + public ErrorNumber ReadSectorsLong(ulong sectorAddress, bool negative, uint length, out byte[] buffer, + out SectorStatus[] sectorStatus) => + ReadSectors(sectorAddress, negative, length, out buffer, out sectorStatus); + + /// + public ErrorNumber ReadSectorTag(ulong sectorAddress, bool negative, SectorTagType tag, out byte[] buffer) + { + buffer = null; + + return ErrorNumber.NotSupported; + } + + /// + public ErrorNumber ReadSectorsTag(ulong sectorAddress, bool negative, uint length, SectorTagType tag, + out byte[] buffer) + { + buffer = null; + + return ErrorNumber.NotSupported; + } + + /// + public ErrorNumber ReadSector(ulong sectorAddress, uint track, out byte[] buffer, out SectorStatus sectorStatus) => + ReadSector(sectorAddress, false, out buffer, out sectorStatus); + + /// + public ErrorNumber ReadSectorLong(ulong sectorAddress, uint track, out byte[] buffer, + out SectorStatus sectorStatus) => + ReadSector(sectorAddress, false, out buffer, out sectorStatus); + + /// + public ErrorNumber ReadSectors(ulong sectorAddress, uint length, uint track, out byte[] buffer, + out SectorStatus[] sectorStatus) => + ReadSectors(sectorAddress, false, length, out buffer, out sectorStatus); + + /// + public ErrorNumber ReadSectorsLong(ulong sectorAddress, uint length, uint track, out byte[] buffer, + out SectorStatus[] sectorStatus) => + ReadSectors(sectorAddress, false, length, out buffer, out sectorStatus); + + /// + public ErrorNumber ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag, out byte[] buffer) + { + buffer = null; + + return ErrorNumber.NotSupported; + } + + /// + public ErrorNumber ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag, + out byte[] buffer) + { + buffer = null; + + return ErrorNumber.NotSupported; + } + + /// + public List GetSessionTracks(Session session) => Tracks; + + /// + public List GetSessionTracks(ushort session) => Tracks; + +#endregion +} \ No newline at end of file diff --git a/Aaru.Images/WUX/Structs.cs b/Aaru.Images/WUX/Structs.cs new file mode 100644 index 000000000..09ef9843c --- /dev/null +++ b/Aaru.Images/WUX/Structs.cs @@ -0,0 +1,60 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Structs.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains structures for Nintendo Wii U compressed disc images (WUX format). +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2026 Natalia Portillo +// ****************************************************************************/ + +using System.Runtime.InteropServices; + +namespace Aaru.Images; + +public sealed partial class Wux +{ +#region Nested type: WuxHeader + + /// WUX file header, 32 bytes, all fields little-endian + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct WuxHeader + { + /// Offset 0x00, "WUX0" magic (0x30585557 LE) + public uint Magic; + /// Offset 0x04, reserved / version + public uint Reserved; + /// Offset 0x08, sector size (must be 0x8000) + public uint SectorSize; + /// Offset 0x0C, must be 0 + public uint Reserved2; + /// Offset 0x10, uncompressed disc size in bytes + public ulong UncompressedSize; + /// Offset 0x18, must be 0 + public ulong Reserved3; + } + +#endregion +} \ No newline at end of file diff --git a/Aaru.Images/WUX/Verify.cs b/Aaru.Images/WUX/Verify.cs new file mode 100644 index 000000000..fbd873b7e --- /dev/null +++ b/Aaru.Images/WUX/Verify.cs @@ -0,0 +1,62 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Verify.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Verifies Nintendo Wii U compressed disc images (WUX format). +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2026 Natalia Portillo +// ****************************************************************************/ + +using System.Collections.Generic; + +namespace Aaru.Images; + +public sealed partial class Wux +{ +#region IOpticalMediaImage Members + + /// + public bool? VerifySector(ulong sectorAddress) => null; + + /// + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + out List unknownLbas) + { + failingLbas = []; + unknownLbas = []; + + for(ulong i = 0; i < length; i++) unknownLbas.Add(sectorAddress + i); + + return null; + } + + /// + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + out List unknownLbas) => + VerifySectors(sectorAddress, length, out failingLbas, out unknownLbas); + +#endregion +} \ No newline at end of file diff --git a/Aaru.Images/WUX/WUX.cs b/Aaru.Images/WUX/WUX.cs new file mode 100644 index 000000000..e80d88cc7 --- /dev/null +++ b/Aaru.Images/WUX/WUX.cs @@ -0,0 +1,76 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : WUX.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Manages Nintendo Wii U compressed disc images (WUX format). +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2026 Natalia Portillo +// ****************************************************************************/ + +using System.Collections.Generic; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Interfaces; +using Aaru.CommonTypes.Structs; + +namespace Aaru.Images; + +/// +/// Implements reading Nintendo Wii U compressed disc images (WUX format) +public sealed partial class Wux : IOpticalMediaImage +{ + const string MODULE_NAME = "WUX plugin"; + ulong _dataOffset; + IFilter _imageFilter; + ImageInfo _imageInfo; + + Dictionary _mediaTags; + uint _sectorCount; + uint[] _sectorIndex; + + public Wux() => _imageInfo = new ImageInfo + { + ReadableSectorTags = [], + ReadableMediaTags = [], + HasPartitions = true, + HasSessions = true, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null + }; +} \ No newline at end of file diff --git a/README.md b/README.md index 8d887d75b..83c18db9c 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ Media image formats we can read * TeleDisk * UltraISO (.ISZ) * WinOnCD (.C2D) +* WUX * X68k DIM disk image files (.DIM) Media image formats we can write to