arrangement of pattern tables and name tables for background

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

arrangement of pattern tables and name tables for background

Post by GradualGames »

It seems to me that for any one background, there must be hundreds of ways to represent it in memory since you could have the same patterns in any order so long as the name table points to the correct ones to form the final picture.

So my question is---are there good and bad ways to arrange the pattern table and name table, or does any arbitrary order produce the same performance from the PPU?

Regards,
-Zom
NES n00b
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

It absolutly does not matter. The PPU renders all tiles at the same speed, so you can arrange them any way you want.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Using consecutive tile numbers may help if you want to use increment instructions instead of lookup tables.

Also, having a text font in ASCII order makes conversion to and from ascii easier. Doesn't have to match the character numbers, just need to add or subtract to get ascii.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

If you're using a board with a relatively powerful mapper chip (i.e. not discrete or MMC1) and CHR ROM, you can switch banks of 64 or 128 tiles at a time, so you'll need to arrange things in CHR ROM so that you don't need tiles from a lot of different banks at once.
Post Reply