Page 1 of 1
2bit Mirroring-Setting in MMC1-5bit-Control
Posted: Mon Mar 28, 2011 8:47 am
by Yggi
Hello.
There are 4 options in the 5bit shift MMC1-Control-Register ($8000-$9FFF) for the Mirroring-Setting
nesdevwiki wrote:0: one-screen, lower bank; 1: one-screen, upper bank;
2: vertical; 3: horizontal
Why are there two options for onescreen-Mirroring? I know, one screen-mirroring means all (remaining three) nametables are a mirror of the first, but what does "lower bank" and "upper bank" mean for the mirroring?
Posted: Mon Mar 28, 2011 9:02 am
by tepples
One-screen lower bank means all four nametables show the first 1 KiB bank of CIRAM ($000-$3FF). One-screen upper bank means all four nametables show the second 1 KiB bank of CIRAM ($400-$7FF). (The other two mirroring types put the two banks side by side.) Games might put a status bar on one and the scrolling playfield on the other; this is common in A*ROM (mapper 7) games.
Posted: Sat Apr 02, 2011 6:39 am
by Yggi
I could finally program an AOROM example with a "status bar" and i now understand how to use these CIRAM banks, but i still don't know how this works internally. Where are the two nametables saved?
Also how do AOROM games (for example a nightmare on elm street) do the scrolling? they only have single screen mirroring so i guess they cannot use the 2005-Register, can they?
Posted: Sat Apr 02, 2011 6:45 am
by thefox
Also how do AOROM games (for example a nightmare on elm street) do the scrolling? they only have single screen mirroring so i guess they cannot use the 2005-Register, can they?
Yes they use 2005 like normal. Scrolling both ways can be implemented even with single screen, like many Rare games do. However when done like this it's impossible to avoid all attribute glitches on the borders of the screen.
Posted: Sat Apr 02, 2011 6:47 am
by tepples
Yggi wrote:I could finally program an AOROM example with a "status bar" and i now understand how to use these CIRAM banks, but i still don't know how this works internally. Where are the two nametables saved?
CIRAM is a 2048 byte SRAM chip on the NES mainboard. In A*ROM and the single-screen mode of MMC1, one nametable is $0000-$03FF of CIRAM, and the other nametable is $0400-$07FF of CIRAM. Bits 0-9 of the CIRAM address come from the PPU, and bit 10 comes from the Game Pak.
Also how do AOROM games (for example a nightmare on elm street) do the scrolling? they only have single screen mirroring so i guess they cannot use the 2005-Register, can they?
In single-screen mirroring, all four nametables show the same 256x240 pixel picture repeated over an infinite plane. Games that scroll over this plane have the artifacts of horizontal scrolling with horizontal mirroring (compare Super Mario Bros. 3). They also have the artifacts of vertical scrolling with vertical mirroring (compare Super C), but the status bar conveniently hides these. Scrolling with PPUSCROLL ($2005) still works, but bits 0 and 1 of PPUCTRL ($2000) are in effect ignored. To switch from one nametable to the other, you have to write to a mapper port.
Posted: Sat Apr 02, 2011 8:01 am
by Yggi
CIRAM is a 2048 byte SRAM chip on the NES mainboard. In A*ROM and the single-screen mode of MMC1, one nametable is $0000-$03FF of CIRAM, and the other nametable is $0400-$07FF of CIRAM. Bits 0-9 of the CIRAM address come from the PPU, and bit 10 comes from the Game Pak.
I think i got it now. Also, nametable addresses in the PPU (2000, 2400, 2800, 2C00) just points to that CIRAM, right?
Also I think i now know how they did the scrolling. They used background clipping and they upload the new column to be shown in the first column which is not visible because of the clipping. Also that's the reason why there are attribute glitches in the second column. Is this correct?
Another question related to the Nightmare on elm street game, which is a bit offtopic, i know...
How did they do the special graphic effect, when you switch from reality to dream?
Posted: Sat Apr 02, 2011 8:11 am
by tepples
Yggi wrote:I think i got it now. Also, nametable addresses in the PPU (2000, 2400, 2800, 2C00) just points to that CIRAM, right?
Yes. The Game Pak translates bits PA11 and PA10 to CIRAM A10.
Also I think i now know how they did the scrolling. They used background clipping and they upload the new column to be shown in the first column which is not visible because of the clipping. Also that's the reason why there are attribute glitches in the second column. Is this correct?
Correct.
Another question related to the Nightmare on elm street game, which is a bit offtopic, i know...
How did they do the special graphic effect, when you switch from reality to dream?
I don't own this Game Pak. Is the effect on YouTube?
Posted: Sat Apr 02, 2011 8:31 am
by Yggi
tepples wrote:Another question related to the Nightmare on elm street game, which is a bit offtopic, i know...
How did they do the special graphic effect, when you switch from reality to dream?
I don't own this Game Pak. Is the effect on YouTube?
Yes,
http://www.youtube.com/watch?v=i3AAiQR6 ... re=related at 2:05
Posted: Sat Apr 02, 2011 8:46 am
by Dwedit
It's just doing horizontal scrolling every scanline in a particular pattern. Note that when you try to do this yourself or emulate this, the "Coarse X" bits are updated on the *Next* scanline, and the "Fine X" bits are updated immediately.
Posted: Sat Apr 02, 2011 9:40 am
by Yggi
Dwedit wrote:It's just doing horizontal scrolling every scanline in a particular pattern. Note that when you try to do this yourself or emulate this, the "Coarse X" bits are updated on the *Next* scanline, and the "Fine X" bits are updated immediately.
sounds logical. I will try that out. Thanks
