32-bit games

A 32-bit game's NVN driver is A32 code, and the game's code runs as blocks in a table by guest address (nx/runtime/arm.c). Each call ends its block, so nvn takes a function by putting a block of its own in the function's slot (arm_slot). That block is the function's A32 adapter (hookgen --a32, docs/platforms/nx/hooks.md), which calls the same handler as the 64-bit adapter. nvnBootstrapLoader and the nvnDeviceGetProcAddress it returns are wrapped as for a 64-bit game. The driver's own lookup runs on the game's thread through arm_run, which runs blocks until the call returns. The game's command buffer memory callback runs the same way.

What differs from a 64-bit game:

The 32-bit game looked at (SDK NVN 0.12.16) answers API 52.32. Its writers fit the header's sizes except the sampler's, as in later SDKs. The game keeps each object at least as far from the next live one of its type as nvn's layout needs: buffers 0x30 apart, memory pools 0x118, programs 0x100, samplers 0x78 and textures in wrappers mostly 0x2a8. It ran from boot to a race on nvn, at 60 frames a second in the menus.


Made from docs/layers/gpu/nvn.md at 69237645142c. GPL-3.0-or-later.