| Part | Files |
|---|---|
| VPK, SELF and ELF loading (zip and zlib, relocations, imports patched to SVCs by index) | src/vita/loader/ |
The offline compiler and the module it makes: the host's native back end's blocks (the A9's, chained: src/common/cpu/arm/codegen.h), as discovery finds them (the recompile says how many it made, and why it refused one) | src/vita/aot/ |
| Process, threads (cooperative, one host thread), waits, memory, the dispatcher, run-time compiles | src/vita/runtime/ |
The system libraries, answered by NID: each module's functions declared in a .hook beside its .c (The system's functions by NID) | src/vita/hle/ (kernel.c, io.c, ctrl.c, display.c, audio.c, misc.c, gxm.c, fiber.c, ngs.c) |
| The game's own C and C++ libraries (SceLibc, SceLibm, SceLibstdcxx) and the Clib, malloc on a heap in guest memory | src/vita/hle/libc.c, heap.c |
sceGxm on Vulkan: guest memory imported with VK_EXT_external_memory_host (a driver without it, as Mali's, works on a host visible copy of each memory block the game maps, which takes the pages the game wrote before the GPU reads them and goes back to guest memory, the rows the GPU wrote alone, when its submission is done), USSE programs translated to SPIR-V through src/common/utilities/spirv_emit.c, decoded by the decoder tools/decodetree makes from usse.decode | src/vita/gpu/ (render.c, usse.c, usse.decode, vk.c, present.c) |
Movies: SceMp4 (MP4 demuxed from memory with libavformat, the file read through the game's callbacks), sceAvcdec (H.264 with libavcodec, the picture laid out in the guest's buffer on the GPU, picture.comp), sceAudiodec (AAC and ATRAC9) and SceCodecEngine's memory | src/vita/hle/ (mp4.c, videodec.c, audiodec.c) |
Guest memory's writes: the pages the renderer copied to the GPU (textures, color surfaces, the framebuffer; every block the GPU uses where it works on copies) write-protected, a fault marking a page written and letting the write through, so unchanged memory isn't copied again (mprotect or VirtualProtect, and the fault handler) | src/vita/runtime/watch.c |
Keyboard, mouse and fingers (touch), the on-screen controls, gamepads and scripted presses (--script=ms:hex,..., SceCtrl's button bits, each held for --press-len= ms) | src/vita/platform/input.c |
Made from docs/platforms/vita/README.md at 69237645142c. GPL-3.0-or-later.