diff --git a/src/ppu.c b/src/ppu.c index 908f5a6..8b7e000 100644 --- a/src/ppu.c +++ b/src/ppu.c @@ -662,8 +662,15 @@ static void Fixit1(void) { void MMC5_hb(int); //Ugh ugh ugh. static void DoLine(void) { + if (scanline >= 240 && scanline != totalscanlines) { + X6502_Run(256 + 69); + scanline++; + X6502_Run(16); + return; + } + int x; - uint8 *target = XBuf + (scanline << 8); + uint8 *target = XBuf + ((scanline < 240 ? scanline : 240) << 8); if (MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline); @@ -1231,11 +1238,11 @@ int FCEUPPU_Loop(int skip) { overclocked = 1; } } - /* For Debugging - * FCEU_printf("Overclock State:%d DMC+7bit:%d Skip_7bit_OC:%d\n", - * overclock_state,DMC_7bit,skip_7bit_overclocking); - * FCEU_printf("SL:%d N_SL:%d, T_SL:%d Overclocked(for FCEU_SoundCPUHook):%d\n\n", - * scanline,normal_scanlines,totalscanlines,overclocked); + /* For Debugging */ + /* FCEU_printf("Overclock State:%d DMC+7bit:%d Skip_7bit_OC:%d\n", + overclock_state,DMC_7bit,skip_7bit_overclocking); + FCEU_printf("SL:%d N_SL:%d, T_SL:%d Overclocked(for FCEU_SoundCPUHook):%d\n\n", + scanline,normal_scanlines,totalscanlines,overclocked); */ DMC_7bit = 0; if (MMC5Hack && (ScreenON || SpriteON)) MMC5_hb(scanline);