scarletnx-vita runs a homebrew VPK the way the other drivers run their games. The VPK is extracted once into the
data folder's recompiled/<title ID>/ (app/ holds the package, ux0/ the writable storage), the eboot's code is
compiled ahead of time into <title ID>_code.so, and a copy of the runtime named after the title ID plays it; its
<title ID>.ini says system=vita, which the launcher and a build's deploy pick the driver by. Code
the offline pass didn't find is compiled at run time by the recompiler's executor, and the addresses it compiled are
kept as hints (<title ID>.hints) for the next offline compile.
build/scarletnx-vita game.vpk # extract, compile and play
build/scarletnx-vita ux0/app/PCSE00001 # a dumped game: linked, its update from ux0/patch/PCSE00001
build/scarletnx-vita -x game.vpk # extract only
build/scarletnx-vita --game=~/.local/share/scarletnx/recompiled/LVBT00001 --seconds=30 --shot=/tmp/frame
scarletnx-vita takes the common options that fit it: -x, -r, --game, --update, --data,
--outdir, --output, --seconds, --shot, --script, -h and the recompile's (-O, --jobs, --chunk,
--jit-cache, --jit-only, --keep-ir, -q), each value as --option VALUE or --option=VALUE.
A dumped game's folder (decrypted, as a console's ux0:app/<title ID>) is linked into the game's folder rather than
copied: app/ names it and patch/ its update (ux0:patch/<title ID> beside it, or --update DIR, which an older version named --patch), whose files app0:
shows over the game's and whose eboot.bin is the one compiled. A retail eboot is a fixed-address module (ET_SCE_EXEC)
without relocations, so discovery starts at every word of the image and every MOVW and MOVT pair that makes a Thumb
function's address. The libraries the game brings in sce_module/ (libc, libfios2, libsmart, libult) are loaded
beside the eboot, from 0x71000000 up, and their module_start functions run in turn before the game's. Their
imports of the system's functions are the runtime's, by NID. Variables a module imports (SceLibc's _Ctype and
_Stdout, the C++ exceptions' vtables) get slots in the runtime's page, numbered after those of the modules loaded
before it, which the loader relocates the code to. A slot is filled from a loaded module's export of the variable
when there is one, and by the runtime when there is none.
The first homebrew it targets is the Lua Vita Tester (lpp-vita with vita2d). It draws its screen, reads the buttons and plays its sound test.
Made from docs/platforms/vita/README.md at 69237645142c. GPL-3.0-or-later.