#include <pspkernel.h> #include <pspdebug.h> #include <pspctrl.h> #include <string.h> PSP_MODULE_INFO("TESTPRX", 0x1000, 1, 1); typedef unsigned char byte; int menu = 0; #define RGB(r,g,B) ((u32)((byte)(r)|((byte)(g) << 8)|((byte)(B) << 16))) #define printf pspDebugScreenPrintf SceCtrlData pad; int main(int argc, char **argv) { pspDebugScreenInit(); while (1) { sceKernelDelayThread(1000); sceCtrlReadBufferPositive(&pad, 1); if (pad.Buttons & PSP_CTRL_RTRIGGER){ if (menu) menu = 0; else menu = 1; } if (menu){ pspDebugScreenSetXY(0, 0); pspDebugScreenSetBackColor(RGB(255, 0, 0)); printf("First Menu"); pspDebugScreenSetXY(0, 1); printf("Play Station Portable"); } } sceKernelSleepThread(); return 0; } void* getModuleInfo(void) { return (void *) &module_info; } int main_thread (void) { return 0; } int module_stop (void) { return 0; }