Page 1 of 1

Scrolling

Posted: Sun Jul 02, 2006 10:48 pm
by nineTENdo
Hello Everybody,
Ive been experimenting with adding different values into NESMAS and i came across something wierd. Instead of starting with value #$00 at the $2005 store i added values like #$20, #$40, #$80, #$99.

Code: Select all

	lda hscroll
	sta $2005
	lda #$30
	sta $2005
Values like #$20, #$40, #$80 made the text scroll on a different row (vertically). While #$99 made the screen flicker but i think that has to do with vblank or sumpthing. Why does this happen? I would have thought that entering these values would start the scroll futher on down the line. Am i embarking on a journey into the magical world of vertical scrolling. Any tips on veritcal scrolling? Or any tips on how to make it got the from left to right?

Posted: Mon Jul 03, 2006 5:47 am
by tepples
Yes, the second value you write to $2005 controls the vertical pixel position. You might get flickering if you rely on sprite 0 and there aren't any opaque tiles to trigger it.

Posted: Tue Jul 04, 2006 2:16 pm
by nineTENdo
What are opaque tiles?

Posted: Tue Jul 04, 2006 5:31 pm
by tepples
An opaque pixel is any pixel that is not colored with index 0. An opaque tile is any tile that contains an opaque pixel. Many games' screen splits rely on sprite 0 timing, which requires an opaque pixel of sprite 0 to overlap an opaque pixel of the background.