Sök

Visningar

Commodore 64 KERNAL ROM versions

Below is information on differences between the Commodore 64 KERNAL revisions R1, R2, R3 and the Commodore SX-64 and the Commodore 4064 ROMs. The chronological order must be R1, R2, 4064, R3 and SX-64.

The KERNAL ROM R1 was obviously used only in early NTSC systems. It lacks the PAL/NTSC detection, and always uses white color while clearing the screen. The white color feature is from the VIC-20 ROM, but the VIC had a white background by default. Thus, this feature can be listed as a bug. The CIA 1 timer A will always divide the system clock by $411C == 16668. The other ROMs use the values $4026 and $4296, depending on the system version (PAL/NTSC), so their interrupt frequency is 985248 Hz / 16422 == 59.996 Hz or 1022727 Hz / 17046 == 59.998 Hz. Note that both clock divisor values differ from the value used in the KERNAL R1.

The PAL/NTSC flag ($2A6) affects the RS-232 timer settings as well. It seems that the new RS-232 tables for the PAL have been created on the upper BASIC interpreter area ($E000--$E4FF), from the address $E4EC on. Surprisingly also the original NTSC tables have been changed. Very probably the units running the KERNAL R1 had a slower clock frequency. Extrapolating from the interrupt timer values, they ran at 1.0000 MHz. Now this makes sense, since the first (NTSC) video chips had 262 lines per frame and 64 cycles per line. The frame rate was thus 1 MHz / 262 / 64 == 59.637 Hz. The newer NTSC units run at 1022727 Hz and draw 263 lines per frame and use 65 cycles per line. This produces a frame rate of 59.826 Hz. Well, now it is very obvious that there has been at least one mother board type that has only been used on NTSC units. Probably the processor clock was created from a 8 MHz chrystal frequency, which served as the dot clock. Or the firmware guys simply assumed that the system runs at exactly 1 MHz, even if it ran at the normal 1022727 Hz NTSC-M speed.

In the newer NTSC units, the video chip still produces the processor clock by dividing the dot clock by eight. An auxiliary clock signal will be generated by dividing the chrystal frequency of 14318181 Hz by 14. This signal is actively being compared with the processor clock and it guarantees the correct frequency of dot clock, 8/14 of the crystal frequency.

The PAL systems have been developed later, and they always run at the same clock frequency, 17734472 Hz / 18. The frame rate has always been 17734472 Hz / 312 / 63 == 50.125 Hz on those puppies.

The changes in the latter ROM revisions were mainly cosmetical. There were some bugs corrected in the R3 revision, though.