learnings - quinkennedy/bitbitJAM3 GitHub Wiki
- Each pixel is represented by 2 bits
- Each background tile is always 8x8 pixels
- 8 pixels * 8 pixels => 64 pixels
- 64 pixels * 2 bits-per-pixel => 128 bits
- 128 bits / 8 bits-per-byte => 16 bytes
- The Tile Data is arranged in two 4 kilobyte chunks: $8000-8FFF and $8800-97FF (0xFFF => 4096)
- 4096 bytes-per-chunk / 16 bytes-per-tile => 255 tiles-per-chunk
- The Background Tile Map can use 32x32 bytes => 1024 entries
- The GB Screen is 160x144 pixels
- 160 pixels wide / 8 pixels-per-sprite => 20 sprites wide
- 144 pixels tall / 8 pixels-per-sprite => 18 sprites tall
- 20x18 sprites => 360 sprites (still too many to fit in one chunk)
- The Background Tile Data always shares memory
- with Sprites (if starting at $8000)
- with Window Tiles (if starting at $8800)