So, VRAM isn't just a chunk and ram_tiles isn't just a chunk. They are both represented by a shared ram space?
I'm having problems understanding how the plane c code works. I'm seeing lots of configs and flags and bit masks.
So, tiles are 2bpp (4 colors total) and that is 16 bytes. The other 8 bytes of the 24 is only for sprites and acts as a bit mask? This changes the colors then?
Could you create a much more basic example for me to go off of? Something along the lines of a tutorial?
Code: Select all
/* Generate tile rows */
for (i = 0U; i < tcnt; i ++ ){
sp = (i * 8U);
for (j = 0U; j < 8U; j ++){
c = ((header_data[sp + 0U] & 3U) << 6) |
((header_data[sp + 1U] & 3U) << 4) |
((header_data[sp + 2U] & 3U) << 2) |
((header_data[sp + 3U] & 3U) );
printf(" 0x%02XU,", c);
c = ((header_data[sp + 4U] & 3U) << 6) |
((header_data[sp + 5U] & 3U) << 4) |
((header_data[sp + 6U] & 3U) << 2) |
((header_data[sp + 7U] & 3U) );
printf(" 0x%02XU,", c);
sp += width;
}
printf("\n");
}
printf("};\n");
I intend to learn this mode and the best way is to get something on the screen and understand how I did it.