feat: boot PPSA04263 with its own sce_module, into the story mode load (supersedes #144) #153

Merged
STL1te merged 40 commits from upstream-pr/153 into main 2026-09-30 08:33:30 +00:00
STL1te commented 2026-09-29 18:34:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by STL1te on 2026-09-29T18:34:09Z.


feat: boot PPSA04263 with its own sce_module, into the story mode load (supersedes #144)

What

Supersedes #144, rebased on current main and reworked after the review there. PPSA04263 (version 01.010.002, master 01.00) now runs with its own sce_module: the relinker is run without --skip-sce-module or any exclusion, and the title's libc.prx, libSceJobManager.prx and libSceNpCppWebApi.prx run as guest modules. The only import the title libc was missing is sceKernelDebugWriteCppExceptionInfo, which is now implemented.

The title plays the intro movie with sound, renders the legal and calibration screens, the main menu and Settings, and loads story mode until the first shader the recompiler cannot structure (see Not done yet).

Differences from #144:

  • Rebased on main (75a8668). The two commits of #83 are gone, since #83 is merged.
  • scePad output (light bar, vibration, trigger effects) keeps the implementation from #84. The no-op this branch had is dropped.
  • DirectMemory: FreeRun from #81 is kept next to this branch's DirectMemoryFind.
  • The code comments are removed in one commit (style: drop the branch's code comments per CONVENTIONS.md). The commits before it keep them, with the reasoning behind each change, for anyone who investigates that code later.
  • New since #144: the title's own sce_module (sceKernelDebugWriteCppExceptionInfo) and the story mode load (the shader recompiler, AGC driver and heap mirror entries below).
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4681063730 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153). Originally posted by [STL1te](https://github.com/STL1te) on 2026-09-29T18:34:09Z. --- feat: boot PPSA04263 with its own sce_module, into the story mode load (supersedes #144) ### What Supersedes #144, rebased on current `main` and reworked after the review there. PPSA04263 (version `01.010.002`, master `01.00`) now runs with **its own `sce_module`**: the relinker is run without `--skip-sce-module` or any exclusion, and the title's `libc.prx`, `libSceJobManager.prx` and `libSceNpCppWebApi.prx` run as guest modules. The only import the title libc was missing is `sceKernelDebugWriteCppExceptionInfo`, which is now implemented. The title plays the intro movie with sound, renders the legal and calibration screens, the main menu and Settings, and loads story mode until the first shader the recompiler cannot structure (see *Not done yet*). Differences from #144: - Rebased on `main` (75a8668). The two commits of #83 are gone, since #83 is merged. - `scePad` output (light bar, vibration, trigger effects) keeps the implementation from #84. The no-op this branch had is dropped. - `DirectMemory`: `FreeRun` from #81 is kept next to this branch's `DirectMemoryFind`. - The code comments are removed in one commit (`style: drop the branch's code comments per CONVENTIONS.md`). The commits before it keep them, with the reasoning behind each change, for anyone who investigates that code later. - New since #144: the title's own `sce_module` (`sceKernelDebugWriteCppExceptionInfo`) and the story mode load (the shader recompiler, AGC driver and heap mirror entries below).
github-actions[bot] commented 2026-09-30 05:01:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-09-30T05:01:16Z.


Progress report (75a8668 → 3a76b18)

📈 System libraries: 74.63% (+1.93%, +97 implemented, +43 declared functions)

✅ 97 implemented
Library Name
libSceAgc sceAgcAsyncRewindPatchSetRewindState
libSceAgc sceAgcCbNopGetSize
libSceAgc sceAgcCbSetShRegisterRangeDirectGetSize
libSceAgc sceAgcCbSetUcRegisterRangeDirectGetSize
libSceAgc sceAgcDcbDrawIndexOffsetGetSize
libSceAgc sceAgcDcbEventWriteGetSize
libSceAgc sceAgcDcbSetCxRegisterDirect
libSceAgc sceAgcDcbSetCxRegisterDirectGetSize
libSceAgc sceAgcDcbSetIndexBufferGetSize
libSceAgc sceAgcDcbSetIndexSizeGetSize
libSceAgc sceAgcDcbSetShRegisterDirect
libSceAgc sceAgcDcbSetShRegisterDirectGetSize
libSceAgc sceAgcDcbSetUcRegisterDirect
libSceAgc sceAgcDcbSetUcRegisterDirectGetSize
libSceAgc sceAgcJumpPatchSetTarget
libSceAgc sceAgcQueueEndOfPipeActionPatchData
libSceAgc sceAgcQueueEndOfPipeActionPatchGcrCntl
libSceAgc sceAgcQueueEndOfPipeActionPatchType
libSceAgc sceAgcRewindPatchSetRewindState
libSceAgc sceAgcUnknownFuseShaderHalves
libSceAgc sceAgcUnknownGetFusedShaderSize
libSceAgc sceAgcUnknown_Ikfdt_MrIqCE
libSceAgcDriver sceAgcDriverInitResourceRegistration
libSceAgcDriver sceAgcDriverQueryResourceRegistrationUserMemoryRequirements
libSceAgcDriver sceAgcDriverRegisterWorkloadStream
libSceAgcDriver sceAgcDriverSetHsOffchipParam
libSceAgcDriver sceAgcDriverSetTFRing
libSceAppContent sceAppContentDownloadDataGetAvailableSpaceKb
libSceAppContent sceAppContentTemporaryDataFormat
libSceAppContent sceAppContentTemporaryDataGetAvailableSpaceKb
libSceAppContent sceAppContentTemporaryDataMount2
libSceAudioOut sceAudioOut2GetSpeakerArrayAmbisonicsCoefficients
libSceAudioOut sceAudioOut2GetSpeakerArrayMemorySize
libSceAudioOut sceAudioOut2SpeakerArrayCreate
libSceAudioOut sceAudioOut2SpeakerArrayDestroy
libSceContentDelete sceContentDeleteInitialize
libSceContentDelete sceContentDeleteTerminate
libSceContentExport sceContentExportInit2
libSceContentExport sceContentExportTerm
libSceContentSearch sceContentSearchInit
libSceContentSearch sceContentSearchTerm
libSceGameLiveStreaming sceGameLiveStreamingInitialize
libSceGameLiveStreaming sceGameLiveStreamingTerminate
libSceIme sceImeKeyboardClose
libSceIme sceImeKeyboardOpen
libSceIme sceImeUpdate
libSceMsgDialog.native sceMsgDialogInitialize
libSceMsgDialog.native sceMsgDialogTerminate
libSceMsgDialog.native sceMsgDialogUpdateStatus
libSceNpManager sceNpGetNpReachabilityState
libSceNpManager sceNpHasSignedUp
libSceNpManager sceNpRegisterNpReachabilityStateCallback
libSceNpManager sceNpRegisterPlusEventCallback
libSceNpManager sceNpRegisterPremiumEventCallback
libSceNpManager sceNpRegisterStateCallback
libSceNpManager sceNpUnregisterPremiumEventCallback
libSceNpManager sceNpUnregisterStateCallback
libSceRemoteplay sceRemoteplayGetConnectionStatus
libSceRemoteplay sceRemoteplayInitialize
libSceRemoteplay sceRemoteplayTerminate
libSceSharePlay sceSharePlayInitialize
libSceSharePlay sceSharePlayTerminate
libSceSystemService sceSystemServiceDisableNoticeScreenSkipFlagAutoSet
libSceSystemService sceSystemServiceSetNoticeScreenSkipFlag
libSceVideoRecordingP sceVideoRecordingGetInfo
libSceVideoRecordingP sceVideoRecordingSetInfo
libSceVoice sceVoiceConnectIPortToOPort
libSceVoice sceVoiceCreatePort
libSceVoice sceVoiceDeletePort
libSceVoice sceVoiceDisconnectIPortFromOPort
libSceVoice sceVoiceEnd_nid_postfix
libSceVoice sceVoiceGetBitRate
libSceVoice sceVoiceGetPortAttr
libSceVoice sceVoiceGetPortInfo
libSceVoice sceVoiceGetVolume
libSceVoice sceVoiceInit
libSceVoice sceVoiceReadFromOPort
libSceVoice sceVoiceSetThreadsParams
libSceVoice sceVoiceSetVolume
libSceVoice sceVoiceStart
libSceVoice sceVoiceStop
libSceWebBrowserDialog sceWebBrowserDialogInitialize
libSceWebBrowserDialog sceWebBrowserDialogTerminate
libSceWebBrowserDialog sceWebBrowserDialogUpdateStatus
libkernel getpeername_nid_postfix
libkernel sceKernelAprGetFileSize
libkernel sceKernelAprGetFileStat
libkernel sceKernelAprResolveFilepathsWithPrefixToIds
libkernel sceKernelAprResolveFilepathsWithPrefixToIdsAndFileSizes
libkernel sceKernelAprSubmitCommandBufferAndGetId
libkernel sceKernelAprSubmitCommandBufferAndGetResult
libkernel sceKernelAprWaitCommandBuffer
libkernel sceKernelCheckReachability
libkernel sceKernelDebugWriteCppExceptionInfo
libkernel sceKernelFsync
libkernel sceKernelQueryMemoryProtection
libkernel shutdown_nid_postfix
🆕 43 declared as stubs
Library Name
libSceAudioOut sceAudioOutSetMixLevelPadSpk
libSceContentDelete sceContentDeleteByPath
libSceContentExport sceContentExportFinish
libSceContentExport sceContentExportFromFile
libSceContentExport sceContentExportFromFileWithThumbnail
libSceContentExport sceContentExportStart
libSceContentSearch sceContentSearchCloseMetadata
libSceContentSearch sceContentSearchGetMetadataFieldInfo
libSceContentSearch sceContentSearchGetMetadataValue
libSceContentSearch sceContentSearchOpenMetadata
libSceContentSearch sceContentSearchSearchContent
libSceMsgDialog.native sceMsgDialogGetResult
libSceMsgDialog.native sceMsgDialogOpen
libSceNpCommerce sceNpCommerceHidePsStoreIcon
libSceNpCommerce sceNpCommerceShowPsStoreIcon
libSceNpEntitlementAccess sceNpEntitlementAccessAbortRequest
libSceNpEntitlementAccess sceNpEntitlementAccessDeleteRequest
libSceNpEntitlementAccess sceNpEntitlementAccessGenerateTransactionId
libSceNpEntitlementAccess sceNpEntitlementAccessPollConsumeEntitlement
libSceNpEntitlementAccess sceNpEntitlementAccessRequestConsumeUnifiedEntitlement
libSceNpUtility sceNpBandwidthTestAbort
libSceNpUtility sceNpBandwidthTestGetStatus
libSceNpUtility sceNpBandwidthTestInitStartDownload
libSceNpUtility sceNpBandwidthTestInitStartUpload
libSceNpUtility sceNpBandwidthTestShutdown
libScePlayerSelectionDialog scePlayerSelectionDialogTerminate
libSceRazorCpu sceRazorCpuJobManagerDispatch
libSceRazorCpu sceRazorCpuJobManagerJob
libSceRazorCpu sceRazorCpuJobManagerSequence
libSceSystemService sceSystemServiceInitializePlayerDialogParam
libSceSystemService sceSystemServiceLaunchPlayerDialog
libSceVideoRecordingP sceVideoRecordingClose
libSceVideoRecordingP sceVideoRecordingGetStatus
libSceVideoRecordingP sceVideoRecordingOpen
libSceVideoRecordingP sceVideoRecordingQueryMemSize
libSceVideoRecordingP sceVideoRecordingStart
libSceVideoRecordingP sceVideoRecordingStop
libSceVideoRecordingP videoRecordingUnknown_iQS6DUtLybE
libSceWebBrowserDialog sceWebBrowserDialogClose
libSceWebBrowserDialog sceWebBrowserDialogGetResult
libSceWebBrowserDialog sceWebBrowserDialogOpen
ulobjmgr _sceUlobjmgrRegisterObject
ulobjmgr _sceUlobjmgrUnregisterObject
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5904413488 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5904413488). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-09-30T05:01:16Z. --- <!-- progress-report --> ### Progress report (75a8668 → 3a76b18) 📈 **System libraries**: 74.63% (+1.93%, +97 implemented, +43 declared functions) <details> <summary>✅ 97 implemented</summary> | Library | Name | | - | - | | libSceAgc | `sceAgcAsyncRewindPatchSetRewindState` | | libSceAgc | `sceAgcCbNopGetSize` | | libSceAgc | `sceAgcCbSetShRegisterRangeDirectGetSize` | | libSceAgc | `sceAgcCbSetUcRegisterRangeDirectGetSize` | | libSceAgc | `sceAgcDcbDrawIndexOffsetGetSize` | | libSceAgc | `sceAgcDcbEventWriteGetSize` | | libSceAgc | `sceAgcDcbSetCxRegisterDirect` | | libSceAgc | `sceAgcDcbSetCxRegisterDirectGetSize` | | libSceAgc | `sceAgcDcbSetIndexBufferGetSize` | | libSceAgc | `sceAgcDcbSetIndexSizeGetSize` | | libSceAgc | `sceAgcDcbSetShRegisterDirect` | | libSceAgc | `sceAgcDcbSetShRegisterDirectGetSize` | | libSceAgc | `sceAgcDcbSetUcRegisterDirect` | | libSceAgc | `sceAgcDcbSetUcRegisterDirectGetSize` | | libSceAgc | `sceAgcJumpPatchSetTarget` | | libSceAgc | `sceAgcQueueEndOfPipeActionPatchData` | | libSceAgc | `sceAgcQueueEndOfPipeActionPatchGcrCntl` | | libSceAgc | `sceAgcQueueEndOfPipeActionPatchType` | | libSceAgc | `sceAgcRewindPatchSetRewindState` | | libSceAgc | `sceAgcUnknownFuseShaderHalves` | | libSceAgc | `sceAgcUnknownGetFusedShaderSize` | | libSceAgc | `sceAgcUnknown_Ikfdt_MrIqCE` | | libSceAgcDriver | `sceAgcDriverInitResourceRegistration` | | libSceAgcDriver | `sceAgcDriverQueryResourceRegistrationUserMemoryRequirements` | | libSceAgcDriver | `sceAgcDriverRegisterWorkloadStream` | | libSceAgcDriver | `sceAgcDriverSetHsOffchipParam` | | libSceAgcDriver | `sceAgcDriverSetTFRing` | | libSceAppContent | `sceAppContentDownloadDataGetAvailableSpaceKb` | | libSceAppContent | `sceAppContentTemporaryDataFormat` | | libSceAppContent | `sceAppContentTemporaryDataGetAvailableSpaceKb` | | libSceAppContent | `sceAppContentTemporaryDataMount2` | | libSceAudioOut | `sceAudioOut2GetSpeakerArrayAmbisonicsCoefficients` | | libSceAudioOut | `sceAudioOut2GetSpeakerArrayMemorySize` | | libSceAudioOut | `sceAudioOut2SpeakerArrayCreate` | | libSceAudioOut | `sceAudioOut2SpeakerArrayDestroy` | | libSceContentDelete | `sceContentDeleteInitialize` | | libSceContentDelete | `sceContentDeleteTerminate` | | libSceContentExport | `sceContentExportInit2` | | libSceContentExport | `sceContentExportTerm` | | libSceContentSearch | `sceContentSearchInit` | | libSceContentSearch | `sceContentSearchTerm` | | libSceGameLiveStreaming | `sceGameLiveStreamingInitialize` | | libSceGameLiveStreaming | `sceGameLiveStreamingTerminate` | | libSceIme | `sceImeKeyboardClose` | | libSceIme | `sceImeKeyboardOpen` | | libSceIme | `sceImeUpdate` | | libSceMsgDialog.native | `sceMsgDialogInitialize` | | libSceMsgDialog.native | `sceMsgDialogTerminate` | | libSceMsgDialog.native | `sceMsgDialogUpdateStatus` | | libSceNpManager | `sceNpGetNpReachabilityState` | | libSceNpManager | `sceNpHasSignedUp` | | libSceNpManager | `sceNpRegisterNpReachabilityStateCallback` | | libSceNpManager | `sceNpRegisterPlusEventCallback` | | libSceNpManager | `sceNpRegisterPremiumEventCallback` | | libSceNpManager | `sceNpRegisterStateCallback` | | libSceNpManager | `sceNpUnregisterPremiumEventCallback` | | libSceNpManager | `sceNpUnregisterStateCallback` | | libSceRemoteplay | `sceRemoteplayGetConnectionStatus` | | libSceRemoteplay | `sceRemoteplayInitialize` | | libSceRemoteplay | `sceRemoteplayTerminate` | | libSceSharePlay | `sceSharePlayInitialize` | | libSceSharePlay | `sceSharePlayTerminate` | | libSceSystemService | `sceSystemServiceDisableNoticeScreenSkipFlagAutoSet` | | libSceSystemService | `sceSystemServiceSetNoticeScreenSkipFlag` | | libSceVideoRecordingP | `sceVideoRecordingGetInfo` | | libSceVideoRecordingP | `sceVideoRecordingSetInfo` | | libSceVoice | `sceVoiceConnectIPortToOPort` | | libSceVoice | `sceVoiceCreatePort` | | libSceVoice | `sceVoiceDeletePort` | | libSceVoice | `sceVoiceDisconnectIPortFromOPort` | | libSceVoice | `sceVoiceEnd_nid_postfix` | | libSceVoice | `sceVoiceGetBitRate` | | libSceVoice | `sceVoiceGetPortAttr` | | libSceVoice | `sceVoiceGetPortInfo` | | libSceVoice | `sceVoiceGetVolume` | | libSceVoice | `sceVoiceInit` | | libSceVoice | `sceVoiceReadFromOPort` | | libSceVoice | `sceVoiceSetThreadsParams` | | libSceVoice | `sceVoiceSetVolume` | | libSceVoice | `sceVoiceStart` | | libSceVoice | `sceVoiceStop` | | libSceWebBrowserDialog | `sceWebBrowserDialogInitialize` | | libSceWebBrowserDialog | `sceWebBrowserDialogTerminate` | | libSceWebBrowserDialog | `sceWebBrowserDialogUpdateStatus` | | libkernel | `getpeername_nid_postfix` | | libkernel | `sceKernelAprGetFileSize` | | libkernel | `sceKernelAprGetFileStat` | | libkernel | `sceKernelAprResolveFilepathsWithPrefixToIds` | | libkernel | `sceKernelAprResolveFilepathsWithPrefixToIdsAndFileSizes` | | libkernel | `sceKernelAprSubmitCommandBufferAndGetId` | | libkernel | `sceKernelAprSubmitCommandBufferAndGetResult` | | libkernel | `sceKernelAprWaitCommandBuffer` | | libkernel | `sceKernelCheckReachability` | | libkernel | `sceKernelDebugWriteCppExceptionInfo` | | libkernel | `sceKernelFsync` | | libkernel | `sceKernelQueryMemoryProtection` | | libkernel | `shutdown_nid_postfix` | </details> <details> <summary>🆕 43 declared as stubs</summary> | Library | Name | | - | - | | libSceAudioOut | `sceAudioOutSetMixLevelPadSpk` | | libSceContentDelete | `sceContentDeleteByPath` | | libSceContentExport | `sceContentExportFinish` | | libSceContentExport | `sceContentExportFromFile` | | libSceContentExport | `sceContentExportFromFileWithThumbnail` | | libSceContentExport | `sceContentExportStart` | | libSceContentSearch | `sceContentSearchCloseMetadata` | | libSceContentSearch | `sceContentSearchGetMetadataFieldInfo` | | libSceContentSearch | `sceContentSearchGetMetadataValue` | | libSceContentSearch | `sceContentSearchOpenMetadata` | | libSceContentSearch | `sceContentSearchSearchContent` | | libSceMsgDialog.native | `sceMsgDialogGetResult` | | libSceMsgDialog.native | `sceMsgDialogOpen` | | libSceNpCommerce | `sceNpCommerceHidePsStoreIcon` | | libSceNpCommerce | `sceNpCommerceShowPsStoreIcon` | | libSceNpEntitlementAccess | `sceNpEntitlementAccessAbortRequest` | | libSceNpEntitlementAccess | `sceNpEntitlementAccessDeleteRequest` | | libSceNpEntitlementAccess | `sceNpEntitlementAccessGenerateTransactionId` | | libSceNpEntitlementAccess | `sceNpEntitlementAccessPollConsumeEntitlement` | | libSceNpEntitlementAccess | `sceNpEntitlementAccessRequestConsumeUnifiedEntitlement` | | libSceNpUtility | `sceNpBandwidthTestAbort` | | libSceNpUtility | `sceNpBandwidthTestGetStatus` | | libSceNpUtility | `sceNpBandwidthTestInitStartDownload` | | libSceNpUtility | `sceNpBandwidthTestInitStartUpload` | | libSceNpUtility | `sceNpBandwidthTestShutdown` | | libScePlayerSelectionDialog | `scePlayerSelectionDialogTerminate` | | libSceRazorCpu | `sceRazorCpuJobManagerDispatch` | | libSceRazorCpu | `sceRazorCpuJobManagerJob` | | libSceRazorCpu | `sceRazorCpuJobManagerSequence` | | libSceSystemService | `sceSystemServiceInitializePlayerDialogParam` | | libSceSystemService | `sceSystemServiceLaunchPlayerDialog` | | libSceVideoRecordingP | `sceVideoRecordingClose` | | libSceVideoRecordingP | `sceVideoRecordingGetStatus` | | libSceVideoRecordingP | `sceVideoRecordingOpen` | | libSceVideoRecordingP | `sceVideoRecordingQueryMemSize` | | libSceVideoRecordingP | `sceVideoRecordingStart` | | libSceVideoRecordingP | `sceVideoRecordingStop` | | libSceVideoRecordingP | `videoRecordingUnknown_iQS6DUtLybE` | | libSceWebBrowserDialog | `sceWebBrowserDialogClose` | | libSceWebBrowserDialog | `sceWebBrowserDialogGetResult` | | libSceWebBrowserDialog | `sceWebBrowserDialogOpen` | | ulobjmgr | `_sceUlobjmgrRegisterObject` | | ulobjmgr | `_sceUlobjmgrUnregisterObject` | </details>
STL1te commented 2026-09-30 06:42:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by STL1te on 2026-09-30T06:42:21Z.


CI fix: the build was failing only because of the FFmpeg package that came with 028d465 (AJM MP3). There are three commits on top, and no code changes besides these:

  • d252a3c fix(build): FFmpeg on Linux.
    • bcrypt ole32 user32 were linked unconditionally, which broke libSceAjm.native.prx on Linux. They are now linked only under MinGW.
    • The Linux FFmpeg package's x86 assembly uses PC32 relocations against its own constants (e.g. ff_pb_80), and ld refuses those in a shared object. --exclude-libs,ALL on the ffmpeg interface target keeps the archives' symbols local, which also keeps FFmpeg out of the prx's dynamic symbols.
  • 5cf8ffa ci(windows): FFmpeg download. WinLibs ships its own cmake.exe (4.3, built with OpenSSL, no CA certificates), and it comes first in PATH. As a result, file(DOWNLOAD) of the FFmpeg package failed with curl error 60. SSL_CERT_FILE now points it at the Git for Windows CA bundle.
  • ee94280 test(libc): guest_formatting is registered only on Windows.
    • The test checks the Windows formatter (it comes from ea3f7b5). main never registered it; this branch did, for all platforms.
    • On Linux, guest snprintf segfaults in glibc once arguments go to the stack. That code is the same on main and is untouched here, so it's left for a separate fix.

Both Build jobs pass at ee94280, tests included: https://github.com/STL1te/AnyPS5/actions/runs/36678986766

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5905665098 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5905665098). Originally posted by [STL1te](https://github.com/STL1te) on 2026-09-30T06:42:21Z. --- CI fix: the build was failing only because of the FFmpeg package that came with 028d465 (AJM MP3). There are three commits on top, and no code changes besides these: - **d252a3c `fix(build)`: FFmpeg on Linux.** - `bcrypt ole32 user32` were linked unconditionally, which broke `libSceAjm.native.prx` on Linux. They are now linked only under MinGW. - The Linux FFmpeg package's x86 assembly uses PC32 relocations against its own constants (e.g. `ff_pb_80`), and `ld` refuses those in a shared object. `--exclude-libs,ALL` on the `ffmpeg` interface target keeps the archives' symbols local, which also keeps FFmpeg out of the prx's dynamic symbols. - **5cf8ffa `ci(windows)`: FFmpeg download.** WinLibs ships its own `cmake.exe` (4.3, built with OpenSSL, no CA certificates), and it comes first in `PATH`. As a result, `file(DOWNLOAD)` of the FFmpeg package failed with curl error 60. `SSL_CERT_FILE` now points it at the Git for Windows CA bundle. - **ee94280 `test(libc)`: `guest_formatting` is registered only on Windows.** - The test checks the Windows formatter (it comes from ea3f7b5). `main` never registered it; this branch did, for all platforms. - On Linux, guest `snprintf` segfaults in glibc once arguments go to the stack. That code is the same on `main` and is untouched here, so it's left for a separate fix. Both Build jobs pass at ee94280, tests included: https://github.com/STL1te/AnyPS5/actions/runs/36678986766
boykopovar commented 2026-09-30 07:07:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-09-30T07:07:53Z.


Problem: The Windows implementation didn't support mapping the same physical memory to multiple virtual addresses with write access - separate copies were used, so writes were disabled.

The fix I added to this PR: The memory was moved to a common backing - multiple addresses now reference the same data, and writes to any of them are immediately visible to the others. This fixed the regression on Dreaming Sarah - it used write access, so our PRXs should support it.

I haven't checked PPSA04263. If a regression appeared there, it can be fixed in future PRs. I'm currently checking for more regressions, and if everything else is fine, I'll merge it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5906045050 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5906045050). Originally posted by [boykopovar](https://github.com/boykopovar) on 2026-09-30T07:07:53Z. --- Problem: The Windows implementation didn't support mapping the same physical memory to multiple virtual addresses with write access - separate copies were used, so writes were disabled. The fix I added to this PR: The memory was moved to a common backing - multiple addresses now reference the same data, and writes to any of them are immediately visible to the others. This fixed the regression on Dreaming Sarah - it used write access, so our PRXs should support it. I haven't checked PPSA04263. If a regression appeared there, it can be fixed in future PRs. I'm currently checking for more regressions, and if everything else is fine, I'll merge it.
boykopovar commented 2026-09-30 07:33:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-09-30T07:33:41Z.


Can you check whether the game will actually use _ZNSt4_PadC2Ev_nid_postfix, _ZNSt4_PadD2Ev_nid_postfix, _ZNSt4_Pad7_LaunchEPP7pthread_nid_postfix, and _ZNSt4_Pad8_ReleaseEv_nid_postfix (Xthreads.cpp) in our libs/prx/libc? To check, you can make each of these functions throw exceptions when called. I suspect these functions are custom (in which case the game will take them from its own .guest.prx). If these functions from our libc.prx are still not called, you should remove them.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5906426975 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5906426975). Originally posted by [boykopovar](https://github.com/boykopovar) on 2026-09-30T07:33:41Z. --- Can you check whether the game will actually use _ZNSt4_PadC2Ev_nid_postfix, _ZNSt4_PadD2Ev_nid_postfix, _ZNSt4_Pad7_LaunchEPP7pthread_nid_postfix, and _ZNSt4_Pad8_ReleaseEv_nid_postfix (Xthreads.cpp) in our libs/prx/libc? To check, you can make each of these functions throw exceptions when called. I suspect these functions are custom (in which case the game will take them from its own .guest.prx). If these functions from our libc.prx are still not called, you should remove them.
STL1te commented 2026-09-30 07:45:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by STL1te on 2026-09-30T07:45:37Z.


Can you check whether the game will actually use _ZNSt4_PadC2Ev_nid_postfix, _ZNSt4_PadD2Ev_nid_postfix, _ZNSt4_Pad7_LaunchEPP7pthread_nid_postfix, and _ZNSt4_Pad8_ReleaseEv_nid_postfix (Xthreads.cpp) in our libs/prx/libc? To check, you can make each of these functions throw exceptions when called. I suspect these functions are custom (in which case the game will take them from its own .guest.prx). If these functions from our libc.prx are still not called, you should remove them.


Checked both ways.

Statically: the executable imports _ZNSt4_PadC2Ev, _ZNSt4_PadD2Ev, _ZNSt4_Pad7_LaunchEPP7pthread and _ZNSt4_Pad8_ReleaseEv from libc, and the title's own sce_module/libc.prx exports all four. They are the stock Dinkumware std::thread launch helpers, not custom ones, and since the relinker lists the guest modules ahead of the host prx in DT_NEEDED, the imports bind to libc.prx.guest.prx.

Dynamically, as you suggested: with each of the four throwing, the title boots, reaches the menu and gets through the story-mode loading route (about 100 s, 2,860 frames) without any of them being called.

They are leftovers from the earlier --skip-sce-module route, where our libc stood in for the title's. The same holds for the rest of Xthreads.cpp (_Mtx_*, _Cnd_*, _Thrd_*, _Xtime_get_ticks): the guest libc exports all of them too. I'll remove the whole file from this PR rather than just the four functions. One note: the file is compiled into libkernel.prx, not libc.prx, even though the NIDs are libc's.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5906606067 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5906606067). Originally posted by [STL1te](https://github.com/STL1te) on 2026-09-30T07:45:37Z. --- > Can you check whether the game will actually use _ZNSt4_PadC2Ev_nid_postfix, _ZNSt4_PadD2Ev_nid_postfix, _ZNSt4_Pad7_LaunchEPP7pthread_nid_postfix, and _ZNSt4_Pad8_ReleaseEv_nid_postfix (Xthreads.cpp) in our libs/prx/libc? To check, you can make each of these functions throw exceptions when called. I suspect these functions are custom (in which case the game will take them from its own .guest.prx). If these functions from our libc.prx are still not called, you should remove them. ---- Checked both ways. Statically: the executable imports `_ZNSt4_PadC2Ev`, `_ZNSt4_PadD2Ev`, `_ZNSt4_Pad7_LaunchEPP7pthread` and `_ZNSt4_Pad8_ReleaseEv` from `libc`, and the title's own `sce_module/libc.prx` exports all four. They are the stock Dinkumware `std::thread` launch helpers, not custom ones, and since the relinker lists the guest modules ahead of the host prx in DT_NEEDED, the imports bind to `libc.prx.guest.prx`. Dynamically, as you suggested: with each of the four throwing, the title boots, reaches the menu and gets through the story-mode loading route (about 100 s, 2,860 frames) without any of them being called. They are leftovers from the earlier `--skip-sce-module` route, where our libc stood in for the title's. The same holds for the rest of `Xthreads.cpp` (`_Mtx_*`, `_Cnd_*`, `_Thrd_*`, `_Xtime_get_ticks`): the guest libc exports all of them too. I'll remove the whole file from this PR rather than just the four functions. One note: the file is compiled into `libkernel.prx`, not `libc.prx`, even though the NIDs are libc's.
STL1te commented 2026-09-30 07:58:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by STL1te on 2026-09-30T07:58:14Z.


Checked, and removed in 9cfdbff.

How I checked: the executable imports all four std::_Pad NIDs from libc, and the title's own sce_module/libc.prx exports them; they are the stock Dinkumware std::thread launch helpers. Since the relinker lists the guest modules ahead of the host prx in DT_NEEDED, the imports bind to libc.prx.guest.prx, never to ours. To confirm it the way you suggested, I made the four functions throw: the title boots, reaches the menu and loads story mode without any of them being called.

The same holds for the rest of that file (_Mtx_*, _Cnd_*, _Thrd_*, _Xtime_get_ticks) and for eight libc additions from the same commit (_FNan, _FDtest, _FExp, __udivti3, _Throw_Cpp_error, generic_category, localeconv, wcsncpy_s, aligned operator new): each is imported from libc and exported by the guest libc. They were leftovers of the --skip-sce-module route, where our libc stood in for the title's. All of them are gone now. Xthreads.cpp was compiled into libkernel.prx, not libc.prx, although the NIDs are libc's.

I also went through every function the branch adds over main (74) against the executable's import table and the guest modules' exports; the remaining ones are imported from libraries the title does not ship, so they stay.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5906803335 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5906803335). Originally posted by [STL1te](https://github.com/STL1te) on 2026-09-30T07:58:14Z. --- Checked, and removed in 9cfdbff. How I checked: the executable imports all four `std::_Pad` NIDs from `libc`, and the title's own `sce_module/libc.prx` exports them; they are the stock Dinkumware `std::thread` launch helpers. Since the relinker lists the guest modules ahead of the host prx in DT_NEEDED, the imports bind to `libc.prx.guest.prx`, never to ours. To confirm it the way you suggested, I made the four functions throw: the title boots, reaches the menu and loads story mode without any of them being called. The same holds for the rest of that file (`_Mtx_*`, `_Cnd_*`, `_Thrd_*`, `_Xtime_get_ticks`) and for eight libc additions from the same commit (`_FNan`, `_FDtest`, `_FExp`, `__udivti3`, `_Throw_Cpp_error`, `generic_category`, `localeconv`, `wcsncpy_s`, aligned `operator new`): each is imported from `libc` and exported by the guest libc. They were leftovers of the `--skip-sce-module` route, where our libc stood in for the title's. All of them are gone now. `Xthreads.cpp` was compiled into `libkernel.prx`, not `libc.prx`, although the NIDs are libc's. I also went through every function the branch adds over `main` (74) against the executable's import table and the guest modules' exports; the remaining ones are imported from libraries the title does not ship, so they stay.
STL1te commented 2026-09-30 07:59:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by STL1te on 2026-09-30T07:59:48Z.


Problem: The Windows implementation didn't support mapping the same physical memory to multiple virtual addresses with write access - separate copies were used, so writes were disabled.

The fix I added to this PR: The memory was moved to a common backing - multiple addresses now reference the same data, and writes to any of them are immediately visible to the others. This fixed the regression on Dreaming Sarah - it used write access, so our PRXs should support it.

I haven't checked PPSA04263. If a regression appeared there, it can be fixed in future PRs. I'm currently checking for more regressions, and if everything else is fine, I'll merge it.

One observation after your three memory commits (abb9c85, f7c53a4, 5e08eb4), same build otherwise, same route to story mode:

before (ee94280) after (5e08eb4)
Resident memory at 30 s 8.5 GB 14 GB
deferred write-back failed in the log 0 11

The failures all read BDA access failed: ... reason=2; the store hit 0x23dc00000+0x120f00000, read-only in the BDA table: stores through GPU-selected descriptors reach only writable ranges imported in place, not ones served by a mirror or a copy. So that direct-memory range is no longer imported in place by the host and is served by a mirror instead, which would explain both the memory growth and the refused GPU stores. I have not looked at the mapping code yet; if it helps, I can bisect the three commits and post the numbers.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5906826538 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5906826538). Originally posted by [STL1te](https://github.com/STL1te) on 2026-09-30T07:59:48Z. --- > Problem: The Windows implementation didn't support mapping the same physical memory to multiple virtual addresses with write access - separate copies were used, so writes were disabled. > > The fix I added to this PR: The memory was moved to a common backing - multiple addresses now reference the same data, and writes to any of them are immediately visible to the others. This fixed the regression on Dreaming Sarah - it used write access, so our PRXs should support it. > > I haven't checked PPSA04263. If a regression appeared there, it can be fixed in future PRs. I'm currently checking for more regressions, and if everything else is fine, I'll merge it. One observation after your three memory commits (abb9c85, f7c53a4, 5e08eb4), same build otherwise, same route to story mode: | | before (ee94280) | after (5e08eb4) | |---|---|---| | Resident memory at 30 s | 8.5 GB | 14 GB | | `deferred write-back failed` in the log | 0 | 11 | The failures all read `BDA access failed: ... reason=2; the store hit 0x23dc00000+0x120f00000, read-only in the BDA table: stores through GPU-selected descriptors reach only writable ranges imported in place, not ones served by a mirror or a copy`. So that direct-memory range is no longer imported in place by the host and is served by a mirror instead, which would explain both the memory growth and the refused GPU stores. I have not looked at the mapping code yet; if it helps, I can bisect the three commits and post the numbers.
boykopovar commented 2026-09-30 08:08:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-09-30T08:08:19Z.


Another issue: current = is_directory(root / "app0") ? root / "app0" : root; - with this change, ctests result depends on the app0 folder being nearby. Previously, it was

root = canonical(current_path());
current = root;
  • as I've seen, applications always specified app0 at the beginning of the path. As I understand it, this is a fallback in case the executable is located inside the game files folder (app0)? If so, it's not needed; it would significantly complicate debugging. In the current main, the following structure is considered correct:
test.exe
libs/
  *.prx
app0/
  <app resources>
  sce_module/
    libc.prx.guest.prx
  • try running it this files organization way, returning
root = canonical(current_path());
current = root;

Regarding BDA access failed - let's add fix in the next PRs, in this PR we'll limit ourselves to the current changes and the absence of regressions relative to main

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5906963590 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5906963590). Originally posted by [boykopovar](https://github.com/boykopovar) on 2026-09-30T08:08:19Z. --- Another issue: `current = is_directory(root / "app0") ? root / "app0" : root;` - with this change, ctests result depends on the app0 folder being nearby. Previously, it was ``` root = canonical(current_path()); current = root; ``` - as I've seen, applications always specified `app0` at the beginning of the path. As I understand it, this is a fallback in case the executable is located inside the game files folder (app0)? If so, it's not needed; it would significantly complicate debugging. In the current main, the following structure is considered correct: ``` test.exe libs/ *.prx app0/ <app resources> sce_module/ libc.prx.guest.prx ``` - try running it this files organization way, returning ``` root = canonical(current_path()); current = root; ``` Regarding BDA access failed - let's add fix in the next PRs, in this PR we'll limit ourselves to the current changes and the absence of regressions relative to main
STL1te commented 2026-09-30 08:16:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by STL1te on 2026-09-30T08:16:29Z.


@boykopovar

Done in 3a76b18: current = root again. You are right about the origin: the app0 fallback came from the --skip-sce-module route, where our libc opened the title's files. With the title's own libc every path arrives as absolute /app0/..., so the fallback was never taken. Verified with the layout you describe (executable, libs/, app0/, sce_module/ under app0): boot, menu and the loading route to story mode run the same, no file errors in the log.

Agreed on the BDA import failures: I'll leave them out of this PR and bring the fix separately. For the record, on this branch as it stands the title now runs at about 21 frames per second on the loading route against 27 before abb9c85, with 16 GB resident against 10; that is the copies the refused imports fall back to. I have the cause isolated (the driver refuses vkAllocateMemory on a host range with a read-only page, which the write tracking of shared mappings arms), and will follow up with numbers in the next PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5907100043 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5907100043). Originally posted by [STL1te](https://github.com/STL1te) on 2026-09-30T08:16:29Z. --- @boykopovar Done in 3a76b18: `current = root` again. You are right about the origin: the `app0` fallback came from the `--skip-sce-module` route, where our libc opened the title's files. With the title's own libc every path arrives as absolute `/app0/...`, so the fallback was never taken. Verified with the layout you describe (executable, `libs/`, `app0/`, `sce_module/` under `app0`): boot, menu and the loading route to story mode run the same, no file errors in the log. Agreed on the BDA import failures: I'll leave them out of this PR and bring the fix separately. For the record, on this branch as it stands the title now runs at about 21 frames per second on the loading route against 27 before abb9c85, with 16 GB resident against 10; that is the copies the refused imports fall back to. I have the cause isolated (the driver refuses `vkAllocateMemory` on a host range with a read-only page, which the write tracking of shared mappings arms), and will follow up with numbers in the next PR.
boykopovar commented 2026-09-30 08:33:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-09-30T08:33:35Z.


It is advisable to open a PR that will contain only the fix for the causes of these three problems:

  • BDA import failures
  • 21 frames per second on the loading route versus 27 before
  • 16 GB resident versus 10
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5907377643 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/153#issuecomment-5907377643). Originally posted by [boykopovar](https://github.com/boykopovar) on 2026-09-30T08:33:35Z. --- It is advisable to open a PR that will contain only the fix for the causes of these three problems: - BDA import failures - 21 frames per second on the loading route versus 27 before - 16 GB resident versus 10
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!153
No description provided.