Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved error handling in sceKernelAllocateDirectMemory #2037

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

StevenMiller123
Copy link
Contributor

@StevenMiller123 StevenMiller123 commented Jan 3, 2025

Some games, most notably the Call of Duty series of games, intentionally make sceKernelAllocateDirectMemory calls that fail. To match hardware behavior, we should return ORBIS_KERNEL_ERROR_EAGAIN instead of throwing an assert.

This should fix games that still hit Unable to find free direct memory area asserts after #1896.

Credits to @red-prig and @raphaelthegreat for helping with the error cases.

This needs testing, as it could hide deeper issues in some games.

@StevenMiller123 StevenMiller123 changed the title Handle errors in sceKernelAllocateDirectMemory Improved error handling in sceKernelAllocateDirectMemory Jan 3, 2025
@Missake212
Copy link

Pretty sure we already tested this on Discord but since these commits are more recent I thought I'd give them a try and send the logs here.

NBA2K15
shad_log.txt

NBA2K17
shad_log.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants