feat(libs): implement homebrew libc and kernel runtime exports #683
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/683"
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 nicolasabosch on 2026-10-05T15:18:04Z.
What
Implement seven runtime imports required by native homebrew:
access,fdopen,setbuf,lldiv,_Getmbcurmax,pipe, andsceKernelDebugOutText.accessresolves guest paths and reports guest errno; Windows checks the read-only attribute and the file ACL, including execute permission.fdopenwraps an existing descriptor without reopening or truncating it and transfers ownership only on success. Pipes preserve binary data. Debug text is written literally rather than interpreted as a format string. The integer and buffering functions use the guest ABI and existing libc stream/locale conventions.Tested
Windows 11, bundled MinGW, Release, rebased on main
fe98276f: this branch builds and passesguest_access,guest_math,guest_standard_streams, andguest_filesystem(4/4).Regression cases include guest cwd/aliases, missing paths, invalid arguments, read-only files, denied execute ACLs, signed 64-bit division, descriptor ownership, embedded NUL/CRLF/0x1a pipe data, EOF, and literal debug text.
Integration with #684 (Windows import binding) and #685 (raw AGC compute): the original integration based on
af92452fbuilt and passed 290/290 CTest tests. DOOM Shareware homebrew PPSA99666 01.001.000 reached E1M1; movement and shooting were checked in a real window. This integration also used #553 (UserService); #614 is already on main. Original game files were unchanged.The rebase includes #677, the upstream fix for the Linux
agc_driver_flat_cache_bitstimeout. Updated Linux and Windows CI pass. No Linux gameplay or audible audio verification claimed. A separate pre-existing, excludedguest_locale_testsexecutable fails its locale exception checks even with its source restored; the new multibyte query is covered byguest_standard_streams.Updated integration on main
fe98276fwith the repaired #683/#684/#685 and #553: full build plus the runtimelibstarget succeeded; all nine focused integration tests passed. DOOM Shareware reached E1M1 again with movement and shooting through AGC compute presentation. Profiling recorded 3,798 dispatch-cache hits in 3,800 dispatches with zero evictions. This is cache-use evidence, not an FPS benchmark. Cold shader compilation can still exceed the homebrew frame deadline and trigger its CPU scaler; a warm restart used AGC. The startup UCRT diagnostic remains. Updated Linux and Windows CI pass.Checklist
fe98276f; open PRs checked for the same functionsIn-game screenshots
Two E1M1 gameplay captures from the integrated DOOM Shareware homebrew run, showing the final integration build and movement/shooting. The integration dependencies and limits are described above.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T15:21:06Z.
Progress report (
fe98276→7789c0a)📈 System libraries: 81.64% (+0.04%, +7 implemented functions)
✅ 7 implemented
_Getmbcurmax_nid_postfixaccess_nid_postfixfdopen_nid_postfixlldiv_nid_postfixsetbuf_nid_postfixpipe_nid_postfixsceKernelDebugOutText