X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=psp%2Fpsp.c;h=b2d0d727ca19962c6b26b4276477dec919a1fc66;hb=c93fb19e8fa757c4eab44f373b697c8158d90c42;hp=8f811f636949092b72c01e1049bc3d5ad1a24615;hpb=db298784dd80d7c316cf6cdf314f029abe1fa1d9;p=libpicofe.git diff --git a/psp/psp.c b/psp/psp.c index 8f811f6..b2d0d72 100644 --- a/psp/psp.c +++ b/psp/psp.c @@ -32,7 +32,8 @@ static int callback_thread(SceSize args, void *argp) { int cbid; - lprintf("callback_thread started with id %i\n", sceKernelGetThreadId()); + lprintf("callback_thread started with id %i, priority %i\n", + sceKernelGetThreadId(), sceKernelGetThreadCurrentPriority()); cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL); sceKernelRegisterExitCallback(cbid); @@ -44,9 +45,10 @@ static int callback_thread(SceSize args, void *argp) void psp_init(void) { - int thid; + SceUID thid; - lprintf("entered psp_init, threadId %i\n", sceKernelGetThreadId()); + lprintf("entered psp_init, threadId %i, priority %i\n", sceKernelGetThreadId(), + sceKernelGetThreadCurrentPriority()); thid = sceKernelCreateThread("update_thread", callback_thread, 0x11, 0xFA0, 0, 0); if (thid >= 0) @@ -64,34 +66,24 @@ void psp_init(void) sceGuInit(); sceGuStart(GU_DIRECT, guCmdList); - sceGuDrawBuffer(GU_PSM_5650, VRAMOFFS_FB0, 512); // point to back fb? - sceGuDispBuffer(480, 272, VRAMOFFS_FB1, 512); + sceGuDrawBuffer(GU_PSM_5650, (void *)VRAMOFFS_FB0, 512); + sceGuDispBuffer(480, 272, (void *)VRAMOFFS_FB1, 512); // don't care sceGuClear(GU_COLOR_BUFFER_BIT | GU_DEPTH_BUFFER_BIT); - sceGuDepthBuffer(VRAMOFFS_DEPTH, 512); + sceGuDepthBuffer((void *)VRAMOFFS_DEPTH, 512); sceGuOffset(2048 - (480 / 2), 2048 - (272 / 2)); sceGuViewport(2048, 2048, 480, 272); sceGuDepthRange(0xc350, 0x2710); sceGuScissor(0, 0, 480, 272); sceGuEnable(GU_SCISSOR_TEST); -// sceGuAlphaFunc(GU_GREATER, 0, 0xff); -// sceGuEnable(GU_ALPHA_TEST); -// sceGuDepthFunc(GU_ALWAYS); // GU_GEQUAL); -// sceGuEnable(GU_DEPTH_TEST); sceGuDepthMask(0xffff); sceGuDisable(GU_DEPTH_TEST); sceGuFrontFace(GU_CW); -// sceGuShadeModel(GU_SMOOTH); -// sceGuEnable(GU_CULL_FACE); sceGuEnable(GU_TEXTURE_2D); -// sceGuEnable(GU_CLIP_PLANES); - sceGuTexMode(GU_PSM_5650, 0, 0, 0); sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB); - sceGuTexFilter(GU_NEAREST, GU_NEAREST); -// sceGuAmbientColor(0xffffffff); -// sceGuEnable(GU_BLEND); -// sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0); + sceGuAmbientColor(0xffffffff); + sceGuColor(0xffffffff); sceGuFinish(); sceGuSync(0, 0);