mirror of
https://github.com/SabreTools/SabreTools.Models.git
synced 2026-02-08 05:44:30 +00:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5565fa2fc3 | ||
|
|
e088e203ea | ||
|
|
acc8d95930 | ||
|
|
1a76c59827 | ||
|
|
8725ec0337 | ||
|
|
8991cc460d | ||
|
|
98ce8b65ec | ||
|
|
ca58343c30 | ||
|
|
2f637e0012 | ||
|
|
80172942fd | ||
|
|
aa0960b42f | ||
|
|
2554f64277 | ||
|
|
4c5c960915 | ||
|
|
1cb49163dd | ||
|
|
d144dd47a1 | ||
|
|
c4247c7ccb | ||
|
|
1e77437167 | ||
|
|
3d79e07d76 | ||
|
|
9d50d577ab | ||
|
|
494ca175fb | ||
|
|
73b3d4a7a8 | ||
|
|
bd40158423 | ||
|
|
149a45d871 | ||
|
|
e18d8d7543 | ||
|
|
38f0d4aef5 | ||
|
|
3959993255 | ||
|
|
00df5bdd6e | ||
|
|
00c087d8e0 | ||
|
|
6bc948784a | ||
|
|
c4f14854c2 | ||
|
|
adaac68898 | ||
|
|
a9bc4a2bfe | ||
|
|
262b91de65 | ||
|
|
62bd6a4bde | ||
|
|
7f14f0c5b0 |
4
.github/workflows/build_nupkg.yml
vendored
4
.github/workflows/build_nupkg.yml
vendored
@@ -28,13 +28,13 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 'Nuget Package'
|
||||
path: 'bin/Release/*.nupkg'
|
||||
path: 'SabreTools.Models/bin/Release/*.nupkg'
|
||||
|
||||
- name: Upload to rolling
|
||||
uses: ncipollo/release-action@v1.14.0
|
||||
with:
|
||||
allowUpdates: True
|
||||
artifacts: 'bin/Release/*.nupkg'
|
||||
artifacts: 'SabreTools.Models/bin/Release/*.nupkg'
|
||||
body: 'Last built commit: ${{ github.sha }}'
|
||||
name: 'Rolling Release'
|
||||
prerelease: True
|
||||
|
||||
42
CHD/Enums.cs
42
CHD/Enums.cs
@@ -1,42 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.Models.CHD
|
||||
{
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
||||
public enum CompressionType : uint
|
||||
{
|
||||
#region V1
|
||||
|
||||
CHDCOMPRESSION_NONE = 0,
|
||||
CHDCOMPRESSION_ZLIB = 1,
|
||||
|
||||
#endregion
|
||||
|
||||
#region V3
|
||||
|
||||
CHDCOMPRESSION_ZLIB_PLUS = 2,
|
||||
|
||||
#endregion
|
||||
|
||||
#region V4
|
||||
|
||||
CHDCOMPRESSION_AV = 3,
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
||||
[Flags]
|
||||
public enum Flags : uint
|
||||
{
|
||||
/// <summary>
|
||||
/// Set if this drive has a parent
|
||||
/// </summary>
|
||||
DriveHasParent = 0x00000001,
|
||||
|
||||
/// <summary>
|
||||
/// Set if this drive allows writes
|
||||
/// </summary>
|
||||
DriveAllowsWrites = 0x00000002,
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.Models.InstallShieldCabinet
|
||||
{
|
||||
/// <see href="https://github.com/twogood/unshield/blob/main/lib/cabfile.h"/>
|
||||
[Flags]
|
||||
public enum FileFlags : ushort
|
||||
{
|
||||
FILE_SPLIT = 1,
|
||||
FILE_OBFUSCATED = 2,
|
||||
FILE_COMPRESSED = 4,
|
||||
FILE_INVALID = 8,
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/twogood/unshield/blob/main/lib/cabfile.h"/>
|
||||
public enum LinkFlags : byte
|
||||
{
|
||||
LINK_NONE = 0,
|
||||
LINK_PREV = 1,
|
||||
LINK_NEXT = 2,
|
||||
LINK_BOTH = 3,
|
||||
}
|
||||
}
|
||||
719
PKZIP/Enums.cs
719
PKZIP/Enums.cs
@@ -1,719 +0,0 @@
|
||||
using System;
|
||||
|
||||
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
|
||||
namespace SabreTools.Models.PKZIP
|
||||
{
|
||||
public enum CompressionMethod : ushort
|
||||
{
|
||||
/// <summary>
|
||||
/// The file is stored (no compression)
|
||||
/// </summary>
|
||||
Stored = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The file is Shrunk
|
||||
/// </summary>
|
||||
Shrunk = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The file is Reduced with compression factor 1
|
||||
/// </summary>
|
||||
ReducedCompressionFactor1 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The file is Reduced with compression factor 2
|
||||
/// </summary>
|
||||
ReducedCompressionFactor2 = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The file is Reduced with compression factor 3
|
||||
/// </summary>
|
||||
ReducedCompressionFactor3 = 4,
|
||||
|
||||
/// <summary>
|
||||
/// The file is Reduced with compression factor 4
|
||||
/// </summary>
|
||||
ReducedCompressionFactor4 = 5,
|
||||
|
||||
/// <summary>
|
||||
/// The file is Imploded
|
||||
/// </summary>
|
||||
Implode = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for Tokenizing compression algorithm
|
||||
/// </summary>
|
||||
TokenizingCompressionAlgorithm = 7,
|
||||
|
||||
/// <summary>
|
||||
/// The file is Deflated
|
||||
/// </summary>
|
||||
Deflate = 8,
|
||||
|
||||
/// <summary>
|
||||
/// Enhanced Deflating using Deflate64(tm)
|
||||
/// </summary>
|
||||
Deflate64 = 9,
|
||||
|
||||
/// <summary>
|
||||
/// PKWARE Data Compression Library Imploding (old IBM TERSE)
|
||||
/// </summary>
|
||||
PKWAREDataCompressionLibraryImplode = 10,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved by PKWARE
|
||||
/// </summary>
|
||||
CompressionMethod11 = 11,
|
||||
|
||||
/// <summary>
|
||||
/// File is compressed using BZIP2 algorithm
|
||||
/// </summary>
|
||||
BZIP2 = 12,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved by PKWARE
|
||||
/// </summary>
|
||||
CompressionMethod13 = 13,
|
||||
|
||||
/// <summary>
|
||||
/// LZMA
|
||||
/// </summary>
|
||||
LZMA = 14,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved by PKWARE
|
||||
/// </summary>
|
||||
CompressionMethod15 = 15,
|
||||
|
||||
/// <summary>
|
||||
/// IBM z/OS CMPSC Compression
|
||||
/// </summary>
|
||||
IBMzOSCMPSC = 16,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved by PKWARE
|
||||
/// </summary>
|
||||
CompressionMethod17 = 17,
|
||||
|
||||
/// <summary>
|
||||
/// File is compressed using IBM TERSE (new)
|
||||
/// </summary>
|
||||
IBMTERSE = 18,
|
||||
|
||||
/// <summary>
|
||||
/// IBM LZ77 z Architecture
|
||||
/// </summary>
|
||||
IBMLZ77 = 19,
|
||||
|
||||
/// <summary>
|
||||
/// deprecated (use method 93 for zstd)
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
OldZstandard = 20,
|
||||
|
||||
/// <summary>
|
||||
/// Zstandard (zstd) Compression
|
||||
/// </summary>
|
||||
Zstandard = 93,
|
||||
|
||||
/// <summary>
|
||||
/// MP3 Compression
|
||||
/// </summary>
|
||||
MP3 = 94,
|
||||
|
||||
/// <summary>
|
||||
/// XZ Compression
|
||||
/// </summary>
|
||||
XZ = 95,
|
||||
|
||||
/// <summary>
|
||||
/// JPEG variant
|
||||
/// </summary>
|
||||
JPEGVariant = 96,
|
||||
|
||||
/// <summary>
|
||||
/// WavPack compressed data
|
||||
/// </summary>
|
||||
WavPack = 97,
|
||||
|
||||
/// <summary>
|
||||
/// PPMd version I, Rev 1
|
||||
/// </summary>
|
||||
PPMdVersionIRev1 = 98,
|
||||
|
||||
/// <summary>
|
||||
/// AE-x encryption marker
|
||||
/// </summary>
|
||||
AExEncryption = 99,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum GeneralPurposeBitFlags : ushort
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that the file is encrypted
|
||||
/// </summary>
|
||||
FileEncrypted = 0b0000_0000_0000_0001,
|
||||
|
||||
#region Compression Method 6 (Implode)
|
||||
|
||||
/// <summary>
|
||||
/// Set - 8K sliding dictionary
|
||||
/// Clear - 4K sliding dictionary
|
||||
/// </summary>
|
||||
LargeSlidingDictionary = 0b0000_0000_0000_0010,
|
||||
|
||||
/// <summary>
|
||||
/// Set - 3 Shannon-Fano trees were used
|
||||
/// Clear - 2 Shannon-Fano trees were used
|
||||
/// </summary>
|
||||
ThreeTrees = 0b0000_0000_0000_0100,
|
||||
|
||||
#endregion
|
||||
|
||||
#region Compression Method 8 (Deflate)
|
||||
|
||||
/// <summary>
|
||||
/// Normal (-en) compression
|
||||
/// </summary>
|
||||
NormalCompression = 0b0000_0000_0000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Maximum (-ex) compression
|
||||
/// </summary>
|
||||
MaximumCompression = 0b0000_0000_0000_0010,
|
||||
|
||||
/// <summary>
|
||||
/// Fast (-ef) compression
|
||||
/// </summary>
|
||||
FastCompression = 0b0000_0000_0000_0100,
|
||||
|
||||
/// <summary>
|
||||
/// Super Fast (-es) compression
|
||||
/// </summary>
|
||||
SuperFastCompression = 0b0000_0000_0000_0110,
|
||||
|
||||
#endregion
|
||||
|
||||
#region Compression Method 14 (LZMA)
|
||||
|
||||
/// <summary>
|
||||
/// Set - indicates an end-of-stream (EOS) marker is used to
|
||||
/// mark the end of the compressed data stream.
|
||||
/// Clear - an EOS marker is not present and the compressed data
|
||||
/// size must be known to extract.
|
||||
/// </summary>
|
||||
EndOfStreamMarker = 0b0000_0000_0000_0010,
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// set - the fields crc-32, compressed size and
|
||||
/// uncompressed size are set to zero in the
|
||||
/// local header. The correct values are put
|
||||
/// in the data descriptor immediately
|
||||
/// following the compressed data.
|
||||
/// </summary>
|
||||
NoCRC = 0b0000_0000_0000_1000,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for use with method 8, for enhanced deflating.
|
||||
/// </summary>
|
||||
EnhancedDeflateReserved = 0b0000_0000_0001_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the file is compressed patched data.
|
||||
/// </summary>
|
||||
/// <remarks>Requires PKZIP version 2.70 or greater</remarks>
|
||||
CompressedPatchedData = 0b0000_0000_0010_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Set - you MUST set the version needed to extract value
|
||||
/// to at least 50 and you MUST also set bit 0. If AES
|
||||
/// encryption is used, the version needed to extract
|
||||
/// value MUST be at least 51.
|
||||
/// </summary>
|
||||
StrongEncryption = 0b0000_0000_0100_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Currently unused
|
||||
/// </summary>
|
||||
Bit7 = 0b0000_0000_1000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Currently unused
|
||||
/// </summary>
|
||||
Bit8 = 0b0000_0001_0000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Currently unused
|
||||
/// </summary>
|
||||
Bit9 = 0b0000_0010_0000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Currently unused
|
||||
/// </summary>
|
||||
Bit10 = 0b0000_0100_0000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Set - the filename and comment fields for this
|
||||
/// file MUST be encoded using UTF-8.
|
||||
/// </summary>
|
||||
LanguageEncodingFlag = 0b0000_1000_0000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved by PKWARE for enhanced compression
|
||||
/// </summary>
|
||||
PKWAREEnhancedCompression = 0b0001_0000_0000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Set - Set when encrypting the Central Directory to
|
||||
/// indicate selected data values in the Local
|
||||
/// Header are masked to hide their actual values
|
||||
/// </summary>
|
||||
LocalHeaderValuesMasked = 0b0010_0000_0000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved by PKWARE for alternate streams
|
||||
/// </summary>
|
||||
PKWAREAlternateStreams = 0b0100_0000_0000_0000,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved by PKWARE
|
||||
/// </summary>
|
||||
PKWAREReserved = 0b1000_0000_0000_0000,
|
||||
}
|
||||
|
||||
public enum HeaderID : ushort
|
||||
{
|
||||
/// <summary>
|
||||
/// Zip64 extended information extra field
|
||||
/// </summary>
|
||||
Zip64ExtendedInformation = 0x0001,
|
||||
|
||||
/// <summary>
|
||||
/// AV Info
|
||||
/// </summary>
|
||||
AVInfo = 0x0007,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for extended language encoding data (PFS)
|
||||
/// </summary>
|
||||
ExtendedLanguageEncodingData = 0x0008,
|
||||
|
||||
/// <summary>
|
||||
/// OS/2
|
||||
/// </summary>
|
||||
OS2 = 0x0009,
|
||||
|
||||
/// <summary>
|
||||
/// NTFS
|
||||
/// </summary>
|
||||
NTFS = 0x000A,
|
||||
|
||||
/// <summary>
|
||||
/// OpenVMS
|
||||
/// </summary>
|
||||
OpenVMS = 0x000C,
|
||||
|
||||
/// <summary>
|
||||
/// UNIX
|
||||
/// </summary>
|
||||
UNIX = 0x000D,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for file stream and fork descriptors
|
||||
/// </summary>
|
||||
FileStreamFork = 0x000E,
|
||||
|
||||
/// <summary>
|
||||
/// Patch Descriptor
|
||||
/// </summary>
|
||||
PatchDescriptor = 0x000F,
|
||||
|
||||
/// <summary>
|
||||
/// PKCS#7 Store for X.509 Certificates
|
||||
/// </summary>
|
||||
PKCSStore = 0x0014,
|
||||
|
||||
/// <summary>
|
||||
/// X.509 Certificate ID and Signature for individual file
|
||||
/// </summary>
|
||||
X509IndividualFile = 0x0015,
|
||||
|
||||
/// <summary>
|
||||
/// X.509 Certificate ID for Central Directory
|
||||
/// </summary>
|
||||
X509CentralDirectory = 0x0016,
|
||||
|
||||
/// <summary>
|
||||
/// Strong Encryption Header
|
||||
/// </summary>
|
||||
StrongEncryptionHeader = 0x0017,
|
||||
|
||||
/// <summary>
|
||||
/// Record Management Controls
|
||||
/// </summary>
|
||||
RecordManagementControls = 0x0018,
|
||||
|
||||
/// <summary>
|
||||
/// PKCS#7 Encryption Recipient Certificate List
|
||||
/// </summary>
|
||||
PKCSCertificateList = 0x0019,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for Timestamp record
|
||||
/// </summary>
|
||||
Timestamp = 0x0020,
|
||||
|
||||
/// <summary>
|
||||
/// Policy Decryption Key Record
|
||||
/// </summary>
|
||||
PolicyDecryptionKey = 0x0021,
|
||||
|
||||
/// <summary>
|
||||
/// Smartcrypt Key Provider Record
|
||||
/// </summary>
|
||||
SmartcryptKeyProvider = 0x0022,
|
||||
|
||||
/// <summary>
|
||||
/// Smartcrypt Policy Key Data Record
|
||||
/// </summary>
|
||||
SmartcryptPolicyKeyData = 0x0023,
|
||||
|
||||
/// <summary>
|
||||
/// IBM S/390 (Z390), AS/400 (I400) attributes - uncompressed
|
||||
/// </summary>
|
||||
IBMS390AttributesUncompressed = 0x0065,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for IBM S/390 (Z390), AS/400 (I400) attributes - compressed
|
||||
/// </summary>
|
||||
IBMS390AttributesCompressed = 0x0066,
|
||||
|
||||
/// <summary>
|
||||
/// POSZIP 4690 (reserved)
|
||||
/// </summary>
|
||||
POSZIP4690 = 0x4690,
|
||||
|
||||
#region Third-Party
|
||||
|
||||
/// <summary>
|
||||
/// Macintosh
|
||||
/// </summary>
|
||||
Macintosh = 0x07C8,
|
||||
|
||||
/// <summary>
|
||||
/// Pixar USD header ID
|
||||
/// </summary>
|
||||
PixarUSD = 0x1986,
|
||||
|
||||
/// <summary>
|
||||
/// ZipIt Macintosh
|
||||
/// </summary>
|
||||
ZipItMacintosh = 0x2605,
|
||||
|
||||
/// <summary>
|
||||
/// ZipIt Macintosh 1.3.5+
|
||||
/// </summary>
|
||||
ZipItMacintosh135Plus = 0x2705,
|
||||
|
||||
/// <summary>
|
||||
/// ZipIt Macintosh 1.3.5+
|
||||
/// </summary>
|
||||
ZipItMacintosh135PlusAlt = 0x2805,
|
||||
|
||||
/// <summary>
|
||||
/// Info-ZIP Macintosh
|
||||
/// </summary>
|
||||
InfoZIPMacintosh = 0x334D,
|
||||
|
||||
/// <summary>
|
||||
/// Acorn/SparkFS
|
||||
/// </summary>
|
||||
AcornSparkFS = 0x4341,
|
||||
|
||||
/// <summary>
|
||||
/// Windows NT security descriptor (binary ACL)
|
||||
/// </summary>
|
||||
WindowsNTSecurityDescriptor = 0x4453,
|
||||
|
||||
/// <summary>
|
||||
/// VM/CMS
|
||||
/// </summary>
|
||||
VMCMS = 0x4704,
|
||||
|
||||
/// <summary>
|
||||
/// MVS
|
||||
/// </summary>
|
||||
MVS = 0x470F,
|
||||
|
||||
/// <summary>
|
||||
/// THEOS (old?)
|
||||
/// </summary>
|
||||
THEOSold = 0x4854,
|
||||
|
||||
/// <summary>
|
||||
/// FWKCS MD5
|
||||
/// </summary>
|
||||
FWKCSMD5 = 0x4B46,
|
||||
|
||||
/// <summary>
|
||||
/// OS/2 access control list (text ACL)
|
||||
/// </summary>
|
||||
OS2AccessControlList = 0x4C41,
|
||||
|
||||
/// <summary>
|
||||
/// Info-ZIP OpenVMS
|
||||
/// </summary>
|
||||
InfoZIPOpenVMS = 0x4D49,
|
||||
|
||||
/// <summary>
|
||||
/// Macintosh Smartzip (??)
|
||||
/// </summary>
|
||||
MacintoshSmartzip = 0x4D63,
|
||||
|
||||
/// <summary>
|
||||
/// Xceed original location extra field
|
||||
/// </summary>
|
||||
XceedOriginalLocation = 0x4F4C,
|
||||
|
||||
/// <summary>
|
||||
/// AOS/VS (ACL)
|
||||
/// </summary>
|
||||
ADSVS = 0x5356,
|
||||
|
||||
/// <summary>
|
||||
/// extended timestamp
|
||||
/// </summary>
|
||||
ExtendedTimestamp = 0x5455,
|
||||
|
||||
/// <summary>
|
||||
/// Xceed unicode extra field
|
||||
/// </summary>
|
||||
XceedUnicode = 0x554E,
|
||||
|
||||
/// <summary>
|
||||
/// Info-ZIP UNIX (original, also OS/2, NT, etc)
|
||||
/// </summary>
|
||||
InfoZIPUNIX = 0x5855,
|
||||
|
||||
/// <summary>
|
||||
/// Info-ZIP Unicode Comment Extra Field
|
||||
/// </summary>
|
||||
InfoZIPUnicodeComment = 0x6375,
|
||||
|
||||
/// <summary>
|
||||
/// BeOS/BeBox
|
||||
/// </summary>
|
||||
BeOSBeBox = 0x6542,
|
||||
|
||||
/// <summary>
|
||||
/// THEOS
|
||||
/// </summary>
|
||||
THEOS = 0x6854,
|
||||
|
||||
/// <summary>
|
||||
/// Info-ZIP Unicode Path Extra Field
|
||||
/// </summary>
|
||||
InfoZIPUnicodePath = 0x7075,
|
||||
|
||||
/// <summary>
|
||||
/// AtheOS/Syllable
|
||||
/// </summary>
|
||||
AtheOSSyllable = 0x7441,
|
||||
|
||||
/// <summary>
|
||||
/// ASi UNIX
|
||||
/// </summary>
|
||||
ASiUNIX = 0x756E,
|
||||
|
||||
/// <summary>
|
||||
/// Info-ZIP UNIX (new)
|
||||
/// </summary>
|
||||
InfoZIPUNIXNew = 0x7855,
|
||||
|
||||
/// <summary>
|
||||
/// Info-ZIP UNIX (newer UID/GID)
|
||||
/// </summary>
|
||||
InfoZIPUNIXNewer = 0x7875,
|
||||
|
||||
/// <summary>
|
||||
/// Data Stream Alignment (Apache Commons-Compress)
|
||||
/// </summary>
|
||||
DataStreamAlignment = 0xA11E,
|
||||
|
||||
/// <summary>
|
||||
/// Microsoft Open Packaging Growth Hint
|
||||
/// </summary>
|
||||
MicrosoftOpenPackagingGrowthHint = 0xA220,
|
||||
|
||||
/// <summary>
|
||||
/// Java JAR file Extra Field Header ID
|
||||
/// </summary>
|
||||
JavaJAR = 0xCAFE,
|
||||
|
||||
/// <summary>
|
||||
/// Android ZIP Alignment Extra Field
|
||||
/// </summary>
|
||||
AndroidZIPAlignment = 0xD935,
|
||||
|
||||
/// <summary>
|
||||
/// Korean ZIP code page info
|
||||
/// </summary>
|
||||
KoreanZIPCodePage = 0xE57A,
|
||||
|
||||
/// <summary>
|
||||
/// SMS/QDOS
|
||||
/// </summary>
|
||||
SMSQDOS = 0xFD4A,
|
||||
|
||||
/// <summary>
|
||||
/// AE-x encryption structure
|
||||
/// </summary>
|
||||
AExEncryptionStructure = 0x9901,
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
Unknown = 0x9902,
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public enum HostSystem : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems)
|
||||
/// </summary>
|
||||
MSDOS = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Amiga
|
||||
/// </summary>
|
||||
Amiga = 1,
|
||||
|
||||
/// <summary>
|
||||
/// OpenVMS
|
||||
/// </summary>
|
||||
OpenVMS = 2,
|
||||
|
||||
/// <summary>
|
||||
/// UNIX
|
||||
/// </summary>
|
||||
UNIX = 3,
|
||||
|
||||
/// <summary>
|
||||
/// VM/CMS
|
||||
/// </summary>
|
||||
VMCMS = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Atari ST
|
||||
/// </summary>
|
||||
AtariST = 5,
|
||||
|
||||
/// <summary>
|
||||
/// OS/2 H.P.F.S.
|
||||
/// </summary>
|
||||
OS2HPFS = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Macintosh
|
||||
/// </summary>
|
||||
Macintosh = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Z-System
|
||||
/// </summary>
|
||||
ZSystem = 8,
|
||||
|
||||
/// <summary>
|
||||
/// CP/M
|
||||
/// </summary>
|
||||
CPM = 9,
|
||||
|
||||
/// <summary>
|
||||
/// Windows NTFS
|
||||
/// </summary>
|
||||
WindowsNTFS = 10,
|
||||
|
||||
/// <summary>
|
||||
/// MVS (OS/390 - Z/OS)
|
||||
/// </summary>
|
||||
MVS = 11,
|
||||
|
||||
/// <summary>
|
||||
/// VSE
|
||||
/// </summary>
|
||||
VSE = 12,
|
||||
|
||||
/// <summary>
|
||||
/// Acorn Risc
|
||||
/// </summary>
|
||||
AcornRisc = 13,
|
||||
|
||||
/// <summary>
|
||||
/// VFAT
|
||||
/// </summary>
|
||||
VFAT = 14,
|
||||
|
||||
/// <summary>
|
||||
/// alternate MVS
|
||||
/// </summary>
|
||||
AlternateVMS = 15,
|
||||
|
||||
/// <summary>
|
||||
/// BeOS
|
||||
/// </summary>
|
||||
BeOS = 16,
|
||||
|
||||
/// <summary>
|
||||
/// Tandem
|
||||
/// </summary>
|
||||
Tandem = 17,
|
||||
|
||||
/// <summary>
|
||||
/// OS/400
|
||||
/// </summary>
|
||||
OS400 = 18,
|
||||
|
||||
/// <summary>
|
||||
/// OS X (Darwin)
|
||||
/// </summary>
|
||||
OSX = 19,
|
||||
|
||||
// 20 thru 255 - unused
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum InternalFileAttributes : ushort
|
||||
{
|
||||
/// <summary>
|
||||
/// Set - The file is apparently an ASCII or text file
|
||||
/// Clear - The file is apparently binary data
|
||||
/// </summary>
|
||||
ASCII = 0b0000_0000_0000_0001,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for use by PKWARE
|
||||
/// </summary>
|
||||
Bit1 = 0b0000_0000_0000_0010,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for use by PKWARE
|
||||
/// </summary>
|
||||
Bit2 = 0b0000_0000_0000_0100,
|
||||
|
||||
/*
|
||||
4.4.14.2 The 0x0002 bit of this field indicates, if set, that
|
||||
a 4 byte variable record length control field precedes each
|
||||
logical record indicating the length of the record. The
|
||||
record length control field is stored in little-endian byte
|
||||
order. This flag is independent of text control characters,
|
||||
and if used in conjunction with text data, includes any
|
||||
control characters in the total length of the record. This
|
||||
value is provided for mainframe data transfer support.
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Assembly Properties -->
|
||||
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Version>1.4.4</Version>
|
||||
<WarningsNotAsErrors>CS0618</WarningsNotAsErrors>
|
||||
|
||||
<!-- Package Properties -->
|
||||
<Authors>Matt Nadareski</Authors>
|
||||
<Description>Common models used by other SabreTools projects</Description>
|
||||
<Copyright>Copyright (c) Matt Nadareski 2022-2024</Copyright>
|
||||
<PackageProjectUrl>https://github.com/SabreTools/</PackageProjectUrl>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<RepositoryUrl>https://github.com/SabreTools/SabreTools.Models</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>model models executable protection archive</PackageTags>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="README.md" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Support for old .NET versions -->
|
||||
<ItemGroup Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`))">
|
||||
<PackageReference Include="MinValueTupleBridge" Version="0.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$(TargetFramework.StartsWith(`net4`))">
|
||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Models", "SabreTools.Models.csproj", "{51F0D5D9-7C2B-445A-8ECD-4A47B33609C4}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Models", "SabreTools.Models\SabreTools.Models.csproj", "{51F0D5D9-7C2B-445A-8ECD-4A47B33609C4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
||||
namespace SabreTools.Models.CFB
|
||||
{
|
||||
/// <see href="https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-CFB/%5bMS-CFB%5d.pdf"/>
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
public sealed class DirectoryEntry
|
||||
{
|
||||
/// <summary>
|
||||
@@ -19,7 +19,7 @@ namespace SabreTools.Models.CFB
|
||||
/// name: '/', '\', ':', '!'.
|
||||
/// </summary>
|
||||
/// <remarks>64 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
|
||||
public string? Name;
|
||||
|
||||
/// <summary>
|
||||
23
SabreTools.Models/CHD/Constants.cs
Normal file
23
SabreTools.Models/CHD/Constants.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace SabreTools.Models.CHD
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public const string SignatureString = "MComprHD";
|
||||
|
||||
#region Header Sizes
|
||||
|
||||
public const int HeaderV1Size = 76;
|
||||
public const int HeaderV2Size = 80;
|
||||
public const int HeaderV3Size = 120;
|
||||
public const int HeaderV4Size = 108;
|
||||
public const int HeaderV5Size = 124;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Metadata Parameters
|
||||
|
||||
public const uint CHDMETAINDEX_APPEND = uint.MaxValue;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
358
SabreTools.Models/CHD/Enums.cs
Normal file
358
SabreTools.Models/CHD/Enums.cs
Normal file
@@ -0,0 +1,358 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.Models.CHD
|
||||
{
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chdcodec.h"/>
|
||||
public enum AVHuffCodec
|
||||
{
|
||||
DECOMPRESS_CONFIG = 1,
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chdcodec.h"/>
|
||||
public enum CodecType : uint
|
||||
{
|
||||
CHD_CODEC_NONE = 0,
|
||||
|
||||
#region General Codecs
|
||||
|
||||
/// <remarks>"zlib"</remarks>
|
||||
ZLIB = 0x7a6c6962,
|
||||
|
||||
/// <remarks>"zstd"</remarks>
|
||||
ZSTD = 0x7a737464,
|
||||
|
||||
/// <remarks>"lzma"</remarks>
|
||||
LZMA = 0x6c7a6d61,
|
||||
|
||||
/// <remarks>"huff"</remarks>
|
||||
HUFFMAN = 0x68756666,
|
||||
|
||||
/// <remarks>"flac"</remarks>
|
||||
FLAC = 0x666c6163,
|
||||
|
||||
#endregion
|
||||
|
||||
#region General Codecs with CD Frontend
|
||||
|
||||
/// <remarks>"cdzl"</remarks>
|
||||
CD_ZLIB = 0x63647a6c,
|
||||
|
||||
/// <remarks>"cdzs"</remarks>
|
||||
CD_ZSTD = 0x63647a73,
|
||||
|
||||
/// <remarks>"cdlz"</remarks>
|
||||
CD_LZMA = 0x63646c7a,
|
||||
|
||||
/// <remarks>"cdfl"</remarks>
|
||||
CD_FLAC = 0x6364666c,
|
||||
|
||||
#endregion
|
||||
|
||||
#region A/V Codecs
|
||||
|
||||
/// <remarks>"avhu"</remarks>
|
||||
AVHUFF = 0x61766875,
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pseudo-Codecs Returned by hunk_info
|
||||
|
||||
/// <summary>
|
||||
/// Copy of another hunk
|
||||
/// </summary>
|
||||
CHD_CODEC_SELF = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Copy of a parent's hunk
|
||||
/// </summary>
|
||||
CHD_CODEC_PARENT = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Legacy "mini" 8-byte repeat
|
||||
/// </summary>
|
||||
CHD_CODEC_MINI = 3,
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
||||
public enum CompressionType : uint
|
||||
{
|
||||
#region V1
|
||||
|
||||
CHDCOMPRESSION_NONE = 0,
|
||||
CHDCOMPRESSION_ZLIB = 1,
|
||||
|
||||
#endregion
|
||||
|
||||
#region V3
|
||||
|
||||
CHDCOMPRESSION_ZLIB_PLUS = 2,
|
||||
|
||||
#endregion
|
||||
|
||||
#region V4
|
||||
|
||||
CHDCOMPRESSION_AV = 3,
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
||||
public enum Error : uint
|
||||
{
|
||||
NO_INTERFACE = 1,
|
||||
NOT_OPEN,
|
||||
ALREADY_OPEN,
|
||||
INVALID_FILE,
|
||||
INVALID_DATA,
|
||||
REQUIRES_PARENT,
|
||||
FILE_NOT_WRITEABLE,
|
||||
CODEC_ERROR,
|
||||
INVALID_PARENT,
|
||||
HUNK_OUT_OF_RANGE,
|
||||
DECOMPRESSION_ERROR,
|
||||
COMPRESSION_ERROR,
|
||||
CANT_VERIFY,
|
||||
METADATA_NOT_FOUND,
|
||||
INVALID_METADATA_SIZE,
|
||||
UNSUPPORTED_VERSION,
|
||||
VERIFY_INCOMPLETE,
|
||||
INVALID_METADATA,
|
||||
INVALID_STATE,
|
||||
OPERATION_PENDING,
|
||||
UNSUPPORTED_FORMAT,
|
||||
UNKNOWN_COMPRESSION,
|
||||
WALKING_PARENT,
|
||||
COMPRESSING
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
||||
[Flags]
|
||||
public enum Flags : uint
|
||||
{
|
||||
/// <summary>
|
||||
/// Set if this drive has a parent
|
||||
/// </summary>
|
||||
DriveHasParent = 0x00000001,
|
||||
|
||||
/// <summary>
|
||||
/// Set if this drive allows writes
|
||||
/// </summary>
|
||||
DriveAllowsWrites = 0x00000002,
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
||||
[Flags]
|
||||
public enum MetadataFlags : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates data is checksummed
|
||||
/// </summary>
|
||||
CHD_MDFLAGS_CHECKSUM = 0x01,
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
||||
public enum MetadataTag : uint
|
||||
{
|
||||
CHDMETATAG_WILDCARD = 0,
|
||||
|
||||
#region Hard Disk
|
||||
|
||||
/// <summary>
|
||||
/// Standard hard disk metadata
|
||||
/// </summary>
|
||||
/// <remarks>"GDDD"</remarks>
|
||||
HARD_DISK_METADATA_TAG = 0x47444444,
|
||||
|
||||
/// <summary>
|
||||
/// Hard disk identify information
|
||||
/// </summary>
|
||||
/// <remarks>"IDNT"</remarks>
|
||||
HARD_DISK_IDENT_METADATA_TAG = 0x49444e54,
|
||||
|
||||
/// <summary>
|
||||
/// Hard disk key information
|
||||
/// </summary>
|
||||
/// <remarks>"KEY "</remarks>
|
||||
HARD_DISK_KEY_METADATA_TAG = 0x4b455920,
|
||||
|
||||
#endregion
|
||||
|
||||
#region PCMCIA
|
||||
|
||||
/// <summary>
|
||||
/// PCMCIA CIS information
|
||||
/// </summary>
|
||||
/// <remarks>"CIS "</remarks>
|
||||
PCMCIA_CIS_METADATA_TAG = 0x43495320,
|
||||
|
||||
#endregion
|
||||
|
||||
#region CD-ROM
|
||||
|
||||
/// <remarks>"CHCD"</remarks>
|
||||
CDROM_OLD_METADATA_TAG = 0x43484344,
|
||||
|
||||
/// <remarks>"CHTR"</remarks>
|
||||
CDROM_TRACK_METADATA_TAG = 0x43485452,
|
||||
|
||||
/// <remarks>"CHT2"</remarks>
|
||||
CDROM_TRACK_METADATA2_TAG = 0x43485432,
|
||||
|
||||
#endregion
|
||||
|
||||
#region GD-ROM
|
||||
|
||||
/// <remarks>"CHGT"</remarks>
|
||||
GDROM_OLD_METADATA_TAG = 0x43484754,
|
||||
|
||||
/// <remarks>"CHGD"</remarks>
|
||||
GDROM_TRACK_METADATA_TAG = 0x43484744,
|
||||
|
||||
#endregion
|
||||
|
||||
#region DVD
|
||||
|
||||
/// <summary>
|
||||
/// Standard DVD metadata
|
||||
/// </summary>
|
||||
/// <remarks>"DVD "</remarks>
|
||||
DVD_METADATA_TAG = 0x44564420,
|
||||
|
||||
#endregion
|
||||
|
||||
#region A/V
|
||||
|
||||
/// <summary>
|
||||
/// Standard A/V metadata
|
||||
/// </summary>
|
||||
/// <remarks>"AVAV"</remarks>
|
||||
AV_METADATA_TAG = 0x41564156,
|
||||
|
||||
/// <summary>
|
||||
/// A/V laserdisc frame metadata
|
||||
/// </summary>
|
||||
/// <remarks>"AVLD"</remarks>
|
||||
AV_LD_METADATA_TAG = 0x41564c44,
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.cpp"/>
|
||||
public enum V34EntryType : uint
|
||||
{
|
||||
/// <summary>
|
||||
/// Invalid type
|
||||
/// </summary>
|
||||
V34_MAP_ENTRY_TYPE_INVALID = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Standard compression
|
||||
/// </summary>
|
||||
V34_MAP_ENTRY_TYPE_COMPRESSED = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Uncompressed data
|
||||
/// </summary>
|
||||
V34_MAP_ENTRY_TYPE_UNCOMPRESSED = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Mini: use offset as raw data
|
||||
/// </summary>
|
||||
V34_MAP_ENTRY_TYPE_MINI = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Same as another hunk in this file
|
||||
/// </summary>
|
||||
V34_MAP_ENTRY_TYPE_SELF_HUNK = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Same as a hunk in the parent file
|
||||
/// </summary>
|
||||
V34_MAP_ENTRY_TYPE_PARENT_HUNK = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Compressed with secondary algorithm (usually FLAC CDDA)
|
||||
/// </summary>
|
||||
V34_MAP_ENTRY_TYPE_2ND_COMPRESSED = 6,
|
||||
}
|
||||
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.cpp"/>
|
||||
public enum V5CompressionType : uint
|
||||
{
|
||||
// These types are live when running
|
||||
|
||||
/// <summary>
|
||||
/// Codec #0
|
||||
/// </summary>
|
||||
COMPRESSION_TYPE_0 = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Codec #1
|
||||
/// </summary>
|
||||
COMPRESSION_TYPE_1 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Codec #2
|
||||
/// </summary>
|
||||
COMPRESSION_TYPE_2 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Codec #3
|
||||
/// </summary>
|
||||
COMPRESSION_TYPE_3 = 3,
|
||||
|
||||
/// <summary>
|
||||
/// No compression; implicit length = hunkbytes
|
||||
/// </summary>
|
||||
COMPRESSION_NONE = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Same as another block in this CHD
|
||||
/// </summary>
|
||||
COMPRESSION_SELF = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Same as a hunk's worth of units in the parent CHD
|
||||
/// </summary>
|
||||
COMPRESSION_PARENT = 6,
|
||||
|
||||
// These additional pseudo-types are used for compressed encodings
|
||||
|
||||
/// <summary>
|
||||
/// Start of small RLE run (4-bit length)
|
||||
/// </summary>
|
||||
COMPRESSION_RLE_SMALL,
|
||||
|
||||
/// <summary>
|
||||
/// Start of large RLE run (8-bit length)
|
||||
/// </summary>
|
||||
COMPRESSION_RLE_LARGE,
|
||||
|
||||
/// <summary>
|
||||
/// Same as the last COMPRESSION_SELF block
|
||||
/// </summary>
|
||||
COMPRESSION_SELF_0,
|
||||
|
||||
/// <summary>
|
||||
/// Same as the last COMPRESSION_SELF block + 1
|
||||
/// </summary>
|
||||
COMPRESSION_SELF_1,
|
||||
|
||||
/// <summary>
|
||||
/// Same block in the parent
|
||||
/// </summary>
|
||||
COMPRESSION_PARENT_SELF,
|
||||
|
||||
/// <summary>
|
||||
/// Same as the last COMPRESSION_PARENT block
|
||||
/// </summary>
|
||||
COMPRESSION_PARENT_0,
|
||||
|
||||
/// <summary>
|
||||
/// Same as the last COMPRESSION_PARENT block + 1
|
||||
/// </summary>
|
||||
COMPRESSION_PARENT_1
|
||||
}
|
||||
}
|
||||
39
SabreTools.Models/CHD/MetadataEntry.cs
Normal file
39
SabreTools.Models/CHD/MetadataEntry.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.CHD
|
||||
{
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.cpp"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class MetadataEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Offset within the file of the header
|
||||
/// </summary>
|
||||
public ulong Offset;
|
||||
|
||||
/// <summary>
|
||||
/// Offset within the file of the next header
|
||||
/// </summary>
|
||||
public ulong Next;
|
||||
|
||||
/// <summary>
|
||||
/// Offset within the file of the previous header
|
||||
/// </summary>
|
||||
public ulong Prev;
|
||||
|
||||
/// <summary>
|
||||
/// Length of the metadata
|
||||
/// </summary>
|
||||
public uint Length;
|
||||
|
||||
/// <summary>
|
||||
/// Metadata tag
|
||||
/// </summary>
|
||||
public MetadataTag Metatag;
|
||||
|
||||
/// <summary>
|
||||
/// Flag bits
|
||||
/// </summary>
|
||||
public MetadataFlags Flags;
|
||||
}
|
||||
}
|
||||
20
SabreTools.Models/CHD/MetadataHash.cs
Normal file
20
SabreTools.Models/CHD/MetadataHash.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.CHD
|
||||
{
|
||||
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.cpp"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class MetadataHash
|
||||
{
|
||||
/// <summary>
|
||||
/// Tag of the metadata in big-endian
|
||||
/// </summary>
|
||||
public MetadataTag Tag;
|
||||
|
||||
/// <summary>
|
||||
/// Hash data
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
||||
public byte[]? SHA1;
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace SabreTools.Models.Charts
|
||||
{
|
||||
/// <see href="https://github.com/TheNathannator/GuitarGame_ChartFormats/tree/main/doc/FileFormats/song.ini"/>
|
||||
/// <remarks>[song]/[Song]</remarks>
|
||||
internal class SongIni
|
||||
public class SongIni
|
||||
{
|
||||
#region Song/Chart Metadata
|
||||
|
||||
16
SabreTools.Models/Charts/Tier.cs
Normal file
16
SabreTools.Models/Charts/Tier.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace SabreTools.Models.Charts
|
||||
{
|
||||
/// <see href="https://github.com/TheNathannator/GuitarGame_ChartFormats/blob/main/doc/FileFormats/Other/Frets%20on%20Fire%20X/Careers.md"/>
|
||||
public class Tier
|
||||
{
|
||||
/// <summary>
|
||||
/// Display name of the tier.
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name used for associating a song with this tier, and for checking unlock requirements.
|
||||
/// </summary>
|
||||
public string? UnlockId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SabreTools.Models.Charts
|
||||
{
|
||||
/// <see href="https://github.com/TheNathannator/GuitarGame_ChartFormats/blob/main/doc/FileFormats/Other/Frets%20on%20Fire%20X/Careers.md"/>
|
||||
/// <remarks>[titles]</remarks>
|
||||
internal class TitlesIni
|
||||
public class TitlesIni
|
||||
{
|
||||
/// <summary>
|
||||
/// A space-separated list of .ini sections to include in the career.
|
||||
@@ -13,9 +11,8 @@ namespace SabreTools.Models.Charts
|
||||
public string[]? SectionList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// `name` - Display name of the tier.
|
||||
/// `unlock_id` - Name used for associating a song with this tier, and for checking unlock requirements.
|
||||
/// This entry points to other sections that should be used as part of the career.
|
||||
/// </summary>
|
||||
public Dictionary<string, (string? Name, string? UnlockId)>? Sections { get; set; }
|
||||
public Tier[]? Sections { get; set; }
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user