MOS Technology VIC II

from Wikipedia, the free encyclopedia
MOS 6569R3 on a C64 mainboard
The VIC II 8565R2 for the C64-II

The VIC-II ( Video Interface Controller-II ) of MOS Technology , successor of the VIC is a video display controller , which in Commodore - home computer C64 and (as easily extended VIC IIE or VIC III ) in the C128 was used. It was produced in NTSC (MOS 6567 / MOS 8562) and PAL versions (MOS 6569 / MOS 8565). A special feature of the VIC II are its 8 hardware sprites with collision query.

Technical specifications

The 16 colors of the VIC II
The MOS 6567 VIC II
  • Generation of the system clock for the other chips
  • Automatic refresh for dynamic RAMs ( DRAM ).
  • The bus and memory can be shared with processors of the 6502 family without slowing down either chip much, both chips accessing them alternately.
  • 16 kB address area ( DMA ) for video and character set memory
  • Separate 1000 × 4 bit color memory, implemented in the C64 with static RAM ( SRAM ). (In the 1 kB address space provided for the CPU , only one nibble appears per addressed byte.)
  • 16 colors
  • Text mode with 25 lines of 40 characters
  • 3 text modes:
    • Hires with 8 × 8 pixels per character, one of 16 foreground colors per character and a background color that applies to the entire screen.
    • Extended-Color Mode (ECM) with 8 × 8 pixels per character, one of 16 foreground colors and one of 4 (of 16) background colors per character, character set limited to the first 64 characters.
    • Multi-color with 4 × 8 (double-width) pixels per character, one of 8 foreground colors per character, and 3 additional colors from 16.Hires characters and multicolor characters can be mixed as desired, the foreground color is only from the first 8 colors to choose from.
  • 2 graphic modes:
    • Hires with 320 × 200 pixels, and a freely selectable foreground and background color per 8 × 8 pixel field
    • Multi-Color with 160 × 200 (double-wide) pixels, 3 freely selectable colors per 4 × 8 pixel field and a color that can be set across the screen.
  • Hardware pixel scrolling (vertical and horizontal by a maximum of 8 hires pixels)
  • 8 hardware sprites with a size of 24 × 21 pixels with collision detection, multicolor option and separate scalability to double the size in the X and Y directions.
  • Optional interrupts for sprite-sprite and sprite-graphic collisions
  • Raster line interrupts
  • Light pen function with interrupts
  • Output signal : Y / C, separate luminance and chrominance (similar to S-Video , only with lower luma amplitude)

Programming the VIC II

The raster line interrupt plays a central role in programming the VIC II . This can be used to stop the current main program at certain screen positions and to load new register contents into some VIC II registers. In this way you can easily divide the screen into several different areas ( split screen ). Furthermore, with their help you can easily use the 8 sprites several times per image structure, so that you can display a lot more sprites. These two methods are used by a great many C64 games.

Furthermore, the frame around the graphics of the C64 is a problem, especially with PAL systems it is very wide. The VIC II does not offer any registers that allow graphics to be displayed in this area, but you can switch off the masking of the display at the right time by means of a few clever register manipulations and thus at least display sprites in this area, so that the graphics are displayed up to to 402 pixels wide and approximately 284 pixels high (with PAL, less with NTSC systems).

The color resolution in the graphic modes can also be increased through skillful register manipulation. You can force the VIC II not only to load new color information from memory for every eighth line, but for every raster line. The consequence of this is that more than 64% of the computing time is used for graphic display of a full-screen graphic, but you get an almost full-fledged 16-color mode ( FLI, Flexible Line Interpreter ).

Fast scrolling of bitmap graphics is also possible through sophisticated register manipulations, the top of the screen can be shifted horizontally ( HSP - Horizontal Screen Position ), which makes it unnecessary to copy the entire bitmap every 8 pixels, which is far too computationally expensive (as would be necessary with conventional hardware scrolling ) makes - it just needs to be rewritten to the scrolling area. The bitmap can be moved vertically down using FLD ( Flexible Line Distance ) or up using line crunching ( VSP - Vertical Screen Position ). Together this effect is known among C64 programmers as AGSP (Any Given Screen Position).

Individual evidence

  1. codebase64.org: Any Given Screen Positioning (AGSP) HSP / VSP with a line crunch

Web links