Skip to content
View psvsdk's full-sized avatar
Block or Report

Block or report psvsdk

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
psvsdk/README.md

PSVSDK

Stable, Consistent and Self-Documented SDK for the PSVita.

Install

If you don't need a specific psvsdk version, you can easily build and install it. However, new PSVita APIs are discovered/updated everyday. To get a reproducible build, one shall use a versioned docker image : docker run -rm -it psvsdk/psvsdk make

Usage

The psvsdk provides a set of tools to compile your C sources into a PSVita compatible binary using the following workflow:

graph LR
main.c & sceCtrl.a & sceNet.a --> psv-gcc --> main.elf --> psv-velf --> main.velf --> psv-self --> main.self --> psv-vpk --> main.vpk
psv-sfo --> param.sfo --> psv-vpk
Loading
  • Compile main.c into an ARM ELF using psv-gcc which is arm-none-eabi-gcc with extra flags.
  • Convert this ARM ELF into a Vita ELF using psv-velf.
  • Sign this .velf using psv-self into a signed Elf .self.
  • Create an SFO file using psv-sfo to describe your application to the LiveArea (title, version, parental, ...).
  • Bundle both .self and .sfo into a .vpk VitaPacKage using psv-vpk.

Example:

psv-gcc  main.c -o a.elf
psv-velf a.elf  a.velf
psv-self a.velf a.self
psv-sfo  TITLE="Hello World" ... > a.sfo
psv-vpk  a.self:EBOOT.bin a.sfo:sce_sys/param.sfo > a.vpk
#curl -T a.vpk ftp://$IP:1337/ux0:/

We can generify them in a Makefile:

%.elf : %.c         ; psv-gcc  $^ -o $@
%.velf: %.elf       ; psv-velf $^ $@
%.self: %.velf      ; psv-self $^ $@
%.sfo : %.ini       ; psv-sfo  $(shell cat $^) > $@
%.vpk : %.sfo %.self; psv-vpk  $(word 1,$^):sce_sys/param.sfo $(word 2,$^):eboot.bin > $@

Build & Install

Note: You'll need the build-essential and gcc-arm packages to build the psvsdk

  • Build the toolchain using make. (see Makefile for possible options)
  • Install globally (require sudo): sudo make install
  • Install locally (only for you): OUT_DIR=$HOME/.local/bin MAN_DIR=/tmp make install
  • Build locally a Docker image: docker build -t psvsdk/psvsdk:latest .

Feel free to take a look at the .travis.yml or the Dockerfile to see how the prebuild SDK is made.

Naming

  • ELF: Executable Locatable File.
  • Module : An ELF file that exports/provides 1-N libraries and imports/requires 0-N libraries.
  • Library : A set of functions related to a common topic (Ctrl,Io,Thread ...).
  • NameID (NID): 32-bit hash generated from a salted {module, library, symbol} name.
  • VELF: Generic ARM ELF with Vita-specific sections .sceModuleInfo.rodata and Import/Export definitions.
  • SELF: Signed VELF
  • FSELF: Signed VELF but with an empty (0000...) signature.
  • Stub: Piece of code that feign a function, so the code can compile, but in real life, this function will only be available at runtime.

Popular repositories Loading

  1. psvsdk psvsdk Public

    PlayStation Vita SDK

    C++ 23 3

  2. psvsdk.github.io psvsdk.github.io Public