(08-29-2011, 08:21 PM)gid15 Wrote:(08-21-2011, 02:57 PM)Hykem Wrote:I've reverted the workaround from r2288 in r2298. The duration of the read operation has also been improved to better match the PSP (based on tests on a real PSP: reading 0x10000 bytes takes approx. 4 ms). Hopefully the thread sync issue should be solved now.(08-20-2011, 09:27 PM)gid15 Wrote:(08-20-2011, 07:25 PM)Hykem Wrote: I've found an unexpected behaviour going on with the async read operation that, by the logs, was affecting this game. Could you please test it again under r2289? Thanks!Which unexpected behavior? I could not find anything from the log files.
Could you post the corresponding code section?
Apparently, the game proceeds immediatly after calling the sceIoReadAsync syscall to check a certain portion of code that should've been overwritten by the file data. If this area is still uninitialized, the game gets locked in a deadlock.
Only after checking the code the game procceds to call sceIoWaitAsync to get the operation's result.
However, the code checking occurs inside another thread which is called after sceIoReadAsync.
I've provided that change in r2288 as a workaround, but like you stated in the code comments, this is probably a thread sync issue.
I'm currently trying to generate the appropriate compiler and runtime log with ThreadManForUser's activity to see if I can capture this activity.
I'll post it here as soon as possible.
Could you test again?
Nice findings, gid!

I can confirm it's working for both the JPN and USA versions of the game. I haven't tested the EUR version of the game, but from Pingutino logs, it seemed to behave differently and hang up also due to a similar thread sync issue at a slightly different stage. It's possible that this may also be solved now.