Repository navigation
Modules
Enrique Pérez edited this page Nov 18, 2026
·
3 revisions
OpenLua registers one global Lua table per module. This page lists what each module does, what it is backed by, and any restrictions you should know before using it.
| Label | Meaning |
|---|---|
| Implemented | The API exists, host tests pass and it has been exercised in PPSSPP. |
| Restricted | Works within a documented subset (no TLS, no write support, etc.). |
| Stub | Signature-compatible but intentionally inactive on this build; returns documented safe values. |
| Not implemented | Not registered. |
| Module | Status | Purpose |
|---|---|---|
color |
Implemented | Build 32-bit ABGR colours. |
screen |
Implemented | Clear colour, flip/present, default font, text print and measurement. |
draw |
Implemented | Lines, rectangles, filled rectangles and circles. |
image |
Implemented | PNG/JPEG/BMP/GIF decode, surfaces, sprite frames, blits, save, transforms. |
font |
Implemented (PGF restricted) | PGF system fonts (host/opt-in only) and fixed-cell PNG fonts. |
sfont |
Implemented | Classic variable-width SFont and fixed 95-cell sheets. |
buttons |
Implemented | Controller mask and analog stick read. |
timers |
Implemented | Millisecond stopwatch objects. |
math |
Implemented | Standard Lua math plus minmax, bitand, bitor, bitnot. |
| Module | Status | Purpose |
|---|---|---|
splash |
Implemented | Blocking start-up splash screens and slideshows. |
sound |
Implemented | WAV (PCM16) and VMA/VOX playback with 8 channels. |
pmf |
Implemented | Blocking PSMF/PMF video and ATRAC3+ audio. |
map |
Implemented | Tile grid rendering. |
amg |
Implemented (subset) | 3D scene control, 2D/3D switch, perspective and fog. |
cam3d |
Implemented (subset) | 3D camera position, eye, up and rotation. |
texture3d |
Implemented (subset) | PNG textures for models and 2D blits. |
model3d |
Implemented (subset) | Wavefront OBJ/MTL models with material textures. |
The 3D subset has no lighting, animation, transparent face sorting or VRAM placement. See API Reference → 3D.
| Module | Status | Purpose |
|---|---|---|
files |
Implemented | Portable file/directory operations, listing, copy, move, delete, and archive scan/extract (ZIP, TAR, GZIP, BZIP2). |
ini |
Implemented | Sectioned INI read/write with atomic updates. |
json |
Implemented | JSON encode/decode and file load/save. |
data / savedata
|
Implemented | 256-byte save slots under PSP/SAVEDATA. No VSH dialog. |
| Module | Status | Purpose |
|---|---|---|
batt |
Implemented (read-only) | Battery charge, time, temperature, voltage, capacity. |
power |
Implemented | AC state, switch lock/unlock, idle tick, suspend/standby requests. |
os |
Implemented (subset) | Date, nickname, MAC, language, memory, clocks, storage info, restart. |
hw |
Implemented (subset) | Model, firmware, volume/mute, headphone, audio route. |
osk |
Implemented | Blocking PSP system keyboard. |
game |
Implemented (read-only) | PBP PARAM.SFO metadata and ICON0/PIC0/PIC1 artwork. |
Kernel-only hardware identity fields (region, baryon, tachyon, fuse IDs,
NAND size, LED control, …) return documented fallbacks; the EBOOT never imports
a kernel driver.
| Module | Status | Purpose |
|---|---|---|
cam |
Implemented | GO! CAM USB camera lifecycle, preview, snapshot. |
umd |
Implemented (read-only) | Mount disc0:, presence, type, ID, SFO info, size estimate. |
usb |
Restricted | Memory Stick mass storage. UMD/flash modes need _usbdevice.prx. |
sio |
Stub | Serial signatures; inactive in the user-mode build. |
ir |
Stub | Infrared signatures; inactive in the user-mode build. |
bluetooth |
Stub | All calls return false; the PSP has no Bluetooth radio. |
| Module | Status | Purpose |
|---|---|---|
wlan |
Restricted | Connect/disconnect, status, IP and signal. No profile dialog. |
socket |
Restricted | TCP client/server, blocking accept, 64-handle cap. |
http |
Restricted | Synchronous HTTP/1.x GET/POST. No TLS. |
ftp |
Restricted | Anonymous read-only passive FTP server. |
adhoc |
Restricted | Adhoc group join, MAC, peer scan. Matching/PDP are stubs. |
http, socket and ftp are plaintext. Do not send credentials over
untrusted networks, and only run trusted scripts.
These OneLua calls are intentionally absent because they are destructive or need a separate safety review:
-
game.pack,game.add,game.remove,game.unpack,game.launch -
umd.dumpiso,umd.launch - WLAN profile add/copy/delete/backup/restore and Sony's profile dialog
- VSH save dialog, IRC client, MP4 containers
| Directory | Responsibility |
|---|---|
engine/core |
Boot, Lua registration, color, screen.clear/flip. |
engine/gfx |
Surfaces, GE, primitives, splash. |
engine/img |
Image decode, blits, transforms. |
engine/font |
PGF (host/opt-in), PNG/SFont loaders, atlas packer. |
engine/snd |
Audio decode and output. |
engine/input |
Controller polling. |
engine/util |
Timers and OneLua math helpers. |
engine/fs |
Files, INI, portable VFS. |
engine/data |
JSON, PSMF header, PBP/SFO parsing. |
engine/net |
Shared network-stack refcount and TCP/DNS helpers. |
engine/sys |
Saves, battery, power, OS, hardware, OSK, PBP, networking. |
engine/maps |
Tilemaps. |
engine/3d |
OBJ/MTL parser, camera/model/texture state. |
engine/gfx/gfx3d.c |
GE 3D state and triangle submission. |
engine/video |
PMF playback through sceMpeg. |
- API Reference — signatures and return values.
- Compatibility & Status — verification level per area.
- Hardware Test Menu — exercise every module on a PSP.