Skip to content

Troubleshooting

OpenLua Bot edited this page Nov 11, 2026 · 2 revisions

Troubleshooting

Start with the symptom. Each section lists the cause first, then the fix.

8002013C: library not found

Symptom: Launching OpenLua from the XMB shows error 8002013C.

Meaning: SCE_KERNEL_ERROR_LIBRARY_NOTFOUND. The firmware could not resolve a library in the EBOOT's import table.

Status: Fixed in v0.1.3. The standard build no longer imports sceLibFont, which is a per-game user module on real firmware rather than a flash0 kernel module. Earlier builds failed on hardware for this reason while PPSSPP (which emulates the font library) booted fine.

If you still see it:

  1. Confirm you have v0.1.3 or newer (check the VERSION file in the ZIP or the app header).
  2. Launch OpenLuaProbe from the same release. It is a minimal EBOOT that writes openlua_probe.txt.
    • Probe runs, OpenLua does not → the console can run homebrew; the tester still has an unresolved import. Send the probe log.
    • Probe also fails → the problem is the CFW/HEN or the launcher, not the OpenLua build.
  3. Check that EBOOT.PBP, script.lua and assets/ are in the same folder (PSP/GAME/OpenLua/).

PGF fonts return nil

Symptom: font.load("flash0:/font/ltn0.pgf") returns nil, or screen.print does nothing after font.setdefault.

Cause: The standard PSP build defines OPENLUA_NO_PGF and does not link sceLibFont. On real firmware that library is exported by each game's libfont.prx user module, not by a flash0 kernel module. A static import makes the EBOOT fail with 8002013C, so the standard build omits it.

Fix: Use a portable font instead:

local f = font.new("assets/font.png", 8, 16)   -- fixed-cell PNG
screen.font(f)
screen.print(20, 20, "Hello")

-- or a classic variable-width sheet:
local s = sfont.load("assets/sfont.png")
sfont.print(s, 20, 40, "Hello")

If you are building yourself and ship/load libfont.prx, compile without -DOPENLUA_NO_PGF. PGF remains enabled in host and opt-in PSP builds.

Black screen or silent halt

  1. Check openlua.log in the app directory (written on script errors).
  2. Check the boot trace at flash0:/openlua_boot.txt with an app0: fallback.
  3. Make sure your loop calls screen.flip() (or amg.update() for 3D). A loop without it never presents a frame.
  4. Run the smoke demo as script.lua to separate engine and script problems.
  5. In PPSSPP, use a desktop GPU backend; software rendering can be slow or unstable.

The script cannot find its assets

Paths are resolved from the working directory (the app folder), not from the script file. Keep assets/ next to EBOOT.PBP, and use relative paths:

image.load("assets/test_sheet.png")

app0: also resolves to the EBOOT directory on both ms0: and ef0:.

Audio does not play

  • Audio is pumped by screen.flip(); a loop without it is silent.
  • WAV must be PCM16; VMA/VOX is also accepted.
  • Channels 1..8 are reserved explicitly; omit the channel (or pass 0) for auto.
  • Check sound.playing(handle) and sound.endstream(handle).

Saves fail or are not found

  • gameid must be 1..13 chars from A-Z, a-z, 0-9, -, _.
  • Payload is capped at 256 bytes.
  • New saves go to the first writable root: ms0: (M2), then ef0: (PSP Go).
  • Loads search both volumes and pick the highest-numbered populated slot.
  • The PSP VSH save dialog is not implemented; files live under <root>/PSP/SAVEDATA/<GAMEID>/.

WLAN, HTTP or FTP does not work

  • The WLAN switch must be on for wlan.connect and adhoc.init.
  • wlan.status() returns the sceNetApctl state; 4 means connected. -13 means the network stack could not be initialised.
  • https:// is rejected: PSPSDK has no TLS client. Use plain http:// only.
  • wlan.getconfigs()/scan() return empty tables: profile enumeration needs a user-mode API PSPSDK does not expose.
  • FTP is anonymous and read-only. Start it only on a trusted LAN and stop it with ftp.term().

USB camera or USB storage fails

  • The GO! CAM and USB mass storage share the USB port. Call cam.term() before usb.mstick(), or usb.stop() before cam.init().
  • usb.umd() and usb.flash*() are no-ops in the standard build; they need Sony's optional _usbdevice.prx, which is not imported.
  • All camera calls are safe when the camera is absent; init returns 0 and render is a no-op.

The tester ignores Circle/O on a page

This was a v0.1.3 bug on the live-demo pages (GRAPHICS, FONTS, GAME, 3D, CAMERA): the demo was restarted every frame after O exited it. v0.1.4 fixes it; upgrade and press O once to leave the demo, then O again to return to the menu. See Hardware Test Menu → Known issues.

On v0.1.3, use START from the main menu to run the batch and leave the app with the PSP HOME button if a page traps O.

A build fails

Symptom Fix
InvalidBaseImagePlatform warning Harmless on ARM hosts; Docker emulates the amd64 PSPSDK image.
Link race after clean Run clean and build in separate commands.
stubs out of order from psp-fixup-imports Reorder LIBS; see the comments in the root Makefile.
EBOOT.PBP missing in packaging Run the PSP build before tools/package_tester.sh.

Getting help

Open an issue with:

  • PSP model and firmware/CFW, or PPSSPP version;
  • a minimal script.lua reproduction;
  • openlua.log and, for boot failures, the probe log or boot trace;
  • whether the bug reproduces in the host tests.

See Contributing.

Clone this wiki locally