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

Reproduces ndstool's historical trainer layout by relocating ARM7, appending caller code and a header backup, and patching boot addresses with the historical staged CRC correction. It is isolated because modern builds do not need it. More...

Static Public Member Functions

static NdsLegacyArm7HookResult Apply (ReadOnlySpan< byte > image, ReadOnlySpan< byte > hook)
 Applies the compatibility transform to a complete DS-family image without mutating caller memory.

Detailed Description

Reproduces ndstool's historical trainer layout by relocating ARM7, appending caller code and a header backup, and patching boot addresses with the historical staged CRC correction. It is isolated because modern builds do not need it.

Definition at line 9 of file NdsLegacyArm7Hook.cs.

Member Function Documentation

◆ Apply()

NdsLegacyArm7HookResult NdsForge.NdsLegacyArm7Hook.Apply ( ReadOnlySpan< byte > image,
ReadOnlySpan< byte > hook )
inlinestatic

Applies the compatibility transform to a complete DS-family image without mutating caller memory.

DSi-enhanced images retain their extended header and DSi-mode programs; the historical hook redirects only the original DS-mode ARM7 boot path, matching ndstool 1.50.3 behavior.

Parameters
imageComplete original or previously hooked DS or DSi-enhanced image.
hookNon-empty ARM7 machine code; zero padding extends it to a four-byte boundary.
Returns
Detached transformed bytes, introduced regions, and preserved CRC32.

Definition at line 19 of file NdsLegacyArm7Hook.cs.


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