Running on recovery mode
-
- Posts: 13
- Joined: Wed Mar 05, 2008 10:34 pm
Running on recovery mode
What should I do if I want to run my app on recovery mode?
I put my app to ms0:/PSP/GAME/RECOVERY/ but it wont start....
I use PSP_MODULE_INFO("manatails007", 0x1000, 1, 0)
I put my app to ms0:/PSP/GAME/RECOVERY/ but it wont start....
I use PSP_MODULE_INFO("manatails007", 0x1000, 1, 0)
Last edited by manatails007 on Thu Feb 05, 2009 1:23 am, edited 1 time in total.
\PSP\GAME\RECOVERY\ is for
"Run program at /PSP/GAME/RECOVERY/EBOOT.PBP" in recovery mode.
well I think there is no "common" way to run a prx in recovery mode. maybe you can do some replacement to solve this (for example, replace the recovery.prx with yours and then load it in your prx?).
Also, why would you want to do so ? :)
"Run program at /PSP/GAME/RECOVERY/EBOOT.PBP" in recovery mode.
well I think there is no "common" way to run a prx in recovery mode. maybe you can do some replacement to solve this (for example, replace the recovery.prx with yours and then load it in your prx?).
Also, why would you want to do so ? :)
-
- Posts: 13
- Joined: Wed Mar 05, 2008 10:34 pm
I'm coding pspbtcnf flasher. But after flashing bin files. PSP is bricked. :/ I checked flash0 with recovery mode but there was nothing wrong with bin files. So I'm trying to flash pspbtcnf bin files before firmware loads up and see what happens. So I'm using recovery mode to do that but my app doesn't load
-
- Posts: 22
- Joined: Sat Jan 03, 2009 6:51 am
-
- Posts: 22
- Joined: Sat Jan 03, 2009 6:51 am
But he doesn't need to use recovery. I'm guessing he just asked about launching from recovery because he couldn't get it to work normally launching from the VSH without the 0x800 flags.
Updater mode is not required. I have a PBP sitting right here that can write to flash0 from any folder under PSP/GAME, not UPDATE. The PRX in it is 0x800. In fact it DOESN'T launch from UPDATE.
Besides, he said his application bricked his PSP, which means it actually ran, so it must have been a kernel ELF in the PBP. I'm guessing that the pspbtcnf file he flashed was corrupted.
Updater mode is not required. I have a PBP sitting right here that can write to flash0 from any folder under PSP/GAME, not UPDATE. The PRX in it is 0x800. In fact it DOESN'T launch from UPDATE.
Besides, he said his application bricked his PSP, which means it actually ran, so it must have been a kernel ELF in the PBP. I'm guessing that the pspbtcnf file he flashed was corrupted.
You can get flash0 access by launching from XMB like this:
(I wonder if it will cause problems with non-DC installed firmware that don't have 0777 stats on files you want to overwrite. But in your case the btcnf files should be 0777 set by the M33 installer anyway.)
(I wonder if it will cause problems with non-DC installed firmware that don't have 0777 stats on files you want to overwrite. But in your case the btcnf files should be 0777 set by the M33 installer anyway.)
Code: Select all
#include <pspkernel.h>
#include <string.h>
#include <pspdebug.h>
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("flash0w", 0x800, 1, 0);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_VSH);
PSP_HEAP_SIZE_KB(2048);
int exit_callback()
{
sceKernelExitGame();
return 0;
}
int CallbackThread(SceSize args, void *argp)
{
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
int SetupCallbacks(void)
{
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0)
{
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int main(int argc, char* argv[])
{
SetupCallbacks();
pspDebugScreenInit();
char text[] = "this is a test file";
int result;
result = sceIoUnassign("flash0:");
if(result < 0)
{
printf("\nError in unassign flash0.");
}
else
{
result = sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
if(result < 0)
{
printf("\nError in assigning flash0 for write.");
}
else
{
SceUID fp;
fp = sceIoOpen("flash0:/test.txt", PSP_O_WRONLY|PSP_O_TRUNC|PSP_O_CREAT, 0777);
if(fp < 0)
{
printf("\nError writing flash0:/test.txt.");
}
else
{
sceIoWrite(fp, &text, strlen(text));
sceIoClose(fp);
printf("\ntest.txt written successfully.");
}
}
}
sceKernelSleepThread();
return 0;
}
Code: Select all
TARGET = flash0w
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
BUILD_PRX = 1
PRX_EXPORTS =
#USE_KERNEL_LIBC=1
#USE_KERNEL_LIBS=1
PSP_FW_VERSION = 380
PSP_LARGE_MEMORY = 0
LIBDIR =
LIBS =
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = flash0
#PSP_EBOOT_ICON="icon0.png"
#PSP_EBOOT_PIC1="pic1.png"
#PSP_EBOOT_SND0="snd0.at3"
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
-
- Posts: 13
- Joined: Wed Mar 05, 2008 10:34 pm