The Switch runtime (src/nx/) plays Switch games. This page lists its layers, with the code and the documents of
each. The documents of this folder describe the parts that only the Switch has. scarletnx takes every one of the
common options but --output.
| Layer | Code | Documents |
|---|---|---|
| Loader | XCI and NSP extraction (src/nx/runtime/driver/extract.c), NSO, NRO and NPDM (src/nx/loader/) | Usage, NRO files |
| CPU | AArch64 compiled ahead of time by the host's native back end (src/common/cpu/recompiler/), 32-bit code through the block compiler (src/common/cpu/arm/), a JIT for the code that the AOT build missed, and NCE on AArch64 hosts | Architecture, CPU plan, NCE, AOT packs |
| Kernel and HLE | the kernel and the SVCs (src/nx/hle/kernel/, hle/svc/, memory/), the services (hle/services/), the file system (hle/filesystem/), the hooks and the native SDK (nn/) | IPC interfaces, Hooks, Filesystem, Networking, Memory accounting, Code memory |
| GPU | NVN (src/nx/gpu/nvn/) and the Maxwell front end (src/nx/gpu/maxwell/), Maxwell shaders to SPIR-V (gpu/shader/), the Vulkan renderer (gpu/vk/) | NVN, GPU-owned guest memory, ASTC, Block linear, BCn without BCn |
| Video | host1x, NVDEC with FFmpeg, and VIC (src/nx/gpu/video/) | VIC |
| Audio | the audio outs, the audio ins, the audio device, the audio renderer's and the hardware Opus decoder's functions, answered in the SDK's own (src/nx/nn/audio.c, audio_renderer.c, codec.c and their .hook), the renderer itself (hle/services/audren.c, audren_dsp.c), the Opus decoding on FFmpeg (hle/services/audio.c) | none yet |
| Input | hid (hle/services/hid.c, hid_touch.c, hid_motion.c), SDL gamepads (runtime/platform/backend/gamepad.c), the on-screen controls | Usage, Playing, Settings |
| Platform | the window or headless run, the menu in the game and the shader screen (src/nx/runtime/platform/), and the host layer that every driver shares (src/common/platform/) | Architecture, the host systems |
Made from docs/platforms/nx/README.md at 69237645142c. GPL-3.0-or-later.