From d6d9ea6a28f919d81a964a56b4073cca7ce93194 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 31 Oct 2011 04:58:59 +0000 Subject: [PATCH] fix newppu bug (allegedly a nondeterminism, but i cant tell how) which prevented metroid from booting. --- src/ppu.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ppu.cpp b/src/ppu.cpp index b0094088..8d075998 100644 --- a/src/ppu.cpp +++ b/src/ppu.cpp @@ -929,9 +929,7 @@ static DECLFW(B2005) static DECLFW(B2006) { - if(!newppu) - FCEUPPU_LineUpdate(); - + FCEUPPU_LineUpdate(); PPUGenLatch=V; if(!vtoggle) @@ -970,6 +968,7 @@ static DECLFW(B2007) uint32 tmp=RefreshAddr&0x3FFF; if(newppu) { + PPUGenLatch=V; RefreshAddr = ppur.get_2007access() & 0x3FFF; CALL_PPUWRITE(RefreshAddr,V); //printf("%04x ",RefreshAddr); @@ -1039,6 +1038,9 @@ static uint8 sprlinebuf[256+8]; void FCEUPPU_LineUpdate(void) { + if(newppu) + return; + #ifdef FCEUDEF_DEBUGGER if(!fceuindbg) #endif