UIQ3 bugfixes, SVP drc indirect jumps, stuff

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@572 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-08-24 09:33:12 +00:00
parent 02ba8788a0
commit f8af96349e
29 changed files with 193 additions and 157 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

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

View file

@ -152,7 +152,7 @@ These options just show if your BIOS files were correctly detected by the emulat
4. "CD LEDs"
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.
5. "CDDA audio (using mp3s)"
5. "CDDA audio"
This option enables CD audio playback.
6. "PCM audio"

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

View file

@ -35,6 +35,7 @@
#include "../common/emu.h"
#include "emu.h"
extern "C" char menuErrorMsg[];
////////////////////////////////////////////////////////////////
//
@ -235,26 +236,18 @@ void CPicolAppView::DisplayOpenROMDialogL()
iROMLoaded = EFalse;
switch (res)
{
case PicoErrRomOpenFailed:
CEikonEnv::Static()->InfoWinL(_L("Error"), _L("Failed to open file."));
case PicoErrRomOpenFailed: {
TBuf<64> mErrorBuff;
TPtrC8 buff8((TUint8*) menuErrorMsg);
mErrorBuff.Copy(buff8);
CEikonEnv::Static()->InfoWinL(_L("Error"), mErrorBuff);
break;
}
case PicoErrOutOfMem:
CEikonEnv::Static()->InfoWinL(_L("Error"), _L("Failed to allocate memory."));
break;
case PicoErrNotRom:
CEikonEnv::Static()->InfoWinL(_L("Error"), _L("The file you selected is not a game ROM."));
break;
case PicoErrNoRomsInArchive:
CEikonEnv::Static()->InfoWinL(_L("Error"), _L("No game ROMs found in zipfile."));
break;
case PicoErrUncomp:
CEikonEnv::Static()->InfoWinL(_L("Error"), _L("Failed while unzipping ROM."));
break;
case PicoErrEmuThread:
CEikonEnv::Static()->InfoWinL(_L("Error"), _L("Failed to create emulation thread. Try to restart this application."));
break;

View file

@ -37,7 +37,6 @@ extern const char *actionNames[];
RSemaphore initSemaphore;
RSemaphore pauseSemaphore;
RSemaphore loadWaitSemaphore;
int pico_was_reset = 0;
static CPicolAppView *appView = 0;
@ -65,9 +64,7 @@ TInt CPicoGameSession::Do(const TPicoServRqst what, TAny *param)
case PicoMsgReset:
if(rom_loaded) {
PicoReset();
pico_was_reset = 1;
return ChangeRunState(PGS_Running);
return ChangeRunState(PGS_Reset);
}
return 1;
@ -182,13 +179,14 @@ TInt CPicoGameSession::loadROM(TPtrC16 *pptr)
// If successful, in will enter PGS_Running state by itself.
loadrom_fname = (char *)writeBuf.PtrZ();
loadrom_result = 0;
loadWaitSemaphore.Wait(1); // make sure sem is not set
ret = ChangeRunState(PGS_ReloadRom);
if(ret) return ret;
loadWaitSemaphore.Wait(20*1000*1000);
loadWaitSemaphore.Wait(60*1000*1000);
if (loadrom_result == 0)
return PicoErrNotRom;
return PicoErrRomOpenFailed;
emu_getGameName(buff);
TPtrC8 buff8((TUint8*) buff);
@ -198,11 +196,9 @@ TInt CPicoGameSession::loadROM(TPtrC16 *pptr)
// debug
#ifdef __DEBUG_PRINT
TInt cells = User::CountAllocCells();
TInt mem;
TInt mem, cells = User::CountAllocCells();
User::AllocSize(mem);
DEBUGPRINT(_L("comm: cels=%d, size=%d KB"), cells, mem/1024);
ChangeRunState(PGS_DebugHeap, PGS_Running);
#endif
return 0;

View file

@ -27,8 +27,8 @@ enum TPicoGameState {
PGS_Paused,
PGS_Quit,
PGS_KeyConfig,
PGS_DebugHeap,
PGS_ReloadRom,
PGS_Reset,
};
enum TPicoServRqst {
@ -49,11 +49,8 @@ enum TPicoGenErrors { // generic errors
PicoErrNoErr = 0, // OK
PicoErrRomOpenFailed,
PicoErrOutOfMem,
PicoErrNotRom,
PicoErrNoRomsInArchive,
PicoErrUncomp, // 5
PicoErrOutOfMemSnd,
PicoErrGenSnd, // 7 generic sound system error
PicoErrGenSnd, // generic sound system error
PicoErrEmuThread
};

View file

@ -1,4 +1,4 @@
# makefile for uiq3_patcher_0_2.tar.gz
# makefile for uiq3_patcher_0_2.tar.gz setup, modified
export CROSS = arm-none-symbianelf-
APPNAME = PicoDrive
VER_MAJ = 1
@ -141,6 +141,20 @@ engine/blit_asm.o : engine/blit.s
@echo ">>>" $@
$(AS) $(ASFLAGS) $< -o $@
# App.o can't be optimized
#App.o : App.cpp
# $(CC) $(CXXFLAGS) -O0 -c $< -o $@
readme.txt: ../../tools/textfilter ../base_readme.txt
../../tools/textfilter ../base_readme.txt $@ UIQ
# ----------- release -----------
ifneq ($(findstring rel,$(MAKECMDGOALS)),)
ifeq ($(VER),)
$(error need VER)
endif
endif
rel: picodrive.sis readme.txt
zip -9 -j ../../PicoDrive_uiq3_$(VER).zip $^
mkdir bin_to_cso_mp3
cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/
zip -9 -r ../../PicoDrive_uiq3_$(VER).zip bin_to_cso_mp3
rm -rf bin_to_cso_mp3

View file

@ -65,6 +65,7 @@ void emu_prepareDefaultConfig(void)
defaultConfig.Frameskip = -1; // auto
defaultConfig.volume = 80;
defaultConfig.scaling = 0;
defaultConfig.KeyBinds[0xd5] = 1<<26; // back
}
/* used by config engine only, not actual menus */
@ -102,7 +103,7 @@ const int opt2_entry_count = OPT2_ENTRY_COUNT;
menu_entry cdopt_entries[] =
{
{ "CD LEDs", MB_ONOFF, MA_CDOPT_LEDS, &currentConfig.EmuOpt, 0x0400, 0, 0, 1, 1 },
{ "CDDA audio (using mp3s)", MB_ONOFF, MA_CDOPT_CDDA, &PicoOpt, 0x0800, 0, 0, 1, 1 },
{ "CDDA audio", MB_ONOFF, MA_CDOPT_CDDA, &PicoOpt, 0x0800, 0, 0, 1, 1 },
{ "PCM audio", MB_ONOFF, MA_CDOPT_PCM, &PicoOpt, 0x0400, 0, 0, 1, 1 },
{ NULL, MB_NONE, MA_CDOPT_READAHEAD, NULL, 0, 0, 0, 1, 1 },
{ "SaveRAM cart", MB_ONOFF, MA_CDOPT_SAVERAM, &PicoOpt, 0x8000, 0, 0, 1, 1 },

View file

@ -171,7 +171,7 @@ void ExceptionHandler(TExcType exc)
#include <stdio.h> // vsprintf
// debug print from c code
extern "C" void lprintf(char *format, ...)
extern "C" void lprintf(const char *format, ...)
{
va_list args;
char buffer[512];

View file

@ -16,7 +16,7 @@
#ifdef __cplusplus
extern "C"
#endif
void lprintf(char *format, ...);
void lprintf(const char *format, ...);
#endif
#else
#define DEBUGPRINT(x...)

View file

@ -84,8 +84,8 @@ char *loadrom_fname = NULL;
int loadrom_result = 0;
static timeval noticeMsgTime = { 0, 0 }; // when started showing
static CGameAudioMS *gameAudio = 0; // the audio object itself
static int reset_timing;
extern int pico_was_reset;
static int reset_timing = 0;
static int pico_was_reset = 0;
extern RSemaphore initSemaphore;
extern RSemaphore pauseSemaphore;
extern RSemaphore loadWaitSemaphore;
@ -170,21 +170,27 @@ static void TargetEpocGameL()
int thissec = 0, frames_done = 0, frames_shown = 0;
int target_fps, target_frametime;
int i, lim_time;
//TRawEvent blevent;
MainInit();
buff[0] = 0;
// try to start pico
DEBUGPRINT(_L("PicoInit()"));
PicoInit();
// just to keep the backlight on (works only on UIQ2)
//blevent.Set(TRawEvent::EActive);
PicoDrawSetColorFormat(2);
PicoWriteSound = updateSound;
// loop?
for(;;)
{
if (gamestate == PGS_Running)
{
#ifdef __DEBUG_PRINT
TInt mem, cells = User::CountAllocCells();
User::AllocSize(mem);
DEBUGPRINT(_L("worker: cels=%d, size=%d KB"), cells, mem/1024);
#endif
// switch context to other thread
User::After(50000);
// prepare window and stuff
@ -203,7 +209,7 @@ static void TargetEpocGameL()
if(!noticeMsgTime.tv_sec) strcpy(noticeMsg, "NTSC@SYSTEM@/@60@FPS");
}
target_frametime = 1000000/target_fps;
if(!noticeMsgTime.tv_sec && pico_was_reset)
if (!noticeMsgTime.tv_sec && pico_was_reset)
gettimeofday(&noticeMsgTime, 0);
// prepare CD buffer
@ -263,6 +269,7 @@ static void TargetEpocGameL()
frames_shown -= target_fps; if (frames_shown < 0) frames_shown = 0;
if (frames_shown > frames_done) frames_shown = frames_done;
}
User::ResetInactivityTime();
}
@ -331,14 +338,23 @@ static void TargetEpocGameL()
CPolledActiveScheduler::Instance()->Schedule();
CGameWindow::FreeResources();
}
else if(gamestate == PGS_Reset)
{
PicoReset();
pico_was_reset = 1;
gamestate = PGS_Running;
}
else if(gamestate == PGS_ReloadRom)
{
loadrom_result = emu_ReloadRom(loadrom_fname);
pico_was_reset = 1;
if (loadrom_result)
gamestate = PGS_Running;
else
else {
extern char menuErrorMsg[];
gamestate = PGS_Paused;
lprintf("%s\n", menuErrorMsg);
}
DEBUGPRINT(_L("done loading ROM, retval=%i"), loadrom_result);
loadWaitSemaphore.Signal();
User::After(50000);
@ -363,15 +379,8 @@ static void TargetEpocGameL()
User::After(150000);
}
emu_WriteConfig(0);
CGameWindow::FreeResources();
} else if(gamestate == PGS_DebugHeap) {
#ifdef __DEBUG_PRINT
TInt cells = User::CountAllocCells();
TInt mem;
User::AllocSize(mem);
DEBUGPRINT(_L("worker: cels=%d, size=%d KB"), cells, mem/1024);
gamestate = gamestate_next;
#endif
} else if(gamestate == PGS_Quit) {
break;
}
@ -397,11 +406,6 @@ static void MainInit()
DumpMemInfo();
// try to start pico
DEBUGPRINT(_L("PicoInit()"));
PicoDrawSetColorFormat(2);
PicoWriteSound = updateSound;
// if (pauseSemaphore.Handle() <= 0)
// pauseSemaphore.CreateLocal(0);
DEBUGPRINT(_L("initSemaphore.Signal()"));
@ -776,6 +780,8 @@ void CGameWindow::DoKeys(void)
areaActions = 0;
}
}
if (movie_data) emu_updateMovie();
}
@ -875,8 +881,11 @@ void CGameWindow::RunEvents(TUint32 which)
sprintf(noticeMsg, "SAVE@SLOT@%i@SELECTED", state_slot);
gettimeofday(&noticeMsgTime, 0);
}
if(which & 0x0020) if(gameAudio) currentConfig.volume = gameAudio->ChangeVolume(0);
if(which & 0x0010) if(gameAudio) currentConfig.volume = gameAudio->ChangeVolume(1);
if ((which & 0x0030) && gameAudio != NULL) {
currentConfig.volume = gameAudio->ChangeVolume((which & 0x0010) ? 1 : 0);
sprintf(noticeMsg, "VOL@%02i@", currentConfig.volume);
gettimeofday(&noticeMsgTime, 0);
}
}

View file

@ -182,7 +182,7 @@ static void drawTextM2Fat(int x, int y, const char *text)
static void drawTextFpsCenter0(const char *text)
{
if(!text) return;
drawTextM2(214, 216, text);
drawTextM2((Pico.video.reg[12]&1) ? 234 : 214, 216, text);
}
static void drawTextFpsFit0(const char *text)
@ -206,7 +206,7 @@ static void drawTextFps0(const char *text)
static void drawTextNoticeCenter0(const char *text)
{
if(!text) return;
drawTextM2(2, 216, text);
drawTextM2(42, 216, text);
}
static void drawTextNoticeFit0(const char *text)
@ -250,12 +250,14 @@ static void fillLocalPal(void)
memcpy32(localPal+0xc0, localPal+0x40, 0x40);
localPal[0xe0] = 0x00000000; // reserved pixels for OSD
localPal[0xf0] = 0x00ee0000;
} else if (rendstatus & 0x20) { // mid-frame palette changes
}
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);
} else {
vidConvCpyRGB32(localPal, Pico.cram, 0x40);
memcpy32(localPal+0x80, localPal, 0x40); // for sprite prio mess
}
}
@ -266,8 +268,6 @@ static void vidBlit_90(int full)
unsigned char *ps = PicoDraw2FB+328*8;
unsigned long *pd = (unsigned long *) screenbuff;
if (Pico.m.dirtyPal) fillLocalPal();
if(Pico.video.reg[12]&1)
vidConvCpy_90(pd, ps, localPal, 320/8);
else {
@ -284,8 +284,6 @@ static void vidBlit_270(int full)
unsigned char *ps = PicoDraw2FB+328*8;
unsigned long *pd = (unsigned long *) screenbuff;
if (Pico.m.dirtyPal) fillLocalPal();
if(Pico.video.reg[12]&1)
vidConvCpy_270(pd, ps, localPal, 320/8);
else {
@ -303,8 +301,6 @@ static void vidBlitCenter_0(int full)
unsigned char *ps = PicoDraw2FB+328*8+8;
unsigned long *pd = (unsigned long *) screenbuff;
if (Pico.m.dirtyPal) fillLocalPal();
if(Pico.video.reg[12]&1) ps += 32;
vidConvCpy_center_0(pd, ps, localPal);
if(full) vidClear(pd + 224*256, 96);
@ -316,8 +312,6 @@ static void vidBlitCenter_180(int full)
unsigned char *ps = PicoDraw2FB+328*8+8;
unsigned long *pd = (unsigned long *) screenbuff;
if (Pico.m.dirtyPal) fillLocalPal();
if(Pico.video.reg[12]&1) ps += 32;
vidConvCpy_center_180(pd, ps, localPal);
if(full) vidClear(pd + 224*256, 96);
@ -326,8 +320,6 @@ static void vidBlitCenter_180(int full)
static void vidBlitFit_0(int full)
{
if (Pico.m.dirtyPal) fillLocalPal();
if(Pico.video.reg[12]&1)
vidConvCpy_center2_40c_0(screenbuff, PicoDraw2FB+328*8, localPal, 168);
else vidConvCpy_center2_32c_0(screenbuff, PicoDraw2FB+328*8, localPal, 168);
@ -337,8 +329,6 @@ static void vidBlitFit_0(int full)
static void vidBlitFit_180(int full)
{
if (Pico.m.dirtyPal) fillLocalPal();
if(Pico.video.reg[12]&1)
vidConvCpy_center2_40c_180(screenbuff, PicoDraw2FB+328*8, localPal, 168);
else vidConvCpy_center2_32c_180(screenbuff, PicoDraw2FB+328*8-64, localPal, 168);
@ -348,8 +338,6 @@ static void vidBlitFit_180(int full)
static void vidBlitFit2_0(int full)
{
if (Pico.m.dirtyPal) fillLocalPal();
if(Pico.video.reg[12]&1)
vidConvCpy_center2_40c_0(screenbuff, PicoDraw2FB+328*8, localPal, 224);
else vidConvCpy_center2_32c_0(screenbuff, PicoDraw2FB+328*8, localPal, 224);
@ -359,8 +347,6 @@ static void vidBlitFit2_0(int full)
static void vidBlitFit2_180(int full)
{
if (Pico.m.dirtyPal) fillLocalPal();
if(Pico.video.reg[12]&1)
vidConvCpy_center2_40c_180(screenbuff, PicoDraw2FB+328*8, localPal, 224);
else vidConvCpy_center2_32c_180(screenbuff, PicoDraw2FB+328*8-64, localPal, 224);
@ -453,6 +439,7 @@ int vidInit(void *vidmem, int reinit)
vidBlit = vidBlit_270;
}
fillLocalPal();
vidBlit(1);
PicoOpt |= 0x100;
Pico.m.dirtyPal = 1;
@ -475,6 +462,7 @@ void vidDrawFrame(char *noticeStr, char *fpsStr, int num)
drawTextFps(fpsStr);
drawTextNotice(noticeStr);
if (Pico.m.dirtyPal) fillLocalPal();
vidBlit(!num); // copy full frame once a second
}

View file

@ -19,7 +19,7 @@
#define CAN_HANDLE_240_LINES 0 // for now
// logging emu events
#define EL_LOGMASK (EL_STATUS|EL_IDLE) // (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO|EL_INTS|EL_CDPOLL) // xffff
#define EL_LOGMASK (EL_STATUS) // |EL_SVP|EL_ANOMALY)
//extern void dprintf(char *format, ...);
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)

View file

@ -35,10 +35,9 @@ ELF2E32 = elf2e32
BMCONV = bmconv
EPOCRC = EPOCROOT=$(EPOCROOT) epocrc
PATH := $(EPOCROOT)/bin:$(GCCPATH)/bin:$(GCCPATH)/$(GCCPREF)/bin:$(PATH)
PATH := $(EPOCROOT)/bin:$(GCCPATH)/bin:$(PATH)
# TODO: do we really need -mapcs?
# -march=armv5t
# -march=armv5t ?
CFLAGS += -Wall -pipe -nostdinc -msoft-float
CFLAGS += -DNDEBUG -D_UNICODE -D__GCCE__ -D__SYMBIAN32__ -D__EPOC32__ -D__MARM__
CFLAGS += -D__EABI__ -D__MARM_ARMV5__ -D__EXE__ -D__SUPPORT_CPP_EXCEPTIONS__ -D__MARM_ARMV5__