View Single Post
  #2 (permalink)  
Old 07-31-2006, 05:10 PM
rikardo_92's Avatar
rikardo_92 rikardo_92 is offline
Senior Member
 
Join Date: Mar 2006
Location: Portugal
Age: 16
Posts: 358
Points: 2.22
Donate
Send a message via ICQ to rikardo_92 Send a message via AIM to rikardo_92 Send a message via MSN to rikardo_92 Send a message via Yahoo to rikardo_92
Quote:
#include
#include
#define printf pspDebugScreenPrintf

/* Define the module info section */
PSP_MODULE_INFO("HELLODEMO", 0, 1, 1);

/* Exit callback */
int exitCallback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}

/* Callback thread */
int callbackThread(SceSize args, void *argp) {
int cbid;


sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();

return 0;
}

/* Sets up the callback thread and returns its thread id */
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() {
pspDebugScreenInit();
SetupCallbacks();

printf("Hello WORLD!");

sceKernelSleepThread();

return 0;
}
this works fine...if u want to learn C for psp go to www.psp-programming.com (have good tutorials)

EDIT: dont forget the pspkernel.h and the pspdebug.h this not shows coz of the html
__________________

Last edited by rikardo_92 : 07-31-2006 at 05:13 PM.
Reply With Quote