Help the PSP 3D community grow! Vote for us below:


| | Development Center - Learn the basics of coding or talk about advanced coding techniques with other developers. |
Welcome to PSP3D.com - Sony PlayStation Portable News, Homebrew, Hacks, Reviews, Videos, Mods, Forums!
You are currently viewing our website as a guest, which gives you limited access to reply and interact to discussions and other members. By joining our free community, you will be able to post topics in the forums, communicate privately with other members, vote in polls, and access many other special features.
Registration is fast, simple, and absolutely free so join our community today!
|  | 
11-22-2006, 09:12 PM
| | Junior Member | | Join Date: Mar 2006
Posts: 19
Points: 36.02 Donate | | | Black screen? I was following the tutorials Here and my game compiles fine, but when i run it on my psp all i get is a black screen.
Am i missing something? Code: // Hello World - My First App for the PSP
/*
This program was created by (Your Name Here) on (Date Here)
It is a simple "Hello World" Application.
*/
#include
#include
#include
#include
PSP_MODULE_INFO("count", 0, 1, 1);
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
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();
int counter = 0;
int i = 0;
SceCtrlData pad;
printf("Press [X] To Start the Timer");
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS) {
break;
}
}
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CIRCLE) {
break;
}
pspDebugScreenClear();
printf("Press [O] To Stop the Timer\n");
printf("Counter: %i", counter);
counter++;
for(i=0; i<5; i++) {
sceDisplayWaitVblankStart();
}
}
pspDebugScreenClear();
printf("Counter Finished.");
printf("Final Count: %i", counter);
sceKernelSleepThread();
return 0;
} that is my code for the lesson 3. | 
11-24-2006, 06:27 PM
| | Teh h4x0r admin
My Mood: | | Join Date: Feb 2006 Location: New York Age: 25
Posts: 961
Points: 9,999,500,270.52 Donate | | You have to define printf. Add this line after the #includes: Code: #define printf pspDebugScreenPrintf Hope that helps.
And yes, I know they're not just #include; the part in <> is showing up as HTML instead of code. | 
11-29-2006, 07:18 PM
| | Member
My Mood: | | | | | how the hell do u right code in c when it is a .pbp that is being run? | 
12-01-2006, 11:13 AM
| | Teh h4x0r admin
My Mood: | | Join Date: Feb 2006 Location: New York Age: 25
Posts: 961
Points: 9,999,500,270.52 Donate | | Quote:
Originally Posted by hobbiecar123 how the hell do u right code in c when it is a .pbp that is being run? | Like this. | 
12-01-2006, 11:15 AM
| | Is Da Best PSP3D Member
My Mood: | | Join Date: Dec 2005 Location: England
Posts: 651
Points: 1.19 Donate | | Quote:
Originally Posted by hobbiecar123 how the hell do u right code in c when it is a .pbp that is being run? |
You complie it | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On Points Per Thread View: 0.00 Points Per Thread: 1.00 Points Per Reply: 0.10 | | | | |