[PR #2879] [MERGED] Core: Fix module load addresses #3050

Closed
opened 2026-02-27 22:02:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2879
Author: @StevenMiller123
Created: 5/4/2025
Status: Merged
Merged: 5/5/2025
Merged by: @squidbus

Base: mainHead: fix-module-mappings


📝 Commits (6)

📊 Changes

2 files changed (+5 additions, -10 deletions)

View changed files

📝 src/core/address_space.h (+0 -2)
📝 src/core/module.cpp (+5 -8)

📄 Description

On a PS4, all modules are mapped starting at address 0x800000000, and with no gaps in-between. Since all platforms are able to map to these addresses, we can hard code this address as a constant and use that as the "base" address we map to.

The information this PR is based on comes from observations visible in this klog:
Memory Map Query klog.txt

These changes fix [Debug] <Critical> memory.cpp:331 operator(): Assertion Failed! when booting some Call of Duty games.
Specifically from my testing, this fixes updated versions of Call of Duty®: Advanced Warfare (CUSA00803) crashing on startup (note that these titles still need to be loaded from default.elf to bypass sceSystemServiceLoadExec)
CoD AW main log.txt
CoD AW PR log.txt

Screenshot from 2025-05-03 20-29-05

This doesn't appear to regress any games on my end, wouldn't hurt to have testers though.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/2879 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 5/4/2025 **Status:** ✅ Merged **Merged:** 5/5/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `fix-module-mappings` --- ### 📝 Commits (6) - [`f15ffe8`](https://github.com/shadps4-emu/shadPS4/commit/f15ffe87b6cf94548eda40785f50d2a90a183ff7) Fix module map addresses - [`f575831`](https://github.com/shadps4-emu/shadPS4/commit/f57583168d8e291e50869eb5a2d6efe11df1114a) Hardcode hardware accurate base address - [`d66c8d6`](https://github.com/shadps4-emu/shadPS4/commit/d66c8d628292b068c74a5762f267da4de5826f01) Clang - [`ecffd80`](https://github.com/shadps4-emu/shadPS4/commit/ecffd80ba20e9e2845da90ee0f921e02f5959c74) Swap module mapping to NoFlags, remove offset code - [`f15c385`](https://github.com/shadps4-emu/shadPS4/commit/f15c3854c18244d17c0649be3f9d2a94146ed769) Fix module mapping names - [`af70f0f`](https://github.com/shadps4-emu/shadPS4/commit/af70f0f232de0cd2274ec32e17f9c9509663b6ab) Fix patches ### 📊 Changes **2 files changed** (+5 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/core/address_space.h` (+0 -2) 📝 `src/core/module.cpp` (+5 -8) </details> ### 📄 Description On a PS4, all modules are mapped starting at address `0x800000000`, and with no gaps in-between. Since all platforms are able to map to these addresses, we can hard code this address as a constant and use that as the "base" address we map to. The information this PR is based on comes from observations visible in this klog: [Memory Map Query klog.txt](https://github.com/user-attachments/files/20025668/Memory.Map.Query.klog.txt) These changes fix `[Debug] <Critical> memory.cpp:331 operator(): Assertion Failed!` when booting some Call of Duty games. Specifically from my testing, this fixes updated versions of Call of Duty®: Advanced Warfare (CUSA00803) crashing on startup (note that these titles still need to be loaded from `default.elf` to bypass `sceSystemServiceLoadExec`) [CoD AW main log.txt](https://github.com/user-attachments/files/20025613/CoD.AW.main.log.txt) [CoD AW PR log.txt](https://github.com/user-attachments/files/20025617/CoD.AW.PR.log.txt) ![Screenshot from 2025-05-03 20-29-05](https://github.com/user-attachments/assets/30624b60-7160-4933-9cd3-31cbf250f92c) This doesn't appear to regress any games on my end, wouldn't hurt to have testers though. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:02:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3050
No description provided.