X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=fce.c;h=35d720987835572d053e4edf1ee158abf4a9a69a;hb=b8da43fbb954ca62228ecae24761b3ab6793d74e;hp=d3a0f6104d57a58c3b07c5478da7dfb0685d290b;hpb=6587f34612d28a36fede21bd6293c4e0e383b343;p=fceu.git diff --git a/fce.c b/fce.c index d3a0f61..35d7209 100644 --- a/fce.c +++ b/fce.c @@ -203,6 +203,9 @@ void FlushGenieRW(void) ARead[x+0x8000]=AReadG[x]; BWrite[x+0x8000]=BWriteG[x]; } +#ifdef ASM_6502 + GenieSetPages(1); +#endif free(AReadG); free(BWriteG); AReadG=0; @@ -586,7 +589,7 @@ static void Loop6502(void) #endif if(ScreenON) { - if(scanline>=FSettings.FirstSLine && scanline<=Settings.LastSLine) + if(scanline>=FSettings.FirstSLine && scanline<=FSettings.LastSLine) BGRender(target); else { @@ -1187,7 +1190,7 @@ void FCEU_ResetVidSys(void) FSettings.FirstSLine=FSettings.UsrFirstSLine[0]; FSettings.LastSLine=FSettings.UsrLastSLine[0]; } - printf("PAL = %i\n", PAL); + printf("ResetVidSys: PAL = %i\n", PAL); SetSoundVariables(); } @@ -1425,6 +1428,18 @@ void ResetNES(void) X6502_Reset(); } +static void FCEU_MemoryRand(uint8 *ptr, uint32 size) +{ + int x=0; + while(size) + { + *ptr=(x&4)?0xFF:0x00; + x++; + size--; + ptr++; + } +} + void PowerNES(void) { if(!GameLoaded) return; @@ -1434,12 +1449,20 @@ void PowerNES(void) GeniePower(); +#ifndef DEBUG_ASM_6502 + FCEU_MemoryRand(RAM,0x800); +#else memset(RAM,0x00,0x800); +#endif ResetMapping(); GameInterface(GI_POWER); PowerSound(); PowerPPU(); timestampbase=0; +#ifdef ASM_6502 + if (geniestage) + GenieSetPages(0); +#endif X6502_Power(); }