NdsForge.NET 1.0.1
Read, validate, edit, compare, and build Nintendo DS and DSi images from .NET
Loading...
Searching...
No Matches
NdsForge.NdsOverlayDefinition Class Referencesealed

Describes one Overlay record and its private Allocation when constructing a new Image. More...

Public Member Functions

 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.

Static Public Member Functions

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.
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 relationship.

Properties

NdsProcessor Processor [get]
 Selects the independent ARM9 or ARM7 Overlay table and execution environment.
uint Id [get]
 Identifies the Overlay to runtime code without determining its FAT File ID.
ReadOnlyMemory< byte > Contents [get]
 Contains definition-owned stored bytes for a private Allocation, or empty memory for a named-file link.
string? LinkedFilePath [get]
 Identifies a shared named NitroFS payload, or remains null for a private Allocation.
uint LoadAddress [get]
 Specifies the first runtime address receiving initialized Overlay bytes.
uint RamSize [get]
 Declares initialized runtime bytes after optional decompression.
uint BssSize [get]
 Declares zero-filled runtime bytes that do not occupy cartridge storage.
uint StaticInitializerStart [get]
 Marks the inclusive start of the runtime constructor pointer list.
uint StaticInitializerEnd [get]
 Marks the exclusive end of the runtime constructor pointer list.
uint CompressedSize [get]
 Occupies the low 24 bits of the packed table control word.
byte Flags [get]
 Occupies the high byte of the packed table control word without reinterpretation.

Detailed Description

Describes one Overlay record and its private Allocation when constructing a new Image.

Overlay ID is runtime metadata, whereas the writer assigns a separate File ID after named NitroFS files. Keeping those identities distinct prevents the historical extraction error of indexing the FAT by Overlay ID.

Definition at line 8 of file NdsOverlayDefinition.cs.

Constructor & Destructor Documentation

◆ NdsOverlayDefinition()

NdsForge.NdsOverlayDefinition.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 )
inline

Copies an Overlay payload and captures every field required by its fixed 32-byte table record.

Parameters
processorARM9 or ARM7 table receiving the record.
idRuntime Overlay identity, which need not be contiguous or equal its eventual File ID.
contentsStored payload bytes, compressed or plain according to flags .
loadAddressFirst runtime address populated by the Overlay loader.
ramSizeInitialized runtime size after any decompression.
bssSizeAdditional zero-initialized bytes absent from the stored payload.
staticInitializerStartInclusive runtime start of the constructor pointer list.
staticInitializerEndExclusive runtime end of the constructor pointer list.
compressedSizeLow 24 bits of the packed control word; zero commonly means uncompressed.
flagsHigh eight bits of the packed control word.

Definition at line 21 of file NdsOverlayDefinition.cs.

Member Function Documentation

◆ LinkToFile() [1/2]

NdsOverlayDefinition NdsForge.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 )
inlinestatic

Links to a builder-owned file object so directory or file moves automatically retain the Overlay relationship.

Parameters
processorARM9 or ARM7 table receiving the record.
idRuntime Overlay identity, independent from generated File ID.
filePayload owned by the same filesystem builder used in the final recipe.
loadAddressFirst runtime address populated by the Overlay loader.
ramSizeInitialized runtime size after any decompression.
bssSizeAdditional zero-initialized bytes absent from storage.
staticInitializerStartInclusive constructor-list start.
staticInitializerEndExclusive constructor-list end.
compressedSizeLow 24 bits of the packed control word.
flagsHigh eight bits of the packed control word.
Returns
An immutable definition whose effective path follows file .

Definition at line 96 of file NdsOverlayDefinition.cs.

◆ LinkToFile() [2/2]

NdsOverlayDefinition NdsForge.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 )
inlinestatic

Links an Overlay record to a named NitroFS payload so both identities share one FAT Allocation.

Parameters
processorARM9 or ARM7 table receiving the record.
idRuntime Overlay identity, independent from the linked file's generated File ID.
filePathCanonical or root-relative NitroFS path that must exist when the recipe is built.
loadAddressFirst runtime address populated by the Overlay loader.
ramSizeInitialized runtime size after any decompression.
bssSizeAdditional zero-initialized bytes absent from the stored payload.
staticInitializerStartInclusive runtime start of the constructor pointer list.
staticInitializerEndExclusive runtime end of the constructor pointer list.
compressedSizeLow 24 bits of the packed control word.
flagsHigh eight bits of the packed control word.
Returns
An immutable record definition that allocates no duplicate payload.

Definition at line 60 of file NdsOverlayDefinition.cs.

Property Documentation

◆ BssSize

uint NdsForge.NdsOverlayDefinition.BssSize
get

Declares zero-filled runtime bytes that do not occupy cartridge storage.

Definition at line 199 of file NdsOverlayDefinition.cs.

◆ CompressedSize

uint NdsForge.NdsOverlayDefinition.CompressedSize
get

Occupies the low 24 bits of the packed table control word.

Definition at line 208 of file NdsOverlayDefinition.cs.

◆ Contents

ReadOnlyMemory<byte> NdsForge.NdsOverlayDefinition.Contents
get

Contains definition-owned stored bytes for a private Allocation, or empty memory for a named-file link.

Definition at line 178 of file NdsOverlayDefinition.cs.

◆ Flags

byte NdsForge.NdsOverlayDefinition.Flags
get

Occupies the high byte of the packed table control word without reinterpretation.

Definition at line 211 of file NdsOverlayDefinition.cs.

◆ Id

uint NdsForge.NdsOverlayDefinition.Id
get

Identifies the Overlay to runtime code without determining its FAT File ID.

Definition at line 175 of file NdsOverlayDefinition.cs.

◆ LinkedFilePath

string? NdsForge.NdsOverlayDefinition.LinkedFilePath
get

Identifies a shared named NitroFS payload, or remains null for a private Allocation.

Definition at line 181 of file NdsOverlayDefinition.cs.

◆ LoadAddress

uint NdsForge.NdsOverlayDefinition.LoadAddress
get

Specifies the first runtime address receiving initialized Overlay bytes.

Definition at line 193 of file NdsOverlayDefinition.cs.

◆ Processor

NdsProcessor NdsForge.NdsOverlayDefinition.Processor
get

Selects the independent ARM9 or ARM7 Overlay table and execution environment.

Definition at line 172 of file NdsOverlayDefinition.cs.

◆ RamSize

uint NdsForge.NdsOverlayDefinition.RamSize
get

Declares initialized runtime bytes after optional decompression.

Definition at line 196 of file NdsOverlayDefinition.cs.

◆ StaticInitializerEnd

uint NdsForge.NdsOverlayDefinition.StaticInitializerEnd
get

Marks the exclusive end of the runtime constructor pointer list.

Definition at line 205 of file NdsOverlayDefinition.cs.

◆ StaticInitializerStart

uint NdsForge.NdsOverlayDefinition.StaticInitializerStart
get

Marks the inclusive start of the runtime constructor pointer list.

Definition at line 202 of file NdsOverlayDefinition.cs.


The documentation for this class was generated from the following file: