I had a headcrash some time again and therefore had to rewrite most of my games' code. I want to make my score-counter to be made of background-tiles again and again I get a messed up screen.
These lines should show a char somewhere on the upper part on the screen, just for testing. But it somehow changes the scrolling values or does nothing, depending on the values I write to $2006.
I read through some technical documentation and my older posts on the nesdev boards and could not find anything wrong with the code. As said, the screen is turned off while writing to it and the loops for loading the title/game backgrounds work.
Code:
;load the titlescreen background
;turn screen on
;wait for start-key to be pressed
lda #0
sta $2001
;load in-game-background
;until here everything works, screen is still turned off
lda #$20
sta $2006
lda #$6B
sta $2006
lda #$2C
sta $2007
;turn screen on again
;turn screen on
;wait for start-key to be pressed
lda #0
sta $2001
;load in-game-background
;until here everything works, screen is still turned off
lda #$20
sta $2006
lda #$6B
sta $2006
lda #$2C
sta $2007
;turn screen on again
These lines should show a char somewhere on the upper part on the screen, just for testing. But it somehow changes the scrolling values or does nothing, depending on the values I write to $2006.
I read through some technical documentation and my older posts on the nesdev boards and could not find anything wrong with the code. As said, the screen is turned off while writing to it and the loops for loading the title/game backgrounds work.