Name Table Help

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
Posts: 2
Joined: Thu Nov 07, 2019 3:49 pm

Name Table Help

Post by Rhad » Thu Nov 07, 2019 4:04 pm

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
|||||| |||||+++- 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

User avatar
Posts: 4394
Joined: Fri Nov 19, 2004 7:35 pm

Re: Name Table Help

Post by Dwedit » Thu Nov 07, 2019 4:28 pm

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

How they relate to the pattern tables:
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.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

Posts: 2
Joined: Thu Nov 07, 2019 3:49 pm

Re: Name Table Help

Post by Rhad » Thu Nov 14, 2019 1:57 pm

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)

Post Reply