hi,
I'm a beginner on Nes and using cc65.
I can display sprites, background, move sprites, palettes, attributes ... and even change bank for graphics / chr.
I read the articles on nesdev wiki but I have a worry when I want to display sprites in 8x16.
My code works in 8x8 and with metatiles.
I change the size of the sprites by changing the PPUCTRL to 0x2000 From 0x90 (1001 000) to 0xB0 (1011 000).
00X0 0000 : X = 0 -> 8x8
: X = 1 -> 8x16
I must do it wrong. Do I need to change something in my code.
I write the values of my sprites in OAM in 0x200 (Y,Tile Num, Attrib, X, ...);
As you can see in pictures, the NES only draw the top of my sprites (8x8)
I'm a beginner on Nes and using cc65.
I can display sprites, background, move sprites, palettes, attributes ... and even change bank for graphics / chr.
I read the articles on nesdev wiki but I have a worry when I want to display sprites in 8x16.
My code works in 8x8 and with metatiles.
I change the size of the sprites by changing the PPUCTRL to 0x2000 From 0x90 (1001 000) to 0xB0 (1011 000).
00X0 0000 : X = 0 -> 8x8
: X = 1 -> 8x16
I must do it wrong. Do I need to change something in my code.
I write the values of my sprites in OAM in 0x200 (Y,Tile Num, Attrib, X, ...);
As you can see in pictures, the NES only draw the top of my sprites (8x8)
Code:
SPRITES[0] = 16; // Y
SPRITES[1] = 0; // Tile num
SPRITES[2] = 0; // Atributes
SPRITES[3] = 24; // X
SPRITES[4] = 16;
SPRITES[5] = 0x10;
SPRITES[6] = 0;
SPRITES[7] = 48;
SPRITES[1] = 0; // Tile num
SPRITES[2] = 0; // Atributes
SPRITES[3] = 24; // X
SPRITES[4] = 16;
SPRITES[5] = 0x10;
SPRITES[6] = 0;
SPRITES[7] = 48;