[Scummvm-devel] PS2 ScummVM 0.11.x updates!
sunmax at libero.it
sunmax at libero.it
Mon Feb 18 08:47:42 CET 2008
>>> exists() implementation games just do not start.
>> Mmm, like : "Error loading game resources."?
Thank you for pointing me in the right direction Eugene!
Actually this is what is (was ;-) going on PS2 fs backend:
- Common::File::exists("file") -> returns '0' if the file exists
- FilesystemNode _ff("file");
_ff.exists() -> returns '1' if the file exists
Now some games (e.g. bs2) do Common::File::exists, some other (e.g.
inherit) do FilesystemNode::exist() to check for resources. I was
quite puzzled at first by the unexpected behaviour of "Common::File::exists". Why on Earth was is returning '0'. Then I
checked its implementation in common/file.cpp and -tada!- gotcha!
Ps2FilesystemNode::isDirectory is still flaky cause it simply returns
_isDirectory, which defaults to true and is not set to false before the
check in Common::File::exists.
Once that is done (and I fixed the savegames - well you can actually
save, but you cannot load them back ;-), I will commit the patch to
you ScummMV masters.
I overrode the isDirectory with a huge hack and was able to get all
of the games I have to start and they play fine. So things are moving
in the right direction. The black sheep is kyra. It keeps failing with
trunks.dat... I hit the assert(fileSize > 0x6D) in Sprites::loadDat...
(after the intro). I tried with the kyra.dat from the svn too, but
did not change. Any idea?
>> Could you please send me a copy of your patched source? Thanks!
>> If you do have problems working with usb devices, I suggest you
>> try a different usb thumb drive.
I did. I tried a bunch of them. Cause I already had this issue in
the past, and only kept the compliant ones. SanDisk Cruzer Micro
being the best in my opinion (the original one, not the pirate ;-)
But I am pretty sure it's not the USB stick, here is the evidence:
I used that same USB stick to copy the data to the HD
(using uLE). If it was uncompatible with the PS2 or its
USB drivers it would not allow me to do that, or the data
will be copied corrupted to the HD. But once copied the
game just runs fine. So PS2+USB are able to correctly
access those data on that USB stick, don't you think?
If the issue is not in scummvm, there are 2 options left:
- uLE has extra code which makes it compatible with a broader
range of USB devices (then we should incorporate that)
- my toolchain is flaky (but then it would be really amazing
that everything else compile fine). I tried to replace my
USB*.IRX (I mean the ones I compiled) with a few others and
they all gave me the same result.
Did you try comi from USB? It happens with 0.9.1 too so you can try it.
I am really interested to hear if it works for you, in this case
I would like to have a copy of the USB*.IRX files you used for the
test. And the brand+model of your USB stick. Thanks.
I need a bed now...
More information about the Scummvm-devel