PSP_DAY_COUNTER

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
fr34k*
Posts: 17
Joined: Fri Aug 31, 2007 6:19 am

PSP_DAY_COUNTER

Post by fr34k* »

Hello, i will make a PSP_Day_Counter ...
A have a code, but can you me say if i have errors or something?
Or is this Code right?

main.c
#include <stdlib.h>
#include <stdio.h>

#include <pspsdk.h>
#include <pspctrl.h>
#include <pspkernel.h>
#include <pspdisplay.h>

// ganz wichtig
#include <pspgu.h>
// Header für Grafikfunktionen
#include <gfx/blit.h>

PSP_MODULE_INFO("name", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
/* important for png image allocations */
/*PSP_HEAP_SIZE_KB(1024); nur für Bilder nötig */


// Hauptfunktion
int main_thread(SceSize args, void *argp) {
// Wartezeit, sonst crasht PSP
sceKernelDelayThread(3000000);
// texte und bilder im XMB ermöglichen
blit_setup();

//
SceCtrlData pad, lastpad;
lastpad = pad;

while(1)
{

// Counter
int i;
for(i=0;i<10;i++) {

// Text blitten Vordergrund Hintergrund
// x,y, Text, weiß schwarz
blit_string46(1,1, "%d/n",i, 0x00ffffff, 0xff000000);

sceCtrlPeekBufferPositive(&pad, 1);
sceDisplayWaitVblankStart();
}
}
sceKernelSleepThread();
return 0;
}


//diese funktion wird beim start aufgerufen
int module_start(SceSize args, void *argp) {

int thid;

/* main thread erstellen */
thid = sceKernelCreateThread("name", main_thread, 0x18, 0x1000, 0, NULL);
if(thid >= 0) sceKernelStartThread(thid, args, argp);

return 0;
}

int module_stop(void)
{
return 0;
}
makefile
TARGET = namehier
OBJS = main.o gfx/blit.o gfx/graphics.o
BUILD_PRX = 1
PRX_EXPORTS = exports.exp
#USE_PSPSDK_LIBC = 1

INCDIR =
LIBDIR =
LIBS = -lpng -ljpeg -lz -lm -lpsppower -lpspusb -lpspusbstor
#-lpspvshbridge_2
LDFLAGS =
CFLAGS = -Os -G0 -Wall -g
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

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

exports: psp-build-exports -s exports.exp
exports.exp
PSP_BEGIN_EXPORTS

PSP_EXPORT_START(syslib, 0, 0x8000)
PSP_EXPORT_FUNC(module_start)
PSP_EXPORT_VAR(module_info)
PSP_EXPORT_END

PSP_EXPORT_START(pspirtty, 0, 0x0001)
//PSP_EXPORT_FUNC(addObject)here comes names of exports
PSP_EXPORT_END

PSP_END_EXPORTS
Big thanks to all, they can help me!
SORRY FOR MY BAD ENGLISH!!!!!
fr34k*
Posts: 17
Joined: Fri Aug 31, 2007 6:19 am

Post by fr34k* »

*Push*
Cont anybody help me?
SORRY FOR MY BAD ENGLISH!!!!!
FreePlay
Posts: 71
Joined: Wed Jan 04, 2006 6:53 pm
Location: Schenectady, New York, USA

Post by FreePlay »

Without any information about the errors you're getting?

Absolutely not.
Post Reply