[Scummvm-devel] agi help
yotam barnoy
yotambarnoy at gmail.com
Sun Sep 27 11:53:21 CEST 2009
Hey guys
In working on sorting out bugs for the PSP plugins, I've come to a fairly
difficult point.
It seems that the AGI engine is very sensitive for some reason to even minor
issues with code relocation/loading. As an example, after much struggling, I
found a weird bug that only occurred in the AGI engine when the code segment
it was in was not aligned to a big enough value. It asked for 0x1000
alignment, but in reality only 0x10000 alignment was good enough for it.
Every other engine I tried seemed to work fine.
In any case, I'm somewhat glad for the AGI engine's sensitivity, since I
consider it to be the canary in the mineshaft, so to speak.
I'm at the point where I can load/unload engines without any issues, except
I've now switched to -O3 build optimization, which adds a little bit of
complication to the relocation code. What I find is that, once again, every
engine works fine, *except* for AGI. Specifically, AGI loads the games fine.
For example, I get KQ3's opening screen, with music, animation etc. However,
when I push a button and the engine starts loading the game proper, I get a
crash. This is not too unusual -- it's what happened with the last bug too.
However, I just can't figure out what I'm doing wrong (or 'not good enough
for AGI') with the relocations, and I need some help with the actual AGI
engine to try figure out what's going on.
Specifically, what are some functions I can break on that only occur once
the actual game (not the opening screen) comes up? I can't get GDB running
on the PSP, but I can put breakpoints using the low-level shell. I've locked
onto AgiEngine::printStatus() as a possible candidate (it also seems to be
close to the crash point according to some very strange stack dumps), but it
happens far too often (I guess every frame) and I haven't gotten to the
crash yet. Is there some mode I can put the engine in to assist in this kind
of debugging?
Any help would be much appreciated
Yotam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090927/1c4b5df2/attachment.html>
More information about the Scummvm-devel
mailing list