Open Zer0xFF opened 5 years ago
Function 6 of SYSMEM is QueryMemSize and returns the total amount of memory managed by the kernel (which should be something like 2MBs). Might be interesting to see what's loaded at the time when it's trying to allocate that huge block.
Function 6 of SYSMEM is QueryMemSize
I gather as much looking at the code and online, but its odd that the game will always try to allocate QueryMemSize - 0x22000
, and always fail, since presumably > 0x22000 is already in use.
note this is also true when I change IOP_RAM_SIZE, as QueryMemSize
also gets bigger
so does the PS2 not expose all the memory, aka reserves? is sif memory allocation different then sysmem? or is free not freeing enough memory (correctly)?
There may be a possibility that the game is checking for TOOL RAM size, which contains 8MB of IOP RAM.
From here https://assemblergames.com/threads/playstation-2-tool-unit-rom-layout.67937/ it mentions
QueryMemSize()
QueryMemSize() returns a value of 8MB-256 bytes (0x007FFF00) on the TOOL, as well as any console (i.e. the PSX) with 8MB of IOP memory installed.
This is due to SYSMEM limiting memory in software.
Stuck in infinite loop
this commit https://github.com/jpd002/Play-/commit/9317656e772bb7b5cf17771ffeb4d12c6cfbad40 seemed relevent to this issue and a quick test shows it is, this allows the game to get past the "infinite loading", though the emu crashes before making it in game
Yup, turns out we had the wrong command ids in the emulator. Gonna check what crashes it to be sure it's not collateral damage.
Ok, seems it's crashing due to the game passing NO_WAIT flag when opening a file. Easy to fix (just remove that bit when opening the file), I'm gonna push something later.
Last Tested On 2021-03-11 - https://github.com/jpd002/Play-/commit/586b23987fecaa518840bbd712d8c054119f61e0
Known Issues & Notes
Related
Screenshots
with the edit mentioned above