mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Added DVD structures.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2015-03-21 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Decoders/DVD.cs:
|
||||
* Decoders/MMC.cs:
|
||||
* DiscImageChef.csproj:
|
||||
* ImagePlugins/ImagePlugin.cs:
|
||||
Added DVD structures.
|
||||
|
||||
2015-03-05 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* ImagePlugins/DiskCopy42.cs:
|
||||
|
||||
1083
DiscImageChef/Decoders/DVD.cs
Normal file
1083
DiscImageChef/Decoders/DVD.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -65,6 +65,41 @@ namespace DiscImageChef.Decoders
|
||||
BDLayer = 0x0040,
|
||||
HDDVDLayer = 0x0050
|
||||
}
|
||||
|
||||
public enum SessionStatusCodes : byte
|
||||
{
|
||||
Empty = 0x00,
|
||||
Incomplete = 0x01,
|
||||
ReservedOrDamaged = 0x02,
|
||||
Complete = 0x03
|
||||
}
|
||||
|
||||
public enum DiscStatusCodes : byte
|
||||
{
|
||||
Empty = 0x00,
|
||||
Incomplete = 0x01,
|
||||
Finalized = 0x02,
|
||||
Others = 0x03
|
||||
}
|
||||
|
||||
public enum BGFormatStatusCodes : byte
|
||||
{
|
||||
NoFormattable = 0x00,
|
||||
IncompleteBackgroundFormat = 0x01,
|
||||
BackgroundFormatInProgress = 0x02,
|
||||
FormatComplete = 0x03
|
||||
}
|
||||
|
||||
public enum DiscTypeCodes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Also valid for CD-DA, DVD and BD
|
||||
/// </summary>
|
||||
CDROM = 0x00,
|
||||
CDi = 0x10,
|
||||
CDROMXA = 0x20,
|
||||
Undefined = 0xFF
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Public methods
|
||||
@@ -859,6 +894,227 @@ namespace DiscImageChef.Decoders
|
||||
/// </summary>
|
||||
public byte Reserved6;
|
||||
}
|
||||
|
||||
public struct DiscInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// 32 + OPCTablesNumber*8
|
||||
/// </summary>
|
||||
public UInt16 DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 000b
|
||||
/// </summary>
|
||||
public byte DataType;
|
||||
/// <summary>
|
||||
/// Byte 2, bit 4
|
||||
/// If set, disc is erasable
|
||||
/// </summary>
|
||||
public bool Erasable;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 3 to 2
|
||||
/// Status of last session
|
||||
/// </summary>
|
||||
public byte LastSessionStatus;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 1 to 0
|
||||
/// Status of disc
|
||||
/// </summary>
|
||||
public byte DiscStatus;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Number of logical track that contains LBA 0
|
||||
/// </summary>
|
||||
public byte FirstTrackNumber;
|
||||
/// <summary>
|
||||
/// Byte 9 (MSB) and byte 4 (LSB)
|
||||
/// Number of sessions
|
||||
/// </summary>
|
||||
public byte Sessions;
|
||||
/// <summary>
|
||||
/// Byte 10 (MSB) and byte 5 (LSB)
|
||||
/// Number of first track in last session
|
||||
/// </summary>
|
||||
public byte FirstTrackLastSession;
|
||||
/// <summary>
|
||||
/// Byte 11 (MSB) and byte 6 (LSB)
|
||||
/// Number of last track in last session
|
||||
/// </summary>
|
||||
public byte LastTrackLastSession;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 7
|
||||
/// If set, DiscIdentification is valid
|
||||
/// </summary>
|
||||
public bool DID_V;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 6
|
||||
/// If set, DiscBarcode is valid
|
||||
/// </summary>
|
||||
public bool DBC_V;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 5
|
||||
/// If set, disc is unrestricted
|
||||
/// </summary>
|
||||
public bool URU;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 4
|
||||
/// If set DiscApplicationCode is valid
|
||||
/// </summary>
|
||||
public bool DAC_V;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public bool Reserved;
|
||||
/// <summary>
|
||||
/// Byte 7, bit 2
|
||||
/// Copy of dirty bit from MRW status
|
||||
/// </summary>
|
||||
public bool Dbit;
|
||||
/// <summary>
|
||||
/// Byte 7, bits 1 to 0
|
||||
/// Background format status
|
||||
/// </summary>
|
||||
public byte BGFormatStatus;
|
||||
/// <summary>
|
||||
/// Byte 8
|
||||
/// Disc type code
|
||||
/// </summary>
|
||||
public byte DiscType;
|
||||
/// <summary>
|
||||
/// Bytes 12 to 15
|
||||
/// Disc identification number from PMA
|
||||
/// </summary>
|
||||
public UInt32 DiscIdentification;
|
||||
/// <summary>
|
||||
/// Bytes 16 to 19
|
||||
/// Last Session Lead-in Start Address (MSF for CD, LBA for others)
|
||||
/// </summary>
|
||||
public UInt32 LastSessionLeadInStartLBA;
|
||||
/// <summary>
|
||||
/// Bytes 20 to 23
|
||||
/// Last Possible Lead-out Start Address (MSF for CD, LBA for others)
|
||||
/// </summary>
|
||||
public UInt32 LastPossibleLeadOutStartLBA;
|
||||
/// <summary>
|
||||
/// Bytes 24 to 31
|
||||
/// Disc barcode
|
||||
/// </summary>
|
||||
public UInt64 DiscBarcode;
|
||||
/// <summary>
|
||||
/// Byte 32
|
||||
/// Disc application code
|
||||
/// </summary>
|
||||
public byte DiscApplicationCode;
|
||||
/// <summary>
|
||||
/// Byte 33
|
||||
/// How many OPC tables are
|
||||
/// </summary>
|
||||
public byte OPCTablesNumber;
|
||||
/// <summary>
|
||||
/// Bytes 34 to end
|
||||
/// OPC tables (8 bytes each)
|
||||
/// </summary>
|
||||
public OPCTable[] OPCTables;
|
||||
}
|
||||
|
||||
public struct OPCTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// kilobytes/sec this OPC table applies to
|
||||
/// </summary>
|
||||
public UInt16 Speed;
|
||||
/// <summary>
|
||||
/// Bytes 2 to 7
|
||||
/// OPC values
|
||||
/// </summary>
|
||||
public byte[] OPCValues;
|
||||
}
|
||||
|
||||
public struct TrackInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length, always 10
|
||||
/// </summary>
|
||||
public UInt16 DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 001b
|
||||
/// </summary>
|
||||
public byte DataType;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 4 to 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 5
|
||||
/// Maximum possible number of tracks on the disc
|
||||
/// </summary>
|
||||
public UInt16 MaxTracks;
|
||||
/// <summary>
|
||||
/// Bytes 6 to 7
|
||||
/// Number of assigned tracks on the disc
|
||||
/// </summary>
|
||||
public UInt16 AssignedTracks;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 9
|
||||
/// Maximum possible number of appendable tracks on the disc
|
||||
/// </summary>
|
||||
public UInt16 MaxAppendable;
|
||||
/// <summary>
|
||||
/// Bytes 10 to 11
|
||||
/// Current number of appendable tracks on the disc
|
||||
/// </summary>
|
||||
public UInt16 CurrentAppendable;
|
||||
}
|
||||
|
||||
public struct OPWInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Bytes 0 to 1
|
||||
/// Data length, always 14
|
||||
/// </summary>
|
||||
public UInt16 DataLength;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 7 to 5
|
||||
/// 010b
|
||||
/// </summary>
|
||||
public byte DataType;
|
||||
/// <summary>
|
||||
/// Byte 2, bits 4 to 0
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved1;
|
||||
/// <summary>
|
||||
/// Byte 3
|
||||
/// Reserved
|
||||
/// </summary>
|
||||
public byte Reserved2;
|
||||
/// <summary>
|
||||
/// Bytes 4 to 5
|
||||
/// Remaining POW Replacements
|
||||
/// </summary>
|
||||
public UInt32 RemainingReplacements;
|
||||
/// <summary>
|
||||
/// Bytes 6 to 7
|
||||
/// Remaining POW Reallocation Map Entries
|
||||
/// </summary>
|
||||
public UInt32 RemainingReallocationEntries;
|
||||
/// <summary>
|
||||
/// Bytes 8 to 9
|
||||
/// Number of Remaining POW Updates
|
||||
/// </summary>
|
||||
public UInt32 RemainingUpdates;
|
||||
}
|
||||
#endregion Public structures
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
<Compile Include="Decoders\CD.cs" />
|
||||
<Compile Include="Decoders\MMC.cs" />
|
||||
<Compile Include="Decoders\BD.cs" />
|
||||
<Compile Include="Decoders\DVD.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
||||
@@ -945,6 +945,12 @@ namespace DiscImageChef.ImagePlugins
|
||||
Hybrid_RecognizedLayers,
|
||||
/// <summary>Disc write protection status</summary>
|
||||
MMC_WriteProtection,
|
||||
/// <summary>Disc standard information</summary>
|
||||
MMC_DiscInformation,
|
||||
/// <summary>Disc track resources information</summary>
|
||||
MMC_TrackResourcesInformation,
|
||||
/// <summary>BD-R Pseudo-overwrite information</summary>
|
||||
MMC_POWResourcesInformation,
|
||||
/// <summary>SCSI INQUIRY response</summary>
|
||||
SCSI_INQUIRY
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user