I apologize in advance this is a lot of reading.
I am reading MarioFanGamer's sprite coding tutorial and simplifying it for my own comprehension. I have run into a confusing part of the Graphics routine coding which talks about OAM tile size and $0460,y
"Y: OAM tile size. Usually, you don't need to store to $0460,y because the tile size routine already does it for you if desired. In Y for this routine, 0x00 means only 8x8 tiles and 0x02 means only 16x16 tiles. If you want to set the tile size manually, just load any negative value like 0xFF into Y and obviously, set the values (either 0x00 or 0x02) to $0460,y. Keep in mind that the tile size index is four times than the OAM index so you have to LSR the index twice."
My question comes in as this, if i were wanting to make a (24x24 or 48x48) sprite how would this portion of code be written?
I was thinking a 24x24 sprite would be LDY #$04 and a 48x48 would be LDY #$08 but im unsure as it only refers to 00 being 8x8 and 02 being 16x16 nothing higher is mentioned.
and if i were to manually set the tile size using $0460,y how would I write that into the routine? its written in a way that sounds like i would write it like this.
I am reading MarioFanGamer's sprite coding tutorial and simplifying it for my own comprehension. I have run into a confusing part of the Graphics routine coding which talks about OAM tile size and $0460,y
"Y: OAM tile size. Usually, you don't need to store to $0460,y because the tile size routine already does it for you if desired. In Y for this routine, 0x00 means only 8x8 tiles and 0x02 means only 16x16 tiles. If you want to set the tile size manually, just load any negative value like 0xFF into Y and obviously, set the values (either 0x00 or 0x02) to $0460,y. Keep in mind that the tile size index is four times than the OAM index so you have to LSR the index twice."
My question comes in as this, if i were wanting to make a (24x24 or 48x48) sprite how would this portion of code be written?
Code
LDA #$00 ; Tile to draw - 1 LDY #$02 ; 16x16 sprite JSL $01B7B3
I was thinking a 24x24 sprite would be LDY #$04 and a 48x48 would be LDY #$08 but im unsure as it only refers to 00 being 8x8 and 02 being 16x16 nothing higher is mentioned.
and if i were to manually set the tile size using $0460,y how would I write that into the routine? its written in a way that sounds like i would write it like this.
Code
LDA #$00 ; Tile to draw - 1 LDY #$FF ; 16x16 sprite STY $0460,y JSL $01B7B3