diff --git a/CHANGELIST.md b/CHANGELIST.md index 1d7c1346..870172bd 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -18,6 +18,7 @@ - Clarify non-Redump systems - Add UltraCade - Re-enable BD33 and BD66 +- Add PIC models for BD (unused) ### 2.5 (2023-03-12) diff --git a/MPF.Core/Data/PICDiscInformation.cs b/MPF.Core/Data/PICDiscInformation.cs new file mode 100644 index 00000000..bca0165f --- /dev/null +++ b/MPF.Core/Data/PICDiscInformation.cs @@ -0,0 +1,38 @@ +namespace MPF.Core.Data +{ + /// + /// 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. + /// + /// + /// + public class PICDiscInformation + { + #region Fields + + /// + /// 2048 bytes for BD-ROM, 3584 bytes for BD-R/RE + /// + /// Big-endian format + public ushort DataStructureLength { get; set; } + + /// + /// Should be 0x00 + /// + public byte Reserved0 { get; set; } + + /// + /// Should be 0x00 + /// + public byte Reserved1 { get; set; } + + /// + /// Disc information and emergency brake units + /// + public PICDiscInformationUnit[] Units { get; set; } + + #endregion + } +} diff --git a/MPF.Core/Data/PICDiscInformationUnit.cs b/MPF.Core/Data/PICDiscInformationUnit.cs new file mode 100644 index 00000000..f2479885 --- /dev/null +++ b/MPF.Core/Data/PICDiscInformationUnit.cs @@ -0,0 +1,111 @@ +namespace MPF.Core.Data +{ + /// + /// + public class PICDiscInformationUnit + { + #region Fields + + #region Header + + /// + /// Disc Information Identifier "DI" + /// Emergency Brake Identifier "EB" + /// + public string DiscInformationIdentifier { get; set; } + + /// + /// Disc Information Format + /// + public byte DiscInformationFormat { get; set; } + + /// + /// Number of DI units in each DI block + /// + public byte NumberOfUnitsInBlock { get; set; } + + /// + /// Should be 0x00 + /// + public byte Reserved2 { get; set; } + + /// + /// DI unit Sequence Number + /// + public byte SequenceNumber { get; set; } + + /// + /// Number of bytes in use in this DI unit + /// + public byte BytesInUse { get; set; } + + /// + /// Should be 0x00 + /// + public byte Reserved3 { get; set; } + + #endregion + + // TODO: Write models for the dependent contents, if possible + #region Body + + /// + /// Disc Type Identifier + /// = "BDO" for BD-ROM + /// = "BDW" for BD-RE + /// = "BDR" for BD-R + /// + public string DiscTypeIdentifier { get; set; } + + /// + /// Disc Size/Class/Version + /// + public byte DiscSizeClassVersion { get; set; } + + /// + /// DI Unit Format dependent contents + /// + /// 52 bytes for BD-ROM, 100 bytes for BD-R/RE + public byte[] FormatDependentContents { get; set; } + + #endregion + + #region Trailer (BD-R/RE only) + + /// + /// Disc Manufacturer ID + /// + /// 6 bytes + public byte[] DiscManufacturerID { get; set; } + + /// + /// Media Type ID + /// + /// 3 bytes + public byte[] MediaTypeID { get; set; } + + /// + /// Time Stamp + /// + public ushort TimeStamp { get; set; } + + /// + /// Product Revision Number + /// + public byte ProductRevisionNumber { get; set; } + + #endregion + + #endregion + + #region Constants + + public const string DiscTypeIdentifierROM = "BDO"; + + public const string DiscTypeIdentifierReWritable = "BDW"; + + public const string DiscTypeIdentifierRecordable = "BDR"; + + #endregion + } +}