mirror of
https://github.com/SabreTools/SabreTools.Models.git
synced 2026-07-08 18:06:06 +00:00
Migrate support file models to Serialization
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// This record type is undocumented but found in real media key blocks
|
||||
/// </summary>
|
||||
public sealed class CopyrightRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// Null-terminated ASCII string representing the copyright
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string? Copyright;
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class DriveRevocationListEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// A 2-byte Range value indicates the range of revoked ID’s starting
|
||||
/// from the ID contained in the record. A value of zero in the Range
|
||||
/// field indicates that only one ID is being revoked, a value of one
|
||||
/// in the Range field indicates two ID’s are being revoked, and so on.
|
||||
/// </summary>
|
||||
public ushort Range;
|
||||
|
||||
/// <summary>
|
||||
/// A 6-byte Drive ID value identifying the Licensed Drive being revoked
|
||||
/// (or the first in a range of Licensed Drives being revoked, in the
|
||||
/// case of a non-zero Range value).
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public byte[]? DriveID;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// A properly formatted type 3 or type 4 Media Key Block contains exactly
|
||||
/// one Drive Revocation List Record. It follows the Host Revocation List
|
||||
/// Record, although it may not immediately follow it.
|
||||
///
|
||||
/// The Drive Revocation List Record is identical to the Host Revocation
|
||||
/// List Record, except it has type 2016, and it contains Drive Revocation
|
||||
/// List Entries, not Host Revocation List Entries. The Drive Revocation List
|
||||
/// Entries refer to Drive IDs in the Drive Certificates.
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class DriveRevocationListRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// The total number of Drive Revocation List Entry fields that follow.
|
||||
/// </summary>
|
||||
public uint TotalNumberOfEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Revocation list entries
|
||||
/// </summary>
|
||||
public DriveRevocationSignatureBlock[]? SignatureBlocks { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class DriveRevocationSignatureBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of Drive Revocation List Entry fields in the signature block.
|
||||
/// </summary>
|
||||
public uint NumberOfEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
public DriveRevocationListEntry[]? EntryFields { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// A properly formatted MKB shall contain an End of Media Key Block Record.
|
||||
/// When a device encounters this Record it stops processing the MKB, using
|
||||
/// whatever Km value it has calculated up to that point as the final Km for
|
||||
/// that MKB (pending possible checks for correctness of the key, as
|
||||
/// described previously).
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class EndOfMediaKeyBlockRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// AACS LA’s signature on the data in the Media Key Block up to,
|
||||
/// but not including, this record. Devices depending on the Version
|
||||
/// Number in the Type and Version Record must verify the signature.
|
||||
/// Other devices may ignore the signature data. If any device
|
||||
/// determines that the signature does not verify or is omitted, it
|
||||
/// must refuse to use the Media Key.
|
||||
/// </summary>
|
||||
public byte[]? SignatureData { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
public enum MediaKeyBlockType : uint
|
||||
{
|
||||
/// <summary>
|
||||
/// (Type 3). This is a normal Media Key Block suitable for being recorded
|
||||
/// on a AACS Recordable Media. Both Class I and Class II Licensed Products
|
||||
/// use it to directly calculate the Media Key.
|
||||
/// </summary>
|
||||
Type3 = 0x00031003,
|
||||
|
||||
/// <summary>
|
||||
/// (Type 4). This is a Media Key Block that has been designed to use Key
|
||||
/// Conversion Data (KCD). Thus, it is suitable only for pre-recorded media
|
||||
/// from which the KCD is derived. Both Class I and Class II Licensed Products
|
||||
/// use it to directly calculate the Media Key.
|
||||
/// </summary>
|
||||
Type4 = 0x00041003,
|
||||
|
||||
/// <summary>
|
||||
/// (Type 10). This is a Class II Media Key Block (one that has the functionality
|
||||
/// of a Sequence Key Block). This can only be processed by Class II Licensed
|
||||
/// Products; Class I Licensed Products are revoked in Type 10 Media Key Blocks
|
||||
/// and cannot process them. This type does not contain the Host Revocation List
|
||||
/// Record, the Drive Revocation List Record, and the Media Key Data Record, as
|
||||
/// described in the following sections. It does contain the records shown in
|
||||
/// Section 3.2.5.2, which are only processed by Class II Licensed Products.
|
||||
/// </summary>
|
||||
Type10 = 0x000A1003,
|
||||
|
||||
/// <summary>
|
||||
/// Type 2.0 Category C.
|
||||
/// This is the Media Key Block Type found on "UHD" media (AACS v2.0)
|
||||
/// </summary>
|
||||
/// <see href="https://code.videolan.org/videolan/libaacs/-/blob/master/src/libaacs/mkb.h"/>
|
||||
Type20 = 0x48141003,
|
||||
|
||||
/// <summary>
|
||||
/// Type 2.1 Category C.
|
||||
/// This is the Media Key Block Type found on "UHD" media (AACS v2.1)
|
||||
/// </summary>
|
||||
/// <see href="https://code.videolan.org/videolan/libaacs/-/blob/master/src/libaacs/mkb.h"/>
|
||||
Type21 = 0x48151003,
|
||||
}
|
||||
|
||||
public enum RecordType : byte
|
||||
{
|
||||
EndOfMediaKeyBlock = 0x02,
|
||||
ExplicitSubsetDifference = 0x04,
|
||||
MediaKeyData = 0x05,
|
||||
SubsetDifferenceIndex = 0x07,
|
||||
MediaKeyVariantData = 0x0C,
|
||||
TypeAndVersion = 0x10,
|
||||
DriveRevocationList = 0x20,
|
||||
HostRevocationList = 0x21,
|
||||
VerifyMediaKey = 0x81,
|
||||
|
||||
// Not documented
|
||||
Copyright = 0x7F,
|
||||
|
||||
// Record types only found in UHD media (AACS v2)
|
||||
// <see href="https://code.videolan.org/videolan/libaacs/-/blob/master/src/devtools/mkb_dump.c"/>
|
||||
Unknown0x28_AACS2 = 0x28,
|
||||
DriveRevocationList_AACS2 = 0x30,
|
||||
HostRevocationList_AACS2 = 0x31,
|
||||
VerifyMediaKey_AACS2 = 0x86,
|
||||
EmptyRecord0xF8_AACS2 = 0xF8,
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class ExplicitSubsetDifferenceRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// In this record, each subset-difference is encoded with 5 bytes.
|
||||
/// </summary>
|
||||
public SubsetDifference[]? SubsetDifferences { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// This represents any record that does not have a concrete model yet
|
||||
/// </summary>
|
||||
public sealed class GenericRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// Unparsed data comprising the record after the header
|
||||
/// </summary>
|
||||
public byte[]? Data { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class HostRevocationListEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// A 2-byte Range value indicates the range of revoked ID’s starting
|
||||
/// from the ID contained in the record. A value of zero in the Range
|
||||
/// field indicates that only one ID is being revoked, a value of one
|
||||
/// in the Range field indicates two ID’s are being revoked, and so on.
|
||||
/// </summary>
|
||||
public ushort Range;
|
||||
|
||||
/// <summary>
|
||||
/// A 6-byte Host ID value identifying the host being revoked (or the
|
||||
/// first in a range of hosts being revoked, in the case of a non-zero
|
||||
/// Range value).
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public byte[]? HostID;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// A properly formatted type 3 or type 4 Media Key Block shall have exactly
|
||||
/// one Host Revocation List Record as its second record. This record provides
|
||||
/// a list of hosts that have been revoked by the AACS LA. The AACS specification
|
||||
/// is applicable to PC-based system where a Licensed Drive and PC Host act
|
||||
/// together as the Recording Device and/or Playback Device for AACS Content.
|
||||
/// AACS uses a drive-host authentication protocol for the host to verify the
|
||||
/// integrity of the data received from the Licensed Drive, and for the Licensed
|
||||
/// Drive to check the validity of the host application. The Type and Version
|
||||
/// Record and the Host Revocation List Record are guaranteed to be the first two
|
||||
/// records of a Media Key Block, to make it easier for Licensed Drives to extract
|
||||
/// this data from an arbitrary Media Key Block.
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class HostRevocationListRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// The total number of Host Revocation List Entry fields that follow.
|
||||
/// </summary>
|
||||
public uint TotalNumberOfEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Revocation list entries
|
||||
/// </summary>
|
||||
public HostRevocationSignatureBlock[]? SignatureBlocks { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class HostRevocationSignatureBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of Host Revocation List Entry fields in the signature block.
|
||||
/// </summary>
|
||||
public uint NumberOfEntries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
public HostRevocationListEntry[]? EntryFields { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// A Media Key Block is formatted as a sequence of contiguous Records.
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class MediaKeyBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// Records
|
||||
/// </summary>
|
||||
public Record[]? Records { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// This record gives the associated encrypted media key data for the
|
||||
/// subset-differences identified in the Explicit Subset-Difference Record.
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class MediaKeyDataRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// Each subset difference has its associated 16 bytes in this
|
||||
/// record, in the same order it is encountered in the subset-difference
|
||||
/// record. This 16 bytes is the ciphertext value C in the media
|
||||
/// key calculation.
|
||||
/// </summary>
|
||||
public byte[][]? MediaKeyData { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// Each Record begins with a one-byte Record Type field, followed by a
|
||||
/// three-byte Record Length field.
|
||||
///
|
||||
/// The following subsections describe the currently defined Record types,
|
||||
/// and how a device processes each. All multi-byte integers, including
|
||||
/// the length field, are “Big Endian”; in other words, the most significant
|
||||
/// byte comes first in the record.
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public abstract class Record
|
||||
{
|
||||
/// <summary>
|
||||
/// The Record Type field value indicates the type of the Record.
|
||||
/// </summary>
|
||||
public RecordType RecordType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Record Length field value indicates the number of bytes in
|
||||
/// the Record, including the Record Type and the Record Length
|
||||
/// fields themselves. Record lengths are always multiples of 4 bytes.
|
||||
/// </summary>
|
||||
// <remarks>UInt24 not UInt32</remarks>
|
||||
public uint RecordLength { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class SubsetDifference
|
||||
{
|
||||
/// <summary>
|
||||
/// The mask for u is given by the first byte. That byte is
|
||||
/// treated as a number, the number of low-order 0-bits in
|
||||
/// the mask. For example, the value 0x01 denotes a mask of
|
||||
/// 0xFFFFFFFE; value 0x0A denotes a mask of 0xFFFFFC00.
|
||||
/// </summary>
|
||||
public byte Mask;
|
||||
|
||||
/// <summary>
|
||||
/// The last 4 bytes are the uv number, most significant
|
||||
/// byte first.
|
||||
/// </summary>
|
||||
public uint Number;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a speed-up record which can be ignored by devices not wishing to
|
||||
/// take advantage of it. It is a lookup table which allows devices to quickly
|
||||
/// find their subset-difference in the Explicit Subset-Difference record,
|
||||
/// without processing the entire record. This Subset-Difference Index record
|
||||
/// is always present, and always precedes the Explicit Subset-Difference record
|
||||
/// in the MKB, although it does not necessarily immediately precede it.
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class SubsetDifferenceIndexRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of devices per index offset.
|
||||
/// </summary>
|
||||
public uint Span { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// These offsets refer to the offset within the following Explicit
|
||||
/// Subset-Difference record, with 0 being the start of the record.
|
||||
/// </summary>
|
||||
// <remarks>UInt24 not UInt32</remarks>
|
||||
public uint[]? Offsets { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// Devices, except for recording devices which are writing Media Key Block
|
||||
/// Extensions, may ignore this record. Recording devices shall verify the
|
||||
/// signature (see End of Media Key Block record) and use the Version Number
|
||||
/// in this record to determine if a new Media Key BLock Extension is, in
|
||||
/// fact, more recent than the Media Key Block Extension that is currently
|
||||
/// on the media.
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class TypeAndVersionRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// For AACS applications, the MKBType field is one of three values.
|
||||
/// It is not an error for a Type 3 Media Key Block to be used for
|
||||
/// controlling access to AACS Content on pre- recorded media. In
|
||||
/// this case, the device shall not use the KCD.
|
||||
/// </summary>
|
||||
public MediaKeyBlockType MediaKeyBlockType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Version Number is a 32-bit unsigned integer. Each time the
|
||||
/// licensing agency changes the revocation, it increments the version
|
||||
/// number and inserts the new value in subsequent Media Key Blocks.
|
||||
/// Thus, larger values indicate more recent Media Key Blocks. The
|
||||
/// Version Numbers begin at 1; 0 is a special value used for test
|
||||
/// Media Key Blocks.
|
||||
/// </summary>
|
||||
public uint VersionNumber { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
namespace SabreTools.Models.AACS
|
||||
{
|
||||
/// <summary>
|
||||
/// A properly formatted MKB shall have exactly one Verify Media Key Record
|
||||
/// as its first record. The presence of the Verify Media Key Record in an MKB
|
||||
/// is mandatory, but the use of the Record by a device is not mandatory. The
|
||||
/// device may use the Verify Media Key Record to verify the correctness of a
|
||||
/// given MKB, or of its processing of it. If everything is correct, the device
|
||||
/// should observe the condition:
|
||||
/// [AES_128D(vKm, C]msb_64 == 0x0123456789ABCDEF)]
|
||||
/// where Km is the Media Key value.
|
||||
/// </summary>
|
||||
/// <see href="https://aacsla.com/wp-content/uploads/2019/02/AACS_Spec_Common_Final_0953.pdf"/>
|
||||
public sealed class VerifyMediaKeyRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 4 through 19 of the Record contain the ciphertext value
|
||||
/// Cv = AES-128E (Km, 0x0123456789ABCDEF || 0xXXXXXXXXXXXXXXXX)
|
||||
/// where 0xXXXXXXXXXXXXXXXX is an arbitrary 8-byte value, and Km is
|
||||
/// the correct final Media Key value.
|
||||
/// </summary>
|
||||
public byte[]? CiphertextValue { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace SabreTools.Models.BDPlus
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public static readonly byte[] SignatureBytes = [0x42, 0x44, 0x53, 0x56, 0x4D, 0x5F, 0x43, 0x43];
|
||||
|
||||
public const string SignatureString = "BDSVM_CC";
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.BDPlus
|
||||
{
|
||||
/// <see href="https://github.com/mwgoldsmith/bdplus/blob/master/src/libbdplus/bdsvm/loader.c"/>
|
||||
public sealed class SVM
|
||||
{
|
||||
/// <summary>
|
||||
/// "BDSVM_CC"
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
|
||||
public string? Signature;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown data
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
||||
public byte[]? Unknown1 = new byte[5];
|
||||
|
||||
/// <summary>
|
||||
/// Version year
|
||||
/// </summary>
|
||||
public ushort Year;
|
||||
|
||||
/// <summary>
|
||||
/// Version month
|
||||
/// </summary>
|
||||
public byte Month;
|
||||
|
||||
/// <summary>
|
||||
/// Version day
|
||||
/// </summary>
|
||||
public byte Day;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown data
|
||||
/// </summary>
|
||||
public uint Unknown2;
|
||||
|
||||
/// <summary>
|
||||
/// Length
|
||||
/// </summary>
|
||||
public uint Length;
|
||||
|
||||
/// <summary>
|
||||
/// Length bytes of data
|
||||
/// </summary>
|
||||
public byte[]? Data { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,621 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.Models.Charts
|
||||
{
|
||||
/// <see href="https://github.com/TheNathannator/GuitarGame_ChartFormats/tree/main/doc/FileFormats/song.ini"/>
|
||||
/// <remarks>[song]/[Song]</remarks>
|
||||
public class SongIni
|
||||
{
|
||||
#region Song/Chart Metadata
|
||||
|
||||
/// <summary>
|
||||
/// Title of the song.
|
||||
/// </summary>
|
||||
/// <remarks>name</remarks>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Artist(s) or band(s) behind the song.
|
||||
/// </summary>
|
||||
/// <remarks>artist</remarks>
|
||||
public string? Artist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Title of the album the song is featured in.
|
||||
/// </summary>
|
||||
/// <remarks>album</remarks>
|
||||
public string? Album { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Genre of the song.
|
||||
/// </summary>
|
||||
/// <remarks>genre</remarks>
|
||||
public string? Genre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sub-genre for the song.
|
||||
/// </summary>
|
||||
/// <remarks>sub_genre</remarks>
|
||||
public string? SubGenre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Year of the song’s release.
|
||||
/// </summary>
|
||||
/// <remarks>year</remarks>
|
||||
public string? Year { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Community member responsible for charting the song.
|
||||
/// </summary>
|
||||
/// <remarks>charter, frets</remarks>
|
||||
public string? Charter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Version number for the song.
|
||||
/// </summary>
|
||||
/// <remarks>version</remarks>
|
||||
public long? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Track number of the song within the album it's from.
|
||||
/// </summary>
|
||||
/// <remarks>album_track, track</remarks>
|
||||
public long? AlbumTrack { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Track number of the song within the playlist/setlist it's from.
|
||||
/// </summary>
|
||||
/// <remarks>playlist_track</remarks>
|
||||
public long? PlaylistTrack { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of the song's audio in milliseconds.
|
||||
/// </summary>
|
||||
/// <remarks>song_length</remarks>
|
||||
public long? SongLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp in milliseconds where the song preview starts.
|
||||
/// </summary>
|
||||
/// <remarks>preview_start_time</remarks>
|
||||
public long? PreviewStartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp in milliseconds that the preview should stop at.
|
||||
/// </summary>
|
||||
/// <remarks>preview_end_time</remarks>
|
||||
public long? PreviewEndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Flavor text for this song, usually shown after picking the song or during loading.
|
||||
/// </summary>
|
||||
/// <remarks>loading_phrase</remarks>
|
||||
public string? LoadingPhrase { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Song/Chart Metadata (Game-Specific)
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Hex color to use in the song screen for the cassette.
|
||||
/// </summary>
|
||||
/// <remarks>cassettecolor</remarks>
|
||||
public string? CassetteColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Miscellaneous tags for the chart.
|
||||
/// Only known valid value is `cover`.
|
||||
/// </summary>
|
||||
/// <remarks>tags</remarks>
|
||||
public string? Tags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Two timestamps in milliseconds for preview start and end time.
|
||||
/// Example: `55000 85000`
|
||||
/// </summary>
|
||||
/// <remarks>preview</remarks>
|
||||
public long[]? Preview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (CH) Playlist that the song should show up in.
|
||||
/// </summary>
|
||||
/// <remarks>playlist</remarks>
|
||||
public string? Playlist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (CH) Sub-playlist that the song should show up in.
|
||||
/// </summary>
|
||||
/// <remarks>sub_playlist</remarks>
|
||||
public string? SubPlaylist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (CH) Indicates if this song is a modchart.
|
||||
/// Meant for sorting purposes only.
|
||||
/// </summary>
|
||||
/// <remarks>modchart</remarks>
|
||||
public bool? Modchart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (CH) Indicates if the song has lyrics or not.
|
||||
/// Meant for sorting purposes only.
|
||||
/// </summary>
|
||||
/// <remarks>lyrics</remarks>
|
||||
public bool? Lyrics { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Track Difficulties
|
||||
|
||||
/// <summary>
|
||||
/// Overall difficulty of the song.
|
||||
/// </summary>
|
||||
/// <remarks>diff_band</remarks>
|
||||
public long? DiffBand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Lead Guitar track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_guitar</remarks>
|
||||
public long? DiffGuitar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the 6-Fret Lead track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_guitarghl</remarks>
|
||||
public long? DiffGuitarGHL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Guitar Co-op track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_guitar_coop</remarks>
|
||||
public long? DiffGuitarCoop { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the 6-Fret Guitar Co-op track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_guitar_coop_ghl</remarks>
|
||||
public long? DiffGuitarCoopGHL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Pro Guitar track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_guitar_real</remarks>
|
||||
public long? DiffGuitarReal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Pro Guitar 22-fret track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_guitar_real_22</remarks>
|
||||
public long? DiffGuitarReal22 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Rhythm Guitar track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_rhythm</remarks>
|
||||
public long? DiffRhythm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the 6-Fret Rhythm Guitar track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_rhythm_ghl</remarks>
|
||||
public long? DiffRhythmGHL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Bass Guitar track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_bass</remarks>
|
||||
public long? DiffBass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the 6-Fret Bass track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_bassghl</remarks>
|
||||
public long? DiffBassGHL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Pro Bass track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_bass_real</remarks>
|
||||
public long? DiffBassReal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Pro Bass 22-fret track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_bass_real_22</remarks>
|
||||
public long? DiffBassReal22 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Drums track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_drums</remarks>
|
||||
public long? DiffDrums { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Pro Drums track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_drums_real</remarks>
|
||||
public long? DiffDrumsReal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Drums Real track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_drums_real_ps</remarks>
|
||||
public long? DiffDrumsRealPS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Keys track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_keys</remarks>
|
||||
public long? DiffKeys { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Pro Keys track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_keys_real</remarks>
|
||||
public long? DiffKeysReal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Keys Real track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_keys_real_ps</remarks>
|
||||
public long? DiffKeysRealPS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Vocals track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_vocals</remarks>
|
||||
public long? DiffVocals { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Harmonies track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_vocals_harm</remarks>
|
||||
public long? DiffVocalsHarm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Difficulty of the Dance track.
|
||||
/// </summary>
|
||||
/// <remarks>diff_dance</remarks>
|
||||
public long? DiffDance { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Chart Properties
|
||||
|
||||
/// <summary>
|
||||
/// Forces the Drums track to be Pro Drums.
|
||||
/// </summary>
|
||||
/// <remarks>pro_drums, pro_drum (FoFiX)</remarks>
|
||||
public bool? ProDrums { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Forces the Drums track to be 5-lane.
|
||||
/// </summary>
|
||||
/// <remarks>five_lane_drums</remarks>
|
||||
public bool? FiveLaneDrums { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies a voice type for the singer (either "male" or "female").
|
||||
/// </summary>
|
||||
/// <remarks>vocal_gender</remarks>
|
||||
public string? VocalGender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies a tuning for 17-fret Pro Guitar.
|
||||
/// </summary>
|
||||
/// <remarks>real_guitar_tuning</remarks>
|
||||
public string? RealGuitarTuning { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies a tuning for 22-fret Pro Guitar.
|
||||
/// </summary>
|
||||
/// <remarks>real_guitar_22_tuning</remarks>
|
||||
public string? RealGuitar22Tuning { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies a tuning for 17-fret Pro Bass.
|
||||
/// </summary>
|
||||
/// <remarks>real_bass_tuning</remarks>
|
||||
public string? RealBassTuning { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies a tuning for 22-fret Pro Bass.
|
||||
/// </summary>
|
||||
/// <remarks>real_bass_22_tuning</remarks>
|
||||
public string? RealBass22Tuning { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the number of lanes for the right hand in Real Keys.
|
||||
/// </summary>
|
||||
/// <remarks>real_keys_lane_count_right</remarks>
|
||||
public long? RealKeysLaneCountRight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the number of lanes for the left hand in Real Keys.
|
||||
/// </summary>
|
||||
/// <remarks>real_keys_lane_count_left</remarks>
|
||||
public long? RealKeysLaneCountLeft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Delays the chart relative to the audio by the specified number of milliseconds.
|
||||
/// Higher = later notes. Can be negative.
|
||||
/// </summary>
|
||||
/// <remarks>delay</remarks>
|
||||
[Obsolete]
|
||||
public long? Delay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the default sustain cutoff threshold with a specified value in ticks.
|
||||
/// </summary>
|
||||
/// <remarks>sustain_cutoff_threshold</remarks>
|
||||
[Obsolete]
|
||||
public long? SustainCutoffThreshold { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the default HOPO threshold with a specified value in ticks.
|
||||
/// </summary>
|
||||
/// <remarks>hopo_frequency</remarks>
|
||||
[Obsolete]
|
||||
public long? HopoFrequency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the HOPO threshold to be a 1/8th step.
|
||||
/// </summary>
|
||||
/// <remarks>eighthnote_hopo</remarks>
|
||||
[Obsolete]
|
||||
public bool? EighthNoteHopo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the .mid note number for Star Power on 5-Fret Guitar.
|
||||
/// Valid values are 103 and 116.
|
||||
/// </summary>
|
||||
/// <remarks>multiplier_note, star_power_note (PS)</remarks>
|
||||
[Obsolete]
|
||||
public long? MultiplierNote { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Chart Properties (Game-Specific)
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Sets 5 to 4 Lane Drums Fallback Note
|
||||
/// </summary>
|
||||
/// <remarks>drum_fallback_blue</remarks>
|
||||
public bool? DrumFallbackBlue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Marks a song as a tutorial and hides it from Quickplay.
|
||||
/// </summary>
|
||||
/// <remarks>tutorial</remarks>
|
||||
public bool? Tutorial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Marks a song as a boss battle.
|
||||
/// </summary>
|
||||
/// <remarks>boss_battle</remarks>
|
||||
public bool? BossBattle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Overrides the natural HOPO threshold using numbers from 0 to 5.
|
||||
/// </summary>
|
||||
/// <remarks>hopofreq</remarks>
|
||||
[Obsolete]
|
||||
public long? HopoFreq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Sets the "early hit window" size.
|
||||
/// Valid values are "none", "half", or "full".
|
||||
/// </summary>
|
||||
/// <remarks>early_hit_window_size</remarks>
|
||||
public string? EarlyHitWindowSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (CH) Sets whether or not end events in the chart will be respected.
|
||||
/// </summary>
|
||||
/// <remarks>end_events</remarks>
|
||||
public bool? EndEvents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Enables .mid SysEx events for guitar sliders/tap notes.
|
||||
/// </summary>
|
||||
/// <remarks>sysex_slider</remarks>
|
||||
public bool? SysExSlider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Enables .mid SysEx events for Real Drums hi-hat pedal control.
|
||||
/// </summary>
|
||||
/// <remarks>sysex_high_hat_ctrl</remarks>
|
||||
public bool? SysExHighHatCtrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Enables .mid SysEx events for Real Drums rimshot hits.
|
||||
/// </summary>
|
||||
/// <remarks>sysex_rimshot</remarks>
|
||||
public bool? SysExRimshot { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Enables .mid SysEx events for guitar open notes.
|
||||
/// </summary>
|
||||
/// <remarks>sysex_open_bass</remarks>
|
||||
public bool? SysExOpenBass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Enables .mid SysEx events for Pro Guitar/Bass slide directions.
|
||||
/// </summary>
|
||||
/// <remarks>sysex_pro_slide</remarks>
|
||||
public bool? SysExProSlide { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Sound sample set index for guitar.
|
||||
/// </summary>
|
||||
/// <remarks>guitar_type</remarks>
|
||||
public long? GuitarType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Sound sample set index for bass.
|
||||
/// </summary>
|
||||
/// <remarks>bass_type</remarks>
|
||||
public long? BassType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Sound sample set index for drums.
|
||||
/// </summary>
|
||||
/// <remarks>kit_type</remarks>
|
||||
public long? KitType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Sound sample set index for keys.
|
||||
/// </summary>
|
||||
/// <remarks>keys_type</remarks>
|
||||
public long? KeysType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Sound sample set index for dance.
|
||||
/// </summary>
|
||||
/// <remarks>dance_type</remarks>
|
||||
public long? DanceType { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Images and Other Resources
|
||||
|
||||
/// <summary>
|
||||
/// Name of an icon image to display for this song.
|
||||
/// Included in either the chart folder or the game the chart was made for, or sourced from this repository of icons.
|
||||
/// </summary>
|
||||
/// <remarks>icon</remarks>
|
||||
public string? Icon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name for a background image file.
|
||||
/// </summary>
|
||||
/// <remarks>background</remarks>
|
||||
public string? Background { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name for a background video file.
|
||||
/// </summary>
|
||||
/// <remarks>video</remarks>
|
||||
public string? Video { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name for a background video file.
|
||||
/// </summary>
|
||||
/// <remarks>video_loop</remarks>
|
||||
public bool? VideoLoop { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp in milliseconds where playback of an included video will start. Can be negative.
|
||||
/// This tag controls the time relative to the video, not relative to the chart. Negative values will delay the video, positive values will make the video be at a further point in when the chart starts.
|
||||
/// </summary>
|
||||
/// <remarks>video_start_time</remarks>
|
||||
public long? VideoStartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp in milliseconds where playback of an included video will end. -1 means no time is specified.
|
||||
/// This is assumed to also be relative to the video, not the chart.
|
||||
/// </summary>
|
||||
/// <remarks>video_end_time</remarks>
|
||||
public long? VideoEndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name for a cover image file.
|
||||
/// </summary>
|
||||
/// <remarks>cover</remarks>
|
||||
public string? Cover { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Images and Other Resources (Game-Specific)
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Name for banner A.
|
||||
/// </summary>
|
||||
/// <remarks>link_name_a</remarks>
|
||||
public string? LinkNameA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Name for banner B.
|
||||
/// </summary>
|
||||
/// <remarks>link_name_b</remarks>
|
||||
public string? LinkNameB { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Link that clicking banner A will open.
|
||||
/// </summary>
|
||||
/// <remarks>banner_link_a</remarks>
|
||||
public string? BannerLinkA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Link that clicking banner B will open.
|
||||
/// </summary>
|
||||
/// <remarks>banner_link_b</remarks>
|
||||
public string? BannerLinkB { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Miscellaneous (Game-Specific)
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) High score data.
|
||||
/// </summary>
|
||||
/// <remarks>scores</remarks>
|
||||
public string? Scores { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Additional score data.
|
||||
/// </summary>
|
||||
/// <remarks>scores_ext</remarks>
|
||||
public string? ScoresExt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Play count.
|
||||
/// </summary>
|
||||
/// <remarks>count</remarks>
|
||||
public long? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (PS) Player's rating of the song
|
||||
/// </summary>
|
||||
/// <remarks>rating</remarks>
|
||||
public long? Rating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Career ID for this song.
|
||||
/// </summary>
|
||||
/// <remarks>unlock_id</remarks>
|
||||
public string? UnlockId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) The career ID that must be completed to unlock this song.
|
||||
/// </summary>
|
||||
/// <remarks>unlock_require</remarks>
|
||||
public string? UnlockRequire { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Text to display if the song is locked.
|
||||
/// </summary>
|
||||
/// <remarks>unlock_text</remarks>
|
||||
public string? UnlockText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (FoFiX) Indicates if the song is unlocked.
|
||||
/// </summary>
|
||||
/// <remarks>unlock_completed</remarks>
|
||||
public long? UnlockCompleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (Editor on Fire) Sets a velocity number for drums accent notes.
|
||||
/// </summary>
|
||||
/// <remarks>eof_midi_import_drum_accent_velocity</remarks>
|
||||
public long? EoFMidiImportDrumAccentVelocity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (Editor on Fire) Sets a velocity number for drums ghost notes.
|
||||
/// </summary>
|
||||
/// <remarks>eof_midi_import_drum_ghost_velocity</remarks>
|
||||
public long? EoFMidiImportDrumGhostVelocity { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
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,18 +0,0 @@
|
||||
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>
|
||||
public class TitlesIni
|
||||
{
|
||||
/// <summary>
|
||||
/// A space-separated list of .ini sections to include in the career.
|
||||
/// </summary>
|
||||
/// <remarks>sections</remarks>
|
||||
public string[]? SectionList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This entry points to other sections that should be used as part of the career.
|
||||
/// </summary>
|
||||
public Tier[]? Sections { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
/// <remarks>
|
||||
/// Information sourced from http://web.archive.org/web/20070221154246/http://www.goldenhawk.com/download/cdrwin.pdf
|
||||
/// </remarks>
|
||||
namespace SabreTools.Models.CueSheets
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single FILE in a cuesheet
|
||||
/// </summary>
|
||||
public class CueFile
|
||||
{
|
||||
/// <summary>
|
||||
/// filename
|
||||
/// </summary>
|
||||
public string? FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// filetype
|
||||
/// </summary>
|
||||
public CueFileType FileType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of TRACK in FILE
|
||||
/// </summary>
|
||||
public CueTrack[]? Tracks { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/// <remarks>
|
||||
/// Information sourced from http://web.archive.org/web/20070221154246/http://www.goldenhawk.com/download/cdrwin.pdf
|
||||
/// </remarks>
|
||||
namespace SabreTools.Models.CueSheets
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single INDEX in a TRACK
|
||||
/// </summary>
|
||||
public class CueIndex
|
||||
{
|
||||
/// <summary>
|
||||
/// INDEX number, between 0 and 99
|
||||
/// </summary>
|
||||
public int Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Starting time of INDEX in minutes
|
||||
/// </summary>
|
||||
public int Minutes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Starting time of INDEX in seconds
|
||||
/// </summary>
|
||||
/// <remarks>There are 60 seconds in a minute</remarks>
|
||||
public int Seconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Starting time of INDEX in frames.
|
||||
/// </summary>
|
||||
/// <remarks>There are 75 frames per second</remarks>
|
||||
public int Frames { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/// <remarks>
|
||||
/// Information sourced from http://web.archive.org/web/20070221154246/http://www.goldenhawk.com/download/cdrwin.pdf
|
||||
/// </remarks>
|
||||
namespace SabreTools.Models.CueSheets
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single cuesheet
|
||||
/// </summary>
|
||||
public class CueSheet
|
||||
{
|
||||
/// <summary>
|
||||
/// CATALOG
|
||||
/// </summary>
|
||||
public string? Catalog { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CDTEXTFILE
|
||||
/// </summary>
|
||||
public string? CdTextFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PERFORMER
|
||||
/// </summary>
|
||||
public string? Performer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SONGWRITER
|
||||
/// </summary>
|
||||
public string? Songwriter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TITLE
|
||||
/// </summary>
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of FILE in cuesheet
|
||||
/// </summary>
|
||||
public CueFile[]? Files { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/// <remarks>
|
||||
/// Information sourced from http://web.archive.org/web/20070221154246/http://www.goldenhawk.com/download/cdrwin.pdf
|
||||
/// </remarks>
|
||||
namespace SabreTools.Models.CueSheets
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single TRACK in a FILE
|
||||
/// </summary>
|
||||
public class CueTrack
|
||||
{
|
||||
/// <summary>
|
||||
/// Track number. The range is 1 to 99.
|
||||
/// </summary>
|
||||
public int Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Track datatype
|
||||
/// </summary>
|
||||
public CueTrackDataType DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FLAGS
|
||||
/// </summary>
|
||||
public CueTrackFlag Flags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ISRC
|
||||
/// </summary>
|
||||
/// <remarks>12 characters in length</remarks>
|
||||
public string? ISRC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PERFORMER
|
||||
/// </summary>
|
||||
public string? Performer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SONGWRITER
|
||||
/// </summary>
|
||||
public string? Songwriter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TITLE
|
||||
/// </summary>
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PREGAP
|
||||
/// </summary>
|
||||
public PreGap? PreGap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of INDEX in TRACK
|
||||
/// </summary>
|
||||
/// <remarks>Must start with 0 or 1 and then sequential</remarks>
|
||||
public CueIndex[]? Indices { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// POSTGAP
|
||||
/// </summary>
|
||||
public PostGap? PostGap { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
using System;
|
||||
|
||||
/// <remarks>
|
||||
/// Information sourced from http://web.archive.org/web/20070221154246/http://www.goldenhawk.com/download/cdrwin.pdf
|
||||
/// </remarks>
|
||||
namespace SabreTools.Models.CueSheets
|
||||
{
|
||||
/// <summary>
|
||||
/// The audio or data file’s filetype
|
||||
/// </summary>
|
||||
public enum CueFileType
|
||||
{
|
||||
/// <summary>
|
||||
/// Intel binary file (least significant byte first). Use for data files.
|
||||
/// </summary>
|
||||
BINARY,
|
||||
|
||||
/// <summary>
|
||||
/// Motorola binary file (most significant byte first). Use for data files.
|
||||
/// </summary>
|
||||
MOTOROLA,
|
||||
|
||||
/// <summary>
|
||||
/// Audio AIFF file (44.1KHz 16-bit stereo)
|
||||
/// </summary>
|
||||
AIFF,
|
||||
|
||||
/// <summary>
|
||||
/// Audio WAVE file (44.1KHz 16-bit stereo)
|
||||
/// </summary>
|
||||
WAVE,
|
||||
|
||||
/// <summary>
|
||||
/// Audio MP3 file (44.1KHz 16-bit stereo)
|
||||
/// </summary>
|
||||
MP3,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Track datatype
|
||||
/// </summary>
|
||||
public enum CueTrackDataType
|
||||
{
|
||||
/// <summary>
|
||||
/// AUDIO, Audio/Music (2352)
|
||||
/// </summary>
|
||||
AUDIO,
|
||||
|
||||
/// <summary>
|
||||
/// CDG, Karaoke CD+G (2448)
|
||||
/// </summary>
|
||||
CDG,
|
||||
|
||||
/// <summary>
|
||||
/// MODE1/2048, CD-ROM Mode1 Data (cooked)
|
||||
/// </summary>
|
||||
MODE1_2048,
|
||||
|
||||
/// <summary>
|
||||
/// MODE1/2352 CD-ROM Mode1 Data (raw)
|
||||
/// </summary>
|
||||
MODE1_2352,
|
||||
|
||||
/// <summary>
|
||||
/// MODE2/2336, CD-ROM XA Mode2 Data
|
||||
/// </summary>
|
||||
MODE2_2336,
|
||||
|
||||
/// <summary>
|
||||
/// MODE2/2352, CD-ROM XA Mode2 Data
|
||||
/// </summary>
|
||||
MODE2_2352,
|
||||
|
||||
/// <summary>
|
||||
/// CDI/2336, CD-I Mode2 Data
|
||||
/// </summary>
|
||||
CDI_2336,
|
||||
|
||||
/// <summary>
|
||||
/// CDI/2352, CD-I Mode2 Data
|
||||
/// </summary>
|
||||
CDI_2352,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Special subcode flags within a track
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum CueTrackFlag
|
||||
{
|
||||
/// <summary>
|
||||
/// DCP, Digital copy permitted
|
||||
/// </summary>
|
||||
DCP = 1 << 0,
|
||||
|
||||
/// <summary>
|
||||
/// 4CH, Four channel audio
|
||||
/// </summary>
|
||||
FourCH = 1 << 1,
|
||||
|
||||
/// <summary>
|
||||
/// PRE, Pre-emphasis enabled (audio tracks only)
|
||||
/// </summary>
|
||||
PRE = 1 << 2,
|
||||
|
||||
/// <summary>
|
||||
/// SCMS, Serial Copy Management System (not supported by all recorders)
|
||||
/// </summary>
|
||||
SCMS = 1 << 3,
|
||||
|
||||
/// <summary>
|
||||
/// DATA, set for data files. This flag is set automatically based on the track’s filetype
|
||||
/// </summary>
|
||||
DATA = 1 << 4,
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/// <remarks>
|
||||
/// Information sourced from http://web.archive.org/web/20070221154246/http://www.goldenhawk.com/download/cdrwin.pdf
|
||||
/// </remarks>
|
||||
namespace SabreTools.Models.CueSheets
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents POSTGAP information of a track
|
||||
/// </summary>
|
||||
public class PostGap
|
||||
{
|
||||
/// <summary>
|
||||
/// Length of POSTGAP in minutes
|
||||
/// </summary>
|
||||
public int Minutes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of POSTGAP in seconds
|
||||
/// </summary>
|
||||
/// <remarks>There are 60 seconds in a minute</remarks>
|
||||
public int Seconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of POSTGAP in frames.
|
||||
/// </summary>
|
||||
/// <remarks>There are 75 frames per second</remarks>
|
||||
public int Frames { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/// <remarks>
|
||||
/// Information sourced from http://web.archive.org/web/20070221154246/http://www.goldenhawk.com/download/cdrwin.pdf
|
||||
/// </remarks>
|
||||
namespace SabreTools.Models.CueSheets
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents PREGAP information of a track
|
||||
/// </summary>
|
||||
public class PreGap
|
||||
{
|
||||
/// <summary>
|
||||
/// Length of PREGAP in minutes
|
||||
/// </summary>
|
||||
public int Minutes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of PREGAP in seconds
|
||||
/// </summary>
|
||||
/// <remarks>There are 60 seconds in a minute</remarks>
|
||||
public int Seconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of PREGAP in frames.
|
||||
/// </summary>
|
||||
/// <remarks>There are 75 frames per second</remarks>
|
||||
public int Frames { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
public sealed class AudioSubPictureAttributesTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of title sets
|
||||
/// </summary>
|
||||
public ushort NumberOfTitleSets { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public ushort Reserved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last VTS_ATRT)
|
||||
/// </summary>
|
||||
public uint EndAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset to VTS_ATRT n
|
||||
/// </summary>
|
||||
/// <remarks>NumberOfTitleSets entries</remarks>
|
||||
public uint[]? Offsets { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entries
|
||||
/// </summary>
|
||||
public AudioSubPictureAttributesTableEntry[]? Entries { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
public sealed class AudioSubPictureAttributesTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// End address (EA)
|
||||
/// </summary>
|
||||
public uint EndAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// VTS_CAT (copy of offset 022-025 of the VTS IFO file)
|
||||
/// 0=unspecified, 1=Karaoke
|
||||
/// </summary>
|
||||
public uint Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Copy of VTS attributes (offset 100 and on from the VTS IFO
|
||||
/// file, usually 0x300 bytes long)
|
||||
/// </summary>
|
||||
public byte[]? AttributesCopy { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo.html"/>
|
||||
public sealed class CellAddressTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of VOB IDs
|
||||
/// </summary>
|
||||
public ushort NumberOfVOBIDs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public ushort Reserved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last entry)
|
||||
/// </summary>
|
||||
public uint EndAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 12-byte entries
|
||||
/// </summary>
|
||||
/// <remarks>NumberOfVOBIDs entries</remarks>
|
||||
public CellAddressTableEntry[]? Entries { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo.html"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class CellAddressTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// VOBidn
|
||||
/// </summary>
|
||||
public ushort VOBIdentity;
|
||||
|
||||
/// <summary>
|
||||
/// CELLidn
|
||||
/// </summary>
|
||||
public byte CellIdentity;
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved;
|
||||
|
||||
/// <summary>
|
||||
/// Starting sector within VOB
|
||||
/// </summary>
|
||||
public uint StartingSectorWithinVOB;
|
||||
|
||||
/// <summary>
|
||||
/// Ending sector within VOB
|
||||
/// </summary>
|
||||
public uint EndingSectorWithinVOB;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public const string VideoManagerIFOSignature = "DVDVIDEO-VMG";
|
||||
|
||||
public const string VideoTitleSetIFOSignature = "DVDVIDEO-VTS";
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
[Flags]
|
||||
public enum ProgramChainCategory : byte
|
||||
{
|
||||
MenuTypeTitle = 0x02,
|
||||
Entry = 0x80,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum TitleType : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Uop0 Time play or search
|
||||
/// </summary>
|
||||
Uop0TimePlayOrSearch = 0x01,
|
||||
|
||||
/// <summary>
|
||||
/// Uop1 PTT play or search
|
||||
/// </summary>
|
||||
Uop1PTTPlayOrSearch = 0x02,
|
||||
|
||||
/// <summary>
|
||||
/// Jump/Link/Call commands - exist
|
||||
/// </summary>
|
||||
JumpLinkCallExist = 0x04,
|
||||
|
||||
/// <summary>
|
||||
/// Jump/Link/Call commands - button
|
||||
/// </summary>
|
||||
JumpLinkCallButton = 0x08,
|
||||
|
||||
/// <summary>
|
||||
/// Jump/Link/Call commands - pre/post
|
||||
/// </summary>
|
||||
JumpLinkCallPrePost = 0x10,
|
||||
|
||||
/// <summary>
|
||||
/// Jump/Link/Call commands - cell
|
||||
/// </summary>
|
||||
JumpLinkCallCell = 0x20,
|
||||
|
||||
/// <summary>
|
||||
/// 0=one_sequential_pgc
|
||||
/// 1=not one_sequential (random, shuffle, stills, loops, or more than one pgc)
|
||||
/// </summary>
|
||||
ComplexPGC = 0x40,
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
Reserved = 0x80,
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
public sealed class LanguageUnitTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of Language Units
|
||||
/// </summary>
|
||||
public ushort NumberOfLanguageUnits { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public ushort Reserved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last PGC in last LU)
|
||||
/// relative to VMGM_PGCI_UT
|
||||
/// </summary>
|
||||
public uint EndAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Language Units
|
||||
/// </summary>
|
||||
/// <remarks>NumberOfVOBIDs entries</remarks>
|
||||
public LanguageUnitTableEntry[]? Entries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Program Chains
|
||||
/// </summary>
|
||||
/// <remarks>NumberOfVOBIDs entries</remarks>
|
||||
public ProgramChainTable[]? ProgramChains { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class LanguageUnitTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// ISO639 language code
|
||||
/// </summary>
|
||||
public ushort ISO639LanguageCode;
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for language code extension
|
||||
/// </summary>
|
||||
public byte Reserved;
|
||||
|
||||
/// <summary>
|
||||
/// Menu existence flag [80 = title]
|
||||
/// </summary>
|
||||
public byte MenuExistenceFlag;
|
||||
|
||||
/// <summary>
|
||||
/// Offset to VMGM_LU, relative to VMGM_PGCI_UT
|
||||
/// </summary>
|
||||
public uint LanguageUnitOffset;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <summary>
|
||||
/// The VMG_PTL_MAIT is searched by country, and points to
|
||||
/// the table for each country.
|
||||
/// </summary>
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
public sealed class ParentalManagementMasksTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of countries
|
||||
/// </summary>
|
||||
public ushort NumberOfCountries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of title sets (NTs)
|
||||
/// </summary>
|
||||
public ushort NumberOfTitleSets { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last PTL_MAIT)
|
||||
/// </summary>
|
||||
public uint EndAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entries
|
||||
/// </summary>
|
||||
public ParentalManagementMasksTableEntry[]? Entries { get; set; }
|
||||
|
||||
/// <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>
|
||||
public byte[][]? BitMasks { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class ParentalManagementMasksTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Country code
|
||||
/// </summary>
|
||||
public ushort CountryCode;
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public ushort Reserved;
|
||||
|
||||
/// <summary>
|
||||
/// Offset to PTL_MAIT
|
||||
/// </summary>
|
||||
public uint Offset;
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
public sealed class ProgramChainTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of Program Chains
|
||||
/// </summary>
|
||||
public ushort NumberOfProgramChains { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public ushort Reserved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last PGC in this LU)
|
||||
/// relative to VMGM_LU
|
||||
/// </summary>
|
||||
public uint EndAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Program Chains
|
||||
/// </summary>
|
||||
/// <remarks>NumberOfProgramChains entries</remarks>
|
||||
public ProgramChainTableEntry[]? Entries { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class ProgramChainTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// PGC category
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public ProgramChainCategory Category;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
public byte Unknown;
|
||||
|
||||
/// <summary>
|
||||
/// Parental management mask
|
||||
/// </summary>
|
||||
public ushort ParentalManagementMask;
|
||||
|
||||
/// <summary>
|
||||
/// Offset to VMGM_PGC, relative to VMGM_LU
|
||||
/// </summary>
|
||||
public uint Offset;
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
public sealed class TitlesTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of titles
|
||||
/// </summary>
|
||||
public ushort NumberOfTitles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public ushort Reserved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End address (last byte of last entry)
|
||||
/// </summary>
|
||||
public uint EndAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 12-byte entries
|
||||
/// </summary>
|
||||
/// <remarks>NumberOfTitles entries</remarks>
|
||||
public TitlesTableEntry[]? Entries { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo_vmg.html"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class TitlesTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Title type
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public TitleType TitleType;
|
||||
|
||||
/// <summary>
|
||||
/// Number of angles
|
||||
/// </summary>
|
||||
public byte NumberOfAngles;
|
||||
|
||||
/// <summary>
|
||||
/// Number of chapters (PTTs)
|
||||
/// </summary>
|
||||
public ushort NumberOfChapters;
|
||||
|
||||
/// <summary>
|
||||
/// Parental management mask
|
||||
/// </summary>
|
||||
public ushort ParentalManagementMask;
|
||||
|
||||
/// <summary>
|
||||
/// Video Title Set number (VTSN)
|
||||
/// </summary>
|
||||
public byte VideoTitleSetNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Title number within VTS (VTS_TTN)
|
||||
/// </summary>
|
||||
public byte TitleNumberWithinVTS;
|
||||
|
||||
/// <summary>
|
||||
/// Start sector for VTS, referenced to whole disk
|
||||
/// (video_ts.ifo starts at sector 00000000)
|
||||
/// </summary>
|
||||
public uint VTSStartSector;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo.html"/>
|
||||
public sealed class VOBUAddressMap
|
||||
{
|
||||
/// <summary>
|
||||
/// End address (last byte of last entry)
|
||||
/// </summary>
|
||||
public uint EndAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Starting sector within VOB of nth VOBU
|
||||
/// </summary>
|
||||
public uint[]? StartingSectors { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo.html"/>
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
public sealed class VideoManagerIFO
|
||||
{
|
||||
/// <summary>
|
||||
/// "DVDVIDEO-VMG"
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]
|
||||
public string? Signature;
|
||||
|
||||
/// <summary>
|
||||
/// Last sector of VMG set (last sector of BUP)
|
||||
/// </summary>
|
||||
public uint LastVMGSetSector;
|
||||
|
||||
/// <summary>
|
||||
/// Last sector of IFO
|
||||
/// </summary>
|
||||
public uint LastIFOSector;
|
||||
|
||||
/// <summary>
|
||||
/// Version number
|
||||
/// - Byte 0 - Reserved, should be 0
|
||||
/// - Byte 1, Bits 7-4 - Major version number
|
||||
/// - Byte 1, Bits 3-0 - Minor version number
|
||||
/// </summary>
|
||||
public ushort VersionNumber;
|
||||
|
||||
/// <summary>
|
||||
/// VMG category
|
||||
/// </summary>
|
||||
/// <remarks>byte1=prohibited region mask</remarks>
|
||||
public uint VMGCategory;
|
||||
|
||||
/// <summary>
|
||||
/// Number of volumes
|
||||
/// </summary>
|
||||
public ushort NumberOfVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Volume number
|
||||
/// </summary>
|
||||
public ushort VolumeNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Side ID
|
||||
/// </summary>
|
||||
public byte SideID;
|
||||
|
||||
/// <summary>
|
||||
/// Number of title sets
|
||||
/// </summary>
|
||||
public ushort NumberOfTitleSets;
|
||||
|
||||
/// <summary>
|
||||
/// Provider ID
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public byte[]? ProviderID;
|
||||
|
||||
/// <summary>
|
||||
/// VMG POS
|
||||
/// </summary>
|
||||
public ulong VMGPOS;
|
||||
|
||||
/// <summary>
|
||||
/// End byte address of VMGI_MAT
|
||||
/// </summary>
|
||||
public uint InformationManagementTableEndByteAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Start address of FP_PGC (First Play program chain)
|
||||
/// </summary>
|
||||
public uint FirstPlayProgramChainStartAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Start sector of Menu VOB
|
||||
/// </summary>
|
||||
public uint MenuVOBStartSector;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to TT_SRPT (table of titles)
|
||||
/// </summary>
|
||||
public uint TableOfTitlesSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VMGM_PGCI_UT (Menu Program Chain table)
|
||||
/// </summary>
|
||||
public uint MenuProgramChainTableSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VMG_PTL_MAIT (Parental Management masks)
|
||||
/// </summary>
|
||||
public uint ParentalManagementMasksSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VMG_VTS_ATRT (copies of VTS audio/sub-picture attributes)
|
||||
/// </summary>
|
||||
public uint AudioSubPictureAttributesSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VMG_TXTDT_MG (text data)
|
||||
/// </summary>
|
||||
public uint TextDataSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VMGM_C_ADT (menu cell address table)
|
||||
/// </summary>
|
||||
public uint MenuCellAddressTableSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VMGM_VOBU_ADMAP (menu VOBU address map)
|
||||
/// </summary>
|
||||
public uint MenuVOBUAddressMapSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Video attributes of VMGM_VOBS
|
||||
/// </summary>
|
||||
public ushort VideoAttributes;
|
||||
|
||||
/// <summary>
|
||||
/// Number of audio streams in VMGM_VOBS
|
||||
/// </summary>
|
||||
public ushort NumberOfAudioStreams;
|
||||
|
||||
/// <summary>
|
||||
/// Audio attributes of VMGM_VOBS
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public ulong[]? AudioAttributes;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[]? Unknown;
|
||||
|
||||
/// <summary>
|
||||
/// Number of subpicture streams in VMGM_VOBS (0 or 1)
|
||||
/// </summary>
|
||||
public ushort NumberOfSubpictureStreams;
|
||||
|
||||
/// <summary>
|
||||
/// Subpicture attributes of VMGM_VOBS
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public byte[]? SubpictureAttributes;
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 164)]
|
||||
public byte[]? Reserved;
|
||||
}
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.DVD
|
||||
{
|
||||
/// <see href="https://dvd.sourceforge.net/dvdinfo/ifo.html"/>
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
public sealed class VideoTitleSetIFO
|
||||
{
|
||||
/// <summary>
|
||||
/// "DVDVIDEO-VTS"
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]
|
||||
public string? Signature;
|
||||
|
||||
/// <summary>
|
||||
/// Last sector of title set (last sector of BUP)
|
||||
/// </summary>
|
||||
public uint LastTitleSetSector;
|
||||
|
||||
/// <summary>
|
||||
/// Last sector of IFO
|
||||
/// </summary>
|
||||
public uint LastIFOSector;
|
||||
|
||||
/// <summary>
|
||||
/// Version number
|
||||
/// - Byte 0 - Reserved, should be 0
|
||||
/// - Byte 1, Bits 7-4 - Major version number
|
||||
/// - Byte 1, Bits 3-0 - Minor version number
|
||||
/// </summary>
|
||||
public ushort VersionNumber;
|
||||
|
||||
/// <summary>
|
||||
/// VTS category
|
||||
/// </summary>
|
||||
/// <remarks>0=unspecified, 1=Karaoke</remarks>
|
||||
public uint VMGCategory;
|
||||
|
||||
/// <summary>
|
||||
/// Number of volumes
|
||||
/// </summary>
|
||||
public ushort NumberOfVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Volume number
|
||||
/// </summary>
|
||||
public ushort VolumeNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Side ID
|
||||
/// </summary>
|
||||
public byte SideID;
|
||||
|
||||
/// <summary>
|
||||
/// Number of title sets
|
||||
/// </summary>
|
||||
public ushort NumberOfTitleSets;
|
||||
|
||||
/// <summary>
|
||||
/// Provider ID
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public byte[]? ProviderID;
|
||||
|
||||
/// <summary>
|
||||
/// VMG POS
|
||||
/// </summary>
|
||||
public ulong VMGPOS;
|
||||
|
||||
/// <summary>
|
||||
/// End byte address of VTS_MAT
|
||||
/// </summary>
|
||||
public uint InformationManagementTableEndByteAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Start address of FP_PGC (First Play program chain)
|
||||
/// </summary>
|
||||
public uint FirstPlayProgramChainStartAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Start sector of Menu VOB
|
||||
/// </summary>
|
||||
public uint MenuVOBStartSector;
|
||||
|
||||
/// <summary>
|
||||
/// Start sector of Title VOB
|
||||
/// </summary>
|
||||
public uint TitleVOBStartSector;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VTS_PTT_SRPT (table of Titles and Chapters)
|
||||
/// </summary>
|
||||
public uint TableOfTitlesAndChaptersSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VTS_PGCI (Title Program Chain table)
|
||||
/// </summary>
|
||||
public uint TitleProgramChainTableSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VTSM_PGCI_UT (Menu Program Chain table)
|
||||
/// </summary>
|
||||
public uint MenuProgramChainTableSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VTS_TMAPTI (time map)
|
||||
/// </summary>
|
||||
public uint TimeMapSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VTSM_C_ADT (menu cell address table)
|
||||
/// </summary>
|
||||
public uint MenuCellAddressTableSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VTSM_VOBU_ADMAP (menu VOBU address map)
|
||||
/// </summary>
|
||||
public uint MenuVOBUAddressMapSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VTS_C_ADT (title set cell address table)
|
||||
/// </summary>
|
||||
public uint TitleSetCellAddressTableSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Sector pointer to VTS_VOBU_ADMAP (title set VOBU address map)
|
||||
/// </summary>
|
||||
public uint TitleSetVOBUAddressMapSectorPointer;
|
||||
|
||||
/// <summary>
|
||||
/// Video attributes of VTSM_VOBS
|
||||
/// </summary>
|
||||
public ushort VideoAttributes;
|
||||
|
||||
/// <summary>
|
||||
/// Number of audio streams in VTSM_VOBS
|
||||
/// </summary>
|
||||
public ushort NumberOfAudioStreams;
|
||||
|
||||
/// <summary>
|
||||
/// Audio attributes of VTSM_VOBS
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public ulong[]? AudioAttributes;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[]? Unknown;
|
||||
|
||||
/// <summary>
|
||||
/// Number of subpicture streams in VTSM_VOBS (0 or 1)
|
||||
/// </summary>
|
||||
public ushort NumberOfSubpictureStreams;
|
||||
|
||||
/// <summary>
|
||||
/// Subpicture attributes of VTSM_VOBS
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public byte[]? SubpictureAttributes;
|
||||
|
||||
/// <summary>
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 164)]
|
||||
public byte[]? Reserved;
|
||||
}
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
namespace SabreTools.Models.IRD
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/Bluray_disc#IRD_file"/>
|
||||
/// <see href="https://github.com/SabreTools/MPF/files/13062347/IRD.File.Format.pdf"/>
|
||||
public class File
|
||||
{
|
||||
/// <summary>
|
||||
/// "3IRD"
|
||||
/// </summary>
|
||||
public byte[]? Magic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Version
|
||||
/// </summary>
|
||||
/// <remarks>Versions 6 - 9 are accepted</remarks>
|
||||
public byte Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The same value stored in PARAM.SFO / TITLE_ID
|
||||
/// </summary>
|
||||
/// <remarks>9 bytes, ASCII, stored without dashes</remarks>
|
||||
public string? TitleID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes that follow containing the title
|
||||
/// </summary>
|
||||
public byte TitleLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The same value stored in PARAM.SFO / TITLE
|
||||
/// </summary>
|
||||
/// <remarks><see cref="TitleLength"/> bytes, ASCII</remarks>
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The same value stored in PARAM.SFO / PS3_SYSTEM_VER
|
||||
/// </summary>
|
||||
/// <remarks>4 bytes, ASCII, missing uses "0000"</remarks>
|
||||
public string? SystemVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The same value stored in PARAM.SFO / VERSION
|
||||
/// </summary>
|
||||
/// <remarks>5 bytes, ASCII</remarks>
|
||||
public string? GameVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The same value stored in PARAM.SFO / APP_VER
|
||||
/// </summary>
|
||||
/// <remarks>5 bytes, ASCII</remarks>
|
||||
public string? AppVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of the gzip-compressed header data
|
||||
/// </summary>
|
||||
public uint HeaderLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gzip-compressed header data
|
||||
/// </summary>
|
||||
public byte[]? Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of the gzip-compressed footer data
|
||||
/// </summary>
|
||||
public uint FooterLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gzip-compressed footer data
|
||||
/// </summary>
|
||||
public byte[]? Footer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of complete regions in the image
|
||||
/// </summary>
|
||||
public byte RegionCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// MD5 hashes for all complete regions in the image
|
||||
/// </summary>
|
||||
/// <remarks><see cref="RegionCount"/> regions, 16-bytes per hash</remarks>
|
||||
public byte[][]? RegionHashes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of decrypted files in the image
|
||||
/// </summary>
|
||||
public uint FileCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Starting sector for each decrypted file
|
||||
/// </summary>
|
||||
/// <remarks><see cref="FileCount"/> files, alternating with each <see cref="FileHashes"/> entry</remarks>
|
||||
public ulong[]? FileKeys { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// MD5 hashes for all decrypted files in the image
|
||||
/// </summary>
|
||||
/// <remarks><see cref="FileCount"/> files, 16-bytes per hash, alternating with each <see cref="FileHashes"/> entry</remarks>
|
||||
public byte[][]? FileHashes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Extra Config, usually 0x0000
|
||||
/// </summary>
|
||||
public ushort ExtraConfig { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Attachments, usually 0x0000
|
||||
/// </summary>
|
||||
public ushort Attachments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// D1 key
|
||||
/// </summary>
|
||||
/// <remarks>16 bytes</remarks>
|
||||
public byte[]? Data1Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// D2 key
|
||||
/// </summary>
|
||||
/// <remarks>16 bytes</remarks>
|
||||
public byte[]? Data2Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Uncompressed PIC data
|
||||
/// </summary>
|
||||
/// <remarks>115 bytes, before D1/D2 keys on version 9</remarks>
|
||||
public byte[]? PIC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique Identifier
|
||||
/// </summary>
|
||||
/// <remarks>Not present on version 6 and prior, after AppVersion on version 7</remarks>
|
||||
public uint UID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IRD content CRC
|
||||
/// </summary>
|
||||
public uint CRC { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace SabreTools.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Marks a key as unable to be filtered on
|
||||
/// </summary>
|
||||
[System.AttributeUsage(System.AttributeTargets.Field)]
|
||||
public class NoFilterAttribute : System.Attribute { }
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace SabreTools.Models.PIC
|
||||
{
|
||||
/// <see href="https://www.t10.org/ftp/t10/document.05/05-206r0.pdf"/>
|
||||
/// <see href="https://github.com/aaru-dps/Aaru.Decoders/blob/devel/Bluray/DI.cs"/>
|
||||
public class Constants
|
||||
{
|
||||
public const string DiscTypeIdentifierROM = "BDO";
|
||||
|
||||
public const string DiscTypeIdentifierROMUltra = "BDU";
|
||||
|
||||
public const string DiscTypeIdentifierReWritable = "BDW";
|
||||
|
||||
public const string DiscTypeIdentifierRecordable = "BDR";
|
||||
|
||||
public const string DiscTypeIdentifierXGD4 = "XG4";
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
namespace SabreTools.Models.PIC
|
||||
{
|
||||
/// <summary>
|
||||
/// Disc Information and Emergency Brake data shall be read from the PIC zone. DI units that
|
||||
/// contain physical information shall be returned.Emergency Brake data shall be returned.The
|
||||
/// information shall be collected from the layer specified in the Layer field of the CDB. If any data
|
||||
/// can be returned, 4 100 bytes shall be returned.
|
||||
/// </summary>
|
||||
/// <see href="https://www.t10.org/ftp/t10/document.05/05-206r0.pdf"/>
|
||||
/// <see href="https://github.com/aaru-dps/Aaru.Decoders/blob/devel/Bluray/DI.cs"/>
|
||||
public class DiscInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// 2048 bytes for BD-ROM, 3584 bytes for BD-R/RE
|
||||
/// </summary>
|
||||
/// <remarks>Big-endian format</remarks>
|
||||
public ushort DataStructureLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should be 0x00
|
||||
/// </summary>
|
||||
public byte Reserved0 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should be 0x00
|
||||
/// </summary>
|
||||
public byte Reserved1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disc information and emergency brake units
|
||||
/// </summary>
|
||||
public DiscInformationUnit[]? Units { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace SabreTools.Models.PIC
|
||||
{
|
||||
/// <see href="https://www.t10.org/ftp/t10/document.05/05-206r0.pdf"/>
|
||||
/// <see href="https://github.com/aaru-dps/Aaru.Decoders/blob/devel/Bluray/DI.cs"/>
|
||||
public class DiscInformationUnit
|
||||
{
|
||||
/// <summary>
|
||||
/// Unit header
|
||||
/// </summary>
|
||||
public DiscInformationUnitHeader? Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unit body
|
||||
/// </summary>
|
||||
public DiscInformationUnitBody? Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unit trailer (BD-R/RE only)
|
||||
/// </summary>
|
||||
public DiscInformationUnitTrailer? Trailer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
namespace SabreTools.Models.PIC
|
||||
{
|
||||
/// <see href="https://www.t10.org/ftp/t10/document.05/05-206r0.pdf"/>
|
||||
/// <see href="https://github.com/aaru-dps/Aaru.Decoders/blob/devel/Bluray/DI.cs"/>
|
||||
/// TODO: Write models for the dependent contents, if possible
|
||||
public class DiscInformationUnitBody
|
||||
{
|
||||
/// <summary>
|
||||
/// Disc Type Identifier
|
||||
/// </summary>
|
||||
public string? DiscTypeIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disc Size/Class/Version
|
||||
/// </summary>
|
||||
public byte DiscSizeClassVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// DI Unit Format dependent contents
|
||||
/// </summary>
|
||||
/// <remarks>52 bytes for BD-ROM, 100 bytes for BD-R/RE</remarks>
|
||||
public byte[]? FormatDependentContents { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.PIC
|
||||
{
|
||||
/// <see href="https://www.t10.org/ftp/t10/document.05/05-206r0.pdf"/>
|
||||
/// <see href="https://github.com/aaru-dps/Aaru.Decoders/blob/devel/Bluray/DI.cs"/>
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
public class DiscInformationUnitHeader
|
||||
{
|
||||
/// <summary>
|
||||
/// Disc Information Identifier "DI"
|
||||
/// Emergency Brake Identifier "EB"
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]
|
||||
public string? DiscInformationIdentifier;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Information Format
|
||||
/// </summary>
|
||||
public byte DiscInformationFormat;
|
||||
|
||||
/// <summary>
|
||||
/// Number of DI units in each DI block
|
||||
/// </summary>
|
||||
public byte NumberOfUnitsInBlock;
|
||||
|
||||
/// <summary>
|
||||
/// Should be 0x00
|
||||
/// </summary>
|
||||
public byte Reserved0;
|
||||
|
||||
/// <summary>
|
||||
/// DI unit Sequence Number
|
||||
/// </summary>
|
||||
public byte SequenceNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes in use in this DI unit
|
||||
/// </summary>
|
||||
public byte BytesInUse;
|
||||
|
||||
/// <summary>
|
||||
/// Should be 0x00
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.PIC
|
||||
{
|
||||
/// <summary>
|
||||
/// BD-R/RE only
|
||||
/// </summary>
|
||||
/// <see href="https://www.t10.org/ftp/t10/document.05/05-206r0.pdf"/>
|
||||
/// <see href="https://github.com/aaru-dps/Aaru.Decoders/blob/devel/Bluray/DI.cs"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class DiscInformationUnitTrailer
|
||||
{
|
||||
/// <summary>
|
||||
/// Disc Manufacturer ID
|
||||
/// </summary>
|
||||
/// <remarks>6 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public byte[]? DiscManufacturerID;
|
||||
|
||||
/// <summary>
|
||||
/// Media Type ID
|
||||
/// </summary>
|
||||
/// <remarks>3 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||
public byte[]? MediaTypeID;
|
||||
|
||||
/// <summary>
|
||||
/// Time Stamp
|
||||
/// </summary>
|
||||
public ushort TimeStamp;
|
||||
|
||||
/// <summary>
|
||||
/// Product Revision Number
|
||||
/// </summary>
|
||||
public byte ProductRevisionNumber;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
// TODO: Add more constants from the wiki
|
||||
namespace SabreTools.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PS3_DISC.SFB"/>
|
||||
public static class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifying bytes for SFO file
|
||||
/// </summary>
|
||||
public const uint SFOMagic = 0x00505346;
|
||||
|
||||
/// <summary>
|
||||
/// Identifying bytes for SFB file
|
||||
/// </summary>
|
||||
public const uint SFBMagic = 0x2E534642;
|
||||
|
||||
#region Hybrid Flags
|
||||
|
||||
/// <summary>
|
||||
/// Not dependant of other disc files, enables a network connection to PSN store
|
||||
/// </summary>
|
||||
public const char FlagDiscBenefits = 'S';
|
||||
|
||||
/// <summary>
|
||||
/// dev_bdvd/PS3_CONTENT/THEMEDIR/PARAM.SFO
|
||||
/// </summary>
|
||||
public const char FlagThemes = 'T';
|
||||
|
||||
/// <summary>
|
||||
/// dev_bdvd/PS3_CONTENT/VIDEODIR/PARAM.SFO
|
||||
/// </summary>
|
||||
public const char FlagVideo = 'V';
|
||||
|
||||
/// <summary>
|
||||
/// friends? (unknown yet, usually combined with g/p?)
|
||||
/// </summary>
|
||||
public const char FlagFriends = 'f';
|
||||
|
||||
/// <summary>
|
||||
/// dev_bdvd/PS3_GAME/USRDIR/PARAM.SFO
|
||||
/// dev_bdvd/PS3_EXTRA/PARAM.SFO
|
||||
/// </summary>
|
||||
public const char FlagGameExtras = 'g';
|
||||
|
||||
/// <summary>
|
||||
/// music?
|
||||
/// </summary>
|
||||
public const char FlagMusic = 'm';
|
||||
|
||||
/// <summary>
|
||||
/// photo? (unknown yet, used with v, fv,..)
|
||||
/// </summary>
|
||||
public const char FlagPhoto = 'p';
|
||||
|
||||
/// <summary>
|
||||
/// dev_bdvd/PS3_UPDATE/PS3UPDAT.PUP
|
||||
/// </summary>
|
||||
public const char FlagFirmwareUpdate = 'u';
|
||||
|
||||
/// <summary>
|
||||
/// dev_bdvd/PS3_VPRM/PARAM.SFO
|
||||
/// </summary>
|
||||
public const char FlagMovie = 'v';
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
// TODO: Add more enumerations from the wiki
|
||||
namespace SabreTools.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
public enum DataFormat : ushort
|
||||
{
|
||||
/// <summary>
|
||||
/// UTF-8 Special Mode, NOT NULL terminated
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Used in SFO's generated by the system and/or linked to an user (Game Saves and Trophies).
|
||||
/// </remarks>
|
||||
UTF8SpecialMode = 0x0004,
|
||||
|
||||
/// <summary>
|
||||
/// UTF-8 character string, NULL terminated (0x00)
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Can be used any character from the system fonts. The NULL byte is counted as part of the used bytes in len
|
||||
/// </remarks>
|
||||
UTF8 = 0x0204,
|
||||
|
||||
/// <summary>
|
||||
/// Integer 32 bits unsigned
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Always has a length of 4 bytes in len and max_len (even in the case some bytes are not used, all them are marked as used)
|
||||
/// </remarks>
|
||||
Integer = 0x0404,
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PS3_DISC.SFB"/>
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
public class SFB
|
||||
{
|
||||
/// <summary>
|
||||
/// ".SFB"
|
||||
/// </summary>
|
||||
public uint Magic;
|
||||
|
||||
/// <summary>
|
||||
/// File version(?)
|
||||
/// </summary>
|
||||
public uint FileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown (zeroes)
|
||||
/// </summary>
|
||||
/// <remarks>0x18 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x18)]
|
||||
public byte[]? Reserved1;
|
||||
|
||||
/// <summary>
|
||||
/// "HYBRID_FLAG" (Flags type)
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x10)]
|
||||
public string? FlagsType;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Content Data Offset
|
||||
/// </summary>
|
||||
public uint DiscContentDataOffset;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Content Data Length
|
||||
/// </summary>
|
||||
public uint DiscContentDataLength;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown (zeroes)
|
||||
/// </summary>
|
||||
/// <remarks>0x08 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x08)]
|
||||
public byte[]? Reserved2;
|
||||
|
||||
/// <summary>
|
||||
/// "TITLE_ID" (Disc Title Name)
|
||||
/// </summary>
|
||||
/// <remarks>0x08 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x08)]
|
||||
public string? DiscTitleName;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown (zeroes)
|
||||
/// </summary>
|
||||
/// <remarks>0x08 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x08)]
|
||||
public byte[]? Reserved3;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Version Data Offset
|
||||
/// </summary>
|
||||
public uint DiscVersionDataOffset;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Version Data Length
|
||||
/// </summary>
|
||||
public uint DiscVersionDataLength;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown (zeroes)
|
||||
/// </summary>
|
||||
/// <remarks>0x188 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x188)]
|
||||
public byte[]? Reserved4;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Content (Hybrid Flags)
|
||||
/// </summary>
|
||||
/// <remarks>0x20 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x20)]
|
||||
public string? DiscContent;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Title
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x10)]
|
||||
public string? DiscTitle;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Version
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x10)]
|
||||
public string? DiscVersion;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown (zeroes)
|
||||
/// </summary>
|
||||
/// <remarks>0x3C0 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x3C0)]
|
||||
public byte[]? Reserved5;
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
namespace SabreTools.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
public class SFO
|
||||
{
|
||||
/// <summary>
|
||||
/// SFO header
|
||||
/// </summary>
|
||||
public SFOHeader? Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Index table
|
||||
/// </summary>
|
||||
public SFOIndexTableEntry[]? IndexTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Key table
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Composed by a number of key entries defined with tables_entries in
|
||||
/// the header, are short utf8 strings in capitals, NULL terminated
|
||||
/// (0x00), and ordered alphabetically (from A to Z). This alphabetically
|
||||
/// order defines the order of the associated entries in the other
|
||||
/// two tables (index_table, and data_table)
|
||||
///
|
||||
/// The end offset of this table needs to be aligned to a multiply of
|
||||
/// 32bits (4 bytes), this is made with a padding at the end of key_table
|
||||
/// when needed (in a few SFO's the table is aligned naturally as a
|
||||
/// coincidence caused by the length of the key names used, when this
|
||||
/// happens there is no padding needed)
|
||||
/// </remarks>
|
||||
public string[]? KeyTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Padding
|
||||
/// </summary>
|
||||
/// <remarks>Enough bytes to align to 4 bytes</remarks>
|
||||
public byte[]? Padding { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Data table
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Composed by a number of data entries defined with tables_entries in
|
||||
/// the header, every entry in this table is defined by the associated entry
|
||||
/// in the index_table by using: fmt, len, max_len, and offset. There is
|
||||
/// no padding between entries neither at the end of this table
|
||||
///
|
||||
/// Some data entries can be filled with zeroes (not used, but availables for
|
||||
/// being used). This entries can be considered reserved, and are marked with
|
||||
/// a len = 0 in the associated entry in the index_table
|
||||
/// </remarks>
|
||||
public byte[][]? DataTable { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class SFOHeader
|
||||
{
|
||||
/// <summary>
|
||||
/// "\0PSF"
|
||||
/// </summary>
|
||||
public uint Magic;
|
||||
|
||||
/// <summary>
|
||||
/// Version
|
||||
/// </summary>
|
||||
public uint Version;
|
||||
|
||||
/// <summary>
|
||||
/// Absolute start offset of key_table
|
||||
/// </summary>
|
||||
public uint KeyTableStart;
|
||||
|
||||
/// <summary>
|
||||
/// Absolute start offset of data_table
|
||||
/// </summary>
|
||||
public uint DataTableStart;
|
||||
|
||||
/// <summary>
|
||||
/// Number of entries in index_table, key_table, and data_table
|
||||
/// </summary>
|
||||
public uint TablesEntries;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class SFOIndexTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Key relative offset.
|
||||
/// (Absolute start offset of key) - (Absolute start offset of key_table)
|
||||
/// </summary>
|
||||
public ushort KeyOffset;
|
||||
|
||||
/// <summary>
|
||||
/// Data type
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.U2)]
|
||||
public DataFormat DataFormat;
|
||||
|
||||
/// <summary>
|
||||
/// Data used length
|
||||
/// </summary>
|
||||
public uint DataLength;
|
||||
|
||||
/// <summary>
|
||||
/// Data total length. TITLE_ID is always = 16 bytes
|
||||
/// </summary>
|
||||
public uint DataMaxLength;
|
||||
|
||||
/// <summary>
|
||||
/// Data relative offset.
|
||||
/// (Absolute start offset of data_1) - (Absolute start offset of data_table)
|
||||
/// </summary>
|
||||
public uint DataOffset;
|
||||
}
|
||||
}
|
||||
@@ -1,237 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.PlayStation4
|
||||
{
|
||||
/// <see href="https://www.psdevwiki.com/ps4/PKG_files"/>
|
||||
/// <remarks>All numeric values are big-endian</remarks>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class AppPkgHeader
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifying bytes for app.pkg file, "\7FCNT"
|
||||
/// </summary>
|
||||
public uint Magic;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Type
|
||||
/// </summary>
|
||||
public uint Type;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Unknown Field
|
||||
/// </summary>
|
||||
public uint PKGUnknown;
|
||||
|
||||
/// <summary>
|
||||
/// PKG File count
|
||||
/// </summary>
|
||||
public uint FileCount;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Entry count
|
||||
/// </summary>
|
||||
public uint EntryCount;
|
||||
|
||||
/// <summary>
|
||||
/// SC Entry count
|
||||
/// </summary>
|
||||
public ushort SCEntryCount;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Entry count (duplicated)
|
||||
/// </summary>
|
||||
public ushort EntryCount2;
|
||||
|
||||
/// <summary>
|
||||
/// PKG File Table offset
|
||||
/// </summary>
|
||||
public uint TableOffset;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Entry data size
|
||||
/// </summary>
|
||||
public uint EntryDataSize;
|
||||
|
||||
/// <summary>
|
||||
/// Offset of PKG Entries
|
||||
/// </summary>
|
||||
public ulong BodyOffset;
|
||||
|
||||
/// <summary>
|
||||
/// Length of all PKG Entries
|
||||
/// </summary>
|
||||
public ulong BodySize;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Content offset
|
||||
/// </summary>
|
||||
public ulong ContentOffset;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Content size
|
||||
/// </summary>
|
||||
public ulong ContentSize;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Content ID
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x24)]
|
||||
public string? ContentID;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Content Padding (Zeroes)
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xC)]
|
||||
public byte[]? ContentZeroes;
|
||||
|
||||
/// <summary>
|
||||
/// PKG DRM Type
|
||||
/// </summary>
|
||||
public uint DRMType;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Content Type
|
||||
/// </summary>
|
||||
public uint ContentType;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Content Flags
|
||||
/// </summary>
|
||||
public uint ContentFlags;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Promote Size
|
||||
/// </summary>
|
||||
public uint PromoteSize;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Version Date
|
||||
/// </summary>
|
||||
public uint VersionDate;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Content Flags
|
||||
/// </summary>
|
||||
public uint VersionHash;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Padding Section 1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x78)]
|
||||
public byte[]? Zeroes1;
|
||||
|
||||
/// <summary>
|
||||
/// PKG SHA256 for Main Entry 1
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x20)]
|
||||
public byte[]? MainEntry1SHA256;
|
||||
|
||||
/// <summary>
|
||||
/// PKG SHA256 for Main Entry 2
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x20)]
|
||||
public byte[]? MainEntry2SHA256;
|
||||
|
||||
/// <summary>
|
||||
/// PKG SHA256 for Digest Table
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x20)]
|
||||
public byte[]? DigestTableSHA256;
|
||||
|
||||
/// <summary>
|
||||
/// PKG SHA256 for Main Table
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x20)]
|
||||
public byte[]? MainTableSHA256;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Padding Section 2
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x280)]
|
||||
public byte[]? Zeroes2;
|
||||
|
||||
/// <summary>
|
||||
/// PFS Unknown Field
|
||||
/// </summary>
|
||||
public uint PFSUnknown;
|
||||
|
||||
/// <summary>
|
||||
/// PFS Image Count
|
||||
/// </summary>
|
||||
public uint PFSImageCount;
|
||||
|
||||
/// <summary>
|
||||
/// PFS Image Flags
|
||||
/// </summary>
|
||||
public ulong PFSImageFlags;
|
||||
|
||||
/// <summary>
|
||||
/// PFS Image Offset
|
||||
/// </summary>
|
||||
public ulong PFSImageOffset;
|
||||
|
||||
/// <summary>
|
||||
/// PFS Image Size
|
||||
/// </summary>
|
||||
public ulong PFSImageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Mount Image Offset
|
||||
/// </summary>
|
||||
public ulong MountImageOffset;
|
||||
|
||||
/// <summary>
|
||||
/// Mount Image Size
|
||||
/// </summary>
|
||||
public ulong MountImageSize;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Size
|
||||
/// </summary>
|
||||
public ulong PKGSize;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Signed Size
|
||||
/// </summary>
|
||||
public uint PKGSignedSize;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Signed Size
|
||||
/// </summary>
|
||||
public uint PKGCacheSize;
|
||||
|
||||
/// <summary>
|
||||
/// SHA256 for PFS Image
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x20)]
|
||||
public byte[]? PFSImageSHA256;
|
||||
|
||||
/// <summary>
|
||||
/// SHA256 for PFS Signed
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x20)]
|
||||
public byte[]? PFSSignedSHA256;
|
||||
|
||||
/// <summary>
|
||||
/// PFS Split Size nth 0
|
||||
/// </summary>
|
||||
public ulong PFSSplitSize0;
|
||||
|
||||
/// <summary>
|
||||
/// PFS Split Size nth 1
|
||||
/// </summary>
|
||||
public ulong PFSSplitSize1;
|
||||
|
||||
/// <summary>
|
||||
/// PKG Padding Section 3
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xB50)]
|
||||
public byte[]? Zeroes3;
|
||||
|
||||
/// <summary>
|
||||
/// SHA256 for PKG
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x20)]
|
||||
public byte[]? PKGSHA256;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace SabreTools.Models.PlayStation4
|
||||
{
|
||||
/// <see href="https://www.psdevwiki.com/ps4/PKG_files"/>
|
||||
public class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifying bytes for app.pkg file, "\7FCNT"
|
||||
/// </summary>
|
||||
public const uint AppPkgMagic = 0x7F434E54;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace SabreTools.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Marks a property as required on write
|
||||
/// </summary>
|
||||
/// <remarks>TODO: Use reflection to determine required fields on write</remarks>
|
||||
[System.AttributeUsage(System.AttributeTargets.Property)]
|
||||
public class RequiredAttribute : System.Attribute { }
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Extra attributes relating to package, in catalog.js
|
||||
/// </summary>
|
||||
public class Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// "supports4k":
|
||||
/// True if package supports 4K, false otherwise
|
||||
/// </summary>
|
||||
[JsonProperty("supports4k", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? Supports4K { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "supportsHdr":
|
||||
/// True if package supports HDR, false otherwise
|
||||
/// </summary>
|
||||
[JsonProperty("supportsHdr", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? SupportsHDR { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "isXboxOneXEnhanced":
|
||||
/// True if package is XboxOne X enhanced, false otherwise
|
||||
/// </summary>
|
||||
[JsonProperty("isXboxOneXEnhanced", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? IsXboxOneXEnhanced { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains metadata information about XboxOne and XboxSX discs
|
||||
/// Stored in a JSON file on the disc at /MSXC/Metadata/catalog.js
|
||||
/// </summary>
|
||||
[JsonObject]
|
||||
public class Catalog
|
||||
{
|
||||
/// <summary>
|
||||
/// "version":
|
||||
/// Version of this catalog.js file
|
||||
/// Known values: 1.0, 2.0, 2.1, 4.0, 4.1 (4.1 not confirmed on a disc)
|
||||
/// </summary>
|
||||
[JsonProperty("version")]
|
||||
public string? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "discNumber":
|
||||
/// Varies for each disc in set
|
||||
/// 0 is reserved and shouldnt be used
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("discNumber", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public int? DiscNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "discCount":
|
||||
/// Total number of discs in set
|
||||
/// Same value for each disc in the set
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("discCount", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public int? DiscCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "discSetId":
|
||||
/// 8 hex character ID for the set itself
|
||||
/// Same value for each disc in the set
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("discSetId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? DiscSetID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "bundle":
|
||||
/// Package details for the bundle itself
|
||||
/// Known fields used: ProductID, XboxProductID,
|
||||
/// OneStoreProductID, Titles, VUI, Images
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("bundle", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Package? Bundle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "launchPackage":
|
||||
/// Package name to use as launch package
|
||||
/// Before 4.0, object=Package with only ContentID filled
|
||||
/// For 4.0 onwards, object=String, representing filename
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("launchPackage", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public object? LaunchPackage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "packages":
|
||||
/// Package details for each package on disc
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("packages")]
|
||||
public Package[]? Packages { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "siblings":
|
||||
/// List of Package Names that are related to this disc
|
||||
/// The console picks the correct one to use
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("siblings", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string[][]? Siblings { get; set; }
|
||||
|
||||
#region v1.0 only
|
||||
|
||||
// The below fields are usually present in a Package sub-field
|
||||
// but for v1.0 catalog.js files, they are at the root Catalog object
|
||||
|
||||
/// <summary>
|
||||
/// "productId":
|
||||
/// Hex identifier for package Product ID
|
||||
/// Known Versions Present: 1.0
|
||||
/// Exists within Packages[].ProductID for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("productId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? ProductID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "contentId":
|
||||
/// Hex content identifier
|
||||
/// Known Versions present: 1.0
|
||||
/// Exists within Packages[].ContentID for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("contentId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? ContentID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "titleId":
|
||||
/// 8 hex character package Title ID
|
||||
/// Known Versions Present: 1.0
|
||||
/// Exists within Packages[].TitleID for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("titleId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? TitleID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "titles"
|
||||
/// List of name of package for each locale
|
||||
/// Known Versions Present: 1.0
|
||||
/// Exists within Packages[].Titles for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("titles", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Title[]? Titles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "vui":
|
||||
/// List of Voice User Interface packages titles for each locale
|
||||
/// Known Versions Present: 1.0
|
||||
/// Exists within Packages[].VUI for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("vui", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Title[]? VUI { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "images":
|
||||
/// List of paths to each image in MSXC/Metadata/<PackageName>/
|
||||
/// Known Versions Present: 1.0
|
||||
/// Exists within Packages[].Images for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Image[]? Images { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "ratings":
|
||||
/// List of package age ratings for each relevant rating system
|
||||
/// Known Versions Present: 1.0
|
||||
/// Exists within Packages[].Ratings for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("ratings", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Rating[]? Ratings { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "size":
|
||||
/// Size of package in bytes
|
||||
/// Known Versions Present: 1.0
|
||||
/// Exists within Packages[].Size for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "type":
|
||||
/// Package Type
|
||||
/// Known values: "Game" (Game package), "Durable" (DLC package)
|
||||
/// Known Versions Present: 1.0
|
||||
/// Exists within Packages[].Type for v2.0 onwards
|
||||
/// </summary>
|
||||
[JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? Type { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,201 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <see href="https://xboxdevwiki.net/Xbe"/>
|
||||
/// <see href="http://wiki.redump.org/index.php?title=Xbox_Title_IDs"/>
|
||||
/// <see href="https://dbox.tools/publishers/"/>
|
||||
public static class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// Mapping of all Xbox 360 media subtypes to long names
|
||||
/// </summary>
|
||||
public static readonly Dictionary<char, string> MediaSubtypes = new()
|
||||
{
|
||||
{ 'F', "XGD3" },
|
||||
{ 'X', "XGD2" },
|
||||
{ 'Z', "Games on Demand / Marketplace Demo" },
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Mapping of all publisher 2-letter codes to long names
|
||||
/// </summary>
|
||||
public static readonly Dictionary<string, string> Publishers = new()
|
||||
{
|
||||
{ "AB", "Ambush Reality" },
|
||||
{ "AC", "Acclaim Entertainment" },
|
||||
{ "AD", "Andamiro USA Corp." },
|
||||
{ "AH", "Arush Entertainment" },
|
||||
{ "AK", "Artdink" },
|
||||
{ "AP", "Aquaplus" },
|
||||
{ "AQ", "Aqua System" },
|
||||
{ "AS", "ASK" },
|
||||
{ "AT", "Atlus" },
|
||||
{ "AV", "Activision" },
|
||||
{ "AW", "Arc System Works" },
|
||||
{ "AX", "Aksys Games" },
|
||||
{ "AY", "Aspyr Media" },
|
||||
|
||||
{ "BA", "Bandai" },
|
||||
{ "BB", "BigBen" },
|
||||
{ "BD", "Bravado" },
|
||||
{ "BE", "Blueside Inc." },
|
||||
{ "BF", "Blind Ferret Entertainment" },
|
||||
{ "BG", "BradyGames" },
|
||||
{ "BH", "Blackhole" },
|
||||
{ "BL", "Black Box" },
|
||||
{ "BM", "BAM! Entertainment" },
|
||||
{ "BR", "Broccoli Co." },
|
||||
{ "BS", "Bethesda Softworks" },
|
||||
{ "BT", "Brash Entertainment" },
|
||||
{ "BU", "Bunkasha Co." },
|
||||
{ "BV", "Buena Vista Games" },
|
||||
{ "BW", "BBC Multimedia" },
|
||||
{ "BZ", "Blizzard" },
|
||||
|
||||
{ "CC", "Capcom" },
|
||||
{ "CK", "Kemco Corporation" }, // TODO: Confirm
|
||||
{ "CM", "Codemasters" },
|
||||
{ "CT", "CTO" },
|
||||
{ "CV", "Crave Entertainment" },
|
||||
|
||||
{ "DC", "DreamCatcher Interactive" },
|
||||
{ "DE", "Destineer" },
|
||||
{ "DX", "Davilex" },
|
||||
|
||||
{ "EA", "Electronic Arts" },
|
||||
{ "EC", "Encore Software" },
|
||||
{ "EF", "E-Frontier" },
|
||||
{ "EL", "Enlight Software" },
|
||||
{ "EM", "Empire Interactive" },
|
||||
{ "ES", "Eidos Interactive" },
|
||||
{ "EV", "Evolved Games" },
|
||||
|
||||
{ "FE", "Focus Entertainment (formerly Focus Home Interactive)" }, // TODO: Confirm
|
||||
{ "FI", "Fox Interactive" },
|
||||
{ "FL", "Fluent Entertainment" },
|
||||
{ "FO", "505 Games" },
|
||||
{ "FS", "From Software" },
|
||||
|
||||
{ "GE", "Genki Co." },
|
||||
{ "GF", "Gameloft" },
|
||||
{ "GV", "Groove Games" },
|
||||
|
||||
{ "HE", "Tru Blu (Entertainment division of Home Entertainment Suppliers)" },
|
||||
{ "HP", "Hip Games" },
|
||||
{ "HU", "Hudson Soft" },
|
||||
{ "HW", "Highwaystar" },
|
||||
|
||||
{ "IA", "Mad Catz Interactive" }, // TODO: Confirm
|
||||
{ "IF", "Idea Factory" },
|
||||
{ "IG", "Infogrames" },
|
||||
{ "IL", "Interlex Corporation" },
|
||||
{ "IM", "Imagine Media" },
|
||||
{ "IO", "Ignition Entertainment" },
|
||||
{ "IP", "Interplay Entertainment" },
|
||||
{ "IX", "InXile Entertainment" },
|
||||
|
||||
{ "JA", "Jaleco Entertainment" },
|
||||
{ "JW", "JoWooD Entertainment" },
|
||||
|
||||
{ "KA", "Konami Osaka / Major A" },
|
||||
{ "KB", "Kemco" }, // TODO: Confirm
|
||||
{ "KI", "Kids Station Inc." }, // TODO: Confirm
|
||||
{ "KN", "Konami" },
|
||||
{ "KO", "Koei" },
|
||||
{ "KT", "Konami Tokyo" },
|
||||
{ "KU", "Kobi and/or GAE (formerly Global A Entertainment)" }, // TODO: Confirm
|
||||
{ "KY", "Kalypso" },
|
||||
|
||||
{ "LA", "LucasArts" },
|
||||
{ "LS", "Black Bean Games (publishing arm of Leader S.p.A.)" }, // TODO: Confirm
|
||||
|
||||
{ "MD", "Metro3D" },
|
||||
{ "ME", "Medix" },
|
||||
{ "MI", "Microïds" }, // TODO: Confirm
|
||||
{ "MJ", "Majesco Entertainment" },
|
||||
{ "MM", "Myelin Media" },
|
||||
{ "MP", "MediaQuest" }, // TODO: Confirm
|
||||
{ "MS", "Microsoft Game Studios" },
|
||||
{ "MW", "Midway Games" },
|
||||
{ "MX", "Empire Interactive" }, // TODO: Confirm
|
||||
|
||||
{ "NK", "NewKidCo" },
|
||||
{ "NL", "NovaLogic" },
|
||||
{ "NM", "Namco" },
|
||||
|
||||
{ "OG", "O-Games" },
|
||||
{ "OX", "Oxygen Interactive" },
|
||||
|
||||
{ "PC", "Playlogic Entertainment" },
|
||||
{ "PL", "Phantagram Co., Ltd. / Playlogic Entertainment" }, // TODO: Confirm
|
||||
|
||||
{ "RA", "Rage" },
|
||||
|
||||
{ "SA", "Sammy" },
|
||||
{ "SC", "SCi Games" },
|
||||
{ "SE", "Sega" },
|
||||
{ "SN", "SNK" },
|
||||
{ "SP", "Southpeak Games" },
|
||||
{ "SQ", "Square Enix" },
|
||||
{ "SS", "Simon & Schuster" },
|
||||
{ "ST", "Studio Nine" },
|
||||
{ "SU", "Success Corporation" },
|
||||
{ "SW", "Swing! Deutschland" },
|
||||
|
||||
{ "TA", "Takara" },
|
||||
{ "TC", "Tecmo" },
|
||||
{ "TD", "The 3DO Company" },
|
||||
{ "TK", "Takuyo" },
|
||||
{ "TM", "TDK Mediactive" },
|
||||
{ "TQ", "THQ" },
|
||||
{ "TS", "Titus Interactive" },
|
||||
{ "TT", "Take-Two Interactive Software" },
|
||||
|
||||
{ "US", "Ubisoft" },
|
||||
|
||||
{ "VC", "Victor Interactive Software" },
|
||||
{ "VG", "Valcon Games" },
|
||||
{ "VN", "Vivendi Universal Games (Former Interplay)" }, // TODO: Confirm
|
||||
{ "VU", "Vivendi Universal Games" },
|
||||
{ "VV", "Vicarious Visions" },
|
||||
|
||||
{ "WE", "Wanadoo Edition" },
|
||||
{ "WR", "Warner Bros. Interactive Entertainment" },
|
||||
|
||||
{ "XA", "Xbox Live Arcade" },
|
||||
{ "XI", "Xicat Interactive / XPEC Entertainment and Idea Factory" }, // TODO: Confirm
|
||||
{ "XK", "Xbox Kiosk" },
|
||||
{ "XL", "Xbox Live" },
|
||||
{ "XM", "Evolved Games" }, // TODO: Confirm
|
||||
{ "XP", "XPEC Entertainment" },
|
||||
{ "XR", "Panorama" }, // TODO: Confirm
|
||||
|
||||
{ "YB", "YBM Sisa (South-Korea)" },
|
||||
|
||||
{ "ZD", "Zushi Games (formerly Zoo Digital Publishing)" },
|
||||
|
||||
{ "" + (char)0x00 + (char)0x01, "Microsoft Downloadable Content" },
|
||||
{ "" + (char)0x05 + (char)0x04, "Zuma's Revenge" },
|
||||
{ "" + (char)0xAA + (char)0xAA, "Arcania - Gothic 4" },
|
||||
{ "" + (char)0xFF + (char)0xED, "Microsoft Downloadable Content" },
|
||||
{ "" + (char)0xFF + (char)0xFD, "Microsoft Downloadable Content" },
|
||||
{ "" + (char)0xFF + (char)0xFE, "Microsoft Downloadable Content" },
|
||||
{ "" + (char)0xFF + (char)0xFF, "Microsoft Downloadable Content" },
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Mapping of all region 1-letter codes to long names
|
||||
/// </summary>
|
||||
public static readonly Dictionary<char, string> Regions = new()
|
||||
{
|
||||
{ 'A', "USA" },
|
||||
{ 'E', "Europe" },
|
||||
{ 'H', "Japan / Europe" },
|
||||
{ 'J', "Japan / Asia" },
|
||||
{ 'K', "USA / Japan" },
|
||||
{ 'L', "USA / Europe" },
|
||||
{ 'W', "World" },
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <summary>
|
||||
/// List of image files associated with a package in catalog.js
|
||||
/// </summary>
|
||||
public class Image
|
||||
{
|
||||
/// <summary>
|
||||
/// "size":
|
||||
/// String representing image size
|
||||
/// Known values: "100x100", "208x208", "480x480"
|
||||
/// </summary>
|
||||
[JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "image":
|
||||
/// File name of image within MSXC/Metadata/<PackageName>/
|
||||
/// </summary>
|
||||
[JsonProperty("image", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,162 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Metadata about each package on disc, in catalog.js
|
||||
/// Packages are stored within /MSXC/
|
||||
/// </summary>
|
||||
public class Package
|
||||
{
|
||||
/// <summary>
|
||||
/// "packageName":
|
||||
/// Package name of variant
|
||||
/// Matches MSXC/<PackageName> and MSXC/Metdata/<PackageName>
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("packageName", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? PackageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "productId":
|
||||
/// Hex identifier for package Product ID
|
||||
/// Known Versions Present: 2.0, 2.1
|
||||
/// </summary>
|
||||
[JsonProperty("productId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? ProductID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "contentId":
|
||||
/// Hex content identifier
|
||||
/// Known Versions present: 2.0, 2.1
|
||||
/// </summary>
|
||||
[JsonProperty("contentId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? ContentID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "xboxProductId":
|
||||
/// Hex product identifier
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("xboxProductId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? XboxProductID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "oneStoreProductId":
|
||||
/// Partner Center Product ID
|
||||
/// 12 character uppercase alphanumeric
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("oneStoreProductId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? OneStoreProductID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "allowedOneStoreProductIds":
|
||||
/// List of OneStoreProductID that this package is associated with
|
||||
/// Used for DLC packages only (Type = "Durable")
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("allowedOneStoreProductIds", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string[]? AllowedOneStoreProductIDs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "franchiseGameHubId":
|
||||
/// Hex identifier
|
||||
/// Optionally used to mark package as game hub
|
||||
/// Known Versions Present: 4.1
|
||||
/// </summary>
|
||||
[JsonProperty("franchiseGameHubId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? FranchiseGameHubID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "associatedFranchiseGameHubId":
|
||||
/// Hex identifier
|
||||
/// Marks corresponding FranchiseGameHubID that this package is launched with
|
||||
/// Known Versions Present: 4.1
|
||||
/// </summary>
|
||||
[JsonProperty("associatedFranchiseGameHubId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? AssociatedFranchiseGameHubID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "titleId":
|
||||
/// 8 hex character package Title ID
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("titleId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? TitleID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "titles"
|
||||
/// List of name of package for each locale
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("titles", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Title[]? Titles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "vui":
|
||||
/// List of Voice User Interface packages titles for each locale
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("vui", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Title[]? VUI { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "images":
|
||||
/// List of paths to each image in MSXC/Metadata/<PackageName>/
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Image[]? Images { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "ratings":
|
||||
/// List of package age ratings for each relevant rating system
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("ratings", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Rating[]? Ratings { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "attributes":
|
||||
/// Extra attributes associated with this package
|
||||
/// Known Versions Present: 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("attributes", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Attribute[]? Attributes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "variants":
|
||||
/// Alternative packages
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("variants", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Package[]? Variants { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "generation":
|
||||
/// Console generation the package is for
|
||||
/// Known values: "8" (XboxOne), "9" (Xbox Series X|S)
|
||||
/// Known Versions Present: 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("generation", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? Generation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "size":
|
||||
/// Size of package in bytes
|
||||
/// Known Versions Present: 2.0, 2.1
|
||||
/// </summary>
|
||||
[JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public long? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "type":
|
||||
/// Package Type
|
||||
/// Known values: "Game" (Game package), "Durable" (DLC package)
|
||||
/// Known Versions Present: 2.0, 2.1, 4.0
|
||||
/// </summary>
|
||||
[JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Package rating for each rating system, in catalog.js
|
||||
/// </summary>
|
||||
public class Rating
|
||||
{
|
||||
/// <summary>
|
||||
/// "system":
|
||||
/// Name of rating system
|
||||
/// Known values: COB-AU, PEGI, PCBP, USK, China, CERO, ESRB, GCAM, CSRR,
|
||||
/// COB, DJCTQ, GRB, OFLC, OFLC-NZ, PEGIPortugal, FPB, Microsoft
|
||||
/// </summary>
|
||||
[JsonProperty("system", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? System { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "value":
|
||||
/// String representing rating value, depends on rating system
|
||||
/// </summary>
|
||||
[JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? Value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Package Title for each locale, for catalog.js
|
||||
/// </summary>
|
||||
public class Title
|
||||
{
|
||||
/// <summary>
|
||||
/// "locale":
|
||||
/// String representing locale that this title is in
|
||||
/// Known values: "default", "en", "de", "fr", "ar", "zh-hans",
|
||||
/// "zh-hant", "zh-TW", "zh-HK", "zh-CN", "zh-SG", etc
|
||||
/// </summary>
|
||||
[JsonProperty("locale", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? Locale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "title":
|
||||
/// Package title
|
||||
/// </summary>
|
||||
[JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information specific to an XGD disc
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// XGD1 XMID Format Information:
|
||||
///
|
||||
/// AABBBCCD
|
||||
/// - AA => The two-ASCII-character publisher identifier (see Constants.Publishers for details)
|
||||
/// - BBB => Game ID
|
||||
/// - CC => Version number
|
||||
/// - D => Region identifier (see Constants.Regions for details)
|
||||
/// </remarks>
|
||||
public class XMID
|
||||
{
|
||||
/// <summary>
|
||||
/// 2-character publisher identifier
|
||||
/// </summary>
|
||||
public string? PublisherIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 3-character Game ID
|
||||
/// </summary>
|
||||
public string? GameID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 2-character Internal version number
|
||||
/// </summary>
|
||||
public string? VersionNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 1-character Region identifier character
|
||||
/// </summary
|
||||
public char RegionIdentifier { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
namespace SabreTools.Models.Xbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information specific to an XGD disc
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// XGD2/3 XeMID Format Information:
|
||||
///
|
||||
/// AABCCCDDEFFGHH(IIIIIIII)
|
||||
/// - AA => The two-ASCII-character publisher identifier (see Constants.Publishers for details)
|
||||
/// - B => Platform identifier; 2 indicates Xbox 360.
|
||||
/// - CCC => Game ID
|
||||
/// - DD => SKU number (unique per SKU of a title)
|
||||
/// - E => Region identifier (see Constants.Regions for details)
|
||||
/// - FF => Base version; usually starts at 01 (can be 1 or 2 characters)
|
||||
/// - G => Media type identifier (see Constants.MediaSubtypes for details)
|
||||
/// - HH => Disc number stored in [disc number][total discs] format
|
||||
/// - IIIIIIII => 8-hex-digit certification submission identifier; usually on test discs only
|
||||
/// </remarks>
|
||||
public class XeMID
|
||||
{
|
||||
/// <summary>
|
||||
/// 2-character publisher identifier
|
||||
/// </summary>
|
||||
public string? PublisherIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 1-character Platform disc is made for, 2 indicates Xbox 360
|
||||
/// </summary>
|
||||
public char PlatformIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 3-character Game ID
|
||||
/// </summary>
|
||||
public string? GameID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 2-character Title-specific SKU
|
||||
/// </summary>
|
||||
public string? SKU { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 1-character Region identifier character
|
||||
/// </summary>
|
||||
public char RegionIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 2-character Base version of executables, usually starts at 01
|
||||
/// </summary>
|
||||
public string? BaseVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 1-character Media subtype identifier
|
||||
/// </summary>
|
||||
public char MediaSubtypeIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 2-character Disc number stored in [disc number][total discs] format
|
||||
/// </summary>
|
||||
public string? DiscNumberIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 8-hex-digit certification submission identifier; usually on test discs only
|
||||
/// </summary>
|
||||
public string? CertificationSubmissionIdentifier { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user