X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fpandora%2Femu.c;h=2d873dfc843bb5968ed6fb92b77c856e294024a4;hb=ca482e5de8bacb70db55f43afe02f93fe6fe3f16;hp=7c2af0326b77d5aebe660b0be6d83ef7810170ac;hpb=3bb7bd19cff9221f3c2b72a3a528b83932c3d4a9;p=picodrive.git diff --git a/platform/pandora/emu.c b/platform/pandora/emu.c index 7c2af03..2d873df 100644 --- a/platform/pandora/emu.c +++ b/platform/pandora/emu.c @@ -48,7 +48,6 @@ char romFileName[PATH_MAX]; static short __attribute__((aligned(4))) sndBuffer[2*44100/50]; static struct timeval noticeMsgTime = { 0, 0 }; // when started showing static int osd_fps_x; -char noticeMsg[64]; // notice msg to draw unsigned char *PicoDraw2FB = NULL; // temporary buffer for alt renderer int reset_timing = 0; @@ -65,7 +64,7 @@ void emu_noticeMsgUpdated(void) gettimeofday(¬iceMsgTime, 0); } -void emu_getMainDir(char *dst, int len) +int emu_getMainDir(char *dst, int len) { extern char **g_argv; int j; @@ -76,6 +75,8 @@ void emu_getMainDir(char *dst, int len) dst[len] = 0; for (j = strlen(dst); j > 0; j--) if (dst[j] == '/') { dst[j+1] = 0; break; } + + return j + 1; } void emu_Init(void) @@ -135,12 +136,13 @@ void emu_Deinit(void) void emu_prepareDefaultConfig(void) { memset(&defaultConfig, 0, sizeof(defaultConfig)); - defaultConfig.EmuOpt = 0x9f | 0x00700; // | <- ram_tmng, confirm_save, cd_leds + defaultConfig.EmuOpt = 0x8f | 0x00600; // | <- confirm_save, cd_leds defaultConfig.s_PicoOpt = 0x0f | POPT_EXT_FM|POPT_EN_MCD_PCM|POPT_EN_MCD_CDDA|POPT_EN_SVP_DRC; defaultConfig.s_PicoOpt |= POPT_ACC_SPRITES|POPT_EN_MCD_GFX; defaultConfig.s_PicoOpt &= ~POPT_EN_SVP_DRC; // crashes :( + defaultConfig.EmuOpt &= ~8; // no save gzip defaultConfig.s_PsndRate = 44100; - defaultConfig.s_PicoRegion = 0; // auto + defaultConfig.s_PicoRegion = 0; defaultConfig.s_PicoAutoRgnOrder = 0x184; // US, EU, JP defaultConfig.s_PicoCDBuffers = 0; defaultConfig.Frameskip = 0; @@ -150,16 +152,6 @@ void emu_prepareDefaultConfig(void) defaultConfig.turbo_rate = 15; } -void emu_setDefaultConfig(void) -{ - memcpy(¤tConfig, &defaultConfig, sizeof(currentConfig)); - PicoOpt = currentConfig.s_PicoOpt; - PsndRate = currentConfig.s_PsndRate; - PicoRegionOverride = currentConfig.s_PicoRegion; - PicoAutoRgnOrder = currentConfig.s_PicoAutoRgnOrder; - PicoCDBuffers = currentConfig.s_PicoCDBuffers; -} - static void textOut16(int x, int y, const char *text) { int i,l,len=strlen(text); @@ -938,6 +930,7 @@ void emu_Loop(void) } bench_fps += frames_shown; sprintf(fpsbuff, "%3i/%3i/%3i", frames_shown, bench_fps_s, (bf[0]+bf[1]+bf[2]+bf[3])>>2); + printf("%s\n", fpsbuff); #else if (currentConfig.EmuOpt & 2) { sprintf(fpsbuff, "%3i/%3i", frames_shown, frames_done);