The HLE BIOS

The software interrupts run as board routines (src/nds/bios/bios.c): Div, Sqrt, CpuSet and CpuFastSet, GetCRC16, BitUnPack, the LZ77, Huffman and run-length decompressors, the two difference filters, WaitByLoop, IsDebugger and CustomPost. Halt, IntrWait and VBlankIntrWait leave on the stacks and in the registers what the console's BIOS leaves there while they wait, and an interrupt is entered and left as the BIOS enters and leaves it (src/nds/cpu/cpu.c): the SDK's interrupt handler switches threads by rewriting the frame the BIOS pushed, and a thread that waits inside the BIOS is resumed there.

The decompressors that read through the game's own functions (LZ77, Huffman and run-length "by callback") read the memory at their source instead, which is what the SDK's functions read. The run says so once.


Made from docs/platforms/nds/README.md at 69237645142c. GPL-3.0-or-later.