forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stop/ unload vshmain "vsh_module"

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
k!rk



Joined: 18 Jul 2008
Posts: 11

PostPosted: Fri Jul 18, 2008 8:43 am    Post subject: Stop/ unload vshmain "vsh_module" Reply with quote

Hi there,

wondering for a while now if there is a way to unload the vsh from another vsh module?
Stop/ unload module is only working in kernel mode afaik.

Need to figure out a way to unload vshmain from a module which is working in vsh mode too.

Thanks for any hints and help. :)
Back to top
View user's profile Send private message
Hellcat



Joined: 24 Jan 2007
Posts: 84

PostPosted: Fri Jul 18, 2008 9:23 pm    Post subject: Reply with quote

You can make a kernel mode module, load that and kill the VSH from there - or at least try.


And here comes a problem of my own, similar to this one:
- I am in 3.xx kernel (4.01 ATM, to be precise)
- I am in kernel mode (kernel .PRX, loaded from my VSH mode one (0x800))
- I did sceIoUnassign() flash0 to 3 (3 didn't exist anyway)
- I did pspSdkSetK1(0)
- when I now try to stop the lfatfs driver module, I get a "0x80020136" - wich is "Module can not stop"

Anyone a small hint how I can make the module to stop and unload?
It's working perfectly fine in that dead thing.... what was it called again.... right: 1.50.... but I need 3.xx+ :)
Back to top
View user's profile Send private message
k!rk



Joined: 18 Jul 2008
Posts: 11

PostPosted: Sat Jul 19, 2008 12:36 am    Post subject: Reply with quote

Thanks for the reply Hellcat.


I tried to load a kmode.prx from my vsh module but then the vsh could not be loaded anymore. maybe it was just my fault think i have to try again.

At the moment im testing with a 0x1000 modul running as a plugin using sceFindModuleByName- stopModule - unloadModule.

It seems the vsh is stopped but not full since i can navigate in the xmb
for some seconds, xmb stops working after some movements and the psp will shutdown.

So it looks like my prx is working but not how it should. Any ideas?
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Tue Jul 22, 2008 12:45 am    Post subject: Reply with quote

I'm just speculating but I don't think the VSH can be easily unloaded, as it may not have been designed to be unloaded. It may not have any cleanup routines. RAM is probably remaining occupied, the GU is initialized and functioning, etc etc. The only way it usually exits is with a kernel reboot when you launch a game/homebrew, in which case cleanup is pointless.
Back to top
View user's profile Send private message
k!rk



Joined: 18 Jul 2008
Posts: 11

PostPosted: Tue Jul 22, 2008 6:15 am    Post subject: Reply with quote

Exactly... thats the problem obvious.

I thought myself about it while watching the topmenu in the unloaded VSH and came to the same conclusion. Stupid me!
As you said much more stuff is loaded while running the XMB and it looks like its something which cant be done that way.

Whats the function to laod a specific module on reboot?
I cant recall right now but think ive seen something in the SDK if im right.

Will dig a little.


Thanks for your input.
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Tue Jul 22, 2008 10:42 pm    Post subject: Reply with quote

k!rk wrote:

Whats the function to laod a specific module on reboot?


Theres a working example in the 4.01m33-2 update SDK.

In any case its not only about unloading vshmain.prx. Even before vshmain.prx is loaded, 21.5MB or User mode memory is ALREADY occupied by the previous modules. There is only around 2.5MB free.

On the Slim PSP nearly 34MB of User memory is used BEFORE vshmain.prx is loaded.

I think the only straight forward way is to reboot into a module using the M33 SDK example. Even if you make a custom vshmain.prx (like in Lockdown Password Protection) you will only have 2.5MB on the Phat and 22MB on the Slim.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group