diff --git a/zsnes/src/cpu/execute.asm b/zsnes/src/cpu/execute.asm index affa6d62..0968394e 100644 --- a/zsnes/src/cpu/execute.asm +++ b/zsnes/src/cpu/execute.asm @@ -104,7 +104,7 @@ EXTSYM JoyRead,ChatType2,chatstrR2,chatstrR3,chatstrR4,chatstrR5 EXTSYM chatRTL2,chatRTL3,chatRTL4,chatRTL5 EXTSYM NetLoadState EXTSYM ProcessMovies -EXTSYM ioportval +EXTSYM ioportval,ppustatus EXTSYM C4VBlank EXTSYM dsp1teststuff EXTSYM ReturnFromSPCStall,SPCStallSetting,cycpb268,cycpb358,HIRQSkip,scanlines @@ -4563,6 +4563,7 @@ NEWSYM execsingle .overy shr dh,1 mov word[curypos],0 + xor byte[ppustatus],80h mov byte[NMIEnab],01h add dword[opcd],170*262 call cachevideo diff --git a/zsnes/src/cpu/regs.inc b/zsnes/src/cpu/regs.inc index 27867903..6e962fcf 100644 --- a/zsnes/src/cpu/regs.inc +++ b/zsnes/src/cpu/regs.inc @@ -409,6 +409,7 @@ NEWSYM nosprincr, db 0 NEWSYM poamaddrs, dw 0 NEWSYM ioportval, db 255 NEWSYM iohvlatch, db 0 +NEWSYM ppustatus, db 0 NEWSYM tempdat, times 478 db 0 ; expandable area @@ -734,7 +735,8 @@ reg213Er: ; PPU Status Flag & Version number (NTSC/PAL/EXTRN Latch flag) reg213Fr: ; mov byte[debstop3],1 - mov al,[romispal] + mov al,[ppustatus] + or al,[romispal] shl al,4 or al,[cfield] mov byte[latchxr],0