After experimenting with various 6845 like controllers, CRT monitors and flat screens, it is clear, to show a certain resolution on all those display devices, we are bound to use the exact timing parameters predefined for that resolution.
As a result, is a calculator sheet that takes the standard resolution as input and calculates the resulting parameters for a given clock frequency and outputs the register values for the MC6845.
Register | dec | hex | |
---|---|---|---|
R0 | 84 | 54 | Horizontal Total |
R1 | 67 | 43 | Horizontal Displayed |
R2 | 69 | 45 | Horizontal Sync Position |
R3 | 6 | 06 | Horizontal and Vertical Sync Widths |
R4 | 77 | 4d | Vertical Total |
R5 | 1 | 01 | Vertical Total Adjust |
R6 | 75 | 4b | Vertical Displayed |
R7 | 76 | 4c | Vertical Sync position |
R8 | 0 | 00 | Interlace and Skew |
R9 | 7 | 07 | Maximum Raster Address |
R10 | 0 | 00 | Cursor Start Raster |
R11 | 0 | 00 | Cursor End Raster |
R12 | 0 | 00 | Display Start Address (High) |
R13 | 0 | 00 | Display Start Address (Low) |
R14 | 0 | 00 | Cursor Address (High) |
R15 | 0 | 00 | Cursor Address (Low) |
MC6845 and it derivatives contains a number of counter and compare registers used to generate timings for CRT Monitors.
For the monitor to show a single line, parameters like length of line (total duration) equals horizontal frequency, blank information and sync timings needs to be set.
Some of the CRTs especially multisync monitors can accept a wide range of timings while flatscreen usually accept only signals for predefined resolutions that in addition has to be met within a few percentage range.
With the intent to make a graphics card for a Z80 machine that should show either 256 or 512 lines in vertical resolution, I did various experiments. As there aren't any definition for a 512x512 display, the first approach was to add a few more extra lines to the VGA 640x480 resolution. I found that CRTs can show 512 lines within a given timing for 640x480 as long as certain high level constraints are met: the horizontal frequency should stay above 30kHz and a vertical frequency above 50Hz. While generally, flatscreens may accept that non standard timing with 512 lines, but it will stick to only show 480 lines or show an error message indicating wrong timing.
References: list of VGA timings and Composite Signal