WIP: The Smurfs Dreams on Linux, first frames (stacked on #5) #12
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12"
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 Pacuka on 2026-09-26T19:47:17Z.
Status
Draft: this is stacked on #5 (Demons Souls boot) and is not meant to be merged on its own yet. This branch is based on #5 (
yumlevi:feat/demons-souls-boot) because its AGC driver is much further along thanmain. It also includes #14 (libstdc++ ABI interposition on Linux). Until #5 lands, the diff below also contains all of #5. The commits new in this PR are the 13 on top of it, listed below. When #5 is merged I will rebase, strip the explanatory comments (docs/CONVENTIONS.md) and split this into small PRs.The goal is running The Smurfs Dreams (Unreal Engine, FMOD) on Linux. How far it gets:
Commits on top of #5
Linux fixes that are also on
main(#7) but missing from #5:fix(build): bundled SDL2 without static executable linking; guest library tests linked dynamicallyfix(videoout): no__stdcallon the window procedurefix(libc): calloc/realloc replacement slots; register the main guest image on Linuxfix(kernel): map SCE protections to readable host pagesNew:
fix(kernel):sceKernelVirtualQueryfallback through/proc/self/maps(#5 only hadVirtualQuery, so it did not build on Linux)__cxa_*aliases Windows-only. It now takes #14 instead, which fixes the same mixed-runtime problem the other way round (libc drives every host throw). With #14 Smurfs gets exactly as far (same 51 draws, 4 frames), and the GPU worker'scatchnow handles the VideoOut "window was closed" exception instead of terminating. The unhandled-throw log fix inRuntime.cppstays.wchar_tis 16-bit. Thewcs*functions in #5 call the hoststd::wcs*, which uses 32-bitwchar_ton Linux. This branch keeps a UTF-16 implementation.sceAgcDriverAddEqEventregistry, per queue id: 0 = graphics, 0x20+ = compute); interrupt RELEASE_MEM stores its label synchronously before the eventSET_PREDICATION(BOOL64/BOOL32)INDIRECT_BUFFER: targets are copied into the submission at submit time. Without CHAIN it is a call with a return stack, with CHAIN a jump.DX_LINEAR_ATTR_CLIP_ENA; CMASKFAST_CLEARcolour targetssceAgcDcbJump: mode 0 = call, mode 1 = chainsceAgcJumpPatchSetTarget,SetPredication,SetPacketPredication,SetRangePredicationGetFusedShaderSize/FuseShaderHalves(VS front + GS back into the GS-stage pair the #5 driver already draws)fPSCdQxgpSwSet*RegIndirectPatchSetNumRegisterssceKernelLoadStartModulefor relinked resident modulesNotes for #5
The 16-bit
wcs*functions, the/proc/self/mapsfallback and the per-queue interrupt delivery are independent of Smurfs and probably worth picking into #5 directly.🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by Pacuka on 2026-09-28T20:46:36Z.
Closing: #5 has been merged, and this draft's work now lives on a local branch rebased onto main. The parts that are still relevant will come as small, separate PRs (some already did: #39, #40, #42). Thanks!
Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-09-30T09:29:05Z.
Does The Smurfs Dreams work on Linux (on main)?
Imported from boykopovar/AnyPS5. Originally posted by Pacuka on 2026-10-06T15:36:41Z.
Sorry for the late answer. Not on
mainyet. I checked today onmain5895ea72(Linux 7.2, AMD): it doesn't load, because 23 imports have no export yet. The first one the loader hits is3YQ1qY5ePUk(libSceAudioIn) from the bundledlibfmod.prx. The others come from the eboot: libkernel (2), VideoOut (2), Net, NpManager, NpWebApi2, NpEntitlementAccess (4), Json2 (4), Http2, GameLiveStreaming (2), WebBrowserDialog (2), VoiceQoS and Acm.On my local branch (an older
mainplus these exports and some AGC driver work that isn't upstream yet) it is playable but slow: the intro cinematic plays, the hub level loads and responds to the controller, at about 4–5 fps. The UI layers are never cleared, so they pile up on screen.I'll send the missing exports as small PRs, one per library, after checking that no open PR already covers them, and then the driver parts one by one.
Pull request closed