From 28cc8f5aaeda56490643553468e84a197871e46a Mon Sep 17 00:00:00 2001 From: qeed Date: Fri, 18 Dec 2009 01:10:26 +0000 Subject: [PATCH] fix some sprite overflow stuff for new ppu --- src/ppu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ppu.cpp b/src/ppu.cpp index dcd15064..c53fd758 100644 --- a/src/ppu.cpp +++ b/src/ppu.cpp @@ -2338,9 +2338,10 @@ int FCEUX_PPU_Loop(int skip) { if(yp >= spr[0] && yp < spr[0]+spriteHeight) { //if we already have maxsprites, then this new one causes an overflow, //set the flag and bail out. - if(oamcount == maxsprites) { + if(oamcount >= 8 && PPUON) { PPU_status |= 0x20; - break; + if (maxsprites == 8) + break; } //just copy some bytes into the internal sprite buffer