PSP programming languages
Written on March 26th, 2022 by Pierre LHere’s a brief overview of the language options available to would-be PSP programmers.
Lua
Lua is far and away the most popular choice for PSP programming, judging by the quantity (if not necessarily quality) of homebrews coded in this language.
Beyond the original Lua Player, which struggles to work with modern firmware revisions, there are tons of interpreters to choose from.
Each one implements PSP-specific functions a bit differently, so code written for one interpreter won’t necessarily work with another.
Homebrew games and apps coded in Lua get a bad rep, but in the right hands, results can be impressive. The 3D rail shooter Gcrew’s Defense Patrol is entirely coded in Lua.
ONELua is the most recent out of all the Lua interpreters for PSP, as well as the best documented.
C / C++
C and C++ are what you would use with the unofficial PSP SDK. The choice languages of coders who want to go beyond the limits of Lua. There is plenty of PSP code in C stored on the PSP Archive, as well as elsewhere on GitHub.
The MINPSPW project used to be a popular Windows-based alternative to the PSP SDK for Linux. It has been abandoned in recent years, after being made obsolete by solutions such as Windows Subsystem for Linux.
There used to be dozens of sites and webpages devoted solely to C/C++ coding and tutorials for PSP, but nearly all have vanished over the years. A few surviving resources are gathered on this page.
More recently, Iridescence published a series of PSP coding tutorials on YouTube. The PSP-Dev Wiki also hosts a few resources.
Libraries
Countless libraries, game engines, guides and other resources were created to make it easier to code in C/C++ on PSP. Here are some of them:
- Docs for OSLib-MOD. The original OldSchool Library by Brunni was widespread in the PSP homebrew scene.
- NGE - a library popular in the Chinese PSP scene.
- DX Library Portable - widely used by Japanese homebrew devs. A more up-to-date Kai version also exists.
- ADQuake - engine for Quake mods by by Crow_Bar and st1x51.
- LTE Game Engine - an engine based on Irrlicht 1.0. A demo built with this engine is available here. Republic of Zombies is one game that uses this engine.
- ODE for LTE Game Engine - integrates LTE with the Open Dynamics Engine.
- JGE++ - a hardware accelerated 2D game SDK for PSP.
- AMGLib-Plus - 3D graphics engine.
- Dungeons Engine 2 - this engine is discussed more in detail here.
- openTRI - game engine.
- xlab - game engine, used by Battlegrounds III.
- gLib2D - lightweight 2D graphics library.
- Irrlicht-PSP - port of the Irrlicht Engine.
- Yeti3D - PSP version of the portable engine.
- PSPGL - hardware-accelerated implementation of something like OpenGL.
- Nehe Tutorials - PSPGL tutorials by Edorul.
- 3D PSP Tutorials by Ghoti, who also created the Boxy II game.
- Chipmunk Physics Library - the most recent port is of version 5.3.1 by Gefa. Older ones are 4.1.0 by SafariAl and 4.0.2 by Mk2k.
- Box2D - 2D physics library.
- CSD Library - documentation in Japanese only.
- cal3D - skeletal-based 3D character animation library.
- Bullet - physics library ported by Drakon.
- Deflatelib - compression/decompression library.
- Velocity - library by Gabriel Anderson (ZettaBlade).
- OpenSSL - port by Raf, creator of PSPRadio. Obsolete.
- PSP-SGE - SDL Graphics Extension.
- exceptionHandler - a PRX that handle exception and can be used to show useful information about a crash.
- System Interface Library - created by Andrew Church, the man behind the Aquaria PSP port and the only usable build of the Yabause emulator for PSP.
- intraFont - a very popular bitmap font library for PSP. A compiled sample for an old version is available here.
- MElib - a library to use the PSP’s Media Engine. An earlier library with an identical name was created by crazyc, author of the DOSBox port.
- FontLoader - interface for utilising the freetype2 library.
- FLIB - a Truetype font processing library based on freetype2.
- sfxMixerTT-PSP - SFX audio mixing library.
- Easy Accelerated Image library - a compiled sample is available here.
- libmad - MPEG audio decoder library, docs in Japanese.
- Celshading Tutorial by McZonk.
- Raptor 3D engine.
- DanzeffOSLib - library for the popular on-screen keyboard by Danzel.
- PSP-OSK - on-screen keyboard.
- funcLib
Python
Python interpreters for PSP have been around since all the way back in 2005, but they were never as popular as Lua. All in all, only 20-odd PSP apps and games have been coded in Python since then.
One of the most impressive PSP homebrews coded in Python is Portable Bubble, a Puzzle Bubble clone by Germano Fabio.
A series of basic tutorials to Python coding on PSP were written by Acid_Snake back in 2012.
Rust
One of the newest additions to this list, the Rust PSP project started in May 2020, though earlier experiments with Rust on PSP date all the way back to 2014.
Not very much used so far, beyond a few coding samples.
BASIC
The PSP can run BASIC code thanks to PSP Yabasic. BASIC never really gained any traction on this device, but it should play homebrews coded for the official Yabasic port for PS2.
Another alternative for using this language on PSP is sdlBasic.
Ruby
Joyau is the name of the only Ruby interpreter for PSP. It was first published in 2009 - relatively late in the handheld’s lifespan, so it never managed to gain any following among developers. Still, the interpreter release does include some working code samples.
Javascript
The standard NetFront web browser is capable of natively running Javascript on PSP. Beyond that, a homebrew app named JS-Otello seems to run on an otherwise unknown Javascript interpreter of sorts.
Adventure Maker was a briefly popular commercial application for Windows that allowed its users to create Javascript games that could then be played on a PSP browser.
Quite a few point-and-click games were created with this app. Some are still available (one example here), but as the installer app for transferring the games from PC no longer works, there seems to be no easy way to actually play them.
C#
There is now some (basic) support for C# coding on PSP, thanks to Matt Emsom’s port of DotNet Anywhere. The developer also coded a version of Tetris to showcase the port’s abilities.
Assembly
Coding a PSP program in MIPS assembly alone is certainly a possibility, though not a popular one. The homebrews fully written in this language are no more than a handful - TyRaNiD’s Minifire being the best known. Another example of a standalone project in assembly is Iridescence’s Hello World.
Some learning resources are available, such as the MIPS page of the uOFW project.
Zig
Another recent addition to the PSP coding repertoire, the Zig port is yet to see any use beyond a few basic coding samples.
GameMaker
While calling it programming might be a stretch, a PSP port of GameMaker 8.1 and has seen increasing use in recent years.
First showcased in 2010, GameMaker for PSP has been used for two official PSP Mini releases before resurfacing as a homebrew project on GitHub nearly a decade later.
Flash
Another option made available through the NetFront internet browser, Flash coding only allowed for very limited projects on PSP, even when compared to Lua homebrews.
In 2007, Adobe themselves also published a short guide to creating Flash games for PSP.
An unofficial Flash player exists as well, but it performs no better than the official one.
The website pspflashgaming.com collects a number of games that were either created for PSP, or happen to be compatible with it.
Image credit: kibwen on Reddit