diff --git a/DiscImageChef.DiscImages/CDRWin.cs b/DiscImageChef.DiscImages/CDRWin.cs index cb3b49a08..69a40e936 100644 --- a/DiscImageChef.DiscImages/CDRWin.cs +++ b/DiscImageChef.DiscImages/CDRWin.cs @@ -54,195 +54,197 @@ namespace DiscImageChef.ImagePlugins struct CDRWinTrackFile { + /// Track # public UInt32 sequence; - // Track # + /// Path of file containing track public string datafile; - // Path of file containing track + /// Offset of track start in file public UInt64 offset; - // Offset of track start in file + /// Type of file public string filetype; - // Type of file } struct CDRWinTrack { + /// Track # public UInt32 sequence; - // Track # + /// Track title (from CD-Text) public string title; - // Track title (from CD-Text) + /// Track genre (from CD-Text) public string genre; - // Track genre (from CD-Text) + /// Track arranger (from CD-Text) public string arranger; - // Track arranger (from CD-Text) + /// Track composer (from CD-Text) public string composer; - // Track composer (from CD-Text) + /// Track performer (from CD-Text) public string performer; - // Track performer (from CD-Text) + /// Track song writer (from CD-Text) public string songwriter; - // Track song writer (from CD-Text) + /// Track ISRC public string isrc; - // Track ISRC + /// File struct for this track public CDRWinTrackFile trackfile; - // File struct for this track + /// Indexes on this track public Dictionary indexes; - // Indexes on this track + /// Track pre-gap in sectors public UInt64 pregap; - // Track pre-gap in sectors + /// Track post-gap in sectors public UInt64 postgap; - // Track post-gap in sectors + /// Digical Copy Permitted public bool flag_dcp; - // Digical Copy Permitted + /// Track is quadraphonic public bool flag_4ch; - // Track is quadraphonic + /// Track has preemphasis public bool flag_pre; - // Track has preemphasis + /// Track has SCMS public bool flag_scms; - // Track has SCMS + /// Bytes per sector public UInt16 bps; - // Bytes per sector + /// Sectors in track public UInt64 sectors; - // Sectors in track + /// Track type public string tracktype; - // Track type + /// Track session public UInt16 session; - // Track session } #endregion struct CDRWinDisc { + /// Disk title (from CD-Text) public string title; - // Disk title (from CD-Text) + /// Disk genre (from CD-Text) public string genre; - // Disk genre (from CD-Text) + /// Disk arranger (from CD-Text) public string arranger; - // Disk arranger (from CD-Text) + /// Disk composer (from CD-Text) public string composer; - // Disk composer (from CD-Text) + /// Disk performer (from CD-Text) public string performer; - // Disk performer (from CD-Text) + /// Disk song writer (from CD-Text) public string songwriter; - // Disk song writer (from CD-Text) + /// Media catalog number public string mcn; - // Media catalog number + /// Disk type public DiskType disktype; - // Disk type + /// Disk type string public string disktypestr; - // Disk type string + /// Disk CDDB ID public string disk_id; - // Disk CDDB ID + /// Disk UPC/EAN public string barcode; - // Disk UPC/EAN + /// Sessions public List sessions; - // Sessions + /// Tracks public List tracks; - // Tracks + /// Disk comment public string comment; - // Disk comment + /// File containing CD-Text public string cdtextfile; - // File containing CD-Text } #region Internal consts // Type for FILE entity + /// Data as-is in little-endian const string CDRWinDiskTypeLittleEndian = "BINARY"; - // Data as-is in little-endian + /// Data as-is in big-endian const string CDRWinDiskTypeBigEndian = "MOTOROLA"; - // Data as-is in big-endian + /// Audio in Apple AIF file const string CDRWinDiskTypeAIFF = "AIFF"; - // Audio in Apple AIF file + /// Audio in Microsoft WAV file const string CDRWinDiskTypeRIFF = "WAVE"; - // Audio in Microsoft WAV file + /// Audio in MP3 file const string CDRWinDiskTypeMP3 = "MP3"; - // Audio in MP3 file + // Type for TRACK entity + /// Audio track, 2352 bytes/sector const string CDRWinTrackTypeAudio = "AUDIO"; - // Audio track, 2352 bytes/sector + /// CD+G track, 2448 bytes/sector (audio+subchannel) const string CDRWinTrackTypeCDG = "CDG"; - // CD+G track, 2448 bytes/sector (audio+subchannel) + /// Mode 1 track, cooked, 2048 bytes/sector const string CDRWinTrackTypeMode1 = "MODE1/2048"; - // Mode 1 track, cooked, 2048 bytes/sector + /// Mode 1 track, raw, 2352 bytes/sector const string CDRWinTrackTypeMode1Raw = "MODE1/2352"; - // Mode 1 track, raw, 2352 bytes/sector + /// Mode 2 form 1 track, cooked, 2048 bytes/sector const string CDRWinTrackTypeMode2Form1 = "MODE2/2048"; - // Mode 2 form 1 track, cooked, 2048 bytes/sector + /// Mode 2 form 2 track, cooked, 2324 bytes/sector const string CDRWinTrackTypeMode2Form2 = "MODE2/2324"; - // Mode 2 form 2 track, cooked, 2324 bytes/sector + /// Mode 2 formless track, cooked, 2336 bytes/sector const string CDRWinTrackTypeMode2Formless = "MODE2/2336"; - // Mode 2 formless track, cooked, 2336 bytes/sector + /// Mode 2 track, raw, 2352 bytes/sector const string CDRWinTrackTypeMode2Raw = "MODE2/2352"; - // Mode 2 track, raw, 2352 bytes/sector + /// CD-i track, cooked, 2336 bytes/sector const string CDRWinTrackTypeCDI = "CDI/2336"; - // CD-i track, cooked, 2336 bytes/sector + /// CD-i track, raw, 2352 bytes/sector const string CDRWinTrackTypeCDIRaw = "CDI/2352"; - // CD-i track, raw, 2352 bytes/sector + // Type for REM ORIGINAL MEDIA-TYPE entity + /// DiskType.CD const string CDRWinDiskTypeCD = "CD"; - // DiskType.CD + /// DiskType.CDRW const string CDRWinDiskTypeCDRW = "CD-RW"; - // DiskType.CDRW + /// DiskType.CDMRW const string CDRWinDiskTypeCDMRW = "CD-MRW"; - // DiskType.CDMRW + /// DiskType.CDMRW const string CDRWinDiskTypeCDMRW2 = "CD-(MRW)"; - // DiskType.CDMRW + /// DiskType.DVDROM const string CDRWinDiskTypeDVD = "DVD"; - // DiskType.DVDROM + /// DiskType.DVDPRW const string CDRWinDiskTypeDVDPMRW = "DVD+MRW"; - // DiskType.DVDPRW + /// DiskType.DVDPRW const string CDRWinDiskTypeDVDPMRW2 = "DVD+(MRW)"; - // DiskType.DVDPRW + /// DiskType.DVDPRWDL const string CDRWinDiskTypeDVDPMRWDL = "DVD+MRW DL"; - // DiskType.DVDPRWDL + /// DiskType.DVDPRWDL const string CDRWinDiskTypeDVDPMRWDL2 = "DVD+(MRW) DL"; - // DiskType.DVDPRWDL + /// DiskType.DVDPR const string CDRWinDiskTypeDVDPR = "DVD+R"; - // DiskType.DVDPR + /// DiskType.DVDPRDL const string CDRWinDiskTypeDVDPRDL = "DVD+R DL"; - // DiskType.DVDPRDL + /// DiskType.DVDPRW const string CDRWinDiskTypeDVDPRW = "DVD+RW"; - // DiskType.DVDPRW + /// DiskType.DVDPRWDL const string CDRWinDiskTypeDVDPRWDL = "DVD+RW DL"; - // DiskType.DVDPRWDL + /// DiskType.DVDPR const string CDRWinDiskTypeDVDPVR = "DVD+VR"; - // DiskType.DVDPR + /// DiskType.DVDRAM const string CDRWinDiskTypeDVDRAM = "DVD-RAM"; - // DiskType.DVDRAM + /// DiskType.DVDR const string CDRWinDiskTypeDVDR = "DVD-R"; - // DiskType.DVDR + /// DiskType.DVDRDL const string CDRWinDiskTypeDVDRDL = "DVD-R DL"; - // DiskType.DVDRDL + /// DiskType.DVDRW const string CDRWinDiskTypeDVDRW = "DVD-RW"; - // DiskType.DVDRW + /// DiskType.DVDRWDL const string CDRWinDiskTypeDVDRWDL = "DVD-RW DL"; - // DiskType.DVDRWDL + /// DiskType.DVDR const string CDRWinDiskTypeDVDVR = "DVD-VR"; - // DiskType.DVDR + /// DiskType.DVDRW const string CDRWinDiskTypeDVDRW2 = "DVDRW"; - // DiskType.DVDRW + /// DiskType.HDDVDROM const string CDRWinDiskTypeHDDVD = "HD DVD"; - // DiskType.HDDVDROM + /// DiskType.HDDVDRAM const string CDRWinDiskTypeHDDVDRAM = "HD DVD-RAM"; - // DiskType.HDDVDRAM + /// DiskType.HDDVDR const string CDRWinDiskTypeHDDVDR = "HD DVD-R"; - // DiskType.HDDVDR + /// DiskType.HDDVDR const string CDRWinDiskTypeHDDVDRDL = "HD DVD-R DL"; - // DiskType.HDDVDR + /// DiskType.HDDVDRW const string CDRWinDiskTypeHDDVDRW = "HD DVD-RW"; - // DiskType.HDDVDRW + /// DiskType.HDDVDRW const string CDRWinDiskTypeHDDVDRWDL = "HD DVD-RW DL"; - // DiskType.HDDVDRW + /// DiskType.BDROM const string CDRWinDiskTypeBD = "BD"; - // DiskType.BDROM + /// DiskType.BDR const string CDRWinDiskTypeBDR = "BD-R"; - // DiskType.BDR + /// DiskType.BDRE const string CDRWinDiskTypeBDRE = "BD-RE"; - // DiskType.BDRE + /// DiskType.BDR const string CDRWinDiskTypeBDRDL = "BD-R DL"; - // DiskType.BDR + /// DiskType.BDRE const string CDRWinDiskTypeBDREDL = "BD-RE DL"; - // DiskType.BDRE #endregion @@ -251,8 +253,8 @@ namespace DiscImageChef.ImagePlugins string imagePath; StreamReader cueStream; FileStream imageStream; + /// Dictionary, index is track #, value is TrackFile Dictionary offsetmap; - // Dictionary, index is track #, value is TrackFile CDRWinDisc discimage; List partitions; @@ -263,8 +265,8 @@ namespace DiscImageChef.ImagePlugins const string SessionRegEx = "REM\\s+SESSION\\s+(?\\d+).*$"; const string DiskTypeRegEx = "REM\\s+ORIGINAL MEDIA-TYPE:\\s+(?.+)$"; const string LeadOutRegEx = "REM\\s+LEAD-OUT\\s+(?[\\d]+:[\\d]+:[\\d]+)$"; - const string LBARegEx = "REM MSF:\\s+(?[\\d]+:[\\d]+:[\\d]+)\\s+=\\s+LBA:\\s+(?[\\d]+)$"; // Not checked + const string LBARegEx = "REM MSF:\\s+(?[\\d]+:[\\d]+:[\\d]+)\\s+=\\s+LBA:\\s+(?[\\d]+)$"; const string DiskIDRegEx = "DISC_ID\\s+(?[\\da-f]{8})$"; const string BarCodeRegEx = "UPC_EAN\\s+(?[\\d]{12,13})$"; const string CommentRegEx = "REM\\s+(?.+)$"; diff --git a/DiscImageChef.DiscImages/ChangeLog b/DiscImageChef.DiscImages/ChangeLog index d2f9e119c..bfba153b7 100644 --- a/DiscImageChef.DiscImages/ChangeLog +++ b/DiscImageChef.DiscImages/ChangeLog @@ -1,3 +1,10 @@ +2015-12-06 Natalia Portillo + + * CDRWin.cs: + * TeleDisk.cs: + * DiskCopy42.cs: + Move comments to XML documentation. + 2015-12-06 Natalia Portillo * ImagePlugin.cs: diff --git a/DiscImageChef.DiscImages/DiskCopy42.cs b/DiscImageChef.DiscImages/DiskCopy42.cs index 1b2ab8dde..15bbf2cbf 100644 --- a/DiscImageChef.DiscImages/DiskCopy42.cs +++ b/DiscImageChef.DiscImages/DiskCopy42.cs @@ -52,23 +52,23 @@ namespace DiscImageChef.ImagePlugins // DiskCopy 4.2 header, big-endian, data-fork, start of file, 84 bytes struct DC42Header { - // 0x00, 64 bytes, pascal string, disk name or "-not a Macintosh disk-", filled with garbage + /// 0x00, 64 bytes, pascal string, disk name or "-not a Macintosh disk-", filled with garbage public string diskName; - // 0x40, size of data in bytes (usually sectors*512) + /// 0x40, size of data in bytes (usually sectors*512) public UInt32 dataSize; - // 0x44, size of tags in bytes (usually sectors*12) + /// 0x44, size of tags in bytes (usually sectors*12) public UInt32 tagSize; - // 0x48, checksum of data bytes + /// 0x48, checksum of data bytes public UInt32 dataChecksum; - // 0x4C, checksum of tag bytes + /// 0x4C, checksum of tag bytes public UInt32 tagChecksum; - // 0x50, format of disk, see constants + /// 0x50, format of disk, see constants public byte format; - // 0x51, format of sectors, see constants + /// 0x51, format of sectors, see constants public byte fmtByte; - // 0x52, is disk image valid? always 0x01 + /// 0x52, is disk image valid? always 0x01 public byte valid; - // 0x53, reserved, always 0x00 + /// 0x53, reserved, always 0x00 public byte reserved; } @@ -77,53 +77,53 @@ namespace DiscImageChef.ImagePlugins #region Internal Constants // format byte - // 3.5", single side, double density, GCR + /// 3.5", single side, double density, GCR const byte kSonyFormat400K = 0x00; - // 3.5", double side, double density, GCR + /// 3.5", double side, double density, GCR const byte kSonyFormat800K = 0x01; - // 3.5", double side, double density, MFM + /// 3.5", double side, double density, MFM const byte kSonyFormat720K = 0x02; - // 3.5", double side, high density, MFM + /// 3.5", double side, high density, MFM const byte kSonyFormat1440K = 0x03; - // 3.5", double side, high density, MFM, 21 sectors/track (aka, Microsoft DMF) - // Unchecked value + /// 3.5", double side, high density, MFM, 21 sectors/track (aka, Microsoft DMF) + // Unchecked value const byte kSonyFormat1680K = 0x04; - // Defined by Sigma Seven's BLU + /// Defined by Sigma Seven's BLU const byte kSigmaFormatTwiggy = 0x54; // There should be a value for Apple HD20 hard disks, unknown... // fmyByte byte // Based on GCR nibble // Always 0x02 for MFM disks // Unknown for Apple HD20 - // Defined by Sigma Seven's BLU + /// Defined by Sigma Seven's BLU const byte kSigmaFmtByteTwiggy = 0x01; - // 3.5" single side double density GCR and MFM all use same code + /// 3.5" single side double density GCR and MFM all use same code const byte kSonyFmtByte400K = 0x02; const byte kSonyFmtByte720K = kSonyFmtByte400K; const byte kSonyFmtByte1440K = kSonyFmtByte400K; const byte kSonyFmtByte1680K = kSonyFmtByte400K; - // 3.5" double side double density GCR, 512 bytes/sector, interleave 2:1 + /// 3.5" double side double density GCR, 512 bytes/sector, interleave 2:1 const byte kSonyFmtByte800K = 0x22; - // 3.5" double side double density GCR, 512 bytes/sector, interleave 2:1, incorrect value (but appears on official documentation) + /// 3.5" double side double density GCR, 512 bytes/sector, interleave 2:1, incorrect value (but appears on official documentation) const byte kSonyFmtByte800KIncorrect = 0x12; - // 3.5" double side double density GCR, ProDOS format, interleave 4:1 + /// 3.5" double side double density GCR, ProDOS format, interleave 4:1 const byte kSonyFmtByteProDos = 0x24; - // Unformatted sectors + /// Unformatted sectors const byte kInvalidFmtByte = 0x96; #endregion #region Internal variables - // Start of data sectors in disk image, should be 0x58 + /// Start of data sectors in disk image, should be 0x58 UInt32 dataOffset; - // Start of tags in disk image, after data sectors + /// Start of tags in disk image, after data sectors UInt32 tagOffset; - // Bytes per tag, should be 12 + /// Bytes per tag, should be 12 UInt32 bptag; - // Header of opened image + /// Header of opened image DC42Header header; - // Disk image file + /// Disk image file string dc42ImagePath; #endregion diff --git a/DiscImageChef.DiscImages/TeleDisk.cs b/DiscImageChef.DiscImages/TeleDisk.cs index 110a8e516..ce0b5b7da 100644 --- a/DiscImageChef.DiscImages/TeleDisk.cs +++ b/DiscImageChef.DiscImages/TeleDisk.cs @@ -54,33 +54,33 @@ namespace DiscImageChef.ImagePlugins struct TD0Header { - // "TD" or "td" depending on compression + /// "TD" or "td" depending on compression public UInt16 signature; - // Sequence, but TeleDisk seems to complaing if != 0 + /// Sequence, but TeleDisk seems to complaing if != 0 public byte sequence; - // Random, same byte for all disks in the same set + /// Random, same byte for all disks in the same set public byte diskSet; - // TeleDisk version, major in high nibble, minor in low nibble + /// TeleDisk version, major in high nibble, minor in low nibble public byte version; - // Data rate + /// Data rate public byte dataRate; - // BIOS drive type + /// BIOS drive type public byte driveType; - // Stepping used + /// Stepping used public byte stepping; - // If set means image only allocates sectors marked in-use by FAT12 + /// If set means image only allocates sectors marked in-use by FAT12 public byte dosAllocation; - // Sides of disk + /// Sides of disk public byte sides; - // CRC of all the previous + /// CRC of all the previous public UInt16 crc; } struct TDCommentBlockHeader { - // CRC of comment block after crc field + /// CRC of comment block after crc field public UInt16 crc; - // Length of comment + /// Length of comment public UInt16 length; public byte year; public byte month; @@ -92,37 +92,37 @@ namespace DiscImageChef.ImagePlugins struct TDTrackHeader { - // Sectors in the track, 0xFF if end of disk image (there is no spoon) + /// Sectors in the track, 0xFF if end of disk image (there is no spoon) public byte sectors; - // Cylinder the head was on + /// Cylinder the head was on public byte cylinder; - // Head/side used + /// Head/side used public byte head; - // Lower byte of CRC of previous fields + /// Lower byte of CRC of previous fields public byte crc; } struct TDSectorHeader { - // Cylinder as stored on sector address mark + /// Cylinder as stored on sector address mark public byte cylinder; - // Head as stored on sector address mark + /// Head as stored on sector address mark public byte head; - // Sector number as stored on sector address mark + /// Sector number as stored on sector address mark public byte sectorNumber; - // Sector size + /// Sector size public byte sectorSize; - // Sector flags + /// Sector flags public byte flags; - // Lower byte of TeleDisk CRC of sector header, data header and data block + /// Lower byte of TeleDisk CRC of sector header, data header and data block public byte crc; } struct TDDataHeader { - // Size of all data (encoded) + next field (1) + /// Size of all data (encoded) + next field (1) public UInt16 dataSize; - // Encoding used for data block + /// Encoding used for data block public byte dataEncoding; }