Possibility of loading dynamic modules at runtime

support for the powerpc toolchain
Post Reply
josebagar
Posts: 4
Joined: Sun Oct 25, 2009 7:06 pm

Possibility of loading dynamic modules at runtime

Post by josebagar » Mon Oct 26, 2009 3:34 pm

Hi all!

First of all, let me say thank you for the great work you've done creating devkitppc!

I'm working on getting a game development platform called BennuGD working on the Wii through HBC.
The problem comes because BennuGD uses a modular design. It is basically a core and several plugins that are loaded at runtime with dlopen.

As I understand dlopen is not available with devkitppc, I decided to integrate the modules into the core to get BennuGD working the Wii. I've been relatively successful and some modules are now integrated and working fine.

The leader of the project has suggested that we find a solution that fits best with the projects modular design, but we don't really know the platform to the point of finding a better alternative.
A few (crazy?) ideas have popped out, like using a custom IOS or creating "driver" programs -just like MS-DOS resident programs did- that load the appropriate modules on runtime. But we're not really sure if they're viable or how much work it would take to do so.

Is any of these ideas possible? or, is there any way to make a program compiled with devkitppc load code dynamically?

Thanks a lot for your help

WinterMute
Site Admin
Posts: 1997
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Possibility of loading dynamic modules at runtime

Post by WinterMute » Tue Nov 03, 2009 2:19 am

devkitPPC is a bare metal toolchain which means that applications are running without any OS support making dynamic modules rather awkward. I'm really not sure what advantages you hope to get from dynamic linking - this tends to use more memory than static linking since the entire library is loaded rather than just the parts your application uses. Memory is a rather limited resource in comparison to your average PC.

Personally I'd tend towards building the modules as a separate static library.
Help keep devkitPro toolchains free, Donate today

Personal Blog

josebagar
Posts: 4
Joined: Sun Oct 25, 2009 7:06 pm

Re: Possibility of loading dynamic modules at runtime

Post by josebagar » Wed Dec 30, 2009 6:23 am

Sorry for the long delay in replying, and thanks for your answer. That's what I supposed.

The idea behind using dynamic libs is that that's how Bennu is designed, so porting would be much easier. Anyway, I'm more or less half-way of getting it ported to the Wii by integrating those modules inside bennu's structure.

So again, thanks for your time.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests