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!
|  | | 
07-31-2006, 04:59 PM
| | Senior Member
My Mood: | | Join Date: Mar 2006 Location: USA Age: 15
Posts: 284
Points: 32.15 Donate | | WHATS WRONG with MY CODE??? ok im trying to make a simple hello world program . it compiles into a eboot but when i start it -its just a blank screen!? so can you tell me whats wrong with this-----. it thinks its html at pspkernel.h and pspdebug.h
but its really there
#include
#include
#define printf pspDebugScreenPrintf
/* Define the module info section */
PSP_MODULE_INFO("HELLODEMO", 0, 1, 1);
/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
/* 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()
{
using namespace std;
printf("Hello WORLD!");
return 0;
}
Last edited by pspeters : 07-31-2006 at 05:01 PM.
| 
07-31-2006, 05:10 PM
| | Senior Member | | Join Date: Mar 2006 Location: Portugal Age: 15
Posts: 358
Points: 1.97 Donate | | 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.
| 
07-31-2006, 05:31 PM
| | Senior Member
My Mood: | | Join Date: Mar 2006 Location: USA Age: 15
Posts: 284
Points: 32.15 Donate | | | well it dosnt do anything | 
07-31-2006, 05:46 PM
| | Senior Member | | Join Date: Mar 2006 Location: Portugal Age: 15
Posts: 358
Points: 1.97 Donate | | | define anything... | 
07-31-2006, 05:59 PM
| | Senior Member
My Mood: | | Join Date: Mar 2006 Location: USA Age: 15
Posts: 284
Points: 32.15 Donate | | | compile it yourself and try to fix it. i dont no why its not working. | 
07-31-2006, 06:10 PM
| | Senior Member | | Join Date: Mar 2006 Location: Portugal Age: 15
Posts: 358
Points: 1.97 Donate | | | show me ur makefile | 
07-31-2006, 06:13 PM
| | Senior Member
My Mood: | | Join Date: Mar 2006 Location: USA Age: 15
Posts: 284
Points: 32.15 Donate | | | TARGET = hello
OBJS = main.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak | 
07-31-2006, 06:14 PM
| | Senior Member | | Join Date: Jun 2006 Location: C:\windows\fonts\gigabyte.tff
Posts: 612
Points: 0.79 Donate | | | its wrong . | 
07-31-2006, 06:15 PM
| | Senior Member
My Mood: | | Join Date: Mar 2006 Location: USA Age: 15
Posts: 284
Points: 32.15 Donate | | | how???please help | 
07-31-2006, 06:16 PM
| | Senior Member | | Join Date: Mar 2006 Location: Portugal Age: 15
Posts: 358
Points: 1.97 Donate | | | wots wrong gigabyte??? | |
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 | | | | |