I already read this thread:
http://forums.ps2dev.org/viewtopic.php? ... ssign+file
But the code supplied was very similiar to mine, just needed to add 1 thing but didn't work anyway.
I also read a post in PSP Link thread which was a reply by TyRaNiD to Ahman I think.
This was my code:
Code: Select all
SceUID res;
res = sceIoUnassign("ms0:");
if (!iserr(res) || res == 0x80020321){
res = sceIoUnassign("msoem0:");
if(!iserr(res) || res == 0x80020321) {
res = sceIoAssign("ms0:", "host:", NULL, IOASSIGN_RDWR, NULL, 0);
if(!iserr(res)) {
res = sceIoAssign("msoem0:", "host:", NULL, IOASSIGN_RDWR, NULL, 0);
if (!iserr(res)) {
remapped = 1;
}
else {
printf("\nError assigning host as msoem0 0x%08X", res);
remapped = 0;
}
}
else {
printf("\nError assigning host as ms0 0x%08X", res);
remapped = 0;
}
}
else {
printf("\nError unassigning msoem0 0x%08X", res);
remapped = 0;
}
}
else {
printf("\nError unassigning ms0 0x%08X", res);
remapped = 0;
}
So I decided to spend all day reading psplink's/usbhostfs's source code and found that usbhostfs.prx use host and not host0.
So I tried with host instead of host0 but nothing, again.
After that, I decided to include host_driver.c and usbhostfs.h in my prx (kernel) and use the function hostfs_init(); to add the new drive (host).
Didn't work again.
Then I tried using host0 in host_driver.c instead but nothing.
The only thing I didn't try was creating a driver called host0 and point the io functions to host_driver.c io functions.
To use host_driver.c I needed to add a new function to exports.exp (command_xchg)
I hope someone can help me :)
(I have been trying to do this whole thing because I always get a 0x00800139 error (exclusive load))