Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Vesa Set Video Mode with CRTC Info Block Structure

184 views
Skip to first unread message

Clark Kent

unread,
Jul 28, 2004, 9:05:55 PM7/28/04
to
Hi all,
I was wondered if any of the talented people posting to this group
have had any luck setting a Vesa Video Mode with some refresh rate
other than 60hz. I noticed in the set video mode function (0x4f02)
that one can specify "CRTC values for refresh rate." All I know is
that I want a 75hz x 46.8khz refresh rate at a 800 x 600 resolution.
But I'll be danged if I can figure out all that other stuff in the
"CRTCInfoBlock struc" like "Horizontal Total", and "Vertical Sync
End", ect. Any thoughts would be appreciated.

Dirk Wolfgang Glomp

unread,
Jul 29, 2004, 6:04:25 AM7/29/04
to
Clark Kent schrieb:

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

Dirk Wolfgang Glomp

unread,
Jul 29, 2004, 8:56:11 AM7/29/04
to
If you get a correct screen to 75hz(or in a other refreshrate/mode),
please sent me the CRT-Table to my email-address.

Thanx.

Dirk

Clark Kent

unread,
Jul 29, 2004, 6:30:40 PM7/29/04
to
Dirk Wolfgang Glomp <spam...@crayne.org> wrote in message news:<n6saec...@news.home.freecrac.dyndns.org>...

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.

Dirk Wolfgang Glomp

unread,
Jul 30, 2004, 2:53:28 AM7/30/04
to
Clark Kent schrieb:

> Dirk Wolfgang Glomp <spam...@crayne.org> wrote in message news:<n6saec...@news.home.freecrac.dyndns.org>...
>
>>If you get a correct screen to 75hz(or in a other refreshrate/mode),
>>please sent me the CRT-Table to my email-address.
>
> 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

Dirk Wolfgang Glomp

unread,
Jul 30, 2004, 7:03:51 AM7/30/04
to
Clark Kent schrieb:

> 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.

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)

Clark Kent

unread,
Jul 31, 2004, 6:32:18 PM7/31/04
to
Hey Dirk,
The problem was that my card has VESA 2.0! I should have checked
that, sorry. I need to get a new card and monitor. I've been trying
to set the refresh rate for a long time. I know that my monitor is
DDC compatible, I guess I just need a new video card. I appreciate
your postings. I have access to the text mode video. But for
graphics, I need that refresh rate higher. I can't look at 60hz all
day. It gives me a head ache. Later.

Markus Humm

unread,
Aug 2, 2004, 1:28:51 PM8/2/04
to
[snip]

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

Markus Humm

unread,
Aug 2, 2004, 2:22:56 PM8/2/04
to
Clark Kent schrieb:

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

Clark Kent

unread,
Aug 6, 2004, 11:09:29 PM8/6/04
to
Mr. Humm,
I was wondering how long ago you got that PDF from ATI. That sounds
like what I need. I've been to their site, but all I could ever find
was an SDK that wouldn't have low level info.

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.

Clark Kent

unread,
Aug 6, 2004, 11:36:45 PM8/6/04
to
I was just re-reading some of the other posts about contacting ATI
ect. I guess I'll try that. It would be nice if the graphics card
people were as good about supplying information on their products as
Intel is.

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.

Dirk Wolfgang Glomp

unread,
Aug 8, 2004, 2:28:00 AM8/8/04
to
Clark Kent schrieb:

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

Dirk Wolfgang Glomp

unread,
Aug 9, 2004, 12:13:52 PM8/9/04
to
I wrote:
> 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.

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

Markus Humm

unread,
Aug 9, 2004, 3:59:43 PM8/9/04
to
[snip]

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

0 new messages