Change Vertical Retrace Frequency

I wanna write a 3D API, with a shutter Glasses. For this I've got rise the refreshrate of the Monitor up to 120Hz. I'm also fit in assembly, but i can't find out wich register i've got to change.
DennisWoodAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sumant032199Connect With a Mentor Commented:
I think the ratrace interval is an extremely hardware dependent
thing and it is set always to its maximam possible frequency.
High frequency means low retrace interval. If you are working with
CGA graphics card or better then you need not bother about retrace
interval as "snow" is not a problem for these adapters.
Following is part of assembly code which will explain you how to
write string escaping from retrace interval. Checking bits present
at the given memory address you can determine which retrace
interval is going on.  

      mov dx,03dah   ;DX= Video Controller's status port address.
      cl1

wait1:  in al,dx
      and al,1
      jnz wait1
                  ;Wait for new retrace interval to start.
wait2:  in al,dx
      and al,l      
      jz wait2
      mov es:[bx],cl
      
      sti
0
 
nils pipenbrinckCommented:
Well..

Changing the refresh-rate of a vga using registers is as complicated as setting a video mode byte by byte without using the bios.

You won't find something like a "refresh" register in any documentations.

Some card manufacturers are nice guys and give away the documentation to their chips (matrox for example). Anyways.. this won't help you 'cause unless you are a tv-technican and know how to calculate the hsync and vsync stuff will most likely blow up your monitor instead of setting the refresh-rate. And even this won't help you because there are more different vga chips out there than I can count.

The only possible way I can think of is to use DirectX. It allows you to specify the refresh rate when you set a video mode. This of cause only works under windows, and not under dos or even a dos-box.

Nils Pipenbrinck



0
 
nils pipenbrinckCommented:
btw..

if you can't resist take a look at the linux x11 sourcecodes..

They contain the bare bones of setting up video modes (don't blame me if you set your mointor into fire!)

Nils
0
All Courses

From novice to tech pro — start learning today.