mode
timing options:
other options:
+---+---------------+---+---+
| | ^ | | |
| | | 5 | | |
| | v | | |
+---#################---+---+
| # ^ # | |
| # | # | |
| # | # | |
| 1 # | 2 # 3 | 4 |
|<->#<------+------>#<->|<->|
| # | # | |
| # | 6 # | |
| # | # | |
| # v # | |
+---#################---+---+
| | ^ | | |
| | | 7 | | |
| | v | | |
+---+---------------+---+---+
| | ^ | | |
| | | 8 | | |
| | v | | |
+---+---------------+---+---+
The area bordered with `#' is the visible display area. Horizontal and vertical frequencies can now easily be calculated, for this the sum of horizontal or vertical values are important
htotal = left + xres + right + hslen
vtotal = upper + yres + lower + vslen
line = pixclock * htotal
hfreq = 1E12 / line = 1E12 / (pixclock * htotal)
To get the vertical frequency vtotal must eventually adjusted. If the display is laced, vtotal must be halved or if the display is a doublescan one, vtotal must be doubled. Now we can calculate the length of one frame
if (lace) vtotal /= 2
if (double) vtotal *= 2
frame = vtotal * line
vfreq = 1E12 / frame = hfreq / vtotal