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

LV2/Loader: Fix kernel regions addresses #14523

Merged
merged 2 commits into from
Aug 21, 2023
Merged

LV2/Loader: Fix kernel regions addresses #14523

merged 2 commits into from
Aug 21, 2023

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Aug 21, 2023

For a while I knew memory area addresses are inaccurate.
From what has been tested: if .ppu_private segment exists, it allocates its own 256MB block of 64k pages. If .rsx_image segment it allocates its own 256MB block of 1M pages. This seems to make sense because access rights (PPU/SPU/RSX flags) are block wide and not allocation specific.
At first, user64k is placed at 0x10000000 if no such special allocfation is made and user1m on 0x30000000. Adding ppu private and rsx image segment to the ELF causes this addresses to become 0x30000000 and 0x50000000 respectively.

In #4522, the game tries to access a region of memory by mistake that would already be allocated on PS3 but not RPCS3 hence it crashes.
By fixing those addresses the game can be played and not crash anymore.

Fixes #4522.
Fixes #8491.

This also fixes some games broken with Debug Console Mode because now user4k region is 512MB long as opposed to 256MB. (because debug console has additional memory, some games use it on user64k)

@elad335 elad335 added Bugfix Loader Involving the load of PS3 file formats labels Aug 21, 2023
@elad335 elad335 merged commit 1843a27 into RPCS3:master Aug 21, 2023
5 checks passed
@arcadee1977
Copy link

无双大蛇Z[BLAS50130] is also fixed,thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Loader Involving the load of PS3 file formats
Projects
None yet
2 participants