Tips and Tricks

Here some useful tips for developing for the PSP.

Making Programs Work on Unmodded PSPs

The PSPDEV toolchain contains tools for making your program work on unmodded PSPs. This can be done by running psp-cmake with some additional commands when building like so:

mkdir build && cd build
psp-cmake -DBUILD_PRX=1 -DENC_PRX=1 .. && make

This does require create_pbp_file to be used in your CMakeLists.txt file. After the first build, running make is enough to get an EBOOT.PBP file which works on official firmware with any new changes made to the code.

Add PSP Specific Code to a Multi-Platform Programs

When porting a game to the PSP, some PSP specific code might be needed. To make this code only apply to PSP, it is possible to use a simple ifdef statements which checks for __PSP__ like so:

#ifdef __PSP__
    // Do PSP specific thing
#else
    // Do the thing all other systems should do
#endif

This makes sure that the other systems supported by the program keeps working the same, while still making it possible to add support for the PSP.

More Libraries

There are many C and C++ libraries available within the PSPDEV toolchain which can add functionality to your program. Some examples:

  • Audio formats: mp3, ogg
  • Image formats: png, jpeg
  • Data formats: json, yaml, sqlite
  • Support for compression, physics, fonts and much more

For the full list take a look at the psp-packages repository or run psp-pacman -Syl. Updating libraries can be done with psp-pacman -Syu.