How to load ~PSP modules?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

How to load ~PSP modules?

Post by Coldbird »

I need to load the compressed modules to save RAM.
Someone got a idea how I can do this? Every method I tried only loads the decrypted unpacked modules.
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Err - how is loading compressed/encrypted modules going to save ram? To be usable, a module must be uncompressed/decrypted. The only thing a compressed module saves is space on the memstick/flash partition.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

Unless you decompress the currently required parts manually and relocate the addresses manually. Even then it wouldn't be registered with module manager. It would just be code in memory that you need to manually jump into.
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Post by Coldbird »

I see. Well that's a bit of a problem... I suppose i will have to manually cut out unneeded functions of the module.
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

Coldbird wrote:I see. Well that's a bit of a problem... I suppose i will have to manually cut out unneeded functions of the module.
That would still require relocation....
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Post by Coldbird »

I know.
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Which module is it that is so HUGE it doesn't fit in memory?? The majority of modules are small. You'd be much better off trimming memory from your app than trying to partially load modules. I would bet the code needed to do that would more than exceed the space saved in partially loading a module.
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Post by Coldbird »

Uhm... I hardly doubt my module can save the memory needed to load that biggie without cutting a game of its thread-memory...

My Module <-- 20kb
My Usermodule Wrapper <-- 60kb (I think i could save like... half of that if i linked differently...)

The module I need...
pspnet_inet.prx <-- 210kb

See what I mean?

And to be more uh clear about the problem at hand, loading works fine...
I can load the module I need into memory with about every game I boot, but then I'm lacking memory to load and start the usermodule wrapper...

Or in a not so severe scenario... the usermodule wrapper loads but then the game crashes because it lacks memory for its own stuff.
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

You shouldn't be making user mode modules anyway. The only way you'll get them to work is on the Slim if you call the sctrlHenSetMemory or whatever in VSH mode so that when it reboots in game mode the full memory will be mapped to user memory.
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Post by Coldbird »

Torch - you know I need the usermode module, else hooking the adhoc functions is a pain in the ass.

The usermode module pretty much forwards the code via wrappers into the kernel one where I do my real stuff.

And I need the internet modules to get a connection to my server.
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

Why don't you get the system working first without any memory constraints? Then look at optimizing it. For that use the Slim extra memory. And like I said, to unlock the memory when the USE_LARGE_MEMORY flag is not set, you must manually call the sctrlHENSetMemory and restart kernel.
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Post by Coldbird »

Don't have a Slim. There ain't extra memory for me.
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I would be shocked to death if you could run pieces of pspnet_inet.prx without loading the whole thing. You're going to have to find some other way of making more memory available.
Post Reply