Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add missing 0 cases allocation granularity size flag for
sys_mmapper_allocate_shared_memory_x
, treat them as 1m (like sys_memory_allocate) . testcase, the testcase tries 0 flag on shared memory allocation, tries to map it with an area with 1m page flags, returns CELL_OK.Fix sys_vm_memory_map address base when vsize is less than 256mb, allocate the block as 256mb in size. testcase, the testcase tries to call sys_vm_memory_map twice with 32 mb vsize, the address returned of the second map is 0x40000000. (0x32000000 on master)
Change total amount of memory returned with sdk version:
I've tested this using a self file that I've changed its sdk version with an hex editor, to get the location of the sdk I've searched for the magic number of
process_param_t
and added 8 bytes from it.The results are changes spotted and tracked down between different sdk versions, I've tested this with alot more versions but when memory size didnt change, I didnt include that. I've tested sdk ranges from 0.00.000 (fake minimum) to 4.75.001 (latest). .vesrion samples were taken from http://www.psdevwiki.com/ps3/SCEI_PS3_SDK. I've set the DECR to "console mode" to fake available memory on a retail console.
This was the first attempt to fix Pirates of the Caribbean: At World's End as it tests availablle memory size and compares it with 192mb : above that it assumes its on a DECR console and can use much more memory than he can, which leads to an access violation.
Unfortunatly, this wasnt not enough, even though it was really close, work needs to be done for the memory stats to get lower enough for the test to pass successfuly. (e.g decreasing available memory size with sys_prx module loading, stack allocations etc).
So: I've started to think going with this the other way around: what if we give the same amounts of memory as the DECR gives? I've grabbed again the testcase and set the DECR to "debug tool mode", which makes the available 512mb ram of the console available to the user. In this case the memory size added to original memory size was anywhere from 192mb (0.00) to 194mb (4.75.001) so I've simply added 192mb to the total memory size and guess what, it booted like magic. Which led me to add a setting for it as mentioned below. with this setting enabled, its possible for the game to boot.
Nothing -> Intro