mirror of
https://github.com/SabreTools/SabreTools.Models.git
synced 2026-07-30 12:42:22 +00:00
Fix warnings from nullabilty
This commit is contained in:
@@ -8,6 +8,10 @@ namespace SabreTools.Models.AACS
|
||||
/// <summary>
|
||||
/// Null-terminated ASCII string representing the copyright
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Copyright;
|
||||
#else
|
||||
public string? Copyright;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,10 @@ namespace SabreTools.Models.AACS
|
||||
/// (or the first in a range of Licensed Drives being revoked, in the
|
||||
/// case of a non-zero Range value).
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] DriveID;
|
||||
#else
|
||||
public byte[]? DriveID;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,10 @@ namespace SabreTools.Models.AACS
|
||||
/// <summary>
|
||||
/// Revocation list entries
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DriveRevocationSignatureBlock[] SignatureBlocks;
|
||||
#else
|
||||
public DriveRevocationSignatureBlock[]? SignatureBlocks;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,10 @@ namespace SabreTools.Models.AACS
|
||||
/// A list of 8-byte Host Drive List Entry fields, the length of this
|
||||
/// list being equal to the number in the signature block.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DriveRevocationListEntry[] EntryFields;
|
||||
#else
|
||||
public DriveRevocationListEntry[]? EntryFields;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,10 @@ namespace SabreTools.Models.AACS
|
||||
/// determines that the signature does not verify or is omitted, it
|
||||
/// must refuse to use the Media Key.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] SignatureData;
|
||||
#else
|
||||
public byte[]? SignatureData;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,10 @@ namespace SabreTools.Models.AACS
|
||||
/// <summary>
|
||||
/// In this record, each subset-difference is encoded with 5 bytes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public SubsetDifference[] SubsetDifferences;
|
||||
#else
|
||||
public SubsetDifference[]? SubsetDifferences;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,10 @@ namespace SabreTools.Models.AACS
|
||||
/// first in a range of hosts being revoked, in the case of a non-zero
|
||||
/// Range value).
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] HostID;
|
||||
#else
|
||||
public byte[]? HostID;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,10 @@ namespace SabreTools.Models.AACS
|
||||
/// <summary>
|
||||
/// Revocation list entries
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public HostRevocationSignatureBlock[] SignatureBlocks;
|
||||
#else
|
||||
public HostRevocationSignatureBlock[]? SignatureBlocks;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,10 @@ namespace SabreTools.Models.AACS
|
||||
/// A list of 8-byte Host Revocation List Entry fields, the length of this
|
||||
/// list being equal to the number in the signature block.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public HostRevocationListEntry[] EntryFields;
|
||||
#else
|
||||
public HostRevocationListEntry[]? EntryFields;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,10 @@ namespace SabreTools.Models.AACS
|
||||
/// <summary>
|
||||
/// Records
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Record[] Records { get; set; }
|
||||
#else
|
||||
public Record[]? Records { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,10 @@ namespace SabreTools.Models.AACS
|
||||
/// record. This 16 bytes is the ciphertext value C in the media
|
||||
/// key calculation.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[][] MediaKeyData;
|
||||
#else
|
||||
public byte[][]? MediaKeyData;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,10 @@ namespace SabreTools.Models.AACS
|
||||
/// Subset-Difference record, with 0 being the start of the record.
|
||||
/// </summary>
|
||||
// <remarks>UInt24 not UInt32</remarks>
|
||||
#if NET48
|
||||
public uint[] Offsets;
|
||||
#else
|
||||
public uint[]? Offsets;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,10 @@ namespace SabreTools.Models.AACS
|
||||
/// where 0xXXXXXXXXXXXXXXXX is an arbitrary 8-byte value, and Km is
|
||||
/// the correct final Media Key value.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] CiphertextValue;
|
||||
#else
|
||||
public byte[]? CiphertextValue;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,20 @@ namespace SabreTools.Models.BDPlus
|
||||
/// <summary>
|
||||
/// "BDSVM_CC"
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 5 bytes of unknown data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Unknown1;
|
||||
#else
|
||||
public byte[]? Unknown1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Version year
|
||||
@@ -31,7 +39,11 @@ namespace SabreTools.Models.BDPlus
|
||||
/// <summary>
|
||||
/// 4 bytes of unknown data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Unknown2;
|
||||
#else
|
||||
public byte[]? Unknown2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Length
|
||||
@@ -41,6 +53,10 @@ namespace SabreTools.Models.BDPlus
|
||||
/// <summary>
|
||||
/// Length bytes of data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Data;
|
||||
#else
|
||||
public byte[]? Data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,19 @@
|
||||
/// <summary>
|
||||
/// Header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Header Header { get; set; }
|
||||
#else
|
||||
public Header? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Files
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public FileEntry[] Files { get; set; }
|
||||
#else
|
||||
public FileEntry[]? Files { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,11 @@
|
||||
/// <summary>
|
||||
/// Name
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Uncompressed size
|
||||
|
||||
@@ -12,7 +12,11 @@ namespace SabreTools.Models.BFPK
|
||||
/// <summary>
|
||||
/// "BFPK"
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Magic;
|
||||
#else
|
||||
public string? Magic;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Version
|
||||
|
||||
16
BSP/File.cs
16
BSP/File.cs
@@ -9,21 +9,37 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Header Header { get; set; }
|
||||
#else
|
||||
public Header? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Lumps
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Lump[] Lumps { get; set; }
|
||||
#else
|
||||
public Lump[]? Lumps { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Texture header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public TextureHeader TextureHeader { get; set; }
|
||||
#else
|
||||
public TextureHeader? TextureHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Textures
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Texture[] Textures { get; set; }
|
||||
#else
|
||||
public Texture[]? Textures { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,11 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Name
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Width
|
||||
@@ -21,12 +25,20 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Offsets
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] Offsets;
|
||||
#else
|
||||
public uint[]? Offsets;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Texture data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] TextureData;
|
||||
#else
|
||||
public byte[]? TextureData;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Palette size
|
||||
@@ -36,6 +48,10 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Palette data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] PaletteData;
|
||||
#else
|
||||
public byte[]? PaletteData;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,10 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Offsets
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] Offsets;
|
||||
#else
|
||||
public uint[]? Offsets;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,11 @@ namespace SabreTools.Models.CFB
|
||||
/// <summary>
|
||||
/// Compound file header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public FileHeader Header { get; set; }
|
||||
#else
|
||||
public FileHeader? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The FAT is the main allocator for space within a compound file.
|
||||
@@ -25,7 +29,11 @@ namespace SabreTools.Models.CFB
|
||||
///
|
||||
/// If Header Major Version is 4, there MUST be 1,024 fields specified to fill a 4,096-byte sector
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public SectorNumber[] FATSectorNumbers { get; set; }
|
||||
#else
|
||||
public SectorNumber[]? FATSectorNumbers { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The mini FAT is used to allocate space in the mini stream.
|
||||
@@ -38,7 +46,11 @@ namespace SabreTools.Models.CFB
|
||||
///
|
||||
/// If Header Major Version is 4, there MUST be 1,024 fields specified to fill a 4,096-byte sector
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public SectorNumber[] MiniFATSectorNumbers { get; set; }
|
||||
#else
|
||||
public SectorNumber[]? MiniFATSectorNumbers { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The DIFAT array is used to represent storage of the FAT sectors.
|
||||
@@ -55,7 +67,11 @@ namespace SabreTools.Models.CFB
|
||||
/// If Header Major Version is 4, there MUST be 1,023 fields specified
|
||||
/// to fill a 4,096-byte sector minus the "Next DIFAT Sector Location" field.
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public SectorNumber[] DIFATSectorNumbers { get; set; }
|
||||
#else
|
||||
public SectorNumber[]? DIFATSectorNumbers { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The directory entry array is an array of directory entries that
|
||||
@@ -87,6 +103,10 @@ namespace SabreTools.Models.CFB
|
||||
/// all zeroes. The Modified Time field in the root storage directory
|
||||
/// entry MAY be all zeroes.
|
||||
/// <remarks>
|
||||
#if NET48
|
||||
public DirectoryEntry[] DirectoryEntries { get; set; }
|
||||
#else
|
||||
public DirectoryEntry[]? DirectoryEntries { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,11 @@ namespace SabreTools.Models.CFB
|
||||
/// The following characters are illegal and MUST NOT be part of the
|
||||
/// name: '/', '\', ':', '!'.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// This field MUST be 0x00, 0x01, 0x02, or 0x05, depending on the
|
||||
|
||||
@@ -57,7 +57,11 @@ namespace SabreTools.Models.CFB
|
||||
/// <summary>
|
||||
/// This field MUST be set to all zeroes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// This integer field contains the count of the number of directory sectors
|
||||
@@ -122,6 +126,10 @@ namespace SabreTools.Models.CFB
|
||||
/// This array of 32-bit integer fields contains the first 109 FAT sector
|
||||
/// locations of the compound file
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public SectorNumber[] DIFAT;
|
||||
#else
|
||||
public SectorNumber[]? DIFAT;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,11 @@ namespace SabreTools.Models.CFB
|
||||
/// <summary>
|
||||
/// 4 bytes of reserved data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -50,7 +54,11 @@ namespace SabreTools.Models.CFB
|
||||
/// <summary>
|
||||
/// 16 bytes of unknown data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Unknown;
|
||||
#else
|
||||
public byte[]? Unknown;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -75,7 +83,11 @@ namespace SabreTools.Models.CFB
|
||||
/// Properties
|
||||
/// </summary>
|
||||
/// <remarks>Each Variant might be followed by an index and offset value</remarks>
|
||||
#if NET48
|
||||
public Variant[] Properties;
|
||||
#else
|
||||
public Variant[]? Properties;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -40,6 +40,10 @@ namespace SabreTools.Models.CFB
|
||||
/// MUST contain an instance of the type, according to the value
|
||||
/// in the <see cref="VariantType"/> field.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public object Union;
|
||||
#else
|
||||
public object? Union;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,11 @@ namespace SabreTools.Models.Compression.LZ
|
||||
/// <see href="https://github.com/wine-mirror/wine/blob/master/dlls/kernel32/lzexpand.c"/>
|
||||
public sealed class FileHeaader
|
||||
{
|
||||
#if NET48
|
||||
public string Magic;
|
||||
#else
|
||||
public string? Magic;
|
||||
#endif
|
||||
|
||||
public byte CompressionType;
|
||||
|
||||
|
||||
@@ -7,7 +7,11 @@ namespace SabreTools.Models.Compression.LZ
|
||||
/// <summary>
|
||||
/// Internal backing stream
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Stream Source { get; set; }
|
||||
#else
|
||||
public Stream? Source { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The last char of the filename for replacement
|
||||
@@ -32,7 +36,11 @@ namespace SabreTools.Models.Compression.LZ
|
||||
/// <summary>
|
||||
/// The rotating LZ table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Table { get; set; }
|
||||
#else
|
||||
public byte[]? Table { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// CURrent TABle ENTry
|
||||
@@ -57,7 +65,11 @@ namespace SabreTools.Models.Compression.LZ
|
||||
/// <summary>
|
||||
/// GETLEN bytes
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Window { get; set; }
|
||||
#else
|
||||
public byte[]? Window { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Current read
|
||||
|
||||
@@ -10,49 +10,81 @@ namespace SabreTools.Models.Compression.LZX
|
||||
/// <summary>
|
||||
/// Generic block header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public BlockHeader Header;
|
||||
#else
|
||||
public BlockHeader? Header;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Aligned offset tree
|
||||
/// </summary>
|
||||
/// <remarks>8 elements, 3 bits each</remarks>
|
||||
#if NET48
|
||||
public byte[] AlignedOffsetTree;
|
||||
#else
|
||||
public byte[]? AlignedOffsetTree;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Pretree for first 256 elements of main tree
|
||||
/// </summary>
|
||||
/// <remarks>20 elements, 4 bits each</remarks>
|
||||
#if NET48
|
||||
public byte[] PretreeFirst256;
|
||||
#else
|
||||
public byte[]? PretreeFirst256;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Path lengths of first 256 elements of main tree
|
||||
/// </summary>
|
||||
/// <remarks>Encoded using pretree</remarks>
|
||||
#if NET48
|
||||
public int[] PathLengthsFirst256;
|
||||
#else
|
||||
public int[]? PathLengthsFirst256;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Pretree for remainder of main tree
|
||||
/// </summary>
|
||||
/// <remarks>20 elements, 4 bits each</remarks>
|
||||
#if NET48
|
||||
public byte[] PretreeRemainder;
|
||||
#else
|
||||
public byte[]? PretreeRemainder;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Path lengths of remaining elements of main tree
|
||||
/// </summary>
|
||||
/// <remarks>Encoded using pretree</remarks>
|
||||
#if NET48
|
||||
public int[] PathLengthsRemainder;
|
||||
#else
|
||||
public int[]? PathLengthsRemainder;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Pretree for length tree
|
||||
/// </summary>
|
||||
/// <remarks>20 elements, 4 bits each</remarks>
|
||||
#if NET48
|
||||
public byte[] PretreeLengthTree;
|
||||
#else
|
||||
public byte[]? PretreeLengthTree;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Path lengths of elements in length tree
|
||||
/// </summary>
|
||||
/// <remarks>Encoded using pretree</remarks>
|
||||
#if NET48
|
||||
public int[] PathLengthsLengthTree;
|
||||
#else
|
||||
public int[]? PathLengthsLengthTree;
|
||||
#endif
|
||||
|
||||
// Entry Comments Size
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
@@ -19,7 +19,11 @@ namespace SabreTools.Models.Compression.LZX
|
||||
/// <summary>
|
||||
/// Generic block header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public BlockHeader Header;
|
||||
#else
|
||||
public BlockHeader? Header;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Padding to align following field on 16-bit boundary
|
||||
@@ -49,7 +53,11 @@ namespace SabreTools.Models.Compression.LZX
|
||||
/// Can use the direct memcpy function, as specified in [IEEE1003.1]
|
||||
/// </summary>
|
||||
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
|
||||
#if NET48
|
||||
public byte[] RawDataBytes;
|
||||
#else
|
||||
public byte[]? RawDataBytes;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Only if uncompressed size is odd
|
||||
|
||||
@@ -9,43 +9,71 @@ namespace SabreTools.Models.Compression.LZX
|
||||
/// <summary>
|
||||
/// Generic block header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public BlockHeader Header;
|
||||
#else
|
||||
public BlockHeader? Header;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Pretree for first 256 elements of main tree
|
||||
/// </summary>
|
||||
/// <remarks>20 elements, 4 bits each</remarks>
|
||||
#if NET48
|
||||
public byte[] PretreeFirst256;
|
||||
#else
|
||||
public byte[]? PretreeFirst256;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Path lengths of first 256 elements of main tree
|
||||
/// </summary>
|
||||
/// <remarks>Encoded using pretree</remarks>
|
||||
#if NET48
|
||||
public int[] PathLengthsFirst256;
|
||||
#else
|
||||
public int[]? PathLengthsFirst256;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Pretree for remainder of main tree
|
||||
/// </summary>
|
||||
/// <remarks>20 elements, 4 bits each</remarks>
|
||||
#if NET48
|
||||
public byte[] PretreeRemainder;
|
||||
#else
|
||||
public byte[]? PretreeRemainder;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Path lengths of remaining elements of main tree
|
||||
/// </summary>
|
||||
/// <remarks>Encoded using pretree</remarks>
|
||||
#if NET48
|
||||
public int[] PathLengthsRemainder;
|
||||
#else
|
||||
public int[]? PathLengthsRemainder;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Pretree for length tree
|
||||
/// </summary>
|
||||
/// <remarks>20 elements, 4 bits each</remarks>
|
||||
#if NET48
|
||||
public byte[] PretreeLengthTree;
|
||||
#else
|
||||
public byte[]? PretreeLengthTree;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Path lengths of elements in length tree
|
||||
/// </summary>
|
||||
/// <remarks>Encoded using pretree</remarks>
|
||||
#if NET48
|
||||
public int[] PathLengthsLengthTree;
|
||||
#else
|
||||
public int[]? PathLengthsLengthTree;
|
||||
#endif
|
||||
|
||||
// Entry Comments Size
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
@@ -9,11 +9,19 @@ namespace SabreTools.Models.Compression.MSZIP
|
||||
/// <summary>
|
||||
/// Huffman code lengths for the literal / length alphabet
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public int[] LiteralLengths;
|
||||
#else
|
||||
public int[]? LiteralLengths;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Huffman distance codes for the literal / length alphabet
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public int[] DistanceCodes;
|
||||
#else
|
||||
public int[]? DistanceCodes;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,11 @@ namespace SabreTools.Models.Compression.MSZIP
|
||||
/// <summary>
|
||||
/// Huffman code lengths for the literal / length alphabet
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] LiteralLengths
|
||||
#else
|
||||
public uint[]? LiteralLengths
|
||||
#endif
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -52,7 +56,11 @@ namespace SabreTools.Models.Compression.MSZIP
|
||||
/// <summary>
|
||||
/// Huffman distance codes for the literal / length alphabet
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] DistanceCodes
|
||||
#else
|
||||
public uint[]? DistanceCodes
|
||||
#endif
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -82,12 +90,20 @@ namespace SabreTools.Models.Compression.MSZIP
|
||||
/// <summary>
|
||||
/// Huffman code lengths for the literal / length alphabet
|
||||
/// </summary>
|
||||
#if NET48
|
||||
private uint[] _literalLengths = null;
|
||||
#else
|
||||
private uint[]? _literalLengths = null;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Huffman distance codes for the literal / length alphabet
|
||||
/// </summary>
|
||||
#if NET48
|
||||
private uint[] _distanceCodes = null;
|
||||
#else
|
||||
private uint[]? _distanceCodes = null;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -8,8 +8,16 @@ namespace SabreTools.Models.Compression.Quantum
|
||||
|
||||
public int Entries;
|
||||
|
||||
#if NET48
|
||||
public ModelSymbol[] Symbols;
|
||||
#else
|
||||
public ModelSymbol[]? Symbols;
|
||||
#endif
|
||||
|
||||
#if NET48
|
||||
public ushort[] LookupTable = new ushort[256];
|
||||
#else
|
||||
public ushort[]? LookupTable = new ushort[256];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last VTS_ATRT)
|
||||
@@ -21,11 +25,19 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Offset to VTS_ATRT n
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] Offsets;
|
||||
#else
|
||||
public uint[]? Offsets;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Entries
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public AudioSubPictureAttributesTableEntry[] Entries;
|
||||
#else
|
||||
public AudioSubPictureAttributesTableEntry[]? Entries;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,10 @@ namespace SabreTools.Models.DVD
|
||||
/// Copy of VTS attributes (offset 100 and on from the VTS IFO
|
||||
/// file, usually 0x300 bytes long)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] AttributesCopy;
|
||||
#else
|
||||
public byte[]? AttributesCopy;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last entry)
|
||||
@@ -21,6 +25,10 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// 12-byte entries
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CellAddressTableEntry[] Entries;
|
||||
#else
|
||||
public CellAddressTableEntry[]? Entries;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last PGC in last LU)
|
||||
@@ -22,11 +26,19 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Language Units
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public LanguageUnitTableEntry[] Entries;
|
||||
#else
|
||||
public LanguageUnitTableEntry[]? Entries;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Program Chains
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ProgramChainTable[] ProgramChains;
|
||||
#else
|
||||
public ProgramChainTable[]? ProgramChains;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -25,13 +25,21 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Entries
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ParentalManagementMasksTableEntry[] Entries;
|
||||
#else
|
||||
public ParentalManagementMasksTableEntry[]? Entries;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The PTL_MAIT contains the 16-bit masks for the VMG and
|
||||
/// all title sets for parental management level 8 followed
|
||||
/// by the masks for level 7, and so on to level 1.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[][] BitMasks;
|
||||
#else
|
||||
public byte[][]? BitMasks;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Offset to PTL_MAIT
|
||||
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last PGC in this LU)
|
||||
@@ -22,6 +26,10 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Program Chains
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ProgramChainTableEntry[] Entries;
|
||||
#else
|
||||
public ProgramChainTableEntry[]? Entries;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last entry)
|
||||
@@ -21,6 +25,10 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// 12-byte entries
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public TitlesTableEntry[] Entries;
|
||||
#else
|
||||
public TitlesTableEntry[]? Entries;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,10 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Starting sector within VOB of nth VOBU
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] StartingSectors;
|
||||
#else
|
||||
public uint[]? StartingSectors;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// "DVDVIDEO-VMG"
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Last sector of VMG set (last sector of BUP)
|
||||
@@ -55,7 +59,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Provider ID
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ProviderID;
|
||||
#else
|
||||
public byte[]? ProviderID;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// VMG POS
|
||||
@@ -115,7 +123,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Video attributes of VMGM_VOBS
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] VideoAttributes;
|
||||
#else
|
||||
public byte[]? VideoAttributes;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Number of audio streams in VMGM_VOBS
|
||||
@@ -125,12 +137,20 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Audio attributes of VMGM_VOBS
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[][] AudioAttributes;
|
||||
#else
|
||||
public byte[][]? AudioAttributes;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Unknown;
|
||||
#else
|
||||
public byte[]? Unknown;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Number of subpicture streams in VMGM_VOBS (0 or 1)
|
||||
@@ -140,11 +160,19 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Subpicture attributes of VMGM_VOBS
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] SubpictureAttributes;
|
||||
#else
|
||||
public byte[]? SubpictureAttributes;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// "DVDVIDEO-VTS"
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Last sector of title set (last sector of BUP)
|
||||
@@ -55,7 +59,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Provider ID
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ProviderID;
|
||||
#else
|
||||
public byte[]? ProviderID;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// VMG POS
|
||||
@@ -125,7 +133,11 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Video attributes of VTSM_VOBS
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] VideoAttributes;
|
||||
#else
|
||||
public byte[]? VideoAttributes;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Number of audio streams in VTSM_VOBS
|
||||
@@ -135,12 +147,20 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Audio attributes of VTSM_VOBS
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[][] AudioAttributes;
|
||||
#else
|
||||
public byte[][]? AudioAttributes;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Unknown;
|
||||
#else
|
||||
public byte[]? Unknown;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Number of subpicture streams in VTSM_VOBS (0 or 1)
|
||||
@@ -150,11 +170,19 @@ namespace SabreTools.Models.DVD
|
||||
/// <summary>
|
||||
/// Subpicture attributes of VTSM_VOBS
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] SubpictureAttributes;
|
||||
#else
|
||||
public byte[]? SubpictureAttributes;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.GCF
|
||||
/// <summary>
|
||||
/// Directory item name from the end of the directory items.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Size of the item. (If file, file size. If folder, num items.)
|
||||
|
||||
84
GCF/File.cs
84
GCF/File.cs
@@ -11,108 +11,192 @@ namespace SabreTools.Models.GCF
|
||||
/// <summary>
|
||||
/// Header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Header Header { get; set; }
|
||||
#else
|
||||
public Header? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Block entry header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public BlockEntryHeader BlockEntryHeader { get; set; }
|
||||
#else
|
||||
public BlockEntryHeader? BlockEntryHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Block entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public BlockEntry[] BlockEntries { get; set; }
|
||||
#else
|
||||
public BlockEntry[]? BlockEntries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Fragmentation map header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public FragmentationMapHeader FragmentationMapHeader { get; set; }
|
||||
#else
|
||||
public FragmentationMapHeader? FragmentationMapHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Fragmentation map data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public FragmentationMap[] FragmentationMaps { get; set; }
|
||||
#else
|
||||
public FragmentationMap[]? FragmentationMaps { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Block entry map header data
|
||||
/// </summary>
|
||||
/// <remarks>Part of version 5 but not version 6.</remarks>
|
||||
#if NET48
|
||||
public BlockEntryMapHeader BlockEntryMapHeader { get; set; }
|
||||
#else
|
||||
public BlockEntryMapHeader? BlockEntryMapHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Block entry map data
|
||||
/// </summary>
|
||||
/// <remarks>Part of version 5 but not version 6.</remarks>
|
||||
#if NET48
|
||||
public BlockEntryMap[] BlockEntryMaps { get; set; }
|
||||
#else
|
||||
public BlockEntryMap[]? BlockEntryMaps { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DirectoryHeader DirectoryHeader { get; set; }
|
||||
#else
|
||||
public DirectoryHeader? DirectoryHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DirectoryEntry[] DirectoryEntries { get; set; }
|
||||
#else
|
||||
public DirectoryEntry[]? DirectoryEntries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory names data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Dictionary<long, string> DirectoryNames { get; set; }
|
||||
#else
|
||||
public Dictionary<long, string?>? DirectoryNames { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory info 1 entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DirectoryInfo1Entry[] DirectoryInfo1Entries { get; set; }
|
||||
#else
|
||||
public DirectoryInfo1Entry[]? DirectoryInfo1Entries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory info 2 entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DirectoryInfo2Entry[] DirectoryInfo2Entries { get; set; }
|
||||
#else
|
||||
public DirectoryInfo2Entry[]? DirectoryInfo2Entries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory copy entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DirectoryCopyEntry[] DirectoryCopyEntries { get; set; }
|
||||
#else
|
||||
public DirectoryCopyEntry[]? DirectoryCopyEntries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory local entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DirectoryLocalEntry[] DirectoryLocalEntries { get; set; }
|
||||
#else
|
||||
public DirectoryLocalEntry[]? DirectoryLocalEntries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory map header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DirectoryMapHeader DirectoryMapHeader { get; set; }
|
||||
#else
|
||||
public DirectoryMapHeader? DirectoryMapHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory map entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DirectoryMapEntry[] DirectoryMapEntries { get; set; }
|
||||
#else
|
||||
public DirectoryMapEntry[]? DirectoryMapEntries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Checksum header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ChecksumHeader ChecksumHeader { get; set; }
|
||||
#else
|
||||
public ChecksumHeader? ChecksumHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Checksum map header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ChecksumMapHeader ChecksumMapHeader { get; set; }
|
||||
#else
|
||||
public ChecksumMapHeader? ChecksumMapHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Checksum map entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ChecksumMapEntry[] ChecksumMapEntries { get; set; }
|
||||
#else
|
||||
public ChecksumMapEntry[]? ChecksumMapEntries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Checksum entries data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ChecksumEntry[] ChecksumEntries { get; set; }
|
||||
#else
|
||||
public ChecksumEntry[]? ChecksumEntries { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Data block header data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DataBlockHeader DataBlockHeader { get; set; }
|
||||
#else
|
||||
public DataBlockHeader? DataBlockHeader { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,17 +11,29 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Common header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CommonHeader CommonHeader { get; set; }
|
||||
#else
|
||||
public CommonHeader? CommonHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Volume header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public VolumeHeader VolumeHeader { get; set; }
|
||||
#else
|
||||
public VolumeHeader? VolumeHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Descriptor
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Descriptor Descriptor { get; set; }
|
||||
#else
|
||||
public Descriptor? Descriptor { get; set; }
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -30,17 +42,29 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Offsets to all file descriptors
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] FileDescriptorOffsets { get; set; }
|
||||
#else
|
||||
public uint[]? FileDescriptorOffsets { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory names
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string[] DirectoryNames { get; set; }
|
||||
#else
|
||||
public string[]? DirectoryNames { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Standard file descriptors
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public FileDescriptor[] FileDescriptors { get; set; }
|
||||
#else
|
||||
public FileDescriptor[]? FileDescriptors { get; set; }
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -49,12 +73,20 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// File group offset to offset list mapping
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Dictionary<long, OffsetList> FileGroupOffsets { get; set; }
|
||||
#else
|
||||
public Dictionary<long, OffsetList?>? FileGroupOffsets { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// File groups
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public FileGroup[] FileGroups { get; set; }
|
||||
#else
|
||||
public FileGroup[]? FileGroups { get; set; }
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -63,12 +95,20 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Component offset to offset list mapping
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Dictionary<long, OffsetList> ComponentOffsets { get; set; }
|
||||
#else
|
||||
public Dictionary<long, OffsetList?>? ComponentOffsets { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Components
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Component[] Components { get; set; }
|
||||
#else
|
||||
public Component[]? Components { get; set; }
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// "ISc("
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Encoded version
|
||||
|
||||
@@ -13,7 +13,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Component identifier
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Identifier;
|
||||
#else
|
||||
public string? Identifier;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Offset to the component descriptor
|
||||
@@ -28,12 +32,20 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Display name
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string DisplayName;
|
||||
#else
|
||||
public string? DisplayName;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved0;
|
||||
#else
|
||||
public byte[]? Reserved0;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved offset
|
||||
@@ -58,7 +70,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Component name
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved offset
|
||||
@@ -78,7 +94,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Offset to the component CLSID
|
||||
@@ -93,12 +113,20 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved3;
|
||||
#else
|
||||
public byte[]? Reserved3;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Number of depends(?)
|
||||
@@ -123,7 +151,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// File group names
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string[] FileGroupNames;
|
||||
#else
|
||||
public string[]? FileGroupNames;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Number of X3(?)
|
||||
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved0;
|
||||
#else
|
||||
public byte[]? Reserved0;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Offset to the component list
|
||||
@@ -26,7 +30,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Size of the file table
|
||||
@@ -46,17 +54,29 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved3;
|
||||
#else
|
||||
public byte[]? Reserved3;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved4;
|
||||
#else
|
||||
public byte[]? Reserved4;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Number of files
|
||||
@@ -81,22 +101,38 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved5;
|
||||
#else
|
||||
public byte[]? Reserved5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved6;
|
||||
#else
|
||||
public byte[]? Reserved6;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Offsets to the file groups
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] FileGroupOffsets;
|
||||
#else
|
||||
public uint[]? FileGroupOffsets;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Offsets to the components
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] ComponentOffsets;
|
||||
#else
|
||||
public uint[]? ComponentOffsets;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Offset to the setup types
|
||||
@@ -111,11 +147,19 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved7;
|
||||
#else
|
||||
public byte[]? Reserved7;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved8;
|
||||
#else
|
||||
public byte[]? Reserved8;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// File descriptor name
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Directory index
|
||||
@@ -41,7 +45,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// MD5 of the entry data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] MD5;
|
||||
#else
|
||||
public byte[]? MD5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Volume number
|
||||
|
||||
@@ -11,7 +11,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// File group name
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Size of the expanded data
|
||||
@@ -21,7 +25,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved0;
|
||||
#else
|
||||
public byte[]? Reserved0;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Size of the compressed data
|
||||
@@ -31,12 +39,20 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Attribute(?)
|
||||
@@ -101,26 +117,46 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved3;
|
||||
#else
|
||||
public byte[]? Reserved3;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved4;
|
||||
#else
|
||||
public byte[]? Reserved4;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved5;
|
||||
#else
|
||||
public byte[]? Reserved5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved6;
|
||||
#else
|
||||
public byte[]? Reserved6;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved7;
|
||||
#else
|
||||
public byte[]? Reserved7;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,11 @@ namespace SabreTools.Models.InstallShieldCabinet
|
||||
{
|
||||
public uint NameOffset;
|
||||
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
public uint DescriptorOffset;
|
||||
|
||||
|
||||
@@ -19,7 +19,11 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// <summary>
|
||||
/// The signature consists of a string of three (3) ASCII characters: "NB0"
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// This defines the type of debugger data that exists in the remainder of the
|
||||
@@ -33,6 +37,10 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// the responsibility of the linker or debugging tools to follow the convention
|
||||
/// for the type field that is defined here.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] DebuggerData;
|
||||
#else
|
||||
public byte[]? DebuggerData;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,10 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// <summary>
|
||||
/// Table entries in the bundle
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public EntryTableEntry[] TableEntries;
|
||||
#else
|
||||
public EntryTableEntry[]? TableEntries;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,85 +13,149 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// <summary>
|
||||
/// MS-DOS executable stub
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public MSDOS.Executable Stub { get; set; }
|
||||
#else
|
||||
public MSDOS.Executable? Stub { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Information block
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public InformationBlock InformationBlock { get; set; }
|
||||
#else
|
||||
public InformationBlock? InformationBlock { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Object table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ObjectTableEntry[] ObjectTable { get; set; }
|
||||
#else
|
||||
public ObjectTableEntry[]? ObjectTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Object page map
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ObjectPageMapEntry[] ObjectPageMap { get; set; }
|
||||
#else
|
||||
public ObjectPageMapEntry[]? ObjectPageMap { get; set; }
|
||||
#endif
|
||||
|
||||
// TODO: Object iterate data map table (Undefined)
|
||||
|
||||
/// <summary>
|
||||
/// Resource table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ResourceTableEntry[] ResourceTable { get; set; }
|
||||
#else
|
||||
public ResourceTableEntry[]? ResourceTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Resident Name table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ResidentNamesTableEntry[] ResidentNamesTable { get; set; }
|
||||
#else
|
||||
public ResidentNamesTableEntry[]? ResidentNamesTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Entry table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public EntryTableBundle[] EntryTable { get; set; }
|
||||
#else
|
||||
public EntryTableBundle[]? EntryTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Module format directives table (optional)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ModuleFormatDirectivesTableEntry[] ModuleFormatDirectivesTable { get; set; }
|
||||
#else
|
||||
public ModuleFormatDirectivesTableEntry[]? ModuleFormatDirectivesTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Verify record directive table (optional)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public VerifyRecordDirectiveTableEntry[] VerifyRecordDirectiveTable { get; set; }
|
||||
#else
|
||||
public VerifyRecordDirectiveTableEntry[]? VerifyRecordDirectiveTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Fix-up page table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public FixupPageTableEntry[] FixupPageTable { get; set; }
|
||||
#else
|
||||
public FixupPageTableEntry[]? FixupPageTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Fix-up record table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public FixupRecordTableEntry[] FixupRecordTable { get; set; }
|
||||
#else
|
||||
public FixupRecordTableEntry[]? FixupRecordTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Import module name table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ImportModuleNameTableEntry[] ImportModuleNameTable { get; set; }
|
||||
#else
|
||||
public ImportModuleNameTableEntry[]? ImportModuleNameTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Import procedure name table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ImportModuleProcedureNameTableEntry[] ImportModuleProcedureNameTable { get; set; }
|
||||
#else
|
||||
public ImportModuleProcedureNameTableEntry[]? ImportModuleProcedureNameTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Per-Page checksum table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public PerPageChecksumTableEntry[] PerPageChecksumTable { get; set; }
|
||||
#else
|
||||
public PerPageChecksumTableEntry[]? PerPageChecksumTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Non-Resident Name table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public NonResidentNamesTableEntry[] NonResidentNamesTable { get; set; }
|
||||
#else
|
||||
public NonResidentNamesTableEntry[]? NonResidentNamesTable { get; set; }
|
||||
#endif
|
||||
|
||||
// TODO: Non-resident directives data (Undefined)
|
||||
|
||||
/// <summary>
|
||||
/// Debug information
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DebugInformation DebugInformation { get; set; }
|
||||
#else
|
||||
public DebugInformation? DebugInformation { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,7 +356,11 @@
|
||||
/// field. The source offsets are relative to the beginning of the page where the
|
||||
/// fixups are to be made.
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public ushort[] SourceOffsetList;
|
||||
#else
|
||||
public ushort[]? SourceOffsetList;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -36,6 +36,10 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// This is a variable length string with it's length defined in bytes by
|
||||
/// the LEN field. The string is case sensitive and is not null terminated.
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// This is a variable length string with it's length defined in bytes by
|
||||
/// the LEN field. The string is case sensitive and is not null terminated.
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,11 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// The signature word is used by the loader to identify the EXE
|
||||
/// file as a valid 32-bit Linear Executable Module Format.
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Byte Ordering.
|
||||
|
||||
@@ -51,7 +51,11 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// This is a variable length string with it's length defined in bytes by the LEN field.
|
||||
/// The string is case case sensitive and is not null terminated.
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Ordinal number.
|
||||
|
||||
@@ -51,7 +51,11 @@ namespace SabreTools.Models.LinearExecutable
|
||||
/// This is a variable length string with it's length defined in bytes by the LEN field.
|
||||
/// The string is case case sensitive and is not null terminated.
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Ordinal number.
|
||||
|
||||
@@ -14,7 +14,11 @@ namespace SabreTools.Models.MSDOS
|
||||
/// <summary>
|
||||
/// MS-DOS executable header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ExecutableHeader Header { get; set; }
|
||||
#else
|
||||
public ExecutableHeader? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// After loading the executable into memory, the program loader goes through
|
||||
@@ -24,6 +28,10 @@ namespace SabreTools.Models.MSDOS
|
||||
/// make the loader add start segment address to the value at offset
|
||||
/// 1*0x10+0x1A=0x2A within the program data.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public RelocationEntry[] RelocationTable { get; set; }
|
||||
#else
|
||||
public RelocationEntry[]? RelocationTable { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,11 @@ namespace SabreTools.Models.MSDOS
|
||||
/// 0x5A4D (ASCII for 'M' and 'Z')
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||
#if NET48
|
||||
public string Magic;
|
||||
#else
|
||||
public string? Magic;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes in the last page.
|
||||
@@ -102,7 +106,11 @@ namespace SabreTools.Models.MSDOS
|
||||
/// Reserved words
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
|
||||
#if NET48
|
||||
public ushort[] Reserved1;
|
||||
#else
|
||||
public ushort[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Defined by name but no other information is given; typically zeroes
|
||||
@@ -118,7 +126,11 @@ namespace SabreTools.Models.MSDOS
|
||||
/// Reserved words
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
|
||||
#if NET48
|
||||
public ushort[] Reserved2;
|
||||
#else
|
||||
public ushort[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Starting address of the PE header
|
||||
|
||||
@@ -37,7 +37,11 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// and the <see cref="CFHEADER.DataReservedSize"/> field value is non-zero, this field contains per-datablock application information.
|
||||
/// This field is defined by the application, and it is used for application-defined purposes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ReservedData;
|
||||
#else
|
||||
public byte[]? ReservedData;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The compressed data bytes, compressed by using the <see cref="CFFOLDER.CompressionType"/>
|
||||
@@ -47,6 +51,10 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// uncompressed data bytes. In this case, the <see cref="CompressedSize"/> and <see cref="UncompressedSize"/> field values will be equal unless
|
||||
/// this CFDATA structure entry crosses a cabinet file boundary.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] CompressedData;
|
||||
#else
|
||||
public byte[]? CompressedData;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,10 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// CFFILE.szName field, but the _A_NAME_IS_UTF attribute is not set, the characters SHOULD be
|
||||
/// interpreted according to the current location.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,11 +50,19 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// and the cbCFFolder field is non-zero, then this field contains per-folder application information.
|
||||
/// This field is defined by the application, and is used for application-defined purposes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ReservedData;
|
||||
#else
|
||||
public byte[]? ReservedData;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Data blocks associated with this folder
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CFDATA[] DataBlocks;
|
||||
#else
|
||||
public CFDATA[]? DataBlocks;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,11 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// Contains the characters "M", "S", "C", and "F" (bytes 0x4D, 0x53, 0x43,
|
||||
/// 0x46). This field is used to ensure that the file is a cabinet (.cab) file.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved field; MUST be set to 0 (zero).
|
||||
@@ -110,7 +114,11 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// cbCFHeader field is non-zero, this field contains per-cabinet-file application information. This field
|
||||
/// is defined by the application, and is used for application-defined purposes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ReservedData;
|
||||
#else
|
||||
public byte[]? ReservedData;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// If the flags.cfhdrPREV_CABINET field is not set, this
|
||||
@@ -122,7 +130,11 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// reported to begin in the "previous cabinet," the szCabinetPrev field would indicate the name of the
|
||||
/// cabinet to examine.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string CabinetPrev;
|
||||
#else
|
||||
public string? CabinetPrev;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// If the flags.cfhdrPREV_CABINET field is not set, then this
|
||||
@@ -131,7 +143,11 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// This string can be used when prompting the user to insert a disk. The string can contain up to 255
|
||||
/// bytes, plus the null byte.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string DiskPrev;
|
||||
#else
|
||||
public string? DiskPrev;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// If the flags.cfhdrNEXT_CABINET field is not set, this
|
||||
@@ -139,7 +155,11 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// cabinet file in a set. The string can contain up to 255 bytes, plus the null byte. Files that extend
|
||||
/// beyond the end of the current cabinet file are continued in the named cabinet file.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string CabinetNext;
|
||||
#else
|
||||
public string? CabinetNext;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// If the flags.cfhdrNEXT_CABINET field is not set, this field is
|
||||
@@ -148,6 +168,10 @@ namespace SabreTools.Models.MicrosoftCabinet
|
||||
/// string can contain up to 255 bytes, plus the null byte. This string can be used when prompting the
|
||||
/// user to insert a disk.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string DiskNext;
|
||||
#else
|
||||
public string? DiskNext;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,16 +12,28 @@
|
||||
/// <summary>
|
||||
/// Cabinet header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CFHEADER Header { get; set; }
|
||||
#else
|
||||
public CFHEADER? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// One or more CFFOLDER entries
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CFFOLDER[] Folders { get; set; }
|
||||
#else
|
||||
public CFFOLDER[]? Folders { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// A series of one or more cabinet file (CFFILE) entries
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CFFILE[] Files { get; set; }
|
||||
#else
|
||||
public CFFILE[]? Files { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,12 +14,20 @@
|
||||
/// <summary>
|
||||
/// MPQ User Data (optional)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public UserData UserData { get; set; }
|
||||
#else
|
||||
public UserData? UserData { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// MPQ Header (required)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ArchiveHeader ArchiveHeader { get; set; }
|
||||
#else
|
||||
public ArchiveHeader? ArchiveHeader { get; set; }
|
||||
#endif
|
||||
|
||||
// TODO: Files (optional)
|
||||
// TODO: Special files (optional)
|
||||
@@ -27,22 +35,38 @@
|
||||
/// <summary>
|
||||
/// HET Table (optional)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public HetTable HetTable { get; set; }
|
||||
#else
|
||||
public HetTable? HetTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// BET Table (optional)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public BetTable BetTable { get; set; }
|
||||
#else
|
||||
public BetTable? BetTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Hash Table (optional)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public HashEntry[] HashTable { get; set; }
|
||||
#else
|
||||
public HashEntry[]? HashTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Block Table (optional)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public BlockEntry[] BlockTable { get; set; }
|
||||
#else
|
||||
public BlockEntry[]? BlockTable { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Hi-Block Table (optional)
|
||||
@@ -54,7 +78,11 @@
|
||||
/// Hi-block table is plain array of 16-bit values. This table is
|
||||
/// not encrypted.
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public short[] HiBlockTable { get; set; }
|
||||
#else
|
||||
public short[]? HiBlockTable { get; set; }
|
||||
#endif
|
||||
|
||||
// TODO: Strong digital signature
|
||||
}
|
||||
|
||||
@@ -14,7 +14,11 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// <summary>
|
||||
/// The MPQ archive signature
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Size of the archive header
|
||||
@@ -143,37 +147,61 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// MD5 of the block table before decryption
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
#if NET48
|
||||
public byte[] BlockTableMD5;
|
||||
#else
|
||||
public byte[]? BlockTableMD5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// MD5 of the hash table before decryption
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
#if NET48
|
||||
public byte[] HashTableMD5;
|
||||
#else
|
||||
public byte[]? HashTableMD5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// MD5 of the hi-block table
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
#if NET48
|
||||
public byte[] HiBlockTableMD5;
|
||||
#else
|
||||
public byte[]? HiBlockTableMD5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// MD5 of the BET table before decryption
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
#if NET48
|
||||
public byte[] BetTableMD5;
|
||||
#else
|
||||
public byte[]? BetTableMD5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// MD5 of the HET table before decryption
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
#if NET48
|
||||
public byte[] HetTableMD5;
|
||||
#else
|
||||
public byte[]? HetTableMD5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// MD5 of the MPQ header from signature to (including) HetTableMD5
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
#if NET48
|
||||
public byte[] MpqHeaderMD5;
|
||||
#else
|
||||
public byte[]? MpqHeaderMD5;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -17,7 +17,11 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// <summary>
|
||||
/// 'BET\x1A'
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Version. Seems to be always 1
|
||||
@@ -130,7 +134,11 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// Followed by array of file flags. Each entry is 32-bit size and its meaning is the same like
|
||||
/// </summary>
|
||||
/// <remarks>Size from <see cref="FlagCount"/></remarks>
|
||||
#if NET48
|
||||
public uint[] FlagsArray;
|
||||
#else
|
||||
public uint[]? FlagsArray;
|
||||
#endif
|
||||
|
||||
// File table. Size of each entry is taken from dwTableEntrySize.
|
||||
// Size of the table is (dwTableEntrySize * dwMaxFileCount), round up to 8.
|
||||
|
||||
@@ -18,7 +18,11 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// <summary>
|
||||
/// 'HET\x1A'
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Version. Seems to be always 1
|
||||
@@ -76,12 +80,20 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// HET hash table. Each entry is 8 bits.
|
||||
/// </summary>
|
||||
/// <remarks>Size is derived from HashTableSize</remarks>
|
||||
#if NET48
|
||||
public byte[] HashTable;
|
||||
#else
|
||||
public byte[]? HashTable;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Array of file indexes. Bit size of each entry is taken from dwTotalIndexSize.
|
||||
/// Table size is taken from dwHashTableSize.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[][] FileIndexes;
|
||||
#else
|
||||
public byte[][]? FileIndexes;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,12 +49,20 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// <summary>
|
||||
/// MD5 of the original (unpached) file
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Md5BeforePatch { get; private set; } = new byte[0x10];
|
||||
#else
|
||||
public byte[]? Md5BeforePatch { get; private set; } = new byte[0x10];
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// MD5 of the patched file
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Md5AfterPatch { get; private set; } = new byte[0x10];
|
||||
#else
|
||||
public byte[]? Md5AfterPatch { get; private set; } = new byte[0x10];
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -111,7 +119,11 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// <summary>
|
||||
/// File data are simply replaced by the data in the patch.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] PatchDataCopy { get; private set; }
|
||||
#else
|
||||
public byte[]? PatchDataCopy { get; private set; }
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -28,11 +28,19 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// MD5 of the entire patch file after decompression
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
#if NET48
|
||||
public byte[] MD5;
|
||||
#else
|
||||
public byte[]? MD5;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The sector offset table (variable length)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public uint[] SectorOffsetTable;
|
||||
#else
|
||||
public uint[]? SectorOffsetTable;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,11 @@ namespace SabreTools.Models.MoPaQ
|
||||
/// The user data signature
|
||||
/// </summary>
|
||||
/// <see cref="SignatureValue"/>
|
||||
#if NET48
|
||||
public string Signature;
|
||||
#else
|
||||
public string? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Maximum size of the user data
|
||||
|
||||
@@ -34,11 +34,19 @@
|
||||
/// 13 Process has access to CPU core 2 (New3DS only)
|
||||
/// </summary>
|
||||
/// TODO: Make enum for flag values
|
||||
#if NET48
|
||||
public uint[] Descriptors;
|
||||
#else
|
||||
public uint[]? Descriptors;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,27 +36,47 @@
|
||||
/// <summary>
|
||||
/// Resource limit descriptors. The first byte here controls the maximum allowed CpuTime.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ushort[] ResourceLimitDescriptors;
|
||||
#else
|
||||
public ushort[]? ResourceLimitDescriptors;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Storage info
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public StorageInfo StorageInfo;
|
||||
#else
|
||||
public StorageInfo? StorageInfo;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Service access control
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ulong[] ServiceAccessControl;
|
||||
#else
|
||||
public ulong[]? ServiceAccessControl;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Extended service access control, support for this was implemented with 9.3.0-X.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ulong[] ExtendedServiceAccessControl;
|
||||
#else
|
||||
public ulong[]? ExtendedServiceAccessControl;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Resource limit category. (0 = APPLICATION, 1 = SYS_APPLET, 2 = LIB_APPLET, 3 = OTHER (sysmodules running under the BASE memregion))
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
/// <summary>
|
||||
/// Descriptors
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Descriptors;
|
||||
#else
|
||||
public byte[]? Descriptors;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// ARM9 Descriptor Version. Originally this value had to be ≥ 2.
|
||||
|
||||
@@ -6,16 +6,28 @@
|
||||
/// <summary>
|
||||
/// ARM11 local system capabilities
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ARM11LocalSystemCapabilities ARM11LocalSystemCapabilities;
|
||||
#else
|
||||
public ARM11LocalSystemCapabilities? ARM11LocalSystemCapabilities;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// ARM11 kernel capabilities
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ARM11KernelCapabilities ARM11KernelCapabilities;
|
||||
#else
|
||||
public ARM11KernelCapabilities? ARM11KernelCapabilities;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// ARM9 access control
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ARM9AccessControl ARM9AccessControl;
|
||||
#else
|
||||
public ARM9AccessControl? ARM9AccessControl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
28
N3DS/CIA.cs
28
N3DS/CIA.cs
@@ -17,7 +17,11 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// CIA header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CIAHeader Header { get; set; }
|
||||
#else
|
||||
public CIAHeader? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Certificate chain
|
||||
@@ -25,32 +29,56 @@ namespace SabreTools.Models.N3DS
|
||||
/// <remarks>
|
||||
/// https://www.3dbrew.org/wiki/CIA#Certificate_Chain
|
||||
/// </remarks>
|
||||
#if NET48
|
||||
public Certificate[] CertificateChain { get; set; }
|
||||
#else
|
||||
public Certificate[]? CertificateChain { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Ticket
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public Ticket Ticket { get; set; }
|
||||
#else
|
||||
public Ticket? Ticket { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// TMD file data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public TitleMetadata TMDFileData { get; set; }
|
||||
#else
|
||||
public TitleMetadata? TMDFileData { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Content file data
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public NCCHHeader[] Partitions { get; set; }
|
||||
#else
|
||||
public NCCHHeader[]? Partitions { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Content file data
|
||||
/// </summary>
|
||||
/// TODO: Parse the content file data
|
||||
#if NET48
|
||||
public byte[] ContentFileData { get; set; }
|
||||
#else
|
||||
public byte[]? ContentFileData { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Meta file data (Not a necessary component)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public MetaData MetaData { get; set; }
|
||||
#else
|
||||
public MetaData? MetaData { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,10 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Content Index
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ContentIndex;
|
||||
#else
|
||||
public byte[]? ContentIndex;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,11 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Filled size of cartridge
|
||||
@@ -26,7 +30,11 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Title version
|
||||
@@ -41,12 +49,20 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved3;
|
||||
#else
|
||||
public byte[]? Reserved3;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Title ID of CVer in included update partition
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] CVerTitleID;
|
||||
#else
|
||||
public byte[]? CVerTitleID;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Version number of CVer in included update partition
|
||||
@@ -56,6 +72,10 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved4;
|
||||
#else
|
||||
public byte[]? Reserved4;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
28
N3DS/Cart.cs
28
N3DS/Cart.cs
@@ -8,36 +8,64 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// 3DS cart header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public NCSDHeader Header { get; set; }
|
||||
#else
|
||||
public NCSDHeader? Header { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 3DS card info header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CardInfoHeader CardInfoHeader { get; set; }
|
||||
#else
|
||||
public CardInfoHeader? CardInfoHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 3DS development card info header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public DevelopmentCardInfoHeader DevelopmentCardInfoHeader { get; set; }
|
||||
#else
|
||||
public DevelopmentCardInfoHeader? DevelopmentCardInfoHeader { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// NCCH partitions
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public NCCHHeader[] Partitions { get; set; }
|
||||
#else
|
||||
public NCCHHeader[]? Partitions { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// NCCH extended headers
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public NCCHExtendedHeader[] ExtendedHeaders { get; set; }
|
||||
#else
|
||||
public NCCHExtendedHeader[]? ExtendedHeaders { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// ExeFS headers associated with each partition
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ExeFSHeader[] ExeFSHeaders { get; set; }
|
||||
#else
|
||||
public ExeFSHeader[]? ExeFSHeaders { get; set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// RomFS headers associated with each partition
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public RomFSHeader[] RomFSHeaders { get; set; }
|
||||
#else
|
||||
public RomFSHeader[]? RomFSHeaders { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -27,17 +27,29 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Signature
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Signature;
|
||||
#else
|
||||
public byte[]? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Padding to align next data to 0x40 bytes
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Padding;
|
||||
#else
|
||||
public byte[]? Padding;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Issuer
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Issuer;
|
||||
#else
|
||||
public string? Issuer;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Key Type
|
||||
@@ -47,7 +59,11 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Name
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string Name;
|
||||
#else
|
||||
public string? Name;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Expiration time as UNIX Timestamp, used at least for CTCert
|
||||
@@ -60,7 +76,11 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Modulus
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] RSAModulus;
|
||||
#else
|
||||
public byte[]? RSAModulus;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Public Exponent
|
||||
@@ -70,7 +90,11 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Padding
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] RSAPadding;
|
||||
#else
|
||||
public byte[]? RSAPadding;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -80,12 +104,20 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Public Key
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ECCPublicKey;
|
||||
#else
|
||||
public byte[]? ECCPublicKey;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Padding
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ECCPadding;
|
||||
#else
|
||||
public byte[]? ECCPadding;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -33,6 +33,10 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// SHA-256 hash
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] SHA256Hash;
|
||||
#else
|
||||
public byte[]? SHA256Hash;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,10 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// SHA-256 hash of the next k content records that have not been hashed yet
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] UnhashedContentRecordsSHA256Hash;
|
||||
#else
|
||||
public byte[]? UnhashedContentRecordsSHA256Hash;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6,26 +6,46 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// InitialData
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public InitialData InitialData;
|
||||
#else
|
||||
public InitialData? InitialData;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// CardDeviceReserved1
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] CardDeviceReserved1;
|
||||
#else
|
||||
public byte[]? CardDeviceReserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// TitleKey
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] TitleKey;
|
||||
#else
|
||||
public byte[]? TitleKey;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// CardDeviceReserved2
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] CardDeviceReserved2;
|
||||
#else
|
||||
public byte[]? CardDeviceReserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// TestData
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public TestData TestData;
|
||||
#else
|
||||
public TestData? TestData;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
/// <summary>
|
||||
/// File name
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string FileName;
|
||||
#else
|
||||
public string? FileName;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// File offset
|
||||
@@ -28,6 +32,10 @@
|
||||
/// <summary>
|
||||
/// SHA256 hash calculated over the entire file contents
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] FileHash;
|
||||
#else
|
||||
public byte[]? FileHash;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,17 +16,29 @@
|
||||
/// <summary>
|
||||
/// File headers (10 headers maximum, 16 bytes each)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ExeFSFileHeader[] FileHeaders;
|
||||
#else
|
||||
public ExeFSFileHeader[]? FileHeaders;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// File hashes (10 hashes maximum, 32 bytes each, one for each header)
|
||||
/// </summary>
|
||||
/// <remarks>SHA-256 hashes</remarks>
|
||||
#if NET48
|
||||
public byte[][] FileHashes;
|
||||
#else
|
||||
public byte[][]? FileHashes;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,31 +6,55 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Card seed keyY (first u64 is Media ID (same as first NCCH partitionId))
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] CardSeedKeyY;
|
||||
#else
|
||||
public byte[]? CardSeedKeyY;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Encrypted card seed (AES-CCM, keyslot 0x3B for retail cards, see CTRCARD_SECSEED)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] EncryptedCardSeed;
|
||||
#else
|
||||
public byte[]? EncryptedCardSeed;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Card seed AES-MAC
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] CardSeedAESMAC;
|
||||
#else
|
||||
public byte[]? CardSeedAESMAC;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Card seed nonce
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] CardSeedNonce;
|
||||
#else
|
||||
public byte[]? CardSeedNonce;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved3
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Copy of first NCCH header (excluding RSA signature)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public NCCHHeader BackupHeader;
|
||||
#else
|
||||
public NCCHHeader? BackupHeader;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,20 @@ namespace SabreTools.Models.N3DS
|
||||
/// Title ID dependency list - Taken from the application's ExHeader
|
||||
/// </summary>
|
||||
/// TODO: Determine numeric format of each entry
|
||||
#if NET48
|
||||
public byte[] TitleIDDependencyList;
|
||||
#else
|
||||
public byte[]? TitleIDDependencyList;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Core Version
|
||||
@@ -22,11 +30,19 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Icon Data(.ICN) - Taken from the application's ExeFS
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] IconData;
|
||||
#else
|
||||
public byte[]? IconData;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,26 +11,46 @@
|
||||
/// <summary>
|
||||
/// SCI
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public SystemControlInfo SCI;
|
||||
#else
|
||||
public SystemControlInfo? SCI;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// ACI
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public AccessControlInfo ACI;
|
||||
#else
|
||||
public AccessControlInfo? ACI;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// AccessDesc signature (RSA-2048-SHA256)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] AccessDescSignature;
|
||||
#else
|
||||
public byte[]? AccessDescSignature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// NCCH HDR RSA-2048 public key
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] NCCHHDRPublicKey;
|
||||
#else
|
||||
public byte[]? NCCHHDRPublicKey;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// ACI (for limitation of first ACI)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public AccessControlInfo ACIForLimitations;
|
||||
#else
|
||||
public AccessControlInfo? ACIForLimitations;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,12 +6,20 @@
|
||||
/// <summary>
|
||||
/// RSA-2048 signature of the NCCH header, using SHA-256.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] RSA2048Signature;
|
||||
#else
|
||||
public byte[]? RSA2048Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Magic ID, always 'NCCH'
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string MagicID;
|
||||
#else
|
||||
public string? MagicID;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Content size, in media units (1 media unit = 0x200 bytes)
|
||||
@@ -44,27 +52,47 @@
|
||||
/// <summary>
|
||||
/// Program ID
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ProgramId;
|
||||
#else
|
||||
public byte[]? ProgramId;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Logo Region SHA-256 hash. (For applications built with SDK 5+) (Supported from firmware: 5.0.0-11)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] LogoRegionHash;
|
||||
#else
|
||||
public byte[]? LogoRegionHash;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Product code
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string ProductCode;
|
||||
#else
|
||||
public string? ProductCode;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Extended header SHA-256 hash (SHA256 of 2x Alignment Size, beginning at 0x0 of ExHeader)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ExtendedHeaderHash;
|
||||
#else
|
||||
public byte[]? ExtendedHeaderHash;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Extended header size, in bytes
|
||||
@@ -74,12 +102,20 @@
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Flags
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public NCCHHeaderFlags Flags;
|
||||
#else
|
||||
public NCCHHeaderFlags? Flags;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Plain region offset, in media units
|
||||
@@ -119,7 +155,11 @@
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved3;
|
||||
#else
|
||||
public byte[]? Reserved3;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// RomFS offset, in media units
|
||||
@@ -139,18 +179,30 @@
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved4;
|
||||
#else
|
||||
public byte[]? Reserved4;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// ExeFS superblock SHA-256 hash - (SHA-256 hash, starting at 0x0 of the ExeFS over the number of
|
||||
/// media units specified in the ExeFS hash region size)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ExeFSSuperblockHash;
|
||||
#else
|
||||
public byte[]? ExeFSSuperblockHash;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// RomFS superblock SHA-256 hash - (SHA-256 hash, starting at 0x0 of the RomFS over the number
|
||||
/// of media units specified in the RomFS hash region size)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] RomFSSuperblockHash;
|
||||
#else
|
||||
public byte[]? RomFSSuperblockHash;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,12 +16,20 @@
|
||||
/// <summary>
|
||||
/// RSA-2048 SHA-256 signature of the NCSD header
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] RSA2048Signature;
|
||||
#else
|
||||
public byte[]? RSA2048Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Magic Number 'NCSD'
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string MagicNumber;
|
||||
#else
|
||||
public string? MagicNumber;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Size of the NCSD image, in media units (1 media unit = 0x200 bytes)
|
||||
@@ -31,7 +39,11 @@
|
||||
/// <summary>
|
||||
/// Media ID
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] MediaId;
|
||||
#else
|
||||
public byte[]? MediaId;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Partitions FS type (0=None, 1=Normal, 3=FIRM, 4=AGB_FIRM save)
|
||||
@@ -41,12 +53,20 @@
|
||||
/// <summary>
|
||||
/// Partitions crypt type (each byte corresponds to a partition in the partition table)
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] PartitionsCryptType;
|
||||
#else
|
||||
public byte[]? PartitionsCryptType;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Offset & Length partition table, in media units
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public PartitionTableEntry[] PartitionsTable;
|
||||
#else
|
||||
public PartitionTableEntry[]? PartitionsTable;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -55,7 +75,11 @@
|
||||
/// <summary>
|
||||
/// Exheader SHA-256 hash
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] ExheaderHash;
|
||||
#else
|
||||
public byte[]? ExheaderHash;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Additional header size
|
||||
@@ -70,22 +94,38 @@
|
||||
/// <summary>
|
||||
/// Partition Flags
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] PartitionFlags;
|
||||
#else
|
||||
public byte[]? PartitionFlags;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Partition ID table
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ulong[] PartitionIdTable;
|
||||
#else
|
||||
public ulong[]? PartitionIdTable;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved?
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Support for this was implemented with 9.6.0-X FIRM. Bit0=1 enables using bits 1-2, it's unknown
|
||||
@@ -107,12 +147,20 @@
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Unknown;
|
||||
#else
|
||||
public byte[]? Unknown;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Encrypted MBR partition-table, for the TWL partitions(key-data used for this keyslot is console-unique).
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] EncryptedMBR;
|
||||
#else
|
||||
public byte[]? EncryptedMBR;
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -11,7 +11,11 @@
|
||||
/// <summary>
|
||||
/// Magic "IVFC"
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string MagicString;
|
||||
#else
|
||||
public string? MagicString;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Magic number 0x10000
|
||||
@@ -41,7 +45,11 @@
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Level 2 logical offset
|
||||
@@ -61,7 +69,11 @@
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Level 3 logical offset
|
||||
@@ -81,12 +93,20 @@
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved3;
|
||||
#else
|
||||
public byte[]? Reserved3;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved4;
|
||||
#else
|
||||
public byte[]? Reserved4;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Optional info size.
|
||||
|
||||
@@ -14,19 +14,31 @@
|
||||
/// <summary>
|
||||
/// System savedata IDs
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] SystemSavedataIDs;
|
||||
#else
|
||||
public byte[]? SystemSavedataIDs;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Storage accessible unique IDs
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] StorageAccessibleUniqueIDs;
|
||||
#else
|
||||
public byte[]? StorageAccessibleUniqueIDs;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Filesystem access info
|
||||
/// </summary>
|
||||
/// TODO: Create enum for the flag values
|
||||
/// TODO: Combine with "other attributes"
|
||||
#if NET48
|
||||
public byte[] FileSystemAccessInfo;
|
||||
#else
|
||||
public byte[]? FileSystemAccessInfo;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Other attributes
|
||||
|
||||
@@ -6,12 +6,20 @@
|
||||
/// <summary>
|
||||
/// Application title (default is "CtrApp")
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public string ApplicationTitle;
|
||||
#else
|
||||
public string? ApplicationTitle;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved1;
|
||||
#else
|
||||
public byte[]? Reserved1;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Flag (bit 0: CompressExefsCode, bit 1: SDApplication)
|
||||
@@ -26,7 +34,11 @@
|
||||
/// <summary>
|
||||
/// Text code set info
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CodeSetInfo TextCodeSetInfo;
|
||||
#else
|
||||
public CodeSetInfo? TextCodeSetInfo;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Stack size
|
||||
@@ -36,17 +48,29 @@
|
||||
/// <summary>
|
||||
/// Read-only code set info
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CodeSetInfo ReadOnlyCodeSetInfo;
|
||||
#else
|
||||
public CodeSetInfo? ReadOnlyCodeSetInfo;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved2;
|
||||
#else
|
||||
public byte[]? Reserved2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Data code set info
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public CodeSetInfo DataCodeSetInfo;
|
||||
#else
|
||||
public CodeSetInfo? DataCodeSetInfo;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// BSS size
|
||||
@@ -56,11 +80,19 @@
|
||||
/// <summary>
|
||||
/// Dependency module (program ID) list
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public ulong[] DependencyModuleList;
|
||||
#else
|
||||
public ulong[]? DependencyModuleList;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// SystemInfo
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public SystemInfo SystemInfo;
|
||||
#else
|
||||
public SystemInfo? SystemInfo;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Reserved;
|
||||
#else
|
||||
public byte[]? Reserved;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,47 +9,83 @@ namespace SabreTools.Models.N3DS
|
||||
/// <summary>
|
||||
/// The bytes FF 00 FF 00 AA 55 AA 55.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Signature;
|
||||
#else
|
||||
public byte[]? Signature;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// An ascending byte sequence equal to the offset mod 256 (08 09 0A ... FE FF 00 01 ... FF).
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] AscendingByteSequence;
|
||||
#else
|
||||
public byte[]? AscendingByteSequence;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// A descending byte sequence equal to 255 minus the offset mod 256 (FF FE FD ... 00 FF DE ... 00).
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] DescendingByteSequence;
|
||||
#else
|
||||
public byte[]? DescendingByteSequence;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Filled with 00 (0b00000000) bytes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Filled00;
|
||||
#else
|
||||
public byte[]? Filled00;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Filled with FF (0b11111111) bytes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] FilledFF;
|
||||
#else
|
||||
public byte[]? FilledFF;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Filled with 0F (0b00001111) bytes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Filled0F;
|
||||
#else
|
||||
public byte[]? Filled0F;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Filled with F0 (0b11110000) bytes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] FilledF0;
|
||||
#else
|
||||
public byte[]? FilledF0;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Filled with 55 (0b01010101) bytes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] Filled55;
|
||||
#else
|
||||
public byte[]? Filled55;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Filled with AA (0b10101010) bytes.
|
||||
/// </summary>
|
||||
#if NET48
|
||||
public byte[] FilledAA;
|
||||
#else
|
||||
public byte[]? FilledAA;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The final byte is 00 (0b00000000).
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user