24 ReadOnlySpan<byte> contents,
28 uint staticInitializerStart = 0,
29 uint staticInitializerEnd = 0,
30 uint compressedSize = 0,
41 staticInitializerStart,
67 uint staticInitializerStart = 0,
68 uint staticInitializerEnd = 0,
69 uint compressedSize = 0,
70 byte flags = 0) =>
new(
79 staticInitializerStart,
103 uint staticInitializerStart = 0,
104 uint staticInitializerEnd = 0,
105 uint compressedSize = 0,
106 byte flags = 0) =>
new(
110 linkedFilePath:
null,
111 file ??
throw new ArgumentNullException(nameof(file)),
115 staticInitializerStart,
116 staticInitializerEnd,
137 string? linkedFilePath,
142 uint staticInitializerStart,
143 uint staticInitializerEnd,
149 throw new ArgumentOutOfRangeException(nameof(processor),
"DS overlay tables belong to ARM9 or ARM7.");
152 if (staticInitializerEnd < staticInitializerStart || compressedSize > 0x00FF_FFFF)
154 throw new ArgumentException(
"Overlay initializer bounds or compressed size are invalid.");
161 LinkedFile = linkedFile;
175 public uint
Id {
get; }
190 internal bool HasPrivateAllocation => EffectiveLinkedFilePath is
null;
Holds one NitroFS payload while an image is being assembled, independently of any source ROM.
string Path
Identifies the file in NitroFS using a leading slash and one-byte path segments; Latin-1 code points ...
Models structural NitroFS changes before ROM offsets and file identifiers are assigned.
uint RamSize
Declares initialized runtime bytes after optional decompression.
uint StaticInitializerEnd
Marks the exclusive end of the runtime constructor pointer list.
static NdsOverlayDefinition LinkToFile(NdsProcessor processor, uint id, string filePath, uint loadAddress, uint ramSize, uint bssSize=0, uint staticInitializerStart=0, uint staticInitializerEnd=0, uint compressedSize=0, byte flags=0)
Links an Overlay record to a named NitroFS payload so both identities share one FAT Allocation.
NdsOverlayDefinition(NdsProcessor processor, uint id, ReadOnlySpan< byte > contents, uint loadAddress, uint ramSize, uint bssSize=0, uint staticInitializerStart=0, uint staticInitializerEnd=0, uint compressedSize=0, byte flags=0)
Copies an Overlay payload and captures every field required by its fixed 32-byte table record.
string? LinkedFilePath
Identifies a shared named NitroFS payload, or remains null for a private Allocation.
uint BssSize
Declares zero-filled runtime bytes that do not occupy cartridge storage.
static NdsOverlayDefinition LinkToFile(NdsProcessor processor, uint id, NdsBuildFile file, uint loadAddress, uint ramSize, uint bssSize=0, uint staticInitializerStart=0, uint staticInitializerEnd=0, uint compressedSize=0, byte flags=0)
Links to a builder-owned file object so directory or file moves automatically retain the Overlay rela...
byte Flags
Occupies the high byte of the packed table control word without reinterpretation.
uint Id
Identifies the Overlay to runtime code without determining its FAT File ID.
ReadOnlyMemory< byte > Contents
Contains definition-owned stored bytes for a private Allocation, or empty memory for a named-file lin...
uint StaticInitializerStart
Marks the inclusive start of the runtime constructor pointer list.
uint CompressedSize
Occupies the low 24 bits of the packed table control word.
NdsProcessor Processor
Selects the independent ARM9 or ARM7 Overlay table and execution environment.
uint LoadAddress
Specifies the first runtime address receiving initialized Overlay bytes.
NdsProcessor
Identifies a processor and execution mode.