--- name: port-to-vita description: Port a game whose full C/C++ source is available (typically a universal-decompiler reconstruction, or any CMake C/C++ project) to the PS Vita as a .vpk, autonomously after one intake conversation. Covers the prerequisite check (complete source, working PC build, supported language), prior art (VitaDB, GitHub, field notes), project scan, tool checks (VitaSDK native or Docker, vdpm, vitaGL), the intake questions with recommendations grounded in the game (controls, touch, rear touch, gyro, glyphs, remapping, resolution and scaling, textures and memory, embedded or external assets, frame rate, title ID), the technical plan (SDL's Vita port + vitaGL, dependency replacements, runtime shaders with libshacccg.suprx, memory budget), adding a Vita target next to the PC one, 32-bit ARM fixes, LiveArea, verification without a Vita (static checks, the PC Vita-simulation profile, Vita3K), the handoff (.vpk, external assets, hardware checklist) and hardware iteration over vitacompanion. Use when the user wants to port, bring, convert or build a game for PS Vita / PSVita / Vita homebrew / a .vpk ("port this to Vita", "make a vpk of my decomp", "can this run on my Vita?"). --- # Port to Vita You are the porter. The user has a git repo with the **full source** of a game (normally the repo universal-decompiler produced, with the original binary and extracted assets in the gitignored `data/`). You add a PS Vita target next to the PC one, in the same repo, and work **autonomously** after one intake conversation, until the done criterion holds. The output is a `.vpk`. You never decompile anything: if the source isn't complete and buildable, say so and point the user to universal-decompiler. - Worked example, every step really run: `examples/lumen-drift/` (an original SDL2 + OpenGL game, its `PORT_PLAN.md`, `PORTLOG.md`, LiveArea from its own art, both asset modes, simulation scripts). - What other agents wrote down: the knowledge base (`knowledge/`, `vita kb search`). ## Your tools `vita` is the toolkit CLI. Plugin installs and clones put it on PATH (it lives at `bin/vita`). Elsewhere: `uv tool install git+https://github.com/hammerill/ps-vita-porter`. Every command has `--help` with examples; every reporting command takes `--json`. Exit codes: 0 ok, 1 problem found, 2 usage error. | Need | Command | |---|---| | Set up the repo: `vita.toml`, `PORT_PLAN.md`, `PORTLOG.md`, `.gitignore`, pre-push guard; the vitaport kit | `vita init`, `vita init --kit` | | Analyse the source: deps vs vdpm, graphics/input APIs, control scheme, resolutions, 64-bit/SIMD, threads, paths, assets + memory; **the intake questions with recommendations** | `vita scan`, `vita scan --questions` | | VitaSDK or Docker, vdpm packages, vitaGL, ffmpeg, pngquant, Vita3K (optional), vitacompanion | `vita tools check` | | Build the `.vpk` (native or Docker), error summary, unresolved-import check | `vita build`, `vita build --docker` | | LiveArea images and `template.xml` | `vita livearea make `, `vita livearea check` | | Validate a `.vpk` | `vita vpk check build-vita/.vpk` | | Convert textures/audio per the plan; check sizes and the memory estimate | `vita assets convert`, `vita assets check` | | PC "Vita simulation": 960x544, Vita controls, memory cap, scripted input, screenshots | `vita sim --shot`, `vita sim --input