Next generation PSP hacking
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 

 Hello World For PSP

Go down 
Junior Member

Posts : 20
Join date : 2010-06-09

PostSubject: Hello World For PSP   Wed Jun 09, 2010 11:35 pm

Welcome to the PSP programing world :mrgreen:. a simple hello world is what will start you into psp programing of any kind, but i wont even touch kernel side of the force, skyend can do that if hes feeling generous Wink

now, what we will need is a pspsdk (playstation portable software development kit).

you can either get, [You must be registered and logged in to see this link.] or [You must be registered and logged in to see this link.]. if you have linux, goto [You must be registered and logged in to see this link.] they will have the latest toolchain there plus instructions.

so here we go.

first of, you should get something like [You must be registered and logged in to see this link.] , cause it has cool syntax highlighting. or you could use regular windows notepad.

first offf, make sure you installed your pspsdk properly.

now for the fun stuff, here is main.c

#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>

#define printf pspDebugScreenPrintf

PSP_MODULE_INFO("Hello World", 0, 1, 1);

int main(int argc, char *argv[])
    printf("\n\tHello World %c!!!!!\n\n\tPress X To Exit",0x01);
    while (1)
          SceCtrlData pad;

      sceCtrlReadBufferPositive(&pad, 1);

                    if(pad.Buttons & PSP_CTRL_CROSS) {
                              printf("\n\n\n\tNow Exiting...");
                              return 0;
              return 0;

Now for our makefile.
TARGET = hello
OBJS = main.o

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti

LIBS = -lpspgu -lpng -lz -lm


PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

now, put those 2 files in a folder and start cmd. now change directory to your folder and where your makefile is and type make

Happy Coding afro afro
Back to top Go down
View user profile
Hello World For PSP
Back to top 
Page 1 of 1
 Similar topics
» 2010 World Youth Chess Championship – Final report
» Adolf Hitler - World Chess Champion.
» Which chess player beat the most World Champions?
» WSCE - World's Strongest Derivative Engines
» FIDE World Chess Championship Match 2014

Permissions in this forum:You cannot reply to topics in this forum
Everything your PSP needs! :: PlayStation Portable (PSP) :: PSP Tutorials-
Jump to: