How plugins work in PSPC
On a PSP running 4.01 M33, plugins are PRX modules on the memory stick, listed in seplugins/game.txt (for games), vsh.txt (for the XMB) or pops.txt (for PS1 games). M33's SystemControl loads the listed ones when a game starts. Most are kernel modules that hook into the firmware: cheat devices such as DarkFrost, NitePR and CWCheat, screenshot plugins and button remappers.
PSPC does the same. Its plugins folder, in PSPC's folder, is laid over the memory stick: whatever is in it appears in ms0:/. So you arrange plugins there exactly as on a memory stick, and the files a plugin writes, such as its cheat codes, settings and screenshots, land next to it.
- Listed plugins load when the game starts, before the game's own code, with kernel plugins in kernel memory as on a PSP. You don't need a Pandora battery or the recovery menu to turn them on.
- They see what they expect. PSPC's kernel is native code rather than Sony's modules, so it reproduces the parts of the firmware plugins look at: the boot sequence they wait on, the module records and export tables they walk, and the kernel-only functions they call.
- Cheats work with native code. When a plugin rewrites a game's code and flushes the instruction cache, as cheat devices do, PSPC runs the changed functions in the interpreter, so the patch takes effect.
Add a plugin
-
Open Plugins
Click Plugins in the launcher's sidebar. The window lists every plugin with what it is loaded for.
-
Bring the plugin's files, if it has any
Many plugins come with a folder of their own. Click Open plugins folder and copy that folder in, as you would to the root of a memory stick.
-
Add the PRX
Choose where it loads, Games, XMB or PS1 games, then click Add PRX… and pick the plugin's
.prx. A PRX that is already in the plugins folder is listed where it is; one from anywhere else is copied intoplugins\seplugins. -
Check it and play
A checked plugin loads; clear its box to keep it listed but off. Remove takes it off the list. Click OK, then start a game.
Example: DarkFrost
DarkFrost 5.1, a cheat device with a code searcher, RAM editor and more, has been tested with Syphon Filter: Combat Ops and Daxter. It works as on a PSP:
-
Install it
Copy DarkFrost so that its file is at
plugins\darkfrost\darkfrost.prx, then add that PRX for Games as above. Its list entry isms0:/darkfrost/darkfrost.prx 1. -
Start a game
“Welcome to DarkFrost v5.1! Double Tap the HOME button then press Vol +, -” appears at the top of the screen.
-
Press HOME twice
Press Esc (or the controller's guide button) twice: once to open the “Quit the game?” screen, once to close it. DarkFrost borrows that screen's buffer for its menu.
-
Press VOL+ and VOL− together
That is Page Up and Page Down together, or both stick clicks on a controller. DarkFrost's menu opens, with its Cheater, Options, Searcher, RAM, Decoder, Tools and Credits tabs. Closing it gives the screen and buttons back to the game.
In a game that uses a 16-bit framebuffer, such as Syphon Filter, DarkFrost's welcome text comes out stretched to twice its width; in a 32-bit one, such as Daxter, it is clean.
The extra buttons plugins use
A PSP has buttons that games never see and plugins use: the volume keys, NOTE and SCREEN. PSPC maps them to keys of their own:
| PSP button | Keyboard | Controller |
|---|---|---|
| VOL+ | Page Up | Right stick click |
| VOL− | Page Down | Left stick click |
| NOTE | N | Misc button (such as Share) |
| SCREEN | B | None |
You can change them under Settings, like any other control.
Editing the lists by hand
The lists are the same text files as on a PSP, in plugins\seplugins: game.txt, vsh.txt and pops.txt. Each line is one plugin's ms0:/ path, optionally followed by 1 (on) or 0 (off):
ms0:/darkfrost/darkfrost.prx 1
ms0:/seplugins/other.prx 0
A line without a flag is on, unless seplugins\conf.bin, where M33's recovery menu keeps its plugin switches, turns it off.
Turning plugins off
- For everything: clear Load plugins when a game or the XMB starts in the Plugins window (
plugins=0inpspc.ini). - For one run: start PSPC with
--no-plugins. That is the quickest way to rule plugins out when a game misbehaves. - To keep plugins somewhere else:
plugins_dir=<folder>inpspc.ini, or--plugins <folder>.
What doesn't work
- Plugins that patch the firmware's own code. Some plugins hook a firmware module by rewriting its instructions in memory, such as the controller driver's sampling function. PSPC's firmware modules are native code, so there are no instructions there to patch. Hooks through M33's own functions, or by rewriting a module's import stubs, do work.
- Driver lookups.
sctrlHENFindDriverhas no driver structures to return. - PS1 plugins. PSPC doesn't run PS1 games, so plugins in
pops.txthave nothing to load into.
DarkFrost is the plugin tested in detail. Others that use the usual M33 hooks are expected to work; if one doesn't, report it.