so, it would seem that a actual iop module patch is required this time around.
|
|
|
|
Would you like to get all the new info from
PSX-Scene in your email each day?
Want to learn more about the team keeping you up to date with the latest scene news?
Read about them now! Check out our Developer bios, too! | ||
|
|
so, it would seem that a actual iop module patch is required this time around.
Just received the network adapter for hope to play Shadow hearts covenant but no luck. Tested with HDD IDE and SMB but it still have random *freeze* on OPL 0.5/0.6/0.7/0.8, tried with serveral setting.
SilverBull, could you disassemble the code in DVD seeking and loading module or you have any clue to hex edit the neccesary files?
Last edited by Udosatiz; 05-11-2011 at 08:28 AM. Reason: forget - *freeze*


You're welcome.
That could be part of a solution, but I doubt it'll be sufficient. FioCommand is checked in a loop in main_thread, and will be invoked again during each iteration as long as it stays at its old value (0x2e).
Because we don't know whether this is the only game that makes implicit assumptions about timing of n-cmd invocation and the completion callback, I'd suggest not to do a game-specific patch here. As I wrote, I was able to get rid of the hangs completely by increasing the delay after which the completion callback runs to 2 milliseconds. This should not have any adverse side effects on other games, as it can take almost forever on real hardware as well; sceCdSeek may never terminate in reasonable time if the target sector is unreachable (within the TOC, but scratched/destroyed), so games already need to take that into account. On the other hand, premature termination of the command is not possible on the PS2, so I'd think this is the reason this bug was not found earlier during QA.
If you would still like to have a game-specific fix, I recommand this one (which I haven't tested myself): set the FioCommand before calling sceCdSeek, then do not touch it at all if the function succeeds:
FioCommand = 0x2f;
if ((res = sceCdSeek(lsn)) != 0) { /* do nothing */ } else ...
The "else" case should be meaningless for OPL, or is it possible that n-cmds fail (sorry, I haven't looked at the code for ages)? Anyway, it is not necessary to change anything in that branch; FIO.IRX simply sets FioCommand to the error state, but that cannot interfere with the callback, as there won't be an outstanding CDVD command.
On a side note: I'd assume this could also fix the problems with this game on backwards-compatible PS3s, if (and only if) we had a chance to inject a modified IRX.
I cannot comment on that specific game, but I remember something from debugging SH:C that may be interesting. When FIO.IRX has entered the bad state and hangs, it won't effect the EE at all, besides that its waiting for data that doesn't arrive. There is no exception, crash, tight endless loop or anything like that; the game's main loop continues as usual, and you cannot see anything (even in a DECI2 debugger). The game has two threads which it periodically switches around; the context switch counts of both threads increase with the same frequency, irrespective of whether the IOP hangs in FIO.IRX or not.
This is completely different to another game I had debugged quite some time ago, Xenosaga 2. You might remember that XS2 had a somewhat similar problem on HDL, as it would randomly hang as well (with the music still playing). In contrast to SH:C, though, XS2 did crash: right in the SIF RPC completion callback, when trying to free the completed RPC packet, as it passed a NULL pointer to the _rpc_pkt_free routine. I was never able to pinpoint why the SIF handler was being called with a wrong parameter, but I suspect it is a synchronization bug on the IOP.
The problem went away after I changed the CDVD emulator to cache a single directory sector for sceCdLayerSearchFile. Turned out XS2 was calling that routine for each access to its data files, whereas the requested file was not present in the ISOFS, but instead in a game-specific file system inside one of the big data files. Calling sceCdLayerSearchFile was completely superfluous (guaranteed to fail), but it somehow effected the timing and ultimately led to the defect SIF completion message.
Last edited by SilverBull; 05-11-2011 at 01:16 PM. Reason: Added comment on SRW Impact
Hi,SilverBull
Super Robot Taisen Impact is a random freeze game like Shadow hearts 2 on OPL,can you do some analysis on this game for help sp193 find out it's freeze principle?
it's disc-code is:Slps_251.04,a NTSC-J game
That does clear more things up...
Thanks for the extra solutions too.
If I remember correctly, N-commands will only fail on OPL only if the N-command function was called while within an interrupt context (Otherwise, it will surely succeed).
I saw something like what you have observed in Xenosaga - the _rpc_pkt_free routine is passed a NULL pointer.
That game was SSX3, and it seemed to be either a bug or anti-HDL system:
1. The game calls one of the CD/DVD routines without calling sceCdInit() first (Possibly without initializing some of the other SIF RPCs too).
2. If the call succeeds, the EE will crash later on when a NULL pointer is passed to _rpc_pkt_free.
3. If the call was to fail (Which should happen), the game would initialize everything first before retrying.
----
About SRW IMPACT:
Modifying the RPC call to sceCdReadIOPm() to return without calling sceCdSync() solves the freezing issue.
However, the BGM will be messed up.
Plus the music is still playing when the game "freezes". The pad's analog light is on too, so the IOP is definitely still running.

| « Previous Thread | Next Thread » |