From: notaz Date: Sun, 24 Aug 2008 09:33:12 +0000 (+0000) Subject: UIQ3 bugfixes, SVP drc indirect jumps, stuff X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61f66fe0ab7ab4047a2c005fc52afeb50c26fc12;p=libpicofe.git UIQ3 bugfixes, SVP drc indirect jumps, stuff git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@572 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/base_readme.txt b/base_readme.txt index c0969bf..abd6a10 100644 --- a/base_readme.txt +++ b/base_readme.txt @@ -402,7 +402,7 @@ test your BIOS. The Sega/Mega CD unit had two blinking LEDs (red and green) on it. This option will display them on top-left corner of the screen. -@@2. "CDDA audio (using mp3s)" +@@2. "CDDA audio" This option enables CD audio playback. @@2. "PCM audio" @@ -497,6 +497,7 @@ both buttons for that action to happen). There is also option to enable 6 button pad (will allow you to configure XYZ keys), and an option to set turbo rate (in Hz) for turbo buttons. #endif +#ifndef UIQ Cheat support @@ -535,6 +536,7 @@ PATCH FILE: Sonic 2.bin.pat Put the file into your ROMs directory. Then load the .pat file as you would a ROM. Then Cheat Menu Option should appear in main menu. +#endif What is emulated? diff --git a/common/config.c b/common/config.c index f8fe5d0..a621893 100644 --- a/common/config.c +++ b/common/config.c @@ -6,7 +6,7 @@ #include #include #include -#ifdef UIQ3 +#ifdef __EPOC32__ #include #endif #include "config.h" diff --git a/common/emu.c b/common/emu.c index 7dbac50..eaabe08 100644 --- a/common/emu.c +++ b/common/emu.c @@ -44,9 +44,11 @@ extern void menu_romload_end(void); // utilities -static void strlwr_(char* string) +static void strlwr_(char *string) { - while ( (*string++ = (char)tolower(*string)) ); + char *p; + for (p = string; *p; p++) + *p = (char)tolower(*p); } static int try_rfn_cut(char *fname) @@ -345,6 +347,7 @@ int emu_ReloadRom(char *rom_fname) return 0; } get_ext(rom_fname, ext); + lprintf("gmv loaded for %s\n", rom_fname); } else if (!strcmp(ext, ".pat")) { @@ -407,7 +410,9 @@ int emu_ReloadRom(char *rom_fname) rom_loaded = 0; if ( (ret = PicoCartLoad(rom, &rom_data, &rom_size)) ) { - sprintf(menuErrorMsg, "PicoCartLoad() failed."); + if (ret == 2) sprintf(menuErrorMsg, "Out of memory"); + else if (ret == 3) sprintf(menuErrorMsg, "Read failed"); + else sprintf(menuErrorMsg, "PicoCartLoad() failed."); lprintf("%s\n", menuErrorMsg); goto fail2; } @@ -774,13 +779,13 @@ void emu_updateMovie(void) } else { // MXYZ SACB RLDU PicoPad[0] = ~movie_data[offs] & 0x8f; // ! SCBA RLDU - if(!(movie_data[offs] & 0x10)) PicoPad[0] |= 0x40; // A - if(!(movie_data[offs] & 0x20)) PicoPad[0] |= 0x10; // B - if(!(movie_data[offs] & 0x40)) PicoPad[0] |= 0x20; // A + if(!(movie_data[offs] & 0x10)) PicoPad[0] |= 0x40; // C + if(!(movie_data[offs] & 0x20)) PicoPad[0] |= 0x10; // A + if(!(movie_data[offs] & 0x40)) PicoPad[0] |= 0x20; // B PicoPad[1] = ~movie_data[offs+1] & 0x8f; // ! SCBA RLDU - if(!(movie_data[offs+1] & 0x10)) PicoPad[1] |= 0x40; // A - if(!(movie_data[offs+1] & 0x20)) PicoPad[1] |= 0x10; // B - if(!(movie_data[offs+1] & 0x40)) PicoPad[1] |= 0x20; // A + if(!(movie_data[offs+1] & 0x10)) PicoPad[1] |= 0x40; // C + if(!(movie_data[offs+1] & 0x20)) PicoPad[1] |= 0x10; // A + if(!(movie_data[offs+1] & 0x40)) PicoPad[1] |= 0x20; // B PicoPad[0] |= (~movie_data[offs+2] & 0x0A) << 8; // ! MZYX if(!(movie_data[offs+2] & 0x01)) PicoPad[0] |= 0x0400; // X if(!(movie_data[offs+2] & 0x04)) PicoPad[0] |= 0x0100; // Z diff --git a/gp2x/emu.c b/gp2x/emu.c index c225f18..dc78521 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -283,7 +283,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 { @@ -293,21 +293,14 @@ 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); vidConvCpyRGB32(localPal+0x80, HighPal+0x40, 0x40); - pallen = 0xc0; } else { vidConvCpyRGB32(localPal, Pico.cram, 0x40); + memcpy32(localPal+0x80, localPal, 0x40); // for spr prio mess } if (pallen > 0xc0) { localPal[0xc0] = 0x0000c000; diff --git a/linux/port_config.h b/linux/port_config.h index 87bbe4b..b781da7 100644 --- a/linux/port_config.h +++ b/linux/port_config.h @@ -29,5 +29,11 @@ //#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__) #define dprintf(x...) +// platform +#define PLAT_MAX_KEYS 32 +#define PLAT_HAVE_JOY 1 +#define PATH_SEP "/" +#define PATH_SEP_C '/' + #endif //PORT_CONFIG_H diff --git a/pandora/emu.c b/pandora/emu.c index 2d873df..0c6935b 100644 --- a/pandora/emu.c +++ b/pandora/emu.c @@ -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; diff --git a/psp/emu.c b/psp/emu.c index d3e6317..5c87355 100644 --- a/psp/emu.c +++ b/psp/emu.c @@ -263,7 +263,7 @@ static void do_pal_update(int allow_sh, int allow_as) localPal[0xe0] = 0; localPal[0xf0] = 0x001f; } - else if (allow_as && (rendstatus & PDRAW_ACC_SPRITES)) + else if (allow_as && (rendstatus & PDRAW_SPR_LO_ON_HI)) { memcpy32((int *)dpal+0x80/2, (void *)localPal, 0x40*2/4); } @@ -290,7 +290,7 @@ static void EmuScanPrepare(void) if (Pico.m.dirtyPal) do_pal_update(1, 1); - if ((rendstatus & PDRAW_ACC_SPRITES) && !(Pico.video.reg[0xC]&8)) + if ((rendstatus & PDRAW_SPR_LO_ON_HI) && !(Pico.video.reg[0xC]&8)) amips_clut_f = amips_clut_6bit; else amips_clut_f = amips_clut; }