UIQ3 bugfixes, SVP drc indirect jumps, stuff

git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@572 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-08-24 09:33:12 +00:00
parent ac087c0e3a
commit 61f66fe0ab
7 changed files with 30 additions and 30 deletions

View file

@ -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?

View file

@ -6,7 +6,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef UIQ3
#ifdef __EPOC32__
#include <unistd.h>
#endif
#include "config.h"

View file

@ -46,7 +46,9 @@ extern void menu_romload_end(void);
// utilities
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

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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;
}