 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
fr34k*
Joined: 31 Aug 2007 Posts: 17
|
Posted: Thu Sep 13, 2007 1:30 am Post subject: PSP_DAY_COUNTER |
|
|
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
| Quote: | #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
| Quote: | 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 | Quote: | 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!!!!! |
|
| Back to top |
|
 |
fr34k*
Joined: 31 Aug 2007 Posts: 17
|
Posted: Thu Sep 13, 2007 7:52 am Post subject: |
|
|
*Push*
Cont anybody help me? _________________ SORRY FOR MY BAD ENGLISH!!!!! |
|
| Back to top |
|
 |
FreePlay
Joined: 04 Jan 2006 Posts: 71 Location: Schenectady, New York, USA
|
Posted: Thu Sep 13, 2007 10:02 am Post subject: |
|
|
Without any information about the errors you're getting?
Absolutely not. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|