Repository navigation
Conversation
The game now runs on a jailbroken PS5 as its own title (PPSA42002, loaded by ShadowMountPlus): LOVE 11.5 on the ps5-opengl SDK (Mesa on AGC, GL 4.6 core), SDL with ScePad / SceAudioOut, LuaJIT with FFI. scripts/build_ps5.sh builds the runtime in WSL and deploys over FTP; ports/ps5/BUILD.md has the details. Runtime fixes the console needed: lstat answers EPERM (wrapped onto stat), the system readdir returns nothing under /data (getdents-based dir API), LuaJIT's os.clock ran 7812x fast (Sony clock() counts microseconds), and PhysFS made 0700 folders that ftpsrv cannot enter (patch 0002 + launcher chmod). A relative io.open is EINVAL there, so the ROM queue passes the real path. Game side: Platform.isPS5, a TV-console profile (pad only, no picker, notify-only updates, FTP hints), and 1080p fullscreen. PACKED CACHE. Creating ~18,400 files on /data took 44 minutes for a Platinum import (each create ~11 ms, then 0.5-0.9 s stalls about once a second); the same bytes appended to one file took 8 s. On the PS5 (or with POKEPORT_PACKED_CACHE=1) the import now writes each version's generated trees into one store-only zip, <prefix>rom-cache.zip, and the game reads it through PhysFS; loose files still win over the archive. Measured on the console: re-import ~54 s, pack verified (18,432 entries, CRCs ok), title, overworld, warps, save and reload all from the pack. Other platforms keep writing loose files exactly as before. The translation worker reads a packed cache through the archive's mount. The online hub still only offers games with a loose cache. tools/cache_pack_check.lua: 77 checks (CRC, round trip, in-progress reads, 65,534-entry limit, overflow to loose, loose wins, abort, clear).
…only Re-importing a version after walking its overworld was refused with "still in use; restart the game and import again". The last map's ground outlives the game that drew it (the session just left, a launcher preview) with its chunk, height and permission files still open, and PhysFS will not unmount an archive with open files. Gen4RangeFile now records the handles it opens (weakly) and closeAll() closes them; the launcher calls it before taking the old pack off the read path. A ground that draws again reopens its file on the next read (Gen4RangeFile.isLive) instead of failing silently. Checked on the desktop with a packed Platinum cache: after reaching the overworld and returning to the launcher, the pack unmounts and can be moved (it could not before). With all three files closed under a live ground, store / bdhcFor / permBlockFor reopen and return data. The "live coverage" line was keyed on the raw reach in view rows, which moves with the camera, so it logged two lines a frame while the player walked -- a file write each, which the PS5 pays for. It now keys on covered / short by N rows.
The PS5 title had no HTTPS client reachable from Lua, so the mod catalog, launcher news, the update notice and the translation glossary all reported "no network transport". The runtime now has love.system.httpDownload(url, absPath, userAgent, accept) -> true | nil, reason, the same bridge Android has, backed by PacBrew's static libcurl 8.18 (OpenSSL). - ports/ps5/launcher/http.c: plain C, one easy handle per call, global init once. Follows redirects (GitHub release assets), http/https only, fails on HTTP >= 400 as "HTTP 404", 15 s connect / 300 s total, writes <path>.part and renames on success. IPv4 only: the SDK's getaddrinfo answers v4 only. - Patch 0003 registers it in love.system's own table, so every Lua state, love.thread workers included, gets it. - CA trust: a pinned Mozilla bundle (cacert-2026-11-05) compiled into the eboot and used through CURLOPT_CAINFO_BLOB; libcurl's compiled-in /user/homebrew paths are cleared, peer and host verification stay on. - Link fixes: a real fnmatch and the zstd trace hooks in compat.c, --wrap=dladdr. check_imports: 396 symbols (15 new, all resolve). - HostShell treats the PS5 like Android's bridge and passes on its reason. Check.lua keeps the PS5 notify-only: a newer release shows "Copy the new release to your PS5" instead of an Update button that can only refuse. Built and smoke-tested on Linux against the same source (GitHub, release redirect, Pages mod feed, PokeAPI, 404, expired/self-signed/wrong-host TLS, DNS and connect timeouts); not yet run on the console.
Tested on the console (13.00): the update check, the release list in the
launcher and the news feed now download; each GitHub request takes about
0.3 s (lookup ~20 ms, TLS ~90 ms).
- http.c resolves the host itself (getaddrinfo, IPv4) and hands curl the
answer through CURLOPT_RESOLVE. libcurl's own lookup thread could not
start in a title ("getaddrinfo() thread failed to start"), so every
download failed before it connected. Redirects are followed hop by hop
so each new host goes through the same lookup. A hop slower than 3 s
logs where its time went.
- compat.c wraps fcntl: the kernel refuses F_SETFD/FD_CLOEXEC on a socket
with EINVAL and curl dropped the connection over it ("fcntl set CLOEXEC:
Invalid argument"). A title never execs, so the refusal is treated as
done; every other call and failure passes through.
- The update check's worker calls the bridge itself on the PS5
(HostShell.bridgeAnyThread) instead of handing each request to the main
thread as Android must: the launcher stayed black for ~25 s at every
start while the main thread waited on GitHub.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs the game on a jailbroken PS5 as its own homebrew title (
PPSA42002, registered by ShadowMountPlus). Experimental, and there is no release asset yet.What's in it
ports/ps5/,scripts/build_ps5.sh,scripts/ps5/):ports/ps5/BUILD.md.lstatreturns EPERM, so it is wrapped ontostat.readdirreturns nothing under/data, so a getdents-based directory API replaces it.os.clockran 7812× too fast, because Sony'sclock()counts microseconds.io.openfails with EINVAL there, so the ROM queue passes the real path.Platform.isPS5and a TV-console profile: pad only, no file picker, update notice only, FTP hints.src/import/CachePack.lua,CacheFs, the import worker):/datacosts about 11 ms, and after that a create stalls for 0.5–0.9 s about once a second. Appending the same bytes to one file took 8 s.POKEPORT_PACKED_CACHE=1) the import writes each version's generated trees into one store-only zip,<prefix>rom-cache.zip, and the game reads it through PhysFS.Testing
POKEPORT_PACKED_CACHE=1:tools/cache_pack_check.lua, 77/77 (CRC, round trip, in-progress reads, the 65,534-entry limit, overflow to loose files, loose wins, abort, clear).nds_import_verification_check,tools/translation/check.lua,gen4_cache_wiring_check, and the Switch path, launcher and import-recovery checks.Known gaps