Date : Tue, 17 Apr 2001 09:35:50 +0100
From : "Rich Talbot-Watkins" <Richard_Watkins@...>
Subject: Re: BBC CRTC and ACIA
"Richard Gellman" <r.gellman@...> wrote:
> R4 is Vertical Total - i.e. the total characters displayed
> there are 8 pixels per character, so total scanlines = R4 x 8
>
> R5 (Vertical adjust) is the number of scanlines added to the bottom of
> the screen to account for the Field Blanking Interval, i.e. the time
> that the TV/monitor is NOT displaying anything because its moving the
> cathode ray back to the top left of the screen
>
> Note, that somehow, Modes 3 & 6 add two blank lines to the characters
> to make 10 scanlines per character.
Close, but not quite :)
R4 is vertical total characters minus 1.
R5 is vertical total scanline adjust.
R9 is scanlines per character minus 1.
So, from the AUG, the programmed register values for Modes 0,1,2,4 and 5 are:
R4 = 38 => vertical total characters = 39
R5 = 0
R9 = 7 => scanlines per character = 8
hence total scanlines = (39*8)+0 = 312 (PAL).
Also, you should be able to see that for modes 3 and 6, where R4=30, R5=2 and
R9=9, this also correctly gives 312 scanlines for PAL.
Note that the number of PAL scanlines includes the top/bottom borders, the
actual main screen area AND the vertical retrace where the cathode ray is
being moved back up to the top.
The other register of interest is R7 - vertical sync position. This
determines the character position at which the VSync signal is active (the
upper 4 bits of R3 determine for how many scanlines this signal remains
active). From memory, in Modes 0,1,2,4 and 5, R7=34 (?). VDUs take the
VSync signal as marking the beginning of vertical retrace (AFAIK - correct me
if I'm wrong), so this gives 5 character lines in order to perform vertical
retrace and top border display.
Anyway, these were my findings while playing about with ways to hardware
scroll parts of the screen and produce pixel-by-pixel vertical scrolling.
Hope that's of some help.
Cheers,
Rich :)