mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[PR #3697] [MERGED] Core: Increase address space limits and rework Windows address space initialization. #3664
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#3664
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/3697
Author: @StevenMiller123
Created: 10/3/2025
Status: ✅ Merged
Merged: 10/4/2025
Merged by: @squidbus
Base:
main← Head:large-addresses📝 Commits (10+)
5b0b14dSearchFree adjustments0bd3538Robust address validation6d59f4cMap around gaps7f4d7aaInitialize vma_map using gaps7d0fbc4Clang92a7908Fix compile130a21bClang50fb49fFix compile again4b58d61Set system_managed_base and system_managed_size based on154db18Reduce address validation in SearchFree📊 Changes
8 files changed (+255 additions, -138 deletions)
View changed files
📝
CMakeLists.txt(+8 -1)📝
src/core/address_space.cpp(+141 -65)📝
src/core/address_space.h(+4 -16)📝
src/core/libraries/gnmdriver/gnmdriver.cpp(+11 -1)📝
src/core/libraries/kernel/threads/pthread.cpp(+1 -1)📝
src/core/libraries/kernel/threads/thread_state.cpp(+2 -1)📝
src/core/memory.cpp(+55 -49)📝
src/core/memory.h(+33 -4)📄 Description
Current Windows builds of shadPS4 are prone to asserting in address_space on emulator initialization due to Windows' address space randomization. This also prevents expanding the address space to higher addresses (which is needed for a handful of EA titles).
This PR introduces logic to detect and map around system mappings on Windows devices, pass information about these gaps to our memory code, and more robust address validation logic to ensure gaps are accounted for when detecting if requested memory areas are within the vma map.
For Mac users: this PR should make asserts trigger more consistently when games try mapping to addresses that we can't reserve.
For Windows users: this PR should fix those random-ish cases of
For all users: this PR should address cases of the following assert triggering on addresses greater than 0x11000000000 (mainly seen in earlier titles published by EA).
I'm opening this as a draft for now since I need to test edge cases further, and ideally make sure our own HLE mappings aren't going to hit asserts in the more extreme cases.
I would also appreciate some tests from the aforementioned EA games, the only thing I have hitting that out of bounds assert is an app, and it dies from a Windows-specific issue with code patches.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.