VRC6 CHR Select and Mirroring

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
SusiKette
Posts: 147
Joined: Fri Mar 16, 2018 1:52 pm
Location: Finland

VRC6 CHR Select and Mirroring

Post by SusiKette »

Can someone explain these parts a bit? The wiki page of VRC6 is somewhat hard to understand. What I've understood, there are some modes that are not useful or very practical. I don't need to know details of these modes, but would like to know which ones are the useless ones and in which situations and configurations.
Avatar is pixel art of Noah Prime from Astral Chain
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: VRC6 CHR Select and Mirroring

Post by lidnariq »

Mode 0x20: Normal mode. Eight 1 KiB CHR ROM banks, your choice of 1/H/V nametable mirroring, nametables only usefully in RAM.
Mode 0x21: Free nametable mode. Four 2 KiB CHR ROM banks, your choice of arbitrary nametable layout, optionally nametables from ROM (mode 0x31).
Mode 0x32: Balanced mode. MMC3-style CHR ROM banks. Arbitrary ROM nametables arranged H/V.
Mode 0x33: Four nametable mode. MMC3-style CHR ROM banks; four unique nametables can be displayed from ROM.

Modes 0x22, 0x23, and 0x30 aren't particularly useful on existing PCBs.

last time NewRisingSun translated Konami's original documentation, which may or may not make things clearer. The other discussion there may also help.
User avatar
SusiKette
Posts: 147
Joined: Fri Mar 16, 2018 1:52 pm
Location: Finland

Re: VRC6 CHR Select and Mirroring

Post by SusiKette »

Few follow up questions:
What's the difference between nametable RAM/ROM?
What is the CIRAM that is mentioned in the wiki page?
Do you mean by 'arbitary nametable layout' that you can decide in which order they are? If so, is this what the 'nametable' table is for on the wiki page?
Does VRC6 have always four nametables available or are some modes similar to how the nametables would work on NES itself?
Avatar is pixel art of Noah Prime from Astral Chain
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: VRC6 CHR Select and Mirroring

Post by rainwarrior »

CIRAM is the internal NES Nametable RAM. (2k = 2 pages.)
ROM nametables are pages from the cartrige's CHR-ROM.

The NES nametable space has 4 pages, but the CIRAM only had 2, which is why 2 pages are normally wired as "mirrors" duplicating the 2.

"Arbitrary" nametable selection means you can put different stuff in all 4 pages, no mirroring required (or any mirroring you want).
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: VRC6 CHR Select and Mirroring

Post by lidnariq »

Does VRC6 have always four nametables available or are some modes similar to how the nametables would work on NES itself?
The VRC6 can only have either ROM nametables or RAM nametables simultaneously: it can't mix and match RAM and ROM nametables. Only Namco's 163 can do that.
User avatar
SusiKette
Posts: 147
Joined: Fri Mar 16, 2018 1:52 pm
Location: Finland

Re: VRC6 CHR Select and Mirroring

Post by SusiKette »

rainwarrior wrote: ROM nametables are pages from the cartrige's CHR-ROM.
What benefits does this have? If one nametable is 1k doesn't that eat up space quiet fast?
Avatar is pixel art of Noah Prime from Astral Chain
User avatar
Gilbert
Posts: 564
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: VRC6 CHR Select and Mirroring

Post by Gilbert »

One obvious benefit is that you can bank switch nametables quickly (while using a lot of cart space), like with the CHR patterns.
As far as I remember, After Burner (II) bank-switches nametables for (relatively) quick changing the background to show different banking(pun) angles.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: VRC6 CHR Select and Mirroring

Post by lidnariq »

The Sunsoft-4 and Namco 163 also supported ROM nametables; you can inspect their games to find these in ROM:

* Almost the entirety of the entire second 128 KiB of CHR ROM for After Burner is ROM nametables (but the other two Sunsoft 4 games, Maharaja and Nantettate! Baseball, don't use appear to use any)
* of Namco 163 games, Battle Fleet, Dokuganryuu Masamume, Final Lap, King of Kings, and Mappy Kids definitely use ROM nametables. Megami Tensei 2 might. A few others have 1 KiB regions of all 0 or all $FF which might be used as a way to blank the screen.

On the downside, ROM nametables can't be compressed, unlike fixed nametables in the program ROM. On the upside, they can be bankswitched instantly, allowing updates faster that the normal limited CPU-to-PPU bandwidth. (As an extreme example, I switched out ROM nametables every scanline to display an image with 16x1 attribute zone)
Post Reply