libkernel: sceKernelWriteModifyMtypeProtectCommand and sceKernelWriteRemapIntoPrtCommand are not exported (Trails in the Sky 2nd Chapter, PPSA35169) #4214
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-12T01:35:14Z.
Trails in the Sky 2nd Chapter (PPSA35169) stops at process start on two missing
libkernelexports —sceKernelWriteModifyMtypeProtectCommandandsceKernelWriteRemapIntoPrtCommandRepro. Relinked and launched PPSA35169 (01.003.000) against a fresh build of current
upstream/main(7a84b2226):Resolved via the project's own
tools/nid_names.pyagainst thezecoxao/sce_symbolsdatabase:hrEIwWDKm-w=sceKernelWriteModifyMtypeProtectCommand. The import registry's own audit (tools/import_audit.py) already lists this NID and a sibling,RPAHEYSOt1s=sceKernelWriteRemapIntoPrtCommand, asabsent, both againstlibkernel.prx— so the second one will stop the title at the same point once the first is addressed. Confirmed absent from every library in a from-scratch build of currentupstream/main(not inferred from a stale checkout — see below).What's already there.
Apr::Opcode(core/libs/prx/libkernel/Apr/include/AprCommandBuffer.hpp:61-64) already declaresAmmModifyMtypeProtect = 24andAmmRemapIntoPrt = 27, and the command-buffer execution side already handles both (core/libs/prx/libkernel/Apr/src/Apr.cpp:586-600:AmmRemapIntoPrt's case, andAmmModifyMtypeProtectdispatching to_ammProtectreading anAmmProtectCommand).docs/dev/TechnicalDebt.md:127already documentsRemapIntoPrt's semantics (moves a fully-mapped range into a PRT range; opcode argument recorded and ignored) as part of the existing PRT entry.What's missing is purely the recorder side — the title-facing functions that append an
AmmModifyMtypeProtect/AmmRemapIntoPrtcommand into aCommandBufferObject, the same rolelibSceAmpr/Export.cpp's existingAppendCommand-based functions play for sibling opcodes (e.g.sceAmprCommandBufferWriteAddressOnCompletion→AppendCommand(buffer, Apr::Opcode::WriteAddress, ...), or the staticRecordWriteKernelEventQueuehelper forWriteKernelEventQueue). One wrinkle: the two missing exports resolve tolibkernel.prx, notlibSceAmpr.prx— the header's own comment says the buffer format is "shared between libSceAmpr (which records commands) and libkernel (which executes them)," so alibkernel-side recorder is a new naming surface there; there is no existingsceKernelWrite*Commandexport inlibkernelto pattern-match against today, only theAppendCommandmechanism itself inlibSceAmpr/Export.cpp.Also absent, not yet reached at runtime (same title, same registry,
libSceAmpr.prxthis time):KqiWXLgCVe0=sceAmprAmmGetUsageStatsData,touqMEt6qXQ=sceAmprAmmSetPageTablePoolOccupancyNotificationThreshold. Noting them here so whoever picks this up doesn't have to re-run the title to find the next two.No existing claim found —
gh search prs/gh search issuesfor both resolved names and a source grep forWriteModifyMtypeProtectCommand/WriteRemapIntoPrtCommandall come back empty.A process note on how this was found, in case it saves someone else the same trip: the title was first run against a local branch ~1,500 commits behind
upstream/main, which made this look like it might already be fixed upstream (a different NID on the same title turned out to be exactly that). This report is from a from-scratch build and relink against currentupstream/main, specifically to rule that out.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-12T02:04:28Z.
Implemented and tested: https://github.com/Dextroid17/AnyPS5/tree/fix/libkernel-write-amm-prt-commands
Both exports mirror the existing, tested
libSceAmprrecorders byte-for-byte (sameAmmProtectCommand/AmmRemapCommandpayloads, same opcodes) — only thelibkernel-side export surface was missing. AddedTestKernelAmmRecorders()covering success, the reserved-field 1011 default/override, invalid-argument/null-buffer/unbound-buffer rejection, and exact-size-then-busy. Full build +ctestpass.Not opening a PR since intake is still paused — flagging here so the branch is ready to pick up (or I'll open the PR myself once intake reopens). This clears Trails in the Sky 2nd Chapter past this wall; the title now stops at the next absent import noted above (
sceAmprAmmGetUsageStatsData), which needs real research (no existing struct/precedent to reference) before anyone should implement it.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-12T02:15:11Z.
Also implemented: https://github.com/Dextroid17/AnyPS5/tree/fix/libampr-usage-stats-stubs
sceAmprAmmGetUsageStatsDataandsceAmprAmmSetPageTablePoolOccupancyNotificationThreshold(KqiWXLgCVe0/touqMEt6qXQ,libSceAmpr.prx) — the other two absent imports noted above. No reference anywhere describes their real semantics, so both throw via the project's existingNotImplemented_nid_no_patchpattern rather than guessing a result.With all four fixes applied, PPSA35169 clears this entire wall and gets much further: Vulkan device + swapchain created, save data touched, 16 game threads running. It now stops on an unrelated NGS2 audio wall — filed separately so this issue can close once these four are reviewed.
Not opening PRs since intake is still paused — both branches are ready to pick up.
Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-12T02:15:44Z.
Next wall filed separately: #4246 (NGS2 custom module id 0x20).
Written with AI assistance.