[PR #2162] [CLOSED] Return error codes to game from map/unmap memory functions #2526

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2162
Author: @mailwl
Created: 1/16/2025
Status: Closed

Base: mainHead: ret_error_from_map_unmap


📝 Commits (4)

  • 988f66d Return error codes to guest from map/unmap memory instead crash
  • 6287085 Log errors in map/unmap memory functions
  • 2127b5f Change error text in unmap memory function
  • 53be1f1 Fix error code

📊 Changes

1 file changed (+12 additions, -4 deletions)

View changed files

📝 src/core/memory.cpp (+12 -4)

📄 Description

Looks like Unity 2020+ games expects errors from map/unmap functions, this PR feeds it.
This should help with games like https://github.com/shadps4-emu/shadps4-game-compatibility/issues/2015 with crash like:

[Kernel.Vmm] memory.cpp:sceKernelMapDirectMemory:183: called, redirected to sceKernelMapNamedDirectMemory
[Debug] memory.cpp:operator():284: Assertion Failed!


🔄 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/2162 **Author:** [@mailwl](https://github.com/mailwl) **Created:** 1/16/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ret_error_from_map_unmap` --- ### 📝 Commits (4) - [`988f66d`](https://github.com/shadps4-emu/shadPS4/commit/988f66d3267e730b066ecb156b76c0b482e68459) Return error codes to guest from map/unmap memory instead crash - [`6287085`](https://github.com/shadps4-emu/shadPS4/commit/6287085c1a831d0b222b927299aabd8a361687f3) Log errors in map/unmap memory functions - [`2127b5f`](https://github.com/shadps4-emu/shadPS4/commit/2127b5f89391ca8013d0543d6c3588fd43c60e68) Change error text in unmap memory function - [`53be1f1`](https://github.com/shadps4-emu/shadPS4/commit/53be1f138f51b3239c3c0d267de657496aa57c35) Fix error code ### 📊 Changes **1 file changed** (+12 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/core/memory.cpp` (+12 -4) </details> ### 📄 Description Looks like Unity 2020+ games expects errors from map/unmap functions, this PR feeds it. This should help with games like https://github.com/shadps4-emu/shadps4-game-compatibility/issues/2015 with crash like: > [Kernel.Vmm] memory.cpp:sceKernelMapDirectMemory:183: called, redirected to sceKernelMapNamedDirectMemory > [Debug] memory.cpp:operator():284: Assertion Failed! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:00:16 +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#2526
No description provided.