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 

Problem loading firmware files...

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



Joined: 07 Jan 2007
Posts: 26

PostPosted: Wed Jan 10, 2007 12:16 pm    Post subject: Problem loading firmware files... Reply with quote

I'm loading firmware files. Some files are loaded successfully but some makes the PSP crash. I'm using kernel mode and SetupCallbacks(); Am I missing something?

Code:

   pspSdkInstallNoDeviceCheckPatch();
   pspSdkInstallNoPlainModuleCheckPatch();
   
   loadStartModule("ms0:/F0/kd/sysmem.prx");
   loadStartModule("ms0:/F0/kd/loadcore.prx");
   loadStartModule("ms0:/F0/kd/exceptionman.prx");
   loadStartModule("ms0:/F0/kd/interruptman.prx");
   loadStartModule("ms0:/F0/kd/threadman.prx");
   loadStartModule("ms0:/F0/kd/dmacman.prx");
   loadStartModule("ms0:/F0/kd/systimer.prx");
   loadStartModule("ms0:/F0/kd/iofilemgr.prx");
   loadStartModule("ms0:/F0/kd/stdio.prx");
   loadStartModule("ms0:/F0/kd/memlmd.prx");
   loadStartModule("ms0:/F0/kd/modulemgr.prx");
   loadStartModule("ms0:/F0/kd/init.prx");
   loadStartModule("ms0:/F0/kd/sysreg.prx");
   loadStartModule("ms0:/F0/kd/gpio.prx");
   loadStartModule("ms0:/F0/kd/pwm.prx");
   loadStartModule("ms0:/F0/kd/i2c.prx");
   loadStartModule("ms0:/F0/kd/dmacplus.prx");
   loadStartModule("ms0:/F0/kd/lcdc.prx");
   loadStartModule("ms0:/F0/kd/emc_sm.prx");
   loadStartModule("ms0:/F0/kd/emc_ddr.prx");
   loadStartModule("ms0:/F0/kd/ge.prx");
   loadStartModule("ms0:/F0/kd/idstorage.prx");
   loadStartModule("ms0:/F0/kd/syscon.prx");
   loadStartModule("ms0:/F0/kd/rtc.prx");
   loadStartModule("ms0:/F0/kd/lfatfs.prx");
   loadStartModule("ms0:/F0/kd/clockgen.prx");
   loadStartModule("ms0:/F0/kd/codec.prx");
   loadStartModule("ms0:/F0/kd/audio.prx");
   loadStartModule("ms0:/F0/kd/display.prx");
   loadStartModule("ms0:/F0/kd/ctrl.prx");
   loadStartModule("ms0:/F0/kd/loadexec.prx");
   loadStartModule("ms0:/F0/kd/mesg_led.prx");
   loadStartModule("ms0:/F0/kd/led.prx");
   loadStartModule("ms0:/F0/kd/hpremote.prx");
   loadStartModule("ms0:/F0/kd/power.prx");
   loadStartModule("ms0:/F0/kd/openpsid.prx");
   loadStartModule("ms0:/F0/kd/npdrm.prx");
   loadStartModule("ms0:/F0/kd/usb.prx");
   loadStartModule("ms0:/F0/kd/mediaman.prx");
   loadStartModule("ms0:/F0/kd/ata.prx");
   loadStartModule("ms0:/F0/kd/umdman.prx");
   loadStartModule("ms0:/F0/kd/umd9660.prx");
   loadStartModule("ms0:/F0/kd/isofs.prx");
   loadStartModule("ms0:/F0/kd/mscm.prx");
   loadStartModule("ms0:/F0/kd/msstor.prx");
   loadStartModule("ms0:/F0/kd/fatmsmod.prx");
   loadStartModule("ms0:/F0/kd/wlan.prx");
   loadStartModule("ms0:/F0/kd/wlanfirm_magpie.prx");
   loadStartModule("ms0:/F0/kd/registry.prx");
   loadStartModule("ms0:/F0/kd/mgr.prx");
   loadStartModule("ms0:/F0/kd/msaudio.prx");
   loadStartModule("ms0:/F0/kd/mgvideo.prx");
   loadStartModule("ms0:/F0/kd/semawm.prx");
   loadStartModule("ms0:/F0/kd/mediasync.prx");
   loadStartModule("ms0:/F0/kd/me_wrapper.prx");
   loadStartModule("ms0:/F0/kd/vaudio.prx");
   loadStartModule("ms0:/F0/kd/utility.prx");
   loadStartModule("ms0:/F0/kd/chkreg.prx");
   loadStartModule("ms0:/F0/kd/impose.prx");
   loadStartModule("ms0:/F0/kd/avcodec.prx");
   loadStartModule("ms0:/F0/kd/vshbridge.prx");
   loadStartModule("ms0:/F0/vsh/module/chnnlsv.prx");
   loadStartModule("ms0:/F0/kd/usersystemlib.prx");
   loadStartModule("ms0:/F0/vsh/module/heaparea1.prx");
   loadStartModule("ms0:/F0/kd/libatrac3plus.prx");
   loadStartModule("ms0:/F0/vsh/module/paf.prx");
   loadStartModule("ms0:/F0/vsh/module/common_gui.prx");
   loadStartModule("ms0:/F0/vsh/module/common_util.prx");
   loadStartModule("ms0:/F0/vsh/module/vshmain.prx");


Code:
int loadStartModule(const char *path)
{
   dprintf("Loading module [%s]: ", path);
   int mid = sceKernelLoadModule(path, 0, 0);
   if(mid == 0x80020139)
   {
      // module is already loaded
      dprintfl("already loaded.");
      return 0;
   }
   
   if(mid < 0)
   {
      // unable to load module
      dprintfl("unable to load.");
      return mid;
   }
   else
   {
      dprintfl("Done.");
   }
   
   dprintf("Starting module [%s]:");
   int result = sceKernelStartModule(mid, 0, 0, 0, 0);
   if(result < 0)
   {
      // Unable to start
      dprintfl("unable to start.");
      return result;
   }
   else
   {
      dprintfl("Done.");
   }
   
   return mid;
}
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Wed Jan 10, 2007 8:27 pm    Post subject: Reply with quote

Loading a firmware on top of a firmware = bad.
Undoubtedly it will crash on files such as sysmem.prx...

You need to unload a lot of modules first, but you can't unload some... like sysmem.prx, loadexec.prx, etc.
The only solution is to patch sceIo so it reads from memory stick whilst accessing the flash, and then soft-reboot using reboot.bin whilst keeping all your patches intact. This is basically what Devhook does.
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