Help Loading Modules Please

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
Jops_2010
Posts: 1
Joined: Wed Dec 30, 2009 9:30 am

Help Loading Modules Please

Post by Jops_2010 »

Hi Everyone :)
Im having a go at PS2 dev, I am using xlink and ps2link at the min. I have created some test code using the hddlib examples but it seems to have trouble loading my modules.

Here is what xLink says for each module:
loadmodule: fname host:../../iop/modules/iomanX.irx args 0 arg
loadmodule: id -203, ret 0
loadmodule: fname host:../../iop/modules/fileXio.irx args 0 arg

Here is part of the code im using:

Code: Select all

void loadModules()
{
	static char hddarg[] = "-o" "\0" "4" "\0" "-n" "\0" "20";
	static char pfsarg[] = "-m" "\0" "4" "\0" "-o" "\0" "10" "\0" "-n" "\0" "40" /*"\0" "-debug"*/;
	SifLoadModule("host:local/iop/modules/poweroff.irx", 0, NULL);
	SifLoadModule("host:../../iop/modules/iomanX.irx", 0, NULL);
	SifLoadModule("host:../../iop/modules/fileXio.irx", 0, NULL);
	SifLoadModule("host:../../iop/modules/ps2dev9.irx", 0, NULL);
	SifLoadModule("host:../../iop/modules/ps2atad.irx", 0, NULL);
	SifLoadModule("host:../../iop/modules/ps2hdd.irx", sizeof(hddarg), hddarg);
	SifLoadModule("host:../../iop/modules/ps2fs.irx", sizeof(pfsarg), pfsarg);
}
I just call this function right after "SifInitRpc(0);" inside my int main.

However xLink just throws up 7 "Error" dialogs, does anyone know why it wont load these modules?
Thank you

EDIT:
Problem solved, I changed the module loading function to look like this:

Code: Select all

void loadModules()
{
	static char hddarg[] = "-o" "\0" "4" "\0" "-n" "\0" "20";
	static char pfsarg[] = "-m" "\0" "4" "\0" "-o" "\0" "10" "\0" "-n" "\0" "40" /*"\0" "-debug"*/;
	SifLoadModule("host0:poweroff.irx", 0, NULL);
	SifLoadModule("host0:iomanX.irx", 0, NULL);
	SifLoadModule("host0:fileXio.irx", 0, NULL);
	SifLoadModule("host0:ps2dev9.irx", 0, NULL);
	SifLoadModule("host0:ps2atad.irx", 0, NULL);
	SifLoadModule("host0:ps2hdd.irx", sizeof(hddarg), hddarg);
	SifLoadModule("host0:ps2fs.irx", sizeof(pfsarg), pfsarg);
}
Post Reply