Address 53265 ($D011) is a register in the VIC-II containing a variety of control bits:
- Bit 7 (weight 128) is the most significant bit of the VIC's nine-bit raster register (see address 53266).
- Bit 6 controls extended color mode; if set to "1", each individual character on the text screen can have one of four background colors. Is by default set to "0", for a single common background color for all on-screen characters.
- Bit 5 selects either the text screen ("0") or high resolution graphics ("1").
- Bit 4 controls whether the screen area is visible or not: By default this bit is set to "1", rendering the screen area visibly, but by setting it to "0", the entire screen assumes the color of the screen color (as per 53280).
- Bit 3 selects 25 (when set to "1") or 24 (when set to "0") visible character lines on the text screen. Mostly used in conjunction with vertical scrolling; see next item.
- Bit 0–2 is used for vertical pixel-by-pixel scrolling of the text or high resolution graphics: Together these three bits form a binary number, indicating how many pixels to "shift" the entire text screen downwards.
This command engages extended color mode:
poke 53265,peek (53265) or 64
To see the effect of this, try typing a few letters with and without using the reverse on as well. To disengage this effect, usekey, and some in
poke 53265,peek (53265) and 191
This command activates high-resolution graphics:
poke 53265,peek (53265) or 32
To get "back" to the normal text screen, you may type:
poke 53265,peek (53265) and 223
To blank the screen from BASIC, one can use
poke 53265,peek (53265) and 239
The "antidote" for this is
poke 53265,peek (53265) or 16
The following example uses bit 3 to select a 24-line text screen, then "counts" through the three least significant bits to "scroll" text lines (somewhat) smoothly up the screen:
1 print chr$(147); 2 for n=0 to 24 3 print "These lines scroll..."; 4 if n<24 then print 5 next n 6 for n=7 to 0 step -1 7 poke 53265,(peek(53265) and 240) or n 8 next n 9 goto 6
Note that chr$(147) yields the control character for SHIFT + CLR/HOME.
This BASIC program cannot do the scrolling motion completely smooth, nor prevent black streaks and other artifacts to appear on the scrolling screen. To achieve this, one must use raster interrupt programming.
When this example is running, the top and bottom part of the "frame", or border, around the screen sometimes "flicker" and momentarily show the screen background color: This hints that 53265 is also involved in the "trickery" about Opening the borders around the screen.