The GPU-map observer imported a new mapping into Vulkan on the thread that made the mapping, on whatever stack it ran. Guest fibers run on contexts the title allocates in guest memory, with no guard page; Demon's Souls packs its 16 KiB job fiber contexts back to back. A GPU mapping made on a fiber used 10,616 bytes of the fiber's stack on NVIDIA (Add, NoteGpuMapping, the registry walk in GuestAllocationsEnd, the import, the fiber's entry and return), about 7.5 KiB of it for the import, so a fiber that mapped GPU memory deep in a job could overrun its context into the next one. The observer now imports inline when the stack pointer lies inside the thread's stack bounds with at least 256 KiB below it, and otherwise starts a host thread for the import and joins it. On Windows the bounds come from GetCurrentThreadStackLimits, which reads the TIB bounds that libSceFiber sets to the fiber context while a fiber runs; on Linux from pthread_getattr_np, whose bounds a fiber's stack lies outside of. A mapping made while the thread holds the GPU mutex still imports inline: a host thread could wait for that mutex forever. A host thread that cannot be started is reported like any failed import, which is still printed to stderr while the mapping carries on. agc_driver_gpu_map_on_fiber maps GPU memory from a fiber with a 64 KiB context and requires that the mapping use at most 8 KiB of it (10,616 bytes inline, 2,960 on a host thread) and start one host thread, then maps the same memory from the main thread and requires that it start none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .github | ||
| 3rdparty | ||
| cmake | ||
| core | ||
| docs | ||
| tools | ||
| .gitignore | ||
| .gitmodules | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
README.md
About
Tool for automatic executables porting to Linux and Windows.
Includes a relinker that converts executable to the target system's native format and implementations of system prx libraries suitable for dynamic linking. No emulation or separate runtime process.
Usage, Build instructions, Architecture, Technical debt of the project, code style conventions, contributing
Status
* System libraries: percentage of the functions known to the project so far (declared in core/libs/prx), not of every PS5 system function. The total grows as more functions are declared.
Unsupported or unexpected states strictly throw std::runtime_error. what() is printed to stderr and the process terminates.
The shader recompiler successfully produces SPIR-V (validated via Spirv-Tools when built with ANYPS5_ENABLE_SPIRV_TOOLS).
Compatibility
Per-game progress (stage reached, open blockers, libraries and GPU coverage) is tracked on the blocker map, a community project built from public GitHub data (source). Test reports go in the Game bring-up discussions, one thread per title.
Input mapping
SDL-mapped game controllers are supported, including analog sticks and triggers. Keyboard and mouse controls can be configured with an anyps5-input.ini file. See input mapping for the supported devices and configuration format.
Disclaimer
This project is intended for interoperability, research, preservation, and compatibility purposes. It does not include, distribute, or require copyrighted software, firmware, cryptographic keys, or proprietary libraries. Users are responsible for ensuring that any binaries used with this project are obtained and used in accordance with applicable laws and their respective license terms.
License
This project is licensed under the GNU General Public License version 2 only.