10-14-2011, 10:38 PM
Ok, looks like I've finally found the reason for the crashing at some battles. The culprit appears to be sceKernelExtendThreadStack not being implemented properly. A quick look at some assembly code shows that the calling thread shouldn't terminate immediately after (or during) the call to sceKernelExtendThreadStack, as it expects to continue execution. Commenting out lines 50 and 55 in ThreadManForUser.java in modules630 allowed the castle battle to load correctly.
As for the corrupt text with Catalyst drivers... it appears that the game gives an incorrect number of mipmaps while supplying only one 512x512 texture for each level of the mipmap. The Catalyst driver doesn't seem to load anything (as this is an incorrectly defined mipmap), so you get a corrupt texture. All I did was implement a check to see if each level of the mipmap has half the width and height of the preceding level, and if it failed, only load the first level of the mipmap (the developers might want to do something different).
Loading from a save on the first battle seems to break the tutorial in the castle battle, so play from the beginning. Saves after that seem to work, but don't bet on it. Expect AI controlled characters to stop moving, thus stopping the game. This might be related to the error Gashet talks about.
There is also an issue where the currently playing audio track will cut out, but I've yet to look into it.
As for the corrupt text with Catalyst drivers... it appears that the game gives an incorrect number of mipmaps while supplying only one 512x512 texture for each level of the mipmap. The Catalyst driver doesn't seem to load anything (as this is an incorrectly defined mipmap), so you get a corrupt texture. All I did was implement a check to see if each level of the mipmap has half the width and height of the preceding level, and if it failed, only load the first level of the mipmap (the developers might want to do something different).
Loading from a save on the first battle seems to break the tutorial in the castle battle, so play from the beginning. Saves after that seem to work, but don't bet on it. Expect AI controlled characters to stop moving, thus stopping the game. This might be related to the error Gashet talks about.
There is also an issue where the currently playing audio track will cut out, but I've yet to look into it.