Move area palette change after GTERender to avoid flicker of new color on old pixels

This commit is contained in:
Lucas Scharenbroich 2023-06-16 15:40:49 -05:00
parent 24cd424d7c
commit ae2cb8f71d

View File

@ -347,16 +347,6 @@ RenderFrame
lsr
sta ROMScreenEdge
; Check the AreaType and see if the palette needs to be changed
ldal ROMBase+$074E
and #$00FF
cmp LastAreaType
beq :no_area_change
sta LastAreaType
jsr SetAreaType
:no_area_change
; Calculate how many blocks have been scrolled into view
lda CurrScrollEdge
@ -396,6 +386,17 @@ RenderFrame
pea $FFFF ; NES mode
_GTERender
; Check the AreaType and see if the palette needs to be changed. We do this after the screen is blitted
; so the palette does not get changed too eary while old pixels are still on the screen.
ldal ROMBase+$074E
and #$00FF
cmp LastAreaType
beq :no_area_change
sta LastAreaType
jsr SetAreaType
:no_area_change
rts
SetAreaType