// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // 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-2025 Natalia Portillo // ****************************************************************************/ // ReSharper disable NotAccessedField.Local using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace Aaru.Images; [SuppressMessage("ReSharper", "UnusedType.Local")] public sealed partial class Nero { #region Nested type: CdText struct CdText { /// "CDTX" public uint ChunkId; /// Chunk size public uint ChunkSize; /// CD-TEXT packs public List Packs; } #endregion #region Nested type: CdTextPack struct CdTextPack { /// 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; } #endregion #region Nested type: CueEntryV1 struct CueEntryV1 { /// 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; } #endregion #region Nested type: CueEntryV2 struct CueEntryV2 { /// 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; } #endregion #region Nested type: CuesheetV1 sealed class CuesheetV1 { /// "CUES" public uint ChunkId; /// Chunk size public uint ChunkSize; /// Cuesheet entries public List Entries; } #endregion #region Nested type: CuesheetV2 sealed class CuesheetV2 { /// "CUEX" public uint ChunkId; /// Chunk size public uint ChunkSize; /// Cuesheet entries public List Entries; } #endregion #region Nested type: DaoEntryV1 struct DaoEntryV1 { /// 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; } #endregion #region Nested type: DaoEntryV2 struct DaoEntryV2 { /// 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; } #endregion #region Nested type: DaoV1 struct DaoV1 { /// "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; } #endregion #region Nested type: DaoV2 struct DaoV2 { /// "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; } #endregion #region Nested type: DiscInformation struct DiscInformation { /// "DINF" public uint ChunkId; /// Chunk size public uint ChunkSize; /// Unknown public uint Unknown; } #endregion #region Nested type: EndOfChunkChain struct EndOfChunkChain { /// "END!" public uint ChunkId; /// Chunk size public uint ChunkSize; } #endregion #region Nested type: FooterV1 struct FooterV1 { /// "NERO" public uint ChunkId; /// Offset of first chunk in file public uint FirstChunkOffset; } #endregion #region Nested type: FooterV2 struct FooterV2 { /// "NER5" public uint ChunkId; /// Offset of first chunk in file public ulong FirstChunkOffset; } #endregion #region Nested type: MediaType struct MediaType { /// "MTYP" public uint ChunkId; /// Chunk size public uint ChunkSize; /// Media type public uint Type; } #endregion #region Nested type: NeroTrack // Internal use only sealed class NeroTrack { public ulong EndOfTrack; public ulong Index0; public ulong Index1; public byte[] Isrc; public ulong Length; public uint Mode; public ulong Offset; public ulong Sectors; public ushort SectorSize; public uint Sequence; public ulong StartLba; public bool UseLbaForIndex; } #endregion #region Nested type: ReloChunk struct ReloChunk { /// "RELO" public uint ChunkId; /// Chunk size public uint ChunkSize; /// Unknown public uint Unknown; } #endregion #region Nested type: Session struct Session { /// "SINF" public uint ChunkId; /// Chunk size public uint ChunkSize; /// Tracks in session public uint Tracks; } #endregion #region Nested type: TaoEntryV0 struct TaoEntryV0 { /// Offset of track on image public uint Offset; /// Length of track in bytes public uint Length; /// Track mode public uint Mode; } #endregion #region Nested type: TaoEntryV1 struct TaoEntryV1 { /// 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; } #endregion #region Nested type: TaoEntryV2 struct TaoEntryV2 { /// 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; } #endregion #region Nested type: TaoV0 struct TaoV0 { /// "TINF" public uint ChunkId; /// Chunk size public uint ChunkSize; /// CD-TEXT packs public List Tracks; } #endregion #region Nested type: TaoV1 struct TaoV1 { /// "ETNF" public uint ChunkId; /// Chunk size public uint ChunkSize; /// CD-TEXT packs public List Tracks; } #endregion #region Nested type: TaoV2 struct TaoV2 { /// "ETN2" public uint ChunkId; /// Chunk size public uint ChunkSize; /// CD-TEXT packs public List Tracks; } #endregion #region Nested type: TocChunk struct TocChunk { /// "TOCT" public uint ChunkId; /// Chunk size public uint ChunkSize; /// Unknown public ushort Unknown; } #endregion }