According to the Nerdy Nights tutorial, before the scrolling is set, the following has to be done:
Then you set the scrolling for the status bar:
Then comes the whole "wait for sprite 0" stuff.
And then the actual scrolling value:
My question: Does the PPU address register clearing have to be done before each change of the scrolling position (i.e. before setting the value to 0 for the status bar and before setting the value for the actual action scene) or is this done only once per frame?
So, is it
1. Clear PPU address register
2. Set scrolling to 0
3. Wait for sprite 0
4. Clear PPU address register
5. Set scrolling to value
?
Or is it
1. Clear PPU address register
2. Set scrolling to 0
3. Wait for sprite 0
4. Set scrolling to value
?
Code:
; The PPU address register is cleared.
LDA #$00
STA $2006
STA $2006
LDA #$00
STA $2006
STA $2006
Then you set the scrolling for the status bar:
Code:
LDA #$00
STA $2005
STA $2005
STA $2005
STA $2005
Then comes the whole "wait for sprite 0" stuff.
And then the actual scrolling value:
Code:
LDA scrollingPosition
STA $2005 ; Horizontal
LDA #$00
STA $2005 ; Vertical
STA $2005 ; Horizontal
LDA #$00
STA $2005 ; Vertical
My question: Does the PPU address register clearing have to be done before each change of the scrolling position (i.e. before setting the value to 0 for the status bar and before setting the value for the actual action scene) or is this done only once per frame?
So, is it
1. Clear PPU address register
2. Set scrolling to 0
3. Wait for sprite 0
4. Clear PPU address register
5. Set scrolling to value
?
Or is it
1. Clear PPU address register
2. Set scrolling to 0
3. Wait for sprite 0
4. Set scrolling to value
?