Changing nametable layout terminology on the wiki

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Fiskbit
Posts: 891
Joined: Sat Nov 18, 2017 9:15 pm

Changing nametable layout terminology on the wiki

Post by Fiskbit »

I'm considering changing the primary term on the wiki for nametable layouts, currently called "mirroring". Mirroring refers to how screens are duplicated and thus is opposite of what people usually care about when they choose a nametable layout, which is the direction of scroll. I've seen this cause significant confusion with game, emulator, and hardware developers, who often get this backward and then have to debug the problem. Hardware is particularly bad because PCBs use H and V to refer to unique screens, not duplicate screens, so they're opposite of the mirroring terminology. I think changing this to a term referring to the layout of unique screens would improve clarity on the wiki and remove a common 'gotcha'. Such a change could also be made to other resources such as nescartdb.

As far as alternative terminology, I think "arrangement" is the best available and already sees some use. "Scroll" is another option and I've heard it was the official terminology at least in mapper documentation, but because many games use a nametable layout that is perpendicular to the direction of scroll, it seems misleading. Arrangement also works better as a descriptor for 4-screen VRAM than mirroring or scroll, as no mirroring is involved and such a layout says nothing about how the game will scroll.

Mirroring would still get a mention, of course, but the mirroring page and mapper documentation would be changed to use arrangement. I know nobody really likes changes in terminology and you can still call it whatever you want, but does anyone have any strong objections to this change on the wiki?
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Changing nametable layout terminology on the wiki

Post by tokumaru »

We may change the wiki, but there's not much we can do about the biggest conflict of all, which is original Nintendo boards using one terminology while the widespread iNES header format uses another, and we cannot change either of them, so confusion will continue to exist no matter what we do.

I guess that the biggest argument against changing the wiki now is that there will always be old documentation and software floating around, so we'd be deliberately creating a new conflict with those, possibly making the situation worse.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Changing nametable layout terminology on the wiki

Post by Dwedit »

There is a way to change the terminology, but you'd have to say something like "Horizontal arrangement ('Vertical Mirroring')" every time you mention them.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Changing nametable layout terminology on the wiki

Post by gauauu »

I agree with Dwedit and Tokumaru ... the confusion will still be out there and trying to erase the "mirroring" term will just add more historical confusion. I don't mind the terminology change, but I think you'd need to be careful to still include text that indicates that this is the opposite of mirroring. I don't think you necessarily need to add Dwedit's parenthetical ("vertical mirroring") on EVERY mention of arrangement, but I do think you'd want to probably in the first instance per page.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Changing nametable layout terminology on the wiki

Post by rainwarrior »

The mirroring page currently uses both prominently, which I think is good.

What is the proposed change, exactly?

I do very much prefer to say "horizontal arrangement" (or just "horizontal nametables") when referring to nametable layout, but as far as reference material goes I don't see any good coming from suppression of the word "mirroring", both since it's ubiquitous in emulators/documents, and especially since that word applies generically to other kinds of memory mirroring.

Like, if not referring to a specific arrangement, I'd still probably call the nametable memory situation "mirroring", and it seems the best word for that. It's only "vertical mirroring" or "horizontal mirroring" which seems to promote confusion.

So, I'm all for saying "horizontal arrangement" first, but we're already doing that.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Changing nametable layout terminology on the wiki

Post by Pokun »

I strongly prefer horizontal/vertical nametable arrangement and Nintendo's terminology (H-/V-Scroll) over mirroring, and I don't see any problems in using this terminology on new documentation provided that the old terminology and its differences are also mentioned in an introductory part of any document that discusses this deeply.
I don't find Nintendo's terminology confusing at all since it's talking about how the nametables are wired. H-Scroll simply means that the second nametable must be scrolled to horizontally and vice versa. This is a hardware matter and there is no implication on what type of scrolling the game is actually using which is potentially a very complicated software matter.

There is no changing old documents and we don't need to. People can use the old or new terminology however they like when discussing this topic, newbies must learn both terms, the damage was already done when iNES and its documentation introduced the old terminology and became the norm for Famicom/NES emulator standards and that's too late to change.

This is far from the only thing where the terminology is all over the place, but it is one extra confusing one because the term mirroring is used in a very different manner from other types of address mirroring, and it's hardly the address mirroring that is the interesting part.
User avatar
Ben Boldt
Posts: 1149
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: Changing nametable layout terminology on the wiki

Post by Ben Boldt »

“Mirroring” might imply that the image would be flipped on the other nametable, like a reflection in a mirror. That might actually be pretty cool; I wonder if that is useful somehow? Pattern data would need to be reversed for “horizontal mirroring”. :mrgreen:
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Changing nametable layout terminology on the wiki

Post by Drag »

Ben Boldt wrote: Tue Jul 05, 2022 6:13 pm “Mirroring” might imply that the image would be flipped on the other nametable, like a reflection in a mirror. That might actually be pretty cool; I wonder if that is useful somehow? Pattern data would need to be reversed for “horizontal mirroring”. :mrgreen:
The Atari 2600 does this. There's only enough register space to hold 20 of the 40 "playfield" pixels for a scanline, so you have the option of duplicating left onto right, or having the right side be a horizontally-flipped version of the left side. Your third option is counting cycles and then updating the playfield register just before the right half of the scanline is drawn, if you want 40 unique pixels.

I'm OK with mirroring just meaning a redundant instance of the same physical byte of memory though. :P

When you look through various consoles and architectures, you'll find that the terminology for describing common things tends to vary. If you're working with the NES (and the SNES I presume), you just have to be familiar that "mirroring" means two or more addresses point to the same physical byte of memory. Similarly, once you see "horizontal" or "vertical" mirroring, it means the nametables, and horizontal mirroring creates vertical scrolling, and vice versa. This is just what our terminology is, and it's going to be much harder to change it given how old it is at this point. :P
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Changing nametable layout terminology on the wiki

Post by Dwedit »

Speaking of confusing terminology, where did the word "Nametable" come from in the first place? Did any NES developers actually use that term before Nesticle came out?

The NES test cartridge refers to it as "PPURAM".
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Changing nametable layout terminology on the wiki

Post by lidnariq »

"name" is all over the TMS9918 datasheet and Sega's documentation about the SMS and Megadrive.

The leaked PPU datasheet refers to it indirectly: the tile number for sprites is a "name"

The SNES documentation still barely hints at it, since the four layers' register names are BGnnNBA
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Changing nametable layout terminology on the wiki

Post by rainwarrior »

lidnariq wrote: Tue Jul 05, 2022 7:37 pmThe SNES documentation still barely hints at it, since the four layers' register names are BGnnNBA
It does say "NAME BASE ADDRESS" in the register description.

Though the thing we call a nametable on SNES is actually addressed with a "SCREEN BASE ADDRESS" (in BGnSC). The name base is the associated CHR data page.

OBJSEL also has a "NAME BASE ADDRESS" and "NAME SELECT" to assign CHR pages to the sprites.

So, it seems to suggest that CHR data is addressed "by name", sort of? The nametable concept just seems to be called a "screen" everywhere in the SNES book.


In another place, I've also seen a "PATTERN NAME TABLE" described in MSX documentation: MSX Red Book - Chapter 4, MSX2-Technical-Handbook Chapter 4

On the MSX at least, the name table does seem to be like the NES concept where it's a grid of stuff that maps directly to a location onscreen, though some of the modes are bitmapped rather than tiled.
Fiskbit
Posts: 891
Joined: Sat Nov 18, 2017 9:15 pm

Re: Changing nametable layout terminology on the wiki

Post by Fiskbit »

I understand that we're stuck with nametable mirroring indefinitely, but I don't think that means we have to continue to use it as the primary term, given that less-confusing alternatives exist and are used. The proposed change is to swap out nametable mirroring for nametable arrangement in most places across the wiki: mapper registers, mapper info boxes, header definitions. I'd probably break the mirroring page up into 'Memory mirroring' and 'Nametable arrangement' pages, which could both be linked to by the Mirroring page. Nametable mirroring as a term would still be defined on the Nametable arrangement page, and the iNES page would still mention the different terms (and NES 2.0 should probably do this, too). Changing this on nescartdb would be easy, and we may be able to do the same with other resources like the NES 2.0 database and Mesen, assuming people are actually onboard enough with the change. I don't expect mirroring to ever become so obscure that newcomers don't see it, but I do think it would be a benefit to the community to move away from using it.

To be clear, I don't disagree that there is memory mirroring here in the nametables, and it's not exactly an inappropriate application of the term, but it's completely backward from how people use the nametables. I don't even think it's that big a deal that mirroring in the context of screens can suggest the image is flipped, like Ben mentions; I have seen people conclude this based on the term, but I don't expect that to really trip up developers who are far enough in to be worrying about mirroring. Rather, the big issue I see is people getting stuck debugging something that turns out to be inverted mirroring, which I believe is often due to the terminology. It's an unnecessary newb trap stemming from a poor word choice 30 years ago, and I'd argue it remains unintuitive for many people who fully understand it.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Changing nametable layout terminology on the wiki

Post by Pokun »

I have no objections. The on concern I have is if places that says H or V will now be flipped and some veterans looking up a cartridge board type or something may make mistakes because they don't know that the terminology have flipped, so that might better be considered whenever making edits so that it can be done in an obvious way.




Regarding nametables, the meaning of "name" as I understands it, is the same as "pattern code" or "CHR number/ID" for both BG characters/tiles and sprites. A background nametable is thus a table of character names.

Nintendo does use "name" quite a bit in the SNES docs. They do use "NAME" both for the CHR code in BG SC Data (low 10 bits) and for the sprite name entry in OAM (low 8 bits of the high word, low OAM table), this is found in the appendix at least. But yeah Nintendo is quite inconsistent with their terminology.


The MSX Red Book has taken "PATTERN NAME TABLE" directly from the TMS9918 datasheet (and Yamaha's "MSX-VIDEO" V9938 and V9958 continues using mostly the same terminology).
In the TMS9918 datasheet the various VRAM areas are (usually) called:

Code: Select all

Pattern Name Table (the background nametable)
Pattern Generator Table (the pixel pattern data for background characters)
Sprite Attribute Table ("OAM" in Nintendo terms)
Sprite Pattern Generator Table (the pixel pattern data for sprites)
Color Table (the palette)
Which is quite unsymmetrical and inconsistent, "pattern" is used both as the meaning of "character/tile" in the PNT and the meaning of "pixel pattern data" in the SPGT and both at the same time in the PGT.
The background is also frequently called the "pattern layer" again suggesting "character/tile" rather than pixel data, and the Pattern Name Table is sometimes just the Name Table.

It would be more symmetrical and logical if they where called something like this:

Code: Select all

Background Name Table (BNT)
Background Pattern Generator Table (BPGT)
Sprite Attribute Table (SAT)
Sprite Pattern Generator Table (SPGT)
Color Generator Table (CGT)
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Changing nametable layout terminology on the wiki

Post by Bregalad »

I don't mind the terminology being changed as long as the original terminology is still documented. The ideal would be to document where each set of terms originally came from and who used them.

But please, don't call horizontal arrangement "horizontal scrolling", because scrollig is already refering to something else, and this term only add more confusion.
Useless, lumbering half-wits don't scare us.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Changing nametable layout terminology on the wiki

Post by Pokun »

The Nintendo term is H-scroll/V-scroll and not really "scrolling" but I agree that it could be confusing if used out of context since horizontal scrolling is just a verb phrase for scrolling horizontally.
Post Reply