Scrolling

Basic and Machine Language

Moderator: Moderators

Post Reply
Mobsie
Vic 20 Drifter
Posts: 32
Joined: Mon Apr 26, 2004 7:51 am
Location: Germany

Scrolling

Post by Mobsie »

Hi,

what is the best way to do scrolling on the vic. I tried to optimize my rutines, i test compiled sprites for tile maps...

Maybe there are other tricks, that i don`t know.

Cheers
Mike
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

I think most recent VIC-20 demos come with sources, so you could get some inspiration there. You know that $9000 is able to move the screen by half a character sideways, and I think by "opening" the side border, you can get a half-decent hardware scroll with the right timing.

When we worked on Veni Vidi VIC! (1996), the scrolling text was in multi-colour (4x8 cells). I wrote a double buffering routine to soft scroll the text (16 pixels high, so not a full screen) in combination with the hardware movement. In the end, we found out that the visual effect was about as good only doing the hardware scroll, so the scroller in the vector part is fine scrolling one multicolour pixel (2 hires), while the end part with all its scrolltexts is rough scrolling two multicolour pixels (4 hires).
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

One register (is it $9001?) sets the vertical center, and for every position it moves just two pixles. So it should be great to use for a vertical scroll (with a screen size bigger than the TV).

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Absolutely correct. The amount of screen data movement should be approximately the same for both directions of scrolling. However, if not everything is supposed to move, I believe it is much harder to vertically scroll only a few columns than horizontally scroll only a few rows (think raster line timing).
Anders Carlsson

Image Image Image Image Image
Post Reply