FAME + some random stuff added

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@276 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-10-21 10:20:56 +00:00
parent 7d4906bfc9
commit 70357ce525
22 changed files with 45359 additions and 4395 deletions

View file

@ -5,6 +5,7 @@
#include <pspkernel.h>
#include <pspiofilemgr.h>
#include <pspdisplay.h>
#include <psppower.h>
#include <pspgu.h>
#include "psp.h"
@ -76,7 +77,8 @@ void psp_finish(void)
void psp_video_flip(int wait_vsync)
{
if (wait_vsync) sceDisplayWaitVblankStart();
sceDisplaySetFrameBuf(psp_screen, 512, PSP_DISPLAY_PIXEL_FORMAT_565, PSP_DISPLAY_SETBUF_NEXTFRAME);
sceDisplaySetFrameBuf(psp_screen, 512, PSP_DISPLAY_PIXEL_FORMAT_565,
wait_vsync ? PSP_DISPLAY_SETBUF_IMMEDIATE : PSP_DISPLAY_SETBUF_NEXTFRAME);
current_screen ^= 1;
psp_screen = current_screen ? PSP_VRAM_BASE0 : PSP_VRAM_BASE1;
}
@ -108,6 +110,19 @@ unsigned int psp_pad_read(int blocking)
return pad.Buttons;
}
int psp_get_cpu_clock(void)
{
return scePowerGetCpuClockFrequencyInt();
}
int psp_set_cpu_clock(int clock)
{
int ret = scePowerSetClockFrequency(clock, clock, clock/2);
if (ret != 0) lprintf("failed to set clock: %i\n", ret);
return ret;
}
/* alt logging */
#define LOG_FILE "log.log"