How do the NAME table, ATTRIBUTE table, and PATTERN table all fit together?
The NES is not like your average Windows PC which has one bitmap screen with all possible colour values being stored directly in each pixel. The PPU memory on the NES is limited, so the NES has to construct a screen display by combining several different, optimized memory areas. First, the pattern table is a small window into the CHR ROM of the NES. It stores 256 different graphics tiles [each being 8×8 pixels] for the background, and 256 more for sprites. When the name table wants to display a certain graphic image, it doesn’t literally draw the image in its own memory. Instead, the name table has to store a byte which is the same number as the desired tile in the pattern table. The NES’ background palette has 16 entries in it, with some mirroring going on. But a tile in the name table can’t access all 16 colours at once; it can only be made up of 4 colours from the total palette of 16. This is just a limitation imposed by Nintendo. So, the attribute table comes in and describes which