Re: How does NTSC VIC-II produce 65 cycles per line

From: Richard Atkinson <ratkinson77_at_icloud.com>
Date: Sat, 14 Jan 2023 13:32:07 +0000
Message-Id: <C4A46161-FE56-4814-A7B7-01038A491D83_at_icloud.com>
Hello Robin, Jim.

> On 14 Jan 2023, at 02:18, Robin Harbron <macbeth_at_tbaytel.net> wrote:
> 
> On 2023-01-13 12:49 a.m., Jim Brain wrote:
> 
>> It does appear to be a hack, though.  I assume the 65 cycle design was because of complaints on sync with certain televisions?
> 
> I haven't found a good explanation of why they went from 64-cycle to 65-cycle. Wikipedia has this totally un-sourced claim: "The 64 color clocks on the initial VIC-II was done with the intention of allowing NTSC artifact color in high resolution bitmap mode as the Atari 8-bit computers did, but that idea was quickly dropped."
> 
This is my understanding:

The (NTSC) VIC-II was designed for an 8 MHz dot clock, 1 MHz CPU clock. It was designed to work with two crystals, one 8 MHz, the other being 4x NTSC color subcarrier frequency, which is 14.31818MHz.

8 MHz / 512 dots per line = 15.625 kHz line frequency

15.625 kHz / 262 lines per frame = 59.6374 Hz frame frequency

I believe the Commodore Max Machine was made with this configuration.

The Commodore 64 was re-engineered to use a single crystal and a phase locked loop to produce the two frequencies need by the VIC-II. The dot clock became 14.31818 MHz * 8 / 14 = 8.181818 MHz

This produces more out of spec frequencies for NTSC televisions than the previous configuration. All the early NTSC C64s were made like this.

8.181818 MHz / 512 dots per line = 15.980 kHz line frequency

15.980 kHz / 262 lines per frame = 60.9928 Hz frame frequency

The PAL VIC-II was made next, using the phase locked loop circuit and some modified parameters. The number of dots per line became 504 (63 CPU cycles per line) and the number of lines per frame became 312. The colour clock became 4x 4.43316875 MHz which is 17.734475 MHz and the dot clock became 17.734475 MHz * 8 / 18 which is 7.881988 MHz

7.881988 MHz / 504 dots per line = 15.63886 kHz line frequency

15.63886 kHz / 312 lines per frame = 50.12457 Hz frame frequency

These figures are much closer to the PAL specification than the early NTSC C64 is to the NTSC specification.

What happened next is that both the NTSC and PAL VIC-IIs were tidied up and improved in a few ways. The number of luminance levels on both chips was increased from five to nine, and the NTSC VIC-II had its timing parameters adjusted for the higher dot clock frequency produced by the phase locked loop circuit. The number of dots per line became 520 (65 CPU cycles) and the number of lines per frame became 263. 

8.181818 MHz / 520 dots per line = 15.734 kHz line frequency

15.734 kHz / 263 lines per frame = 59.8261 Hz frame frequency

These figures are much closer to the NTSC specification.

Richard
Received on 2023-01-14 15:00:03

Archive generated by hypermail 2.3.0.