Discuss the development of new homebrew software, tools and libraries.
	Moderators:  cheriff , TyRaNiD 
			
		
		
			
				
																			
								Magniot 							 
									
		Posts:  4  		Joined:  Tue Dec 30, 2008 9:55 pm 		
		
						
						
		 
		
						
					
													
							
						
									
						Post 
					 
								by Magniot   »  Tue Dec 30, 2008 10:03 pm 
			
			
			
			
			Hi, i'm new on this forum. I'm french.
I've got one problem: i'm trying to create an homebrew to flash files in flash0 but i don't arrive to create directories in flash0.
Code: Select all 
sceIoUnassign("flash0");
sceIoAssign("flash0", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
sceIoMkdir("flash0:/test", 0777);
Is this code correct? Because nothing is created in flash0.
Thanks
 
			
			
													
					Last edited by 
Magniot  on Wed Dec 31, 2008 6:36 am, edited 2 times in total.
									
 
			
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								hibbyware 							 
									
		Posts:  78  		Joined:  Wed Mar 28, 2007 10:29 am 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by hibbyware   »  Tue Dec 30, 2008 10:14 pm 
			
			
			
			
			You was almost correct you are missing a ":" 
Here is the function I use it has error checking but I don't use it,  lol
Code: Select all 
/**
  * Reassign flash0/flash1 to enable read and write access.
  *
  * @param - n/a
  *
  * @returns - n/a
  **********************************************************************************************************/
	void Reassign() {
		
		
		if (sceIoUnassign("flash0:") < 0) {
			// Unassign failed
		}
		
		if (sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0) < 0) {
			// Assign failed
		}
		
		
		
		if (sceIoUnassign("flash1:") < 0) {
			// Unassign failed
		}
		
		if (sceIoAssign("flash1:", "lflash0:0,1", "flashfat1:", IOASSIGN_RDWR, NULL, 0) < 0) {
			// Assign failed
		}
		
		
		
	}
	
/***********************************************************************************************************/
 
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Magniot 							 
									
		Posts:  4  		Joined:  Tue Dec 30, 2008 9:55 pm 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by Magniot   »  Tue Dec 30, 2008 10:23 pm 
			
			
			
			
			Thanks. now i've got another problem lol
Code: Select all 
void Reassign() {
      
      
      if (sceIoUnassign("flash0:") < 0) {
         // Unassign failed
      }
      
      if (sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0) < 0) {
         // Assign failed
      }
      
      
      
      if (sceIoUnassign("flash1:") < 0) {
         // Unassign failed
      }
      
      if (sceIoAssign("flash1:", "lflash0:0,1", "flashfat1:", IOASSIGN_RDWR, NULL, 0) < 0) {
         // Assign failed
      }
      
      
      
   } 
and in int main after my part of code there is:
Code: Select all 
Reassign();
sceIoMkdir("flash0:/test", 0777);
And it's the same, nothing was created when i launched my eboot on my psp. my text is on the screen but when i toogle usb flash0 the directorie isn't here.
 
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								hibbyware 							 
									
		Posts:  78  		Joined:  Wed Mar 28, 2007 10:29 am 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by hibbyware   »  Tue Dec 30, 2008 10:30 pm 
			
			
			
			
			Try... 
 
sceIoMkdir("flash0:/test/ ", 0777);
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Magniot 							 
									
		Posts:  4  		Joined:  Tue Dec 30, 2008 9:55 pm 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by Magniot   »  Tue Dec 30, 2008 10:37 pm 
			
			
			
			
			and it doesn't work too. I've already tested it and i have tested it again. 
 
If you've got a flasher source code made by you or someone else please upload it or post it to have an example. Thanks for all and sorry :)
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								hibbyware 							 
									
		Posts:  78  		Joined:  Wed Mar 28, 2007 10:29 am 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by hibbyware   »  Tue Dec 30, 2008 10:45 pm 
			
			
			
			
			I have not messed with flash0 since 3.80 / 3.90
I remember having problems with certain modes and ended up using 0x800 in my module info,
Code: Select all 
PSP_MODULE_INFO("Write2Flash380", 0x800, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
PSP_HEAP_SIZE_MAX();
 
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Magniot 							 
									
		Posts:  4  		Joined:  Tue Dec 30, 2008 9:55 pm 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by Magniot   »  Tue Dec 30, 2008 10:54 pm 
			
			
			
			
			It works!!!!! Thanks!
and to create dirs:
Code: Select all 
sceIoMkdir("flash0:/test", 0777);
without "
/ " after name directorie.
Thanks again.