LaunchElf and mcInit
LaunchElf and mcInit
When I launch mc_example from ps2sdk using LaunchElf the mcInit fails and returns -120. Any ideas on this?
In mcInit at the line:
This passes ok and returns 0, however rdata contains all zeros so that this part fails:
and the memory card fails to initialize.
Any ideas on why this is happening? Is it because rom0:MCSERV is loaded instead of rom0:XMCSERV?
I definately load rom0:XMCSERV but rom0:MCSERV is already loaded by LaunchELF. Does loading rom0:XMCSERV overwrite rom0:MCSERV? Or does the loading of rom0:XMCSERV fail?
If it fails is there a way to unload rom0:MCSERV or even reset the PS2 so that no modules are loaded?
Code: Select all
ret = SifCallRpc(&cdata, mcRpcCmd[mcType][MC_RPCCMD_INIT], 0, &mcCmd, 48, rdata, 12, 0, 0)
Code: Select all
POPDATA( int, UNCACHED_SEG((rdata+4)), ret, i);
if(ret < 0x205)
printf("libmc: mcserv is too old (%x)\n", ret);
Any ideas on why this is happening? Is it because rom0:MCSERV is loaded instead of rom0:XMCSERV?
I definately load rom0:XMCSERV but rom0:MCSERV is already loaded by LaunchELF. Does loading rom0:XMCSERV overwrite rom0:MCSERV? Or does the loading of rom0:XMCSERV fail?
If it fails is there a way to unload rom0:MCSERV or even reset the PS2 so that no modules are loaded?
Look here (how to reset iop): http://forums.ps2dev.org/viewtopic.php?t=13
edit:
or try reset like that:
edit:
or try reset like that:
Code: Select all
void resetIOP() {
SifInitRpc(0);
SifExitIopHeap();
SifLoadFileExit();
SifExitRpc();
SifIopReset("rom0:UDNL rom0:EELOADCNF",0);
while (!SifIopSync()) ;
SifInitRpc(0);
}