<div dir="ltr"><div class="gmail_quote">On Wed, Sep 9, 2009 at 1:01 PM, Marcus Comstedt <span dir="ltr"><<a href="mailto:marcus@mc.pp.se">marcus@mc.pp.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im"><br>
yotam barnoy <<a href="mailto:yotambarnoy@gmail.com">yotambarnoy@gmail.com</a>> writes:<br>
<br>
> I'm in the middle of debugging the PSP plugins and I haven't really gotten<br>
> to the point where this would be an issue, since I'm working with just one<br>
> plugin right now, but I noticed that scummvm_main() has the following code:<br>
><br>
>     // Load the plugins.<br>
>     PluginManager::instance().loadPlugins();<br>
><br>
> which seems to mean that we're trying to load all the plugins at once(?) Why<br>
> would we do such a thing?<br>
<br>
</div>Because the plugins also contain the detection code, so unless we load<br>
all plugins, we will not be able to detect all games.<br>
<div class="im"><br></div></blockquote><div><br>I realize that that's an issue. Maybe it would be a good idea to allow at least the option for the backend to choose to load, detect and then unload with every plugin. <br>

 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<br>
> I'm wondering how this works in the memory-limited DC?<br>
<br>
</div>16MB is enough to load all plugins, as long as you don't actually<br>
start any game.  Before the game is started, all the plugins except<br>
the one used for the game are unloaded, which reclaims the memory<br>
for dynamic use by the engine.<br>
<font color="#888888"></font><br></blockquote><div><br>16MB (or 24 on the PSP) is enough for now, but it won't be eventually so this may not be a good approach going forward. <br><br>Also, as I said, for the PSP's MIPS architecture this is an issue in terms of the global pointer register. Even if I could get all the plugins to load at once (which is doable but requires reworking the current way I'm doing short section assignments) it a) means that the gp-addressed section might fill up faster than the PSP's memory does, putting an even smaller limit on the number of engines b) prevents me from optimizing the PSP by putting as much as is possible in the gp-addressed section.<br>

 <br>Yotam<br></div></div></div>