Recovery MenĂ¼

by nniicccoo on July 23rd, 2010
No notes
Syntax: No syntax
Show lines - Hide lines - Show in textbox - Download
/********************************************************
 * 		Get Battery Serial
 *
 ********************************************************/
int GetBatSer()
{
	static int started = 0;
	if(started == 0)
	{
	pspSdkLoadStartModule("flash0:/vsh/module/bat.prx", PSP_MEMORY_PARTITION_KERNEL);
	started += 1;
	}
 
	char* BatMode;
	u16 BatSer[2];
	ReadSerial(BatSer);
 
	if((BatSer[0] == 0xFFFF)&&(BatSer[1] == 0xFFFF)){BatMode = "Service Mode Battery";}
	else if((BatSer[0] == 0x0000)&&(BatSer[1] == 0x0000)){BatMode = "AutoBoot Battery";}
	else{BatMode = "Normal Battery";}
 
	char BatteryMode[] = "";
 
	sprintf(BatteryMode, "Battery Mode: %s\nBattery Serial: 0x%04X%04X", BatMode, BatSer[0], BatSer[1]);
	Success(BatteryMode);
	return 0;
}	
 
/********************************************************
 * 		Normal Message Dialog
 *
 ********************************************************/
void Success(char *text)
{
	vlfGuiMessageDialog(text, VLF_MD_TYPE_NORMAL | VLF_MD_BUTTONS_NONE);
}
 

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS