I'm trying to load up all of $3F00-$3F1F, and have those 20 bytes of my palettes stored into ram. I'm able to do it, but, I get a very quick vram glitch. Idk if its cause I'm loading 20 bytes, or if I'm not doing this in the proper way? Ill show the asm I have going on.
Code:
; what I do, is set X as 00, and create the address '3F00' to store at ram $50-$51
LDX #$00
LDA #$3F
STA $50
LDA #$00
STA $51
LDA #$20
STA $52
;I then load $50-$51 for palette address loading, and alter the ram address $51, so I can load through all of $3F00-$3F1Fppu, and store it through ram address $53-$72
LDA $50
STA $2006
LDA $51
STA $2006
LDA $2007
STA $53,x
INX
LDA $51
CMP #$20
BEQ (to LDA #$FF, after my next description)
INC $51
BNE (to LDA $50, up above)
;the INC $E1, is for my asm address pointer table, to make it so when the cpu finishes it's cycle, it will no longer read the asm I just pasted here, I have it looking at just an RTS for now.
LDA #$FF
STA $73
INC $E1
RTS
LDX #$00
LDA #$3F
STA $50
LDA #$00
STA $51
LDA #$20
STA $52
;I then load $50-$51 for palette address loading, and alter the ram address $51, so I can load through all of $3F00-$3F1Fppu, and store it through ram address $53-$72
LDA $50
STA $2006
LDA $51
STA $2006
LDA $2007
STA $53,x
INX
LDA $51
CMP #$20
BEQ (to LDA #$FF, after my next description)
INC $51
BNE (to LDA $50, up above)
;the INC $E1, is for my asm address pointer table, to make it so when the cpu finishes it's cycle, it will no longer read the asm I just pasted here, I have it looking at just an RTS for now.
LDA #$FF
STA $73
INC $E1
RTS