X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=ppu098.c;h=fe0e5c2485b4690d5972dd3979f26254831d95db;hp=d0a0a49f5dcf5621a8923f8ffe16dbbbafda8560;hb=7a93887006449450b8fbffab3d54c3e271094c79;hpb=778873069e1caaf3afbe7e99b9cefa4f770959c0 diff --git a/ppu098.c b/ppu098.c index d0a0a49..fe0e5c2 100644 --- a/ppu098.c +++ b/ppu098.c @@ -86,7 +86,7 @@ static void makeppulut(void) } } -#ifdef ASM_6502 +#if defined(ASM_6502) && !defined(DEBUG_ASM_6502) static void asmcpu_update(int32 cycles) { // some code from x6502.c @@ -370,7 +370,7 @@ static void ResetRL(uint8 *target) Plinef=target; Pline=target; firsttile=0; - linestartts=timestamp*48+X.count; + linestartts=timestamp*48+X6502_GetCycleCount(); tofix=0; FCEUPPU_LineUpdate098(); tofix=1; @@ -489,9 +489,13 @@ static void FASTAPASS(1) RefreshLine098(int lastpixel) if(!ScreenON && !SpriteON) { uint32 tem; + int tiles; tem=Pal[0]|(Pal[0]<<8)|(Pal[0]<<16)|(Pal[0]<<24); tem|=0x40404040; - FCEU_dwmemset(Pline,tem,numtiles*8); + tiles=numtiles; + if(firsttile+tiles > 256/8) tiles=256/8-firsttile; + if(tiles > 0) + FCEU_dwmemset(Pline,tem,tiles*8); P+=numtiles*8; Pline=P; @@ -695,7 +699,9 @@ static void Fixit1(void) void MMC5_hb(int); /* Ugh ugh ugh. */ static void DoLine(void) { +#ifndef GP2X int x; +#endif uint8 *target=XBuf+scanline*320+32; if(MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);