// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // Filename : Structs.cs // Author(s) : Natalia Portillo // // Component : Disk image plugins. // // --[ Description ] ---------------------------------------------------------- // // Contains structures for Nero Burning ROM disc images. // // --[ License ] -------------------------------------------------------------- // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of the // License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2019 Natalia Portillo // ****************************************************************************/ using System.Collections.Generic; namespace DiscImageChef.DiscImages { public partial class Nero { struct NeroV1Footer { /// /// "NERO" /// public uint ChunkId; /// /// Offset of first chunk in file /// public uint FirstChunkOffset; } struct NeroV2Footer { /// /// "NER5" /// public uint ChunkId; /// /// Offset of first chunk in file /// public ulong FirstChunkOffset; } struct NeroV2CueEntry { /// /// Track mode. 0x01 for audio, 0x21 for copy-protected audio, 0x41 for data /// public byte Mode; /// /// Track number in BCD /// public byte TrackNumber; /// /// Index number in BCD /// public byte IndexNumber; /// /// Always zero /// public byte Dummy; /// /// LBA sector start for this entry /// public int LbaStart; } struct NeroV2Cuesheet { /// /// "CUEX" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// Cuesheet entries /// public List Entries; } struct NeroV1CueEntry { /// /// Track mode. 0x01 for audio, 0x21 for copy-protected audio, 0x41 for data /// public byte Mode; /// /// Track number in BCD /// public byte TrackNumber; /// /// Index number in BCD /// public byte IndexNumber; /// /// Always zero /// public ushort Dummy; /// /// MSF start sector's minute for this entry /// public byte Minute; /// /// MSF start sector's second for this entry /// public byte Second; /// /// MSF start sector's frame for this entry /// public byte Frame; } struct NeroV1Cuesheet { /// /// "CUES" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// Cuesheet entries /// public List Entries; } struct NeroV1DaoEntry { /// /// ISRC (12 bytes) /// public byte[] Isrc; /// /// Size of sector inside image (in bytes) /// public ushort SectorSize; /// /// Sector mode in image /// public ushort Mode; /// /// Unknown /// public ushort Unknown; /// /// Index 0 start /// public uint Index0; /// /// Index 1 start /// public uint Index1; /// /// End of track + 1 /// public uint EndOfTrack; } struct NeroV1Dao { /// /// "DAOI" /// public uint ChunkId; /// /// Chunk size (big endian) /// public uint ChunkSizeBe; /// /// Chunk size (little endian) /// public uint ChunkSizeLe; /// /// UPC (14 bytes, null-padded) /// public byte[] Upc; /// /// TOC type /// public ushort TocType; /// /// First track /// public byte FirstTrack; /// /// Last track /// public byte LastTrack; /// /// Tracks /// public List Tracks; } struct NeroV2DaoEntry { /// /// ISRC (12 bytes) /// public byte[] Isrc; /// /// Size of sector inside image (in bytes) /// public ushort SectorSize; /// /// Sector mode in image /// public ushort Mode; /// /// Seems to be always 0. /// public ushort Unknown; /// /// Index 0 start /// public ulong Index0; /// /// Index 1 start /// public ulong Index1; /// /// End of track + 1 /// public ulong EndOfTrack; } struct NeroV2Dao { /// /// "DAOX" /// public uint ChunkId; /// /// Chunk size (big endian) /// public uint ChunkSizeBe; /// /// Chunk size (little endian) /// public uint ChunkSizeLe; /// /// UPC (14 bytes, null-padded) /// public byte[] Upc; /// /// TOC type /// public ushort TocType; /// /// First track /// public byte FirstTrack; /// /// Last track /// public byte LastTrack; /// /// Tracks /// public List Tracks; } struct NeroCdTextPack { /// /// Pack type /// public byte PackType; /// /// Track number /// public byte TrackNumber; /// /// Pack number in block /// public byte PackNumber; /// /// Block number /// public byte BlockNumber; /// /// 12 bytes of data /// public byte[] Text; /// /// CRC /// public ushort Crc; } struct NeroCdText { /// /// "CDTX" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// CD-TEXT packs /// public List Packs; } struct NeroV1TaoEntry { /// /// Offset of track on image /// public uint Offset; /// /// Length of track in bytes /// public uint Length; /// /// Track mode /// public uint Mode; /// /// LBA track start (plus 150 lead in sectors) /// public uint StartLba; /// /// Unknown /// public uint Unknown; } struct NeroV1Tao { /// /// "ETNF" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// CD-TEXT packs /// public List Tracks; } struct NeroV2TaoEntry { /// /// Offset of track on image /// public ulong Offset; /// /// Length of track in bytes /// public ulong Length; /// /// Track mode /// public uint Mode; /// /// LBA track start (plus 150 lead in sectors) /// public uint StartLba; /// /// Unknown /// public uint Unknown; /// /// Track length in sectors /// public uint Sectors; } struct NeroV2Tao { /// /// "ETN2" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// CD-TEXT packs /// public List Tracks; } struct NeroSession { /// /// "SINF" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// Tracks in session /// public uint Tracks; } struct NeroMediaType { /// /// "MTYP" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// Media type /// public uint Type; } struct NeroDiscInformation { /// /// "DINF" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// Unknown /// public uint Unknown; } struct NeroTocChunk { /// /// "TOCT" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// Unknown /// public ushort Unknown; } struct NeroReloChunk { /// /// "RELO" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; /// /// Unknown /// public uint Unknown; } struct NeroEndOfChunkChain { /// /// "END!" /// public uint ChunkId; /// /// Chunk size /// public uint ChunkSize; } // Internal use only struct NeroTrack { public byte[] Isrc; public ushort SectorSize; public ulong Offset; public ulong Length; public ulong EndOfTrack; public uint Mode; public ulong StartLba; public ulong Sectors; public ulong Index0; public ulong Index1; public uint Sequence; } } }