rendered paste body#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#define printf pspDebugScreenPrintf
#define MODULE_NAME "P1"
PSP_MODULE_INFO(MODULE_NAME, 0, 1, 1);
SceCtrlData pad;
cprintf(char *text,int color) //RED = 0x0000FF //BLUE = 0xFF0000 // GREEN = 0x00FF00
{
pspDebugScreenSetTextColor(color);
printf("%s\n", text);
pspDebugScreenSetTextColor(0xFFFFFF);
}
int main(int argc, char **argv)
{
int pos = 1;
pspDebugScreenInit();
pspDebugScreenSetTextColor(0xFF0000);
printf("## ## ## ### # # ## # # ### ## \n");
printf("# # # # # # # # # # # # # # # \n");
printf("## # ## ## # ### # ### ## ## \n");
printf("# # # # # # # # # # # # # \n");
printf("# ## # # ### # # ## # # ### # # \n");
printf("WELCOME TO PSPFLASHER v0.1!\n");
pspDebugScreenSetTextColor( 0x0000FF);
printf(">> Flash <<\n");
printf(" Exit\n");
while(1)
{
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_UP) {
if(pos > 1){
pos--;
pspDebugScreenClear();
pspDebugScreenSetTextColor(0xFF0000);
printf("## ## ## ### # # ## # # ### ## \n");
printf("# # # # # # # # # # # # # # # \n");
printf("## # ## ## # ### # ### ## ## \n");
printf("# # # # # # # # # # # # # \n");
printf("# ## # # ### # # ## # # ### # # \n");
printf("WELCOME TO PSPFLASHER v0.1!\n");
pspDebugScreenSetTextColor( 0x0000FF);
printf(">> Flash <<\n");
printf(" Exit\n");
}
else{}
}
else if(pad.Buttons & PSP_CTRL_DOWN) {
if(pos < 2){
pos++;
pspDebugScreenClear();
pspDebugScreenSetTextColor(0xFF0000);
printf("## ## ## ### # # ## # # ### ## \n");
printf("# # # # # # # # # # # # # # # \n");
printf("## # ## ## # ### # ### ## ## \n");
printf("# # # # # # # # # # # # # \n");
printf("# ## # # ### # # ## # # ### # # \n");
printf("WELCOME TO PSPFLASHER v0.1!\n");
pspDebugScreenSetTextColor( 0x0000FF);
printf(" Flash\n");
printf(">> Exit <<\n");
}
else{}
}
else if(pad.Buttons & PSP_CTRL_CROSS)
{
if(pos == 1)
{
printf("Flashing... Don't turn off your psp...\n");
double test = 0;
while(test <= 1000000)
{
test++;
}
printf("Done! You can now exit.\n");
}
else if(pos == 2)
{
printf("Exiting...");
sceKernelExitGame();
}
} }
sceKernelSleepThread();
return 0;
}