Re: EGA driver for Xfree ? // Hercules too
The main problem in getting a XFree86 to work, is to get a working modeline
to start with... after that, one can easily make tests to tweak the most out
of the server.
On a Unix system, or any system, there are a lot of utilities that allow you
to peek into the CRTC (Cathode Ray Tube Controller). Since the modeline is
used to set these values, you can simply peek in here and reverse calculate
the numbers to get a working start. The modeline holds 4 values for horizontal
and vertial display calculations. These are
Modeline "Name" ClkInd HDisp HSyncS HSyncE HTot VDisp VSyncS VSyncE VTot
HTot = (CRTC[0] + 5) << 3;
HDisp = (CRTC[1] + 1) << 3;
HSyncS = (CRTC[2] + 1) << 3;
HSyncE = ((CRTC[3] & 0x1F) | ((CRTC[5] >> 2) & 0x20)) << 3; // bits 0-5
// HSyncE does only use bits 0-5 of the value, so bits 7-9 should be set
// in accordance with values in HSyncS, for logicability.
VTot = (CRTC[6] | ((CRTC[7] & 1) << 8) | ((CRTC[7] & 0x20) << 4)) + 2;
VDisp = (CRTC[18] | ((CRTC[7] & 2) << 7) | ((CRTC[7] & 0x40) << 3)) + 1;
VSyncS = CRTC[16] | ((CRTC[7] & 4) << 6) | ((CRTC[7] & 0x80) << 2);
VSyncE = CRTC[17] & 0x0F;
// Again VSyncE uses only bits 0-3 of the value, as with HSyncE one must
// use the data in VSyncS to logicalize this value, which is the width of
// the sync pulse.
ClkInd = (MiscOutReg >> 2) & 3;
There are several proper readings on the VGA registers, look at those for a
better overview of the ports.
A quick view at a Hercules, the starting values should look like...
HDisp = 720
VDisp = 400
// a quick guess at these
HTot = 760, or 800
VTot = 450
Section "Monitor"
Identifier "My Monitor"
VendorName "Victor Technologies"
ModelName "Monochrome Graphics Monitor"
HorizSync 12-65 # To ensure the server allows me to do some tests
VertRefresh 40-150
// the index 28.3 is just a guess of the index into the Clocks line
// these are the clocks proped for my Video7 card...
modeline "first" 28.3 720 736 752 760 400 440 449 450
...
EndSection
Section "Device"
Identifier "Generic MONO"
VendorName "Unknown"
Boardname "hercules"
Chipset "generic"
VideoRam 128
Clocks 24.5 28.3 36.0 43.8
EndSection
Section "Screen"
Driver "MONO"
Device "Generic MONO"
Monitor "My Monitor"
Subsection "Display"
Modes "first" "second" "third" "fourth" "fifth" "sixth"
ViewPort 0 0
Virtual 800 600
Visual "StaticGray"
EndSubsection
EndSection
After setting the modelines to your test, (the "first", "second" ...) you
can then shift between them with ALT+CTRL (KeyPad +)/(KeyPad -), and if it
looks like it isn't working, kill the server with ALT+BACKSPACE... edit
the XF86Config modelines and try again...
Just try make sure, that the clock index is the correct one, if it isn't you
will hear a knick/knack in your monitor when the card is trying to change the
clock frequencies. I've heard this can damage the monitor.
Hope that helps...
--
----------------------------------------------------------------------------
Ørn Einar Hansen oe.hansen@halmstad.mail.telia.com
oehansen@daimi.aau.dk
fax; +46 035 217194
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: