This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

help!A question about scrolling

help!A question about scrolling
by on (#49741)
i had seen the article "The Skinny on NES Scrolling".

some explain in it:
-----------------------------------------------
here are the related registers:
(v) vram address, a.k.a. 2006 which we all know and love. (16 bits)
(t) another temp vram address (16 bits)
(you can really call them 15 bits, the last isn't used)
(x) tile X offset (3 bits)
-----------------------------------------------
but i dont understand that the (x) mean.
it mean:if (x) = 6,all 32 of tiles are offset 6 pixels?if as I said,so the screen is show 250*240 pixel?
Re: help!A question about scrolling
by on (#49759)
amin2312 wrote:
i had seen the article "The Skinny on NES Scrolling".

some explain in it:
-----------------------------------------------
here are the related registers:
(v) vram address, a.k.a. 2006 which we all know and love. (16 bits)
(t) another temp vram address (16 bits)
(you can really call them 15 bits, the last isn't used)
(x) tile X offset (3 bits)
-----------------------------------------------
but i dont understand that the (x) mean.
it mean:if (x) = 6,all 32 of tiles are offset 6 pixels?if as I said,so the screen is show 250*240 pixel?

It is the pixel offset into the first tile on the scanline then all other tiles are rendered as usual. So if the pixel offset is 6 then only two pixels of the first tile on the scanline are visible (at pixel positions 0 and 1 of the scanline).
Re: help!A question about scrolling
by on (#49760)
NESICIDE wrote:
amin2312 wrote:
i had seen the article "The Skinny on NES Scrolling".

some explain in it:
-----------------------------------------------
here are the related registers:
(v) vram address, a.k.a. 2006 which we all know and love. (16 bits)
(t) another temp vram address (16 bits)
(you can really call them 15 bits, the last isn't used)
(x) tile X offset (3 bits)
-----------------------------------------------
but i dont understand that the (x) mean.
it mean:if (x) = 6,all 32 of tiles are offset 6 pixels?if as I said,so the screen is show 250*240 pixel?

It is the pixel offset into the first tile on the scanline then all other tiles are rendered as usual. So if the pixel offset is 6 then only two pixels of the first tile on the scanline are visible (at pixel positions 0 and 1 of the scanline).



as you said,when offset 6 pixel then the screen is show 250*240,
but i have seen most of emulators are alway show 256*240??

by on (#49762)
I think there is some fundamental misunderstanding here. Have you read and understood most of nestech?

First of all, the NES screen in memory is always 256x240 pixels. The actual TV displayed resolution may be slightly different depending on if the signal is PAL or NTSC, or even individual TVs. But that is not the most important thing when starting out, all you need to focus on initially is that you will be programming for a 256x240 viewable area.

"The Skinny" is probably going to be very hard to understand for someone who doesn't understand most other NES documentation. For now, the question you are asking can be answered by this picture:

Image

If you adjust other registers like 2005 you get more drastic shifts than that. x is for intermediate adjustments up to 7 pixels.

by on (#49770)
UncleSporky wrote:
I think there is some fundamental misunderstanding here. Have you read and understood most of nestech?

First of all, the NES screen in memory is always 256x240 pixels. The actual TV displayed resolution may be slightly different depending on if the signal is PAL or NTSC, or even individual TVs. But that is not the most important thing when starting out, all you need to focus on initially is that you will be programming for a 256x240 viewable area.

"The Skinny" is probably going to be very hard to understand for someone who doesn't understand most other NES documentation. For now, the question you are asking can be answered by this picture:

Image


i have seen the picture.
but i dont undetstand,"NTSC 2C02 technical reference" was wrote:every scanline is scan tile one by one,but how can it show a part of tile?as the picture,look like every scanline is scan pixel one by one.

by on (#49775)
The PPU feeds background slivers (8x1px) through a set of shift registers. The 'x' bit determines which tap of the shift registers to use.