Vic 20 Scrolling using assembler

I am trying to get scrolling in 6502 assembler on the Vic 20 to work. The following is for expanded Vic (16k for example), built using CBM PRG Studio.

I understand the Vic in as much to write games that are static, but I can not get scrolling to work.

Two excellent scrolling examples are : -

https://www.youtube.com/watch?v=CgCHzrjT3uE

or multi directional

https://www.youtube.com/watch?v=gEzOomjmzU4

I have noticed they both appear to be in what I would called monochrome (I could be wrong) - is that a clue?

I have experimented, running under a Timer/Raster IRQ, putting values into $9001 similar to : -

lda $9001
and #$f0
ora MY_SCROLL_AMOUNT
sta $9001

So if MY_SCROLL_AMOUNT is increased 0-7 each frame then I get a "kind of" scrolling effect but the screen is "bouncing" rather than scrolling (expected as adjusting the vertical offset $9001), but that doesn't look anything like how the scrollers in the above links work.

I read about putting Character Data at $1000 so you can get 512 characters available to edit, and if I understood correctly, can display a screen of 512 chars with each char (or tile) forming part of the bitmap, and then dynamically (on the IRQ using double screen techniques) draw data into the character map memory but : -

  1. How do you display a character of code, say, 531 in a char/tile cell where its a byte value (0-ff)?

  2. Where would the two screens go if the character map memory is using $1000 to $1fff?

Regards,

G

Upvotes: 2

Views: 429

Answers (1)

Devolus
Devolus

Reputation: 22084

AFAIK you can only scroll by two pixels on VC20. You move the screen up/down and when you scrolled by one character, then you move the screen back to the original position, and move the screen content up/down one line. This way you get the scrolling effect. Same applies of course to left/right.

You can only display characters from 0-ff, there is no char 531.

As for character scrolling, this is quite a different technique, and only useful for a background scrolling effect, but it can not be used for level data scrolling, as it would be to slow.

Best would be to go to an emulator forum and look there. I doubt that stackoverflow is a good resource for such questions. :)

Upvotes: 3

Related Questions