mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-20 05:03:11 +00:00
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
53 lines
1.7 KiB
C#
53 lines
1.7 KiB
C#
namespace SabreTools.Data.Models.NES
|
|
{
|
|
/// <summary>
|
|
/// NES headered cart
|
|
/// </summary>
|
|
/// <see href="https://www.nesdev.org/wiki/INES"/>
|
|
/// <see href="https://www.nesdev.org/wiki/NES_2.0"/>
|
|
public class Cart
|
|
{
|
|
/// <summary>
|
|
/// NES 1.0 or 2.0 header
|
|
/// </summary>
|
|
public CartHeader? Header { get; set; }
|
|
|
|
/// <summary>
|
|
/// Trainer, if present (0 or 512 bytes)
|
|
/// </summary>
|
|
public byte[] Trainer { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// PRG ROM data (16384 * x bytes)
|
|
/// </summary>
|
|
public byte[] PrgRomData { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// CHR ROM data, if present (8192 * y bytes)
|
|
/// </summary>
|
|
public byte[] ChrRomData { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// PlayChoice INST-ROM, if present (0 or 8192 bytes)
|
|
/// </summary>
|
|
public byte[] PlayChoiceInstRom { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// PlayChoice PROM, if present (16 bytes Data, 16 bytes CounterOut)
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This is often missing; see PC10 ROM-Images for details
|
|
/// 16 bytes RP5H01 PROM Data output (needed to decrypt the INST ROM)
|
|
/// 16 bytes RP5H01 PROM CounterOut output (needed to decrypt the INST ROM) (usually constant: 00,00,00,00,FF,FF,FF,FF,00,00,00,00,FF,FF,FF,FF)
|
|
/// </remarks>
|
|
/// TODO: Split into 2 parts
|
|
public byte[] PlayChoiceProm { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Some ROM-Images additionally contain a 128-byte (or sometimes 127-byte)
|
|
/// title at the end of the file.
|
|
/// </summary>
|
|
public byte[] Title { get; set; } = [];
|
|
}
|
|
}
|