Hello,
I want to reserve a small chunk of RAM as a PPU buffer, so to test a small concept first I have:
So just storing values 6, 7, and 8 in memory locations $80 through $80 + 2.
I tested this using Indirect Indexing which works:
First question is, by writing to $80 I'm still in Zero Page correct? And am writing into NES RAM? If nothing else in my code explicitly touches $80 through $80 + 2, can anything else from the NES alter those values in any way?
Last question is, when I try to make a pointer to $80 my Indirect Indexing no longer seems to work. So instead of writing $80, I wanted to write something descriptive.
I tried setting the pointer like so:
But no luck. My comparisons don't match up like when I use the memory address directly.
I want to reserve a small chunk of RAM as a PPU buffer, so to test a small concept first I have:
Code:
LDA #$06
STA $80
LDA #$07
STA $80 + 1
LDA #$08
STA $80 + 2
STA $80
LDA #$07
STA $80 + 1
LDA #$08
STA $80 + 2
So just storing values 6, 7, and 8 in memory locations $80 through $80 + 2.
I tested this using Indirect Indexing which works:
Code:
LDA ($80), y
; do stuff
; do stuff
First question is, by writing to $80 I'm still in Zero Page correct? And am writing into NES RAM? If nothing else in my code explicitly touches $80 through $80 + 2, can anything else from the NES alter those values in any way?
Last question is, when I try to make a pointer to $80 my Indirect Indexing no longer seems to work. So instead of writing $80, I wanted to write something descriptive.
I tried setting the pointer like so:
Code:
ppuBufferPtr .rs 1
.......
LDA $80
STA ppuBufferPtr
.......
LDA [ppuBufferPtr], y ; also tried LDA (ppuBufferPtr), y
.......
LDA $80
STA ppuBufferPtr
.......
LDA [ppuBufferPtr], y ; also tried LDA (ppuBufferPtr), y
But no luck. My comparisons don't match up like when I use the memory address directly.