For a refreshrate in 800x600, i have only this two different tables:
;----------------------------------------------------------------------
; 800x600x32 140 Hz
;--------------------------------------
CRTC DW 1088 ; horizontal Total in Pixel
HORIANF DW 860 ; horizontal Sync-Start in Pixel
HORIEND DW 18 ; horizontal Sync-End in Pixel
VERTOTA DW 651 ; vertical Total in Lines
VERTANF DW 600 ; vertical Sync-Start in Lines
VERTEND DW 47 ; vertical Sync-End in Lines
DOIFLAG DB 04h ; Flag (interlaced,doubleScan,polarity)
PIXCLOC DD 99160000 ; Pixel clock in hz
REFRATE DW 14000 ; Refresh-Rate in 0.01 hz
;---------------------
DB 40 dup (0)
;--------------------------------------------------------------------------
...
;--------------------------------------------------------------------------
; 800x600x32 144 Hz
;--------------------------------------
CRTC DW 1088 ; horizontal Total in Pixel
HORIANF DW 860 ; horizontal Sync-Start in Pixel
HORIEND DW 18 ; horizontal Sync-End in Pixel
VERTOTA DW 653 ; vertical Total in Lines
VERTANF DW 600 ; vertical Sync-Start in Lines
VERTEND DW 47 ; vertical Sync-End in Lines
DOIFLAG DB 04h ; Flag (interlaced,doubleScan,polarity)
PIXCLOC DD 102271000 ; Pixel clock in hz
REFRATE DW 14394 ; Refresh-Rate in 0.01 hz
;---------------------
DB 40 dup (0)
;----------------------------------------------------------------------
If the screen not correct play with the values.
If you want to change the refreshrate to 75 hz,
dont forget to change the pixel-clock.
Dirk
Thanx.
Dirk
Thanks for responding Dirk,
I've struggled and struggled in vain. I have been vanquished by the
VBE. Every time I end up with 0x014f in ax. The function call
failed. I've experimented with the clock calculations--everything,
but it has no effect. I can successfully change to the mode I want,
but when I include the bit that specifies a user defined CRTC info
block, it fails. Thanks anyway.
Sorry I have no table for 75hz, but i have this one in 85hz.
I hope your monitor provide it.
;----------------------------------------------------------------------------
; 640x480 85 Hz
;--------------------------------------
CRTC DW 832 ; horizontal Total in Pixel
HORIANF DW 700 ; horizontal Sync-Start in Pixel
HORIEND DW 64 ; horizontal Sync-End in Pixel
VERTOTA DW 509 ; vertical Total in Lines
VERTANF DW 480 ; vertical Sync-Start in Lines
VERTEND DW 25 ; vertical Sync-End in Lines
DOIFLAG DB 0Ch ; Flag (interlaced,doubleScan,polarity)
PIXCLOC DD 35993000 ; Pixel clock in hz
REFRATE DW 8499 ; Refresh-Rate in 0.01 hz
;---------------------
DB 40 dup (0)
;----------------------------------------------------------------------------
Also take a look to: "Re: Problem reading port 60h!!"
There is my routine to set the mode.
For calculation google for "GTF_V1R1.xls".
Dirk
VBE RETURN STATUS
AL == 4Fh: Function is supported
AL != 4Fh: Function is not supported
AH == 00h: Function call successful
AH == 01h: Function call failed
AH == 02h: Function is not supported in the current hardware configuration
AH == 03h: Function call invalid in current video mode
Oh, for _VESA 2_-video-cards is it not possible to set a mode with own CRT.
Only with _VESA 3_-video-cards can change the refreshrate by VESA.
Check it before use it,
in the buffer(dup 100h) of the VbeInfoBlock(Function 4F00h).
Short way to get this info:
debug
-a
mov ax,cs
mov es,ax
mov di,200
mov ax,4F00
int 10
-g=cs:100 10C
-des:204 l2
------------- minor major --
xxxx:0200 00 03 <-- my GF4 TI4200 (32Bit per pixel in true color)
xxxx:0200 00 02 <-- my ATI 9800 Pro (only 24Bit per pixel in true color)
-------------
The VbeVersion is a BCD value which specifies
what level of the VBE standard is implemented in the software.
The higher byte specifies the major version number.
The lower byte specifies the minor version number.
Note: The BCD value for VBE 3.0 is 0300h and the BCD value for VBE 1.2 is 0102h.
In the past we have had some applications misinterpreting these BCD values.
For example, BCD 0102h was interpreted as 1.02, which is incorrect.
-----------------------------------------------------------------------------
Warning for all to use this stuff: Check the capabilities of the attached monitor.
Old monitors can be damage. If the timming not correct,
skip the videomode to textmode(3) before the monitor be damage.
Only new monitors print: signal out of range.
-----------------------------------------------------------------------------
_Is there any body who can discribe the calculation,
for the correct values for my own CRT(in simple words)_?
_Is there any body with a modern AGP-Matrox-card,
who can tell me about the Vesa-version_?
-----------------------------------------------------------------------------
Dirk(german, sorry for my english)
If your monitor is DDC compliant, you might read out the ussported
resolutions and refresh rates first.
Cirrus Logic Cards did have a INT 10h interface to set some refresh
rates, it's documented in Ralf Browns Interrupt list.
Greetings
Markus
Yes, simply a new Vesa 3.0 compliant gfx card would do, otherwise get a
copy of a programmers reference manual for your graphics card and
program this yourself. At least ATI and Matrox did supply them as PDFs
on request!
Greetings
Markus
My card is an ATI Radeon 7200. I was thinking of getting an Nvidia,
so I contacted them about getting information on programming at the
register level. I got no response. Maybe I should bother ATI.
What I would like, ideally, is to be able to boot my system, change
the video mode and refresh rate to some comfortable level (like
Windows and XFree86 does), and use some 3d acceleration functions to
display stuff on the screen. But, I would settle for just being able
to set the video mode and refresh rate, and writing to a linear frame
buffer.
As of right now, I can boot my system, change the video mode and write
to a linear frame buffer, but I can't change the refresh rate. It
would be nice to have those 3d functions too.
If I could find a graphics card maker that published their specs, I
would buy it at an instant, even if it was slower. At least I could
get some 3d acceleration. As it is, it seems the people at XFree86
can't even get information on that. And if they can't get it, what
chance do I have?
I'm going to continue reading on the subject. It looks like there
would be some standard VGA register I could use to change the refresh
rate. I ordered a book about VGA programming. If that sheds any
light on the subject, I'll let you guys know. If I ever figure out
how to do it I'm going to put it on a website.
There has to be a way to set the refresh rate without using VESA. I
just don't know what that will involve. XFree86 and Windows do it
just fine. My next steps are to read about VGA and if that fails, I
will have to look at XFree86 source, which will involve many tedious,
undocumented, overly complicated, hours.
Later.
I wanted some x86 programming info one time. I sent away for volume 2
of the Intel developer's manual. I waited a while, and thought that
maybe I'd mistyped my address or something. I then re-ordered the
same thing. A few weeks later they sent me all three volumes of the
manual--twice! So now I'm sitting on six volumes of intel
documentation. Back then, and I guess they still are, they were
giving those books away for free. Evidently, they want people to
write programs to run on their chips. I feel guilty because now I
have an AMD.
A tip from André Janz:
--------------------------------------------------------
de.comp.hardware.graphik -> Re: welche Vesa(VBE) Version auf modernen Matrox
http://www.columbia.edu/~em36/wpdos/graphicsmode.html#flickerfree
"For many recent boards that support the VESA 3.0 standard,
but do not include utilities that let you set DOS refresh rates for the VESA driver,
two third-party solutions to the problem are available: the freeware VBEHz utility,
and the (highly recommended) shareware Unirefresh utility by Rob Muller. [...]
These programs work with all recent boards based on Nvidia and 3Dfx chips,
the Matrox G450 (and possibly the G200 and G400 if upgraded
with the new BIOS available on Matrox's web site)."
http://www.terminalsoft.net/qa.htm
"vesa 3.0 support card
NVDIA RIVA128/TNT/TNT2/GERFORCE
MATROX G200/G400/G450 (G200 need a VESA 3.0 TSR)
VOODOO BANSHEE/VOODOO3/VOODOO4
ATI Rage 128/Pro ATI / Radeon / Radeon VE
INTEL 810/815"
--------------------------------------------------------
In the VBEHz utility i found "Modelist.com".
I start it on my ATI 9800 Pro card to get all vesa-modi.
I test the 32Bit-Mode of 800x600 with own CRT and it works fine.
In the 24Bit-mode it is not possible to start with CRTs.
The versions-info of function 4F00 show only a Vesa 2.0 card.
A test of tripple buffering faild.
Dirk
No, its wrong. I forget to set the CTR-bit in the mode.
It only works with 32Bit-linear access to video-ram at 60hz.
The own CRT-values will ignored with Vesa 2.
Sorry for my bug.
Dirk
The docs I have are about the Mach64 series, which as I understand are
the core of the modern ATI graphics cards. I only have an ATI Xpert XL
or so, which was covered. They describe all about detection which card
one has etc.
=> if you contact them and don't get any response, I'd be willing to
send you some part of the docs I have so that you can show them to ATI
and tell them what you request and that they used to give that away!
I think Nvidia is known to be less friendly with such things...
Greetings
Markus