X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fpandora%2Femu.c;h=0c6935b1b84e55f982eb9ae4bf61b6cebbf07827;hb=f8af96349ea464111fbef3c6528016c3dc34cdcf;hp=633d027c9ed5fd165cc9f11afbf5c47cf76da774;hpb=84100c0fd5a5abb6b1e712aa1feb33388362695d;p=picodrive.git diff --git a/platform/pandora/emu.c b/platform/pandora/emu.c index 633d027..0c6935b 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) @@ -151,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); @@ -359,7 +350,7 @@ static void blit(const char *fps, const char *notice) // 8bit accurate renderer if (Pico.m.dirtyPal) { - int pallen = 0x40; + int pallen = 0xc0; Pico.m.dirtyPal = 0; if (Pico.video.reg[0xC]&8) // shadow/hilight mode { @@ -369,13 +360,6 @@ static void blit(const char *fps, const char *notice) memcpy32(localPal+0xc0, localPal+0x40, 0x40); pallen = 0x100; } - else if (rendstatus & PDRAW_ACC_SPRITES) { - vidConvCpyRGB32(localPal, Pico.cram, 0x40); - memcpy32(localPal+0x40, localPal, 0x40); - memcpy32(localPal+0x80, localPal, 0x40); - memcpy32(localPal+0xc0, localPal, 0x40); - pallen = 0x100; - } else if (rendstatus & PDRAW_SONIC_MODE) { // mid-frame palette changes vidConvCpyRGB32(localPal, Pico.cram, 0x40); vidConvCpyRGB32(localPal+0x40, HighPal, 0x40); @@ -384,6 +368,7 @@ static void blit(const char *fps, const char *notice) } else { vidConvCpyRGB32(localPal, Pico.cram, 0x40); + memcpy32(localPal+0x80, localPal, 0x40); } if (pallen > 0xc0) { localPal[0xc0] = 0x0000c000;