Bregalad wrote:
Be sure that the screen *is* OFF when you're writing to the PPU via $2006; $2007.
How do you do that? Do you turn the screen off by writing #$00 to $2000 and $2001?
There's a section in my code labeled "background:" and following that are numerous .byte $00, $00, etc. statements that determine what the background looks like.
In one part of the code i want to change a certain tile of the background:
Code:
lda #$00
sta background+6968
sta background+6968
Then in my vblank i've added the code to store the background in the ppu:
Code:
update_background:
;load $2400 nametable
ldy #$00
ldx #$04
lda #<background
sta background_low
lda #>background
sta background_high
lda #$24
sta $2006
lda #$00
sta $2006
* lda (background_low), y
sta $2007
iny
bne -
inc background_high
dex
bne -
rts
;load $2400 nametable
ldy #$00
ldx #$04
lda #<background
sta background_low
lda #>background
sta background_high
lda #$24
sta $2006
lda #$00
sta $2006
* lda (background_low), y
sta $2007
iny
bne -
inc background_high
dex
bne -
rts
But, when i run it, the screen in nintendulator goes all insane. Is that because i haven't turned the screen off? Am i doing something else wrong? THANK YOU!