X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pandora%2Femu.c;h=a749836b81f690790ebde8b4f065d93b2cdfe1b7;hb=095a240bd91548be4b9770d28d5d6c3e97637094;hp=2d873dfc843bb5968ed6fb92b77c856e294024a4;hpb=36f6fd5afec3bd982c715f6d39d5712dacb237cd;p=libpicofe.git diff --git a/pandora/emu.c b/pandora/emu.c index 2d873df..a749836 100644 --- a/pandora/emu.c +++ b/pandora/emu.c @@ -24,9 +24,9 @@ #include "../common/common.h" #include "asm_utils.h" -#include -#include -#include +#include +#include +#include #include //#define PFRAMES @@ -139,7 +139,7 @@ void emu_prepareDefaultConfig(void) 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.s_PicoOpt &= ~POPT_EN_SVP_DRC; // crashes :( defaultConfig.EmuOpt &= ~8; // no save gzip defaultConfig.s_PsndRate = 44100; defaultConfig.s_PicoRegion = 0; @@ -294,8 +294,8 @@ static int EmuScanEnd16(unsigned int num) len = 256; } - if (!sh && (rendstatus & PDRAW_ACC_SPRITES)) - mask=0x3f; // accurate sprites, upper bits are priority stuff + if (!sh && (rendstatus & PDRAW_SPR_LO_ON_HI)) + mask=0x3f; // messed sprites, upper bits are priority stuff #if 1 clut_line(pd, ps, pal, (mask<<16) | len); @@ -350,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 { @@ -360,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); @@ -375,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; @@ -781,6 +775,11 @@ void emu_forcedFrame(int opts) currentConfig.EmuOpt = eo_old; } +void emu_platformDebugCat(char *str) +{ + // nothing +} + static void simpleWait(int thissec, int lim_time) { struct timeval tval; @@ -1002,7 +1001,8 @@ void emu_Loop(void) if (currentConfig.Frameskip < 0 && tval.tv_usec - lim_time >= 300000) // slowdown detection reset_timing = 1; -/* else if (PsndOut != NULL || currentConfig.Frameskip < 0) +#if 1 + else if (PsndOut != NULL || currentConfig.Frameskip < 0) { // sleep or vsync if we are still too fast // usleep sleeps for ~20ms minimum, so it is not a solution here @@ -1018,7 +1018,7 @@ void emu_Loop(void) } } } -*/ +#endif blit(fpsbuff, notice); pframes_done++; pframes_shown++;