2018-06-25 19:08:16 +01:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
2018-12-29 15:26:00 +00:00
|
|
|
|
// Filename : Images.cs
|
2018-06-25 19:08:16 +01:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : Disc image plugins.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Defines enumerations to be used by disc image plugins.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
|
//
|
2018-06-25 19:22:42 +01:00
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
|
// copy of this software and associated documentation files (the
|
|
|
|
|
|
// "Software"), to deal in the Software without restriction, including
|
|
|
|
|
|
// without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
|
// distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
|
|
// permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
|
|
// the following conditions:
|
|
|
|
|
|
//
|
|
|
|
|
|
// The above copyright notice and this permission notice shall be included
|
|
|
|
|
|
// in all copies or substantial portions of the Software.
|
|
|
|
|
|
//
|
|
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
|
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
|
|
|
|
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
|
|
|
|
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
|
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
|
|
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2018-06-25 19:08:16 +01:00
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
// Copyright © 2011-2018 Natalia Portillo
|
|
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DiscImageChef.CommonTypes.Enums
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Track (as partitioning element) types.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public enum TrackType : byte
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>Audio track</summary>
|
|
|
|
|
|
Audio = 0,
|
|
|
|
|
|
/// <summary>Data track (not any of the below defined ones)</summary>
|
|
|
|
|
|
Data = 1,
|
|
|
|
|
|
/// <summary>Data track, compact disc mode 1</summary>
|
|
|
|
|
|
CdMode1 = 2,
|
|
|
|
|
|
/// <summary>Data track, compact disc mode 2, formless</summary>
|
|
|
|
|
|
CdMode2Formless = 3,
|
|
|
|
|
|
/// <summary>Data track, compact disc mode 2, form 1</summary>
|
|
|
|
|
|
CdMode2Form1 = 4,
|
|
|
|
|
|
/// <summary>Data track, compact disc mode 2, form 2</summary>
|
|
|
|
|
|
CdMode2Form2 = 5
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Type of subchannel in track
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public enum TrackSubchannelType
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Track does not has subchannel dumped, or it's not a CD
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
None,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Subchannel is packed and error corrected
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Packed,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Subchannel is interleaved
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Raw,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Subchannel is packed and comes interleaved with main channel in same file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
PackedInterleaved,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Subchannel is interleaved and comes interleaved with main channel in same file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
RawInterleaved,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Only Q subchannel is stored as 16 bytes
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Q16,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Only Q subchannel is stored as 16 bytes and comes interleaved with main channel in same file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Q16Interleaved
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Metadata present for each sector (aka, "tag").
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public enum SectorTagType
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>Apple's GCR sector tags, 12 bytes</summary>
|
|
|
|
|
|
AppleSectorTag,
|
|
|
|
|
|
/// <summary>Sync frame from CD sector, 12 bytes</summary>
|
|
|
|
|
|
CdSectorSync,
|
|
|
|
|
|
/// <summary>CD sector header, 4 bytes</summary>
|
|
|
|
|
|
CdSectorHeader,
|
|
|
|
|
|
/// <summary>CD mode 2 sector subheader</summary>
|
|
|
|
|
|
CdSectorSubHeader,
|
|
|
|
|
|
/// <summary>CD sector EDC, 4 bytes</summary>
|
|
|
|
|
|
CdSectorEdc,
|
|
|
|
|
|
/// <summary>CD sector ECC P, 172 bytes</summary>
|
|
|
|
|
|
CdSectorEccP,
|
|
|
|
|
|
/// <summary>CD sector ECC Q, 104 bytes</summary>
|
|
|
|
|
|
CdSectorEccQ,
|
|
|
|
|
|
/// <summary>CD sector ECC (P and Q), 276 bytes</summary>
|
|
|
|
|
|
CdSectorEcc,
|
|
|
|
|
|
/// <summary>CD sector subchannel, 96 bytes</summary>
|
|
|
|
|
|
CdSectorSubchannel,
|
|
|
|
|
|
/// <summary>CD track ISRC, string, 12 bytes</summary>
|
|
|
|
|
|
CdTrackIsrc,
|
|
|
|
|
|
/// <summary>CD track text, string, 13 bytes</summary>
|
|
|
|
|
|
CdTrackText,
|
|
|
|
|
|
/// <summary>CD track flags, 1 byte</summary>
|
|
|
|
|
|
CdTrackFlags,
|
|
|
|
|
|
/// <summary>DVD sector copyright information</summary>
|
|
|
|
|
|
DvdCmi,
|
|
|
|
|
|
/// <summary>Floppy address mark (contents depend on underlying floppy format)</summary>
|
|
|
|
|
|
FloppyAddressMark
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Metadata present for each media.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public enum MediaTagType
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>CD table of contents</summary>
|
|
|
|
|
|
CD_TOC,
|
|
|
|
|
|
/// <summary>CD session information</summary>
|
|
|
|
|
|
CD_SessionInfo,
|
|
|
|
|
|
/// <summary>CD full table of contents</summary>
|
|
|
|
|
|
CD_FullTOC,
|
|
|
|
|
|
/// <summary>CD PMA</summary>
|
|
|
|
|
|
CD_PMA,
|
|
|
|
|
|
/// <summary>CD Adress-Time-In-Pregroove</summary>
|
|
|
|
|
|
CD_ATIP,
|
|
|
|
|
|
/// <summary>CD-Text</summary>
|
|
|
|
|
|
CD_TEXT,
|
|
|
|
|
|
/// <summary>CD Media Catalogue Number</summary>
|
|
|
|
|
|
CD_MCN,
|
|
|
|
|
|
/// <summary>DVD/HD DVD Physical Format Information</summary>
|
|
|
|
|
|
DVD_PFI,
|
|
|
|
|
|
/// <summary>DVD Lead-in Copyright Management Information</summary>
|
|
|
|
|
|
DVD_CMI,
|
|
|
|
|
|
/// <summary>DVD disc key</summary>
|
|
|
|
|
|
DVD_DiscKey,
|
|
|
|
|
|
/// <summary>DVD/HD DVD Burst Cutting Area</summary>
|
|
|
|
|
|
DVD_BCA,
|
|
|
|
|
|
/// <summary>DVD/HD DVD Lead-in Disc Manufacturer Information</summary>
|
|
|
|
|
|
DVD_DMI,
|
|
|
|
|
|
/// <summary>Media identifier</summary>
|
|
|
|
|
|
DVD_MediaIdentifier,
|
|
|
|
|
|
/// <summary>Media key block</summary>
|
|
|
|
|
|
DVD_MKB,
|
|
|
|
|
|
/// <summary>DVD-RAM/HD DVD-RAM DDS information</summary>
|
|
|
|
|
|
DVDRAM_DDS,
|
|
|
|
|
|
/// <summary>DVD-RAM/HD DVD-RAM Medium status</summary>
|
|
|
|
|
|
DVDRAM_MediumStatus,
|
|
|
|
|
|
/// <summary>DVD-RAM/HD DVD-RAM Spare area information</summary>
|
|
|
|
|
|
DVDRAM_SpareArea,
|
|
|
|
|
|
/// <summary>DVD-R/-RW/HD DVD-R RMD in last border-out</summary>
|
|
|
|
|
|
DVDR_RMD,
|
|
|
|
|
|
/// <summary>Pre-recorded information from DVD-R/-RW lead-in</summary>
|
|
|
|
|
|
DVDR_PreRecordedInfo,
|
|
|
|
|
|
/// <summary>DVD-R/-RW/HD DVD-R media identifier</summary>
|
|
|
|
|
|
DVDR_MediaIdentifier,
|
|
|
|
|
|
/// <summary>DVD-R/-RW/HD DVD-R physical format information</summary>
|
|
|
|
|
|
DVDR_PFI,
|
|
|
|
|
|
/// <summary>ADIP information</summary>
|
|
|
|
|
|
DVD_ADIP,
|
|
|
|
|
|
/// <summary>HD DVD Lead-in copyright protection information</summary>
|
|
|
|
|
|
HDDVD_CPI,
|
|
|
|
|
|
/// <summary>HD DVD-R Medium Status</summary>
|
|
|
|
|
|
HDDVD_MediumStatus,
|
|
|
|
|
|
/// <summary>DVD+/-R DL Layer capacity</summary>
|
|
|
|
|
|
DVDDL_LayerCapacity,
|
|
|
|
|
|
/// <summary>DVD-R DL Middle Zone start address</summary>
|
|
|
|
|
|
DVDDL_MiddleZoneAddress,
|
|
|
|
|
|
/// <summary>DVD-R DL Jump Interval Size</summary>
|
|
|
|
|
|
DVDDL_JumpIntervalSize,
|
|
|
|
|
|
/// <summary>DVD-R DL Start LBA of the manual layer jump</summary>
|
|
|
|
|
|
DVDDL_ManualLayerJumpLBA,
|
|
|
|
|
|
/// <summary>Blu-ray Disc Information</summary>
|
|
|
|
|
|
BD_DI,
|
|
|
|
|
|
/// <summary>Blu-ray Burst Cutting Area</summary>
|
|
|
|
|
|
BD_BCA,
|
|
|
|
|
|
/// <summary>Blu-ray Disc Definition Structure</summary>
|
|
|
|
|
|
BD_DDS,
|
|
|
|
|
|
/// <summary>Blu-ray Cartridge Status</summary>
|
|
|
|
|
|
BD_CartridgeStatus,
|
|
|
|
|
|
/// <summary>Blu-ray Status of Spare Area</summary>
|
|
|
|
|
|
BD_SpareArea,
|
|
|
|
|
|
/// <summary>AACS volume identifier</summary>
|
|
|
|
|
|
AACS_VolumeIdentifier,
|
|
|
|
|
|
/// <summary>AACS pre-recorded media serial number</summary>
|
|
|
|
|
|
AACS_SerialNumber,
|
|
|
|
|
|
/// <summary>AACS media identifier</summary>
|
|
|
|
|
|
AACS_MediaIdentifier,
|
|
|
|
|
|
/// <summary>Lead-in AACS media key block</summary>
|
|
|
|
|
|
AACS_MKB,
|
|
|
|
|
|
/// <summary>AACS data keys</summary>
|
|
|
|
|
|
AACS_DataKeys,
|
|
|
|
|
|
/// <summary>LBA extents flagged for bus encryption by AACS</summary>
|
|
|
|
|
|
AACS_LBAExtents,
|
|
|
|
|
|
/// <summary>CPRM media key block in Lead-in</summary>
|
|
|
|
|
|
AACS_CPRM_MKB,
|
|
|
|
|
|
/// <summary>Recognized layer formats in hybrid discs</summary>
|
|
|
|
|
|
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,
|
|
|
|
|
|
/// <summary>SCSI MODE PAGE 2Ah</summary>
|
|
|
|
|
|
SCSI_MODEPAGE_2A,
|
|
|
|
|
|
/// <summary>ATA IDENTIFY DEVICE response</summary>
|
|
|
|
|
|
ATA_IDENTIFY,
|
|
|
|
|
|
/// <summary>ATA IDENTIFY PACKET DEVICE response</summary>
|
|
|
|
|
|
ATAPI_IDENTIFY,
|
|
|
|
|
|
/// <summary>PCMCIA/CardBus Card Information Structure</summary>
|
|
|
|
|
|
PCMCIA_CIS,
|
|
|
|
|
|
/// <summary>SecureDigital CID</summary>
|
|
|
|
|
|
SD_CID,
|
|
|
|
|
|
/// <summary>SecureDigital CSD</summary>
|
|
|
|
|
|
SD_CSD,
|
|
|
|
|
|
/// <summary>SecureDigital SCR</summary>
|
|
|
|
|
|
SD_SCR,
|
|
|
|
|
|
/// <summary>SecureDigital OCR</summary>
|
|
|
|
|
|
SD_OCR,
|
|
|
|
|
|
/// <summary>MultiMediaCard CID</summary>
|
|
|
|
|
|
MMC_CID,
|
|
|
|
|
|
/// <summary>MultiMediaCard CSD</summary>
|
|
|
|
|
|
MMC_CSD,
|
|
|
|
|
|
/// <summary>MultiMediaCard OCR</summary>
|
|
|
|
|
|
MMC_OCR,
|
|
|
|
|
|
/// <summary>MultiMediaCard Extended CSD</summary>
|
|
|
|
|
|
MMC_ExtendedCSD,
|
|
|
|
|
|
/// <summary>Xbox Security Sector</summary>
|
|
|
|
|
|
Xbox_SecuritySector,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// On floppy disks, data in last cylinder usually in a different format that contains duplication or
|
|
|
|
|
|
/// manufacturing information
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Floppy_LeadOut,
|
|
|
|
|
|
/// <summary>DVD Disc Control Blocks</summary>
|
|
|
|
|
|
DCB,
|
|
|
|
|
|
/// <summary>Compact Disc Lead-in</summary>
|
|
|
|
|
|
CD_LeadIn,
|
|
|
|
|
|
/// <summary>Compact Disc Lead-out</summary>
|
|
|
|
|
|
CD_LeadOut,
|
|
|
|
|
|
/// <summary>SCSI MODE SENSE (6)</summary>
|
|
|
|
|
|
SCSI_MODESENSE_6,
|
|
|
|
|
|
/// <summary>SCSI MODE SENSE (10)</summary>
|
|
|
|
|
|
SCSI_MODESENSE_10,
|
|
|
|
|
|
/// <summary>USB descriptors</summary>
|
|
|
|
|
|
USB_Descriptors,
|
|
|
|
|
|
/// <summary>XGD unlocked DMI</summary>
|
|
|
|
|
|
Xbox_DMI,
|
|
|
|
|
|
/// <summary>XDG unlocked PFI</summary>
|
|
|
|
|
|
Xbox_PFI
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Enumeration of media types defined in CICM metadata
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public enum XmlMediaType
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Purely optical discs
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
OpticalDisc,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Media that is physically block-based or abstracted like that
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
BlockMedia,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Media that can be accessed by-byte or by-bit, like chips
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
LinearMedia,
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Media that can only store data when it is modulated to audio
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
AudioMedia
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> CD flags bitmask</summary>
|
|
|
|
|
|
[Flags]
|
|
|
|
|
|
public enum CdFlags : byte
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>Track is quadraphonic.</summary>
|
|
|
|
|
|
FourChannel = 0x08,
|
|
|
|
|
|
/// <summary>Track is non-audio (data).</summary>
|
|
|
|
|
|
DataTrack = 0x04,
|
|
|
|
|
|
/// <summary>Track is copy protected.</summary>
|
|
|
|
|
|
CopyPermitted = 0x02,
|
|
|
|
|
|
/// <summary>Track has pre-emphasis.</summary>
|
|
|
|
|
|
PreEmphasis = 0x01
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Status of a requested floppy sector</summary>
|
|
|
|
|
|
[Flags]
|
|
|
|
|
|
public enum FloppySectorStatus : byte
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>Both address mark and data checksums are correct.</summary>
|
|
|
|
|
|
Correct = 0x01,
|
|
|
|
|
|
/// <summary>Data checksum is incorrect.</summary>
|
|
|
|
|
|
DataError = 0x02,
|
|
|
|
|
|
/// <summary>Addres mark checksum is incorrect.</summary>
|
|
|
|
|
|
AddressMarkError = 0x04,
|
|
|
|
|
|
/// <summary>There is another sector in the same track/head with same sector id.</summary>
|
|
|
|
|
|
Duplicated = 0x08,
|
|
|
|
|
|
/// <summary>Sector data section is not magnetized.</summary>
|
|
|
|
|
|
Demagnetized = 0x10,
|
|
|
|
|
|
/// <summary>Sector data section has a physically visible hole.</summary>
|
|
|
|
|
|
Hole = 0x20,
|
|
|
|
|
|
/// <summary>There is no address mark containing the requested sector id in the track/head.</summary>
|
|
|
|
|
|
NotFound = 0x40
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum FloppyTypes : byte
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>8" floppy</summary>
|
|
|
|
|
|
Floppy,
|
|
|
|
|
|
/// <summary>5.25" floppy</summary>
|
|
|
|
|
|
MiniFloppy,
|
|
|
|
|
|
/// <summary>3.5" floppy</summary>
|
|
|
|
|
|
MicroFloppy,
|
|
|
|
|
|
/// <summary>3" floppy</summary>
|
|
|
|
|
|
CompactFloppy,
|
|
|
|
|
|
/// <summary>5.25" twiggy</summary>
|
|
|
|
|
|
FileWare,
|
|
|
|
|
|
/// <summary>2.5" quickdisk</summary>
|
|
|
|
|
|
QuickDisk
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum FloppyDensities : byte
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>Standard coercitivity (about 300Oe as found in 8" and 5.25"-double-density disks).</summary>
|
|
|
|
|
|
Standard,
|
|
|
|
|
|
/// <summary>Double density coercitivity (about 600Oe as found in 5.25" HD and 3.5" DD disks).</summary>
|
|
|
|
|
|
Double,
|
|
|
|
|
|
/// <summary>High density coercitivity (about 700Oe as found in 3.5" HD disks).</summary>
|
|
|
|
|
|
High,
|
|
|
|
|
|
/// <summary>Extended density coercitivity (about 750Oe as found in 3.5" ED disks).</summary>
|
|
|
|
|
|
Extended
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|