The MOS 6567/6569 video controller (VIC-II) and its application in the Commodore 64 |
||||||||||||||||||||
Contents 3. Description of the VIC |
||||||||||||||||||||
|
||||||||||||||||||||
The VIC uses two flip flops to generate the border around the display window: A main border flip flop and a vertical border flip flop. The main border flip flop controls the border display. If it is set, the VIC displays the color stored in register $d020, otherwise it displays the color that the priority multiplexer switches through from the graphics or sprite data sequencer. So the border overlays the text/bitmap graphics as well as the sprites. It has the highest display priority. The vertical border flip flop is for auxiliary control of the upper/lower border. If it is set, the main border flip flop cannot be reset. Apart from that, the vertical border flip flop controls the output of the graphics data sequencer. The sequencer only outputs data if the flip flop is not set, otherwise it displays the background color. This was probably done to prevent sprite-graphics collisions in the border area. There are 2×2 comparators belonging to each of the two flip flops. There comparators compare the X/Y position of the raster beam with one of two hardwired values (depending on the state of the CSEL/RSEL bits) to control the flip flops. The comparisons only match if the values are reached precisely. There is no comparison with an interval.
The flip flops are switched according to the following rules:
So the Y coordinate is checked once or twice within each raster line: In cycle 63 and if the X coordinate reaches the left comparison value. By appropriate switching of the CSEL/RSEL bits you can prevent the comparison values from being reached and thus turn off the border partly or completely (see 3.14.1.). |
||||||||||||||||||||
![]() ![]() |