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

Supplies one executable payload and the CPU addresses required to place it in a newly built image. More...

Public Member Functions

 NdsProgramDefinition (NdsProcessor processor, ReadOnlySpan< byte > contents, uint loadAddress, uint entryAddress)
 Captures exact executable bytes together with their runtime identity and addresses.
NdsProgramDefinition SetFooter (ReadOnlySpan< byte > footer)
 Attaches a recognized SDK footer immediately after ARM9 while retaining its separate structural identity.

Properties

NdsProcessor Processor [get]
 Distinguishes ARM9, ARM7, ARM9i, and ARM7i address spaces and header tuples.
ReadOnlyMemory< byte > Contents [get]
 Contains the exact cartridge payload in definition-owned, externally immutable memory.
uint LoadAddress [get]
 Specifies the first runtime address receiving payload bytes; it is not a ROM offset.
uint EntryAddress [get]
 Specifies the first instruction address and must be meaningful for the selected processor mode.
ReadOnlyMemory< byte > Footer [get]
 Contains the optional 12-byte ARM9 SDK footer beginning with marker 0xDEC00621.

Detailed Description

Supplies one executable payload and the CPU addresses required to place it in a newly built image.

The definition copies program bytes at construction, so later mutation of the caller's buffer cannot make a previously reviewed Build Recipe nondeterministic. ROM offsets are deliberately absent: the Layout assigns those after every component size and alignment policy is known.

Definition at line 11 of file NdsProgramDefinition.cs.

Constructor & Destructor Documentation

◆ NdsProgramDefinition()

NdsForge.NdsProgramDefinition.NdsProgramDefinition ( NdsProcessor processor,
ReadOnlySpan< byte > contents,
uint loadAddress,
uint entryAddress )
inline

Captures exact executable bytes together with their runtime identity and addresses.

Parameters
processorThe execution target; DS builds currently require ARM9 and ARM7 definitions.
contentsRaw executable bytes as they should appear in the Image.
loadAddressFirst CPU address populated when the payload is loaded.
entryAddressCPU address at which execution begins.

Definition at line 21 of file NdsProgramDefinition.cs.

Member Function Documentation

◆ SetFooter()

NdsProgramDefinition NdsForge.NdsProgramDefinition.SetFooter ( ReadOnlySpan< byte > footer)
inline

Attaches a recognized SDK footer immediately after ARM9 while retaining its separate structural identity.

Parameters
footerExactly 12 bytes whose first little-endian word is 0xDEC00621.
Returns
The same definition for fluent Build Recipe construction.
Exceptions
InvalidDataExceptionThe processor is not ARM9 or the bytes do not match the recognized footer form.

Definition at line 52 of file NdsProgramDefinition.cs.

Property Documentation

◆ Contents

ReadOnlyMemory<byte> NdsForge.NdsProgramDefinition.Contents
get

Contains the exact cartridge payload in definition-owned, externally immutable memory.

Definition at line 37 of file NdsProgramDefinition.cs.

◆ EntryAddress

uint NdsForge.NdsProgramDefinition.EntryAddress
get

Specifies the first instruction address and must be meaningful for the selected processor mode.

Definition at line 43 of file NdsProgramDefinition.cs.

◆ Footer

ReadOnlyMemory<byte> NdsForge.NdsProgramDefinition.Footer
get

Contains the optional 12-byte ARM9 SDK footer beginning with marker 0xDEC00621.

Definition at line 46 of file NdsProgramDefinition.cs.

◆ LoadAddress

uint NdsForge.NdsProgramDefinition.LoadAddress
get

Specifies the first runtime address receiving payload bytes; it is not a ROM offset.

Definition at line 40 of file NdsProgramDefinition.cs.

◆ Processor

NdsProcessor NdsForge.NdsProgramDefinition.Processor
get

Distinguishes ARM9, ARM7, ARM9i, and ARM7i address spaces and header tuples.

Definition at line 34 of file NdsProgramDefinition.cs.


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