Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
MOS Technology VIC-II
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Scrolling=== In order to scroll a character screen, the VIC-II is set to 38-column and/or 24-line mode via the registers at {{mono|$D011}} and {{mono|$D016}}. This creates an off-screen buffer where the row of characters to be scrolled is placed. By adjusting the scroll bits in the above-mentioned registers, one row may be moved on-screen after which it repeats unless a new row is put in the buffer. Color RAM is scrolled simultaneous with screen RAM and works the same way. VIC-II scrolling is a relatively complicated, CPU intensive task, although it is not uncommon for C64 game programmers to cheat by designing graphics so that the color RAM can remain static. Another standard trick is to use a section of the screen (perhaps the bottom or top 4 or 5 character rows) as a game status area to display score, lives, etc. reducing the amount of scrolling that has to be performed. Finally, it is often necessary to use the "double-buffering" technique to prevent screen tearing. Two 1k blocks of screen ram are reserved; one is displayed while another is written to, then during vblank they are quickly swapped through manipulation of the VIC-II registers. Unfortunately this cannot be done with color RAM. Late in the C64's commercial lifespan, an exploit known as VSP (Variable Screen Positioning) was discovered that involved manipulation of the control bits in {{mono|$D011}} to produce fast scrolling at a much lower CPU cycle cost than the standard scroll registers, however it required careful, cycle-exact coding and did not work reliably on some VIC-II revisions; also it can only be used for horizontal scrolling. It is notably used in ''[[Mayhem in Monsterland]]''.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)