Uncovered: The VDC 8568's 38th register

Ok you,re probably already thinking, "but the VDC has only 37 registers, hasn't it?" This is quite correct for the old 8563 types inside the C128 and C128D. Inside the C128DCR, however, a later version with different new characteristics had been installed. One of them is an additional register!

by Nicolas Welte

The existance of register 37 (you start counting at 0) had already been reported about by 64'er magazine, but there hasn't even been a hint of an explanation of the register's function. This should finally be made up for with this article.

Only bits 7 and 6 are available, all other bits are 'reserved' and will always read back as 1. Following a hardware reset, though, bits 7 and 6 are also 1, so that reading the register will return 255 just as with all other unused registers. Only when writing into the register, the difference will become apparent, and in a really big way to boot: the screen loses synchronization and the picture runs through. This is not a useful effect, of course.

Some measuring at video output returned the following function: bit 7 controls the horizontal sync signal's polarity. That signal is found at the RGBI connector. In the same way, the vertical sync signal at pin 9 is controlled by bit 6. In this case, polarity refers to whether the synchronisation pulse is directed from TTL 0 to 1 (positive) or from 1 to 0 (negative).  By default, the C128 works with positive pulses for both signals, and all monitors are designed for that. This leads to following register map, which you should glue into the manual:

[table is printed in the issue]

Is there any advantage we can get from this register? Yes, indeed there is! But in order to gain it, you need an EGA monitor. EGA monitors were the first high resolution monitors for PCs that really deserved the name. These monitors work with two different fixed frequency modes, one of which is comaptible with older CGA cards, and therefore with the C128's RGBI output. The other mode works at a line frequency of about 21kHz and a resolution of 640x350 at a vertical refresh rate of 60Hz, though. EGA also offers 64 colors instead of just 16 colors, but of course this feature can't be used by a C128.  Some C128 owners may be using such a monitor, as they offer a better display quality than older CGA models.  These days, they can be bought for a song as well.

How does the EGA monitor know in which of its two modes it should work? One option would be an automatic detection of the line frequency, but the time hadn't come for that technology yet. Thus, the monitor needed a signal from the outside indicating which mode should be chosen. This is realized by the sync signals' polarity! Four different modes could therefore be chosen, but my monitor in particular knows only two. There are also modern multi frequency monitors which ignore this signaling and
switch automatically.

There are two example programs on the cover disk, which will only run on a C128DCR.  Those of you who are sure you have a monitor which switches automatically, may remove line 5 from the program, which will allow the programs to run on old C128s and C128Ds. In all cases, you should be absolutely sure that a monitor is connected which can handle 21kHz, otherwise, there can be significant damage! Two different versions are given, a 50Hz version and a 60Hz version, sensibly named EGA50HZ and EGA60HZ. The 60Hz version displays a text screen with 77 columns and 43 lines roughly resembling PC's EGA standard. At least for me, the 50Hz version works better, perhaps due to the fact that I have a 50Hz mains current as well. This allows for 77 columns and 52 lines, without any interlace flickering! Unfortunately, 77 columns are the absolute maximum with attributes turned off.
 

[Read more about this topic in the current GO64!-issue]