namespace SabreTools.Data.Models.NES
{
///
/// NES 1.0 header information
///
///
///
/// Older versions of the iNES emulator ignored bytes 7-15, and several ROM management
/// tools wrote messages in there. Commonly, these will be filled with "DiskDude!",
/// which results in 64 being added to the mapper number.
///
/// A general rule of thumb: if the last 4 bytes are not all zero, and the header is
/// not marked for NES 2.0 format, an emulator should either mask off the upper 4 bits
/// of the mapper number or simply refuse to load the ROM.
///
public class CartHeader1 : CartHeader
{
// All common header parts take up bytes 0-7
///
/// Size of PRG RAM in 8 KB units
///
///
/// Value 0 infers 8 KB for compatibility; see PRG RAM circuit.
/// This was a later extension to the iNES format and not widely used.
/// NES 2.0 is recommended for specifying PRG RAM size instead.
///
public byte PrgRamSize { get; set; }
///
/// TV system (rarely used extension)
///
///
/// Though in the official specification, very few emulators honor this bit
/// as virtually no ROM images in circulation make use of it.
///
public TVSystem TVSystem { get; set; }
#region Byte 10
///
/// TV system with extended values
///
///
/// Byte 10, Bits 0-1
///
/// This byte is not part of the official specification, and relatively
/// few emulators honor it.
///
public TVSystemExtended TVSystemExtended { get; set; }
///
/// Unknown reserved bits
///
///
/// Byte 10, Bits 2-3
///
/// This byte is not part of the official specification, and relatively
/// few emulators honor it.
///
public byte Byte10ReservedBits23 { get; set; }
///
/// PRG RAM ($6000-$7FFF) present
///
///
/// Byte 10, Bit 4
///
/// This byte is not part of the official specification, and relatively
/// few emulators honor it.
///
public bool PrgRamPresent { get; set; }
///
/// Board has bus conflicts
///
///
/// Byte 10, Bit 5
///
/// This byte is not part of the official specification, and relatively
/// few emulators honor it.
///
public bool HasBusConflicts { get; set; }
///
/// Unknown reserved bits
///
///
/// Byte 10, Bits 6-7
///
/// This byte is not part of the official specification, and relatively
/// few emulators honor it.
///
public byte Byte10ReservedBits67 { get; set; }
#endregion
///
/// Unused padding to align to 16 bytes
///
public byte[] Padding { get; set; } = new byte[5];
}
}