So if you asked for that: what is this, and how it works.
(I did not post it before because i have to write most of my remarks in Notepad since internet is expensive in Hungary... I only can stay connected after midnight)
The display is being altered through many ports, 3C2 is one of them. This is a very difficult thing, for example to set up the 320*200*256 color mode from nothing you would need to give approximately 30 bytes to four or five VGA ports. And to not be so easy VGA was developed to be compatible with all the screens before so many of the values overflew (since VGA can display more pixels than those and have more memory) so were broken into small pieces what are all around these registers... And some values are needed to send to two or three places to set a mode correctly. So this was why i think tweaking difficult.
In the case of port 3C2 it holds many values in it's bits, the refresh rate is two of them. This is why most of the screens need different input to this port: to save everything but the refresh rate. So there will not be any problem except the ones what may rise because of the higher refresh rates. If both Bit2 and Bit3 (note: bit2 is the third bit, not the second since i assumed Bit0 as the first so i have got bits from 0 to 7) are set to 0 then the VGA will be at 25MHz what creates the usual refresh rates. If Bit2 is 1 (and Bit3 = 0) then it will be 28MHz. These two modes can be set on any VGA compatible card. If Bit3 is 1 and Bit2 = 0 then the 39MHz mode will be set on the VGAs what can do this (I do not know how spread is this mode). If both of the bits are 1 then my card told the VGA to work somewhere around 50MHz but i think this is a very special case.
What does those MHzs mean? I do not know exactly, but i think this shows the total number of pixels can be displayed per second. On the other hand dividing 25MHz by 640 * 480 results 81Hz, but as i wrote above the screen is not so easy so it might be true.
After tweaking a lot again and triing to set up some special modes, i found that the 28MHz mode is used at all screens 720 pixels wide to generate the same refresh rates as the 640 pixels wide modes. It is being used in the basic text mode too (it is 720 * 400)!
(I knew that the text mode uses value 1 already but it appeared me how it works at all when i tried to set up a 360 * 224 mode what has the same aspect ratio as screen 13, but i could not get more than 60Hz with it)
And at last: Why is this good?
(I could find nobody here who talked about this subject...)
You will know if you write this code:
Code:
SCREEN 12
LINE (0, 0) - (639, 479), 15, BF
SLEEP 3600
and you wait it finishing looking at the screen all the time...
(If you not want to go to the oculist after this hour you may set it to 360 for first try)
Screens and centering...
The picture tube has to be calibrated to every different resolutions and refresh rates what can not be done automatically. Usually the most common modes (640 * 480, 60Hz, 640 * 480, 85Hz, 800 * 600, 60Hz ect.) are being calibrated by the factory so that's why they work immediately after setting up the screen. But most of the modes were not calibrated which have to be done by hand and then the screen saves the settings to calibrate itself well on the next time calling that resolution & refresh rate combination. I think these (640 * 480, 67Hz, 640 * 350, 79Hz ect.) resolutions were never called before so the screen must have not known them.