Got an indirect addressing question I'm wondering if someone could help me with. I'm used to doing indirect addressing by doing something like
lda #<(Player0Gfx) sta Player0Ptr lda #>(Player0Gfx) sta Player0Ptr+1
then that's the address for my graphics pointer. Uses two bytes of RAM. But currently, I'm working on something that has 14 graphics pointers using 28 bytes of RAM, 14 of which are the same number because its all on the same page. Looking over lda in the 6502 guide I notice this syntax:
Indirect,X LDA ($44,X) $A1 2 6 Indirect,Y LDA ($44),Y $B1 2 5+
It looks to me like y is an indexed lda. But the x example looks like x might be representing the page. Is that what its doing? Could I just skip the Player0Ptr+1. Then when loading graphics have something like:
ldx #$FB ;The page all my graphics happen to be on. lda (Player0Ptr,x) ; which is #<(Player0Gfx) sta GRP0
Edited by BNE Jeff, Fri May 17, 2019 2:55 PM.