This is slightly different than last topic, so I figured I'd start a new thread, even though it is related.
Essentially, I'd like to update attributes on 'metatile' level (2x2 tiles, or 1 quadrant of the attribute byte).
Thanks to the help here, I have been able to find the attribute block based on the tile in question. I am easily able to put in a hard value (say, #%00 01 10 11) to demo that this is working, and as expected.
What I'd like to be able to do is read the attribute byte, then ora in a value based on some math to find the quadrant of attribute byte.
Essentially, I've tried derivations of:
...where if #%00000000 was in $2007 originally, it should now read #%00000011.
But I know that both the read and the write are advancing the PPU address, correct?
What would be the best way to do this?
Thanks!
Essentially, I'd like to update attributes on 'metatile' level (2x2 tiles, or 1 quadrant of the attribute byte).
Thanks to the help here, I have been able to find the attribute block based on the tile in question. I am easily able to put in a hard value (say, #%00 01 10 11) to demo that this is working, and as expected.
What I'd like to be able to do is read the attribute byte, then ora in a value based on some math to find the quadrant of attribute byte.
Essentially, I've tried derivations of:
Code:
LDA #%00000011
STA temp
LDA $2007
ORA temp
STA $2007
STA temp
LDA $2007
ORA temp
STA $2007
...where if #%00000000 was in $2007 originally, it should now read #%00000011.
But I know that both the read and the write are advancing the PPU address, correct?
What would be the best way to do this?
Thanks!