mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[PR #3775] [MERGED] Windows: Limit address space maximum when higher addresses are not needed #3714
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3714
Loading…
Add table
Add a link
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?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3775
Author: @StevenMiller123
Created: 11/6/2025
Status: ✅ Merged
Merged: 11/10/2025
Merged by: @georgemoralis
Base:
main← Head:limit-address📝 Commits (10+)
cad8adfEarlier initialization of elf info.a15fb24Extract compiled SDK version from pubtoolinfo string80fa245Store compiled SDK version in ElfInfo0492a75Limit address space for compiled SDK version at or above FW 3c9b092eUse compiled SDK version for sceKernelGetCompiledSdkVersiona5cb0c5Log SDK versiond31e01aUpdate address_space.cpp8e24459Update emulator.cpp414cc0dMerge branch 'shadps4-emu:main' into limit-addressa911341Backwards compatible logging📊 Changes
4 files changed (+66 additions, -25 deletions)
View changed files
📝
src/common/elf_info.h(+6 -0)📝
src/core/address_space.cpp(+17 -8)📝
src/core/libraries/kernel/process.cpp(+1 -1)📝
src/emulator.cpp(+42 -16)📄 Description
While decompiling the PS4 kernel, I've found that every form of memory mapping restricts the maximum address to
0xfc00000000, but only if the compiled SDK version is at or above firmware 3.00.Since the expanded address space causes performance issues on Windows specifically, this PR restricts the address space maximum to
0x10000000000when running newer games that would have this address restriction applied.To enable this change, I've also addressed some issues with game loading logic. Specifically, I've added logic for getting the actual compiled SDK version from the param.sfo, as opposed to the game's required firmware version. I also shifted ElfInfo initialization earlier in our code, since we're already loading the param.sfo earlier to accomodate separated logs.
This PR is primarily to address the severe Windows-specific loading time regression in Cyberpunk 2077 (see report https://github.com/shadps4-compatibility/shadps4-game-compatibility/issues/33#issuecomment-3483378217 for details), and similar performance regressions visible in my homebrew tests. I plan to properly implement the kernel-side address checks in a future PR.
This PR needs regression tests, particularly from EA titles that abuse high address mappings.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.