NdsForge.NET 1.0.1
Read, validate, edit, compare, and build Nintendo DS and DSi images from .NET
Loading...
Searching...
No Matches
NdsManifestModels.cs
1namespace NdsForge;
2
4public sealed class NdsManifestHeader
5{
7 public string Title { get; init; } = string.Empty;
9 public string GameCode { get; init; } = string.Empty;
11 public string MakerCode { get; init; } = string.Empty;
13 public NdsImageKind Kind { get; init; }
15 public byte Version { get; init; }
17 public byte RegionCode { get; init; }
19 public byte AutoStart { get; init; }
21 public uint UsedImageSize { get; init; }
23 public long DeviceCapacityBytes { get; init; }
25 public uint NormalCardControl { get; init; }
27 public uint SecureCardControl { get; init; }
29 public string Sha256 { get; init; } = string.Empty;
30}
31
33public sealed class NdsManifestProgram
34{
36 public NdsProcessor Processor { get; init; }
38 public long Offset { get; init; }
40 public long Length { get; init; }
42 public uint LoadAddress { get; init; }
44 public uint EntryAddress { get; init; }
46 public string Sha256 { get; init; } = string.Empty;
47}
48
50public sealed class NdsManifestFile
51{
53 public string Path { get; init; } = string.Empty;
55 public int FileId { get; init; }
57 public long Offset { get; init; }
59 public long Length { get; init; }
61 public string Sha256 { get; init; } = string.Empty;
62}
63
65public sealed class NdsManifestAllocation
66{
68 public int FileId { get; init; }
70 public long Offset { get; init; }
72 public long Length { get; init; }
74 public string Sha256 { get; init; } = string.Empty;
75}
76
78public sealed class NdsManifestOverlay
79{
81 public NdsProcessor Processor { get; init; }
83 public uint OverlayId { get; init; }
85 public uint FileId { get; init; }
87 public string? FilePath { get; init; }
89 public long? Offset { get; init; }
91 public long? Length { get; init; }
93 public uint LoadAddress { get; init; }
95 public uint RamSize { get; init; }
97 public uint BssSize { get; init; }
99 public uint StaticInitializerStart { get; init; }
101 public uint StaticInitializerEnd { get; init; }
103 public uint CompressedSize { get; init; }
105 public byte Flags { get; init; }
107 public string? Sha256 { get; init; }
108}
Snapshots every FAT record, including unnamed private Overlay payloads and otherwise unreferenced all...
string Sha256
Hashes the exact allocation bytes with SHA-256 so unnamed payload changes remain visible.
long Offset
Records the first physical byte addressed by the FAT record.
long Length
Records the FAT end-minus-start length, including valid zero-byte allocations.
int FileId
Records the zero-based FAT slot independent from Overlay IDs and optional FNT names.
Snapshots one named NitroFS allocation so path, numeric identity, layout, and payload can change inde...
int FileId
Records the FAT identifier referenced by FNT order and possibly Overlay metadata.
long Offset
Records the first physical payload byte independently from path and File ID.
string Sha256
Hashes the exact FAT allocation bytes with SHA-256.
long Length
Records stored payload bytes without inferring compression or game-specific structure.
string Path
Records the canonical case-sensitive slash-delimited NitroFS identity.
Snapshots common header identity, execution policy, and size claims in serialization-stable scalar fi...
byte AutoStart
Records the complete boot-control byte, including reserved bits retained by the parser.
uint SecureCardControl
Records secure-transfer cartridge bus timing and control bits as an uninterpreted hardware word.
byte RegionCode
Records the raw region byte whose interpretation depends on execution mode.
string Title
Preserves the visible fixed-width cartridge title after format padding is removed.
byte Version
Records the publisher-controlled software revision byte rather than any structure version.
string MakerCode
Preserves the two-character publisher identity without resolving an external company database.
string GameCode
Preserves the exact four-character product identity used by tools and cryptographic derivations.
string Sha256
Hashes every parsed common or extended header byte, including reserved fields, with SHA-256.
uint NormalCardControl
Records ordinary cartridge bus timing and control bits as an uninterpreted hardware word.
long DeviceCapacityBytes
Records the power-of-two capacity represented by the device-capacity exponent.
uint UsedImageSize
Separates the meaningful image extent claimed by the header from physical padding.
NdsImageKind Kind
Records the DS, DSi-enhanced, or DSi-exclusive unit-code interpretation.
Snapshots one Overlay record and its resolved payload identity without conflating Overlay and File ID...
uint RamSize
Records initialized runtime bytes after any decompression.
uint BssSize
Records additional zero-filled bytes absent from the cartridge payload.
long? Length
Records stored payload length, or remains absent for an invalid FAT reference.
uint LoadAddress
Records the first runtime address populated by the Overlay loader.
long? Offset
Records the first payload byte, or remains absent for an invalid FAT reference.
string? FilePath
Records a resolved NitroFS path only when the allocation also has an FNT name.
uint StaticInitializerStart
Records the inclusive constructor-pointer-list start.
uint FileId
Records the referenced FAT allocation, which may be unnamed.
NdsProcessor Processor
Separates the independent ARM9 and ARM7 Overlay namespaces.
string? Sha256
Hashes resolved payload bytes, or remains absent when the File ID cannot be resolved.
uint CompressedSize
Records the packed control word's low 24-bit stored-size field.
uint StaticInitializerEnd
Records the exclusive constructor-pointer-list end.
byte Flags
Records the packed control word's high byte without inventing unsupported flag meanings.
uint OverlayId
Records runtime Overlay identity rather than table position or FAT identity.
Snapshots one executable's physical placement, runtime mapping, and content identity.
uint EntryAddress
Records the initial instruction address after any ELF virtual-to-physical translation.
long Length
Records header-declared executable bytes and intentionally excludes an optional SDK footer.
string Sha256
Hashes only the header-declared executable region with SHA-256.
long Offset
Records the first cartridge byte of the header-declared executable.
NdsProcessor Processor
Separates original and DSi execution modes as well as ARM9 and ARM7 address spaces.
uint LoadAddress
Records the CPU address populated from the first executable byte.
NdsProcessor
Identifies a processor and execution mode.
NdsImageKind
Identifies the hardware family targeted by an image.