PPSSPP Development

About PPSSPP

PPSSPP is a PSP emulator written in C++. It translates PSP CPU instructions directly into optimized x86, x64 and ARM machine code, using JIT recompilers (dynarecs).

PPSSPP can thus run on quite low-spec hardware, including stronger ARM-based phones and tablets, as long as there's OpenGL ES 2.0 support.

Code and commit access

PPSSPP is an open source project, licensed under the GPL 2.0 (or later). Anyone is welcome to contribute their improvements to the code. The code is hosted at the Github page for PPSSPP, using the Git source control system.

Following the Dolphin tradition, the PPSSPP project is very open. Anyone can participate directly in the development by making pull requests, and if you make substantial contributions you may be given rights to commit directly.

Building

Android

You can build for Android from Windows, MacOSX or Linux.

To build for Android, make sure that you have installed the Android SDK and NDK correctly, and that the $NDK environment variable is set to the path of the NDK.

  • Go to ppsspp/android in a command prompt and run either ab.cmd or ab.sh, depending on your operating system.
  • Open the project in Eclipse (Impor it into your workspace, also import the "native" project and set up an Android library dependency from PPSSPP to native)
  • Build and run on your phone. If you rebuild the NDK part, you may have to add a space to PPSSPPActivity.java or refresh the project to force Eclipse to push out a new APK to your device.

Debugging and logging

You'll find yourself relying on the logs a lot to figure out what's really going on. As PPSSPP simulates the PSP OS, we get something similar to a Unix-style strace.

There's a headless (no display/audio) build, which is very useful when running the pspautotests through test.py - highly recommended way to find issues.

The Windows port and the Qt build have interactive debuggers (Qt currently broken). This is not available for mobile platforms and "SDL" builds.

HLE

PPSSPP is a HLE ("high level emulation") emulator, it simulates the PSP OS as seen by the game rather than the full hardware. A program running on the PSP OS can send raw display lists to the graphics chips, but can't access the flash controller or the Media Engine directly, instead it has to go through libraries and the PSP OS kernel. We simply simulate these. This is a lot of work though, the PSP OS is large and has plenty of functionality so achieving 100% compatibility is difficult bordering on the impossible. We can get close though.

Automated Test Suite

Since this emulator implements most of the PSP OS in order to run games, testing it against the real thing is critical. Some other PSP emulator authors have collaborated around creating a test suite called pspautotest, and we have picked that up and expanded it. There are two scripts: test.py and gentest.py. gentest.py uses psplink to run a test program on your real PSP and captures the text output and saves it as [test].expected. Then you can run the same test in PPSSPP by using test.py, which will automatically compare the output to the expected output.

Dependencies

PPSSPP has few dependencies: basically zlib and OpenGL, and its own fork of FFMPEG. It mostly sticks to the OpenGL ES 2.0 subset of OpenGL. It also includes a few minor libraries like CityHash and libzip directly in the distribution, for ease of building on Windows.

Contributing

Pick from the list of tasks below, go look at the open issues on GitHub, or just implement whatever missing feature you feel like. Send your code as a pull request on Github. If you send a couple of good pull requests, you'll be added as a contributor and get your own commit access.

The PPSSPP coding style is similar to the Google C++ coding style.

Porting PPSSPP

You are encouraged to port PPSSPP to new platforms. Here's an incomplete list of platforms that PPSSPP could or could not plausibly be ported to:

PlatformDoneComments
WindowsDoneJIT for x86 and x64
AndroidDoneJIT for ARM
Ouya (Android)SoonGamepad and JIT
LinuxDoneJIT for x86 and x64
MacOSXDoneJIT for x86 and x64. Port still pretty bad.
Blackberry 10DoneJIT for ARM
SymbianDoneJIT for ARM
PandoraDone (unofficial)
iOSDone (unofficial)JIT (Jailbreak required)
Raspberry PiDone?Slow
MeegoDone
Windows Phone 7.xNOT POSSIBLENo native code support
Windows Phone 8NOT POSSIBLEJIT not allowed, will be slow
Windows RTPOSSIBLEJIT not allowed, will be slow
Xbox 360POSSIBLEHacked consoles only.
Playstation 3POSSIBLEHacked consoles only.
WiiMAYBE POSSIBLEHacked consoles only.
Xbox OriginalPOSSIBLESlow. Hacked consoles only.
Playstation 2NOT POSSIBLELack of RAM, weak CPU.
GamecubeNOT POSSIBLELack of RAM
DreamcastNOT POSSIBLELack of RAM, weak CPU.
P166MMXNOT POSSIBLEWeak CPU
Nintendo DSAre you kidding?Way below requirements
C64Go away.Yeah...