Execute PBP via USBHostFS

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Execute PBP via USBHostFS

Post by Pirata Nervo »

Ok, I have been trying to get it to work but nothing.
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;
	}
I was always getting a "No Such Device" Error.
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))
Image
Upgrade your PSP
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

You obviously didn't read very far :P The PSP aliases host to host0 and the psp side driver of usbhostfs only hands off the drive letter to the PC side, it is the PC side which decides which mapping to use.

Still anyway I assume you probably still have blacklists even on new firmwares which you would have to remove to get the mapping to work, personally I don't pay attention to PSP stuff much these days so I have no idea :)

You might be able to unassign ms0 then create use sceIoAddDrv to create a version of hostfs which actually uses ms as its drive name...
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

hmm ok :)
I will give it a try again :P
I already tried creating a driver for host0 using hostfs io functions but didn't work :P
I will try unassigning ms0 and delete the ms0 driver, then create a ms0 driver and use hostfs io functions
Image
Upgrade your PSP
Post Reply