Page 1 of 1

Name Table Help

Posted: Thu Nov 07, 2019 4:04 pm
by Rhad
All the information I can find on the name table is frustratingly vague, basically just saying that each byte points to the pattern table without specifying how. Based on this diagram from the wiki, which describes interpretation of pattern table addresses, it looks like the byte in the name table is probably the RRRR CCCC and the H bit is in the PPU control register. Can anyone confirm that this is the case?

Code: Select all

DCBA98 76543210
---------------
0HRRRR CCCCPTTT
|||||| |||||+++- T: Fine Y offset, the row number within a tile
|||||| ||||+---- P: Bit plane (0: "lower"; 1: "upper")
|||||| ++++----- C: Tile column
||++++---------- R: Tile row
|+-------------- H: Half of sprite table (0: "left"; 1: "right")
+--------------- 0: Pattern table is at $0000-$1FFF

Re: Name Table Help

Posted: Thu Nov 07, 2019 4:28 pm
by Dwedit
The bytes in the nametables:
32x32 nametable, "32" rows. (last two rows are actually the attribute tables)
5 bits for Column, 5 bits for Row, 2 bits for nametable number, 1 bit to indicate that it's not the pattern tables
001xNNYYYYYXXXXX


How they relate to the pattern tables:
000CTTTTTTTT0000
T = tile number 8 bits
C = PPU control, whether to use the left or right pattern table
That gives you the address of the first byte of the tile.

Re: Name Table Help

Posted: Thu Nov 14, 2019 1:57 pm
by Rhad
Thanks for the help, that's more or less what I thought.
(Sorry for the delayed response, had to go into hermit mode for a big round of midterms)