When I write this:
this shouldn't do anything useful, right? It reads the value and writes it back.
So, how come that if I do this and then I do some background graphics work, that my new tiles are drawn vertically while they would be drawn horizontally without these two calls?
The acual code:
Code:
LDA $2000
STA $2000
STA $2000
this shouldn't do anything useful, right? It reads the value and writes it back.
So, how come that if I do this and then I do some background graphics work, that my new tiles are drawn vertically while they would be drawn horizontally without these two calls?
The acual code:
Code:
LDA $2000
STA $2000
; --> Should actually be useless, but influences the following output.
LDA $2002
LDA $20
STA $2006
LDA $00
STA $2006
LDX #$00
@loop:
LDA TilesForUpdate, X
STA $2007
INX
CPX #TILES_FOR_UPDATE_COUNT
BNE @loop
STA $2000
; --> Should actually be useless, but influences the following output.
LDA $2002
LDA $20
STA $2006
LDA $00
STA $2006
LDX #$00
@loop:
LDA TilesForUpdate, X
STA $2007
INX
CPX #TILES_FOR_UPDATE_COUNT
BNE @loop