Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
RayeR

Homepage

CZ,
07.01.2009, 14:54
 

nVidia-disable LCD scaling, refresh rates (Users)

Hi,
after a long years I finally moved from CRT to LCD. I know about many many LCD disadvantages but my 8-year old Samsung is fading and there are no new CRTs available, only refurbished. It was hard for me to choose good enough LCD. Finally I chosen NEC 2190Uxp. It has S-PVA panel, 12bit gamma LUT, and lot of features. For me is interesting user defined scaling and 1:1 option for each resolution. But it's not so simple...

I'd like to use DVI-D connection to my nvidia 7900GT for best quality image. But unfortunatelly my vnidioted bios have some bad behavior which complicate it.
1) it's enabled on-chip upscaling by default, so my monitor always get 1600x1200 regardless on current videomode - this mean I cannot use LCD resampling and 1:1
2) for unknown reason when DVI is attached VESA BIOS will drop 1600x1200 and higher VESA modes from mode list - this really sucks! I wondered where my hires modes get lost and when I connected LCD via analog they came back.

So currently I have LCD attached by both cables to 2 heads on VGA and I can switch between analog and DVI. It's interestng that when windows has load nvidia drivers that on-chip scaling is disabled and I can use LCD scaling or 1:1. Of course via analog cable it works anywhere. It seems that this nvidia feature is configurable. I guess that setting some MMIO register will be eneough but nvidia don't give docs. But there's opensource nvidia linux driver http://nouveau.freedesktop.org/wiki/ which makes progress. I chat with some guys on IRC and they told me that this scaling feature is already implemented in nouveau driver. My plan is to browse sources and get knowledges to write own DOS utility which will disable scaling. If there is somebody interested let me know.

Second problem is disabled VESA modes. I will probalby need DASM and hack the VGA BIOS. If somebody can tell me something about nvidia bios structure or know where to find it please let me know.

Another thing is releated to refresh rate control. I personally lost interest because LCD doesn't need higher refresh rates :) but Bear Windows (autor of VBEMP) mailed me that he succeed with setting refresh rate and he plan to add support to his drivers. Maybe he could make some DOS tool too. He used same approach as colibri os driver. Or maybe he give me some sample code for others who want to make a DOS refresh rate tool.

---
DOS gives me freedom to unlimited HW access.

rr

Homepage E-mail

Berlin, Germany,
07.01.2009, 20:25

@ RayeR
 

nVidia-disable LCD scaling, refresh rates

> 2) for unknown reason when DVI is attached VESA BIOS will drop 1600x1200
> and higher VESA modes from mode list - this really sucks! I wondered where
> my hires modes get lost and when I connected LCD via analog they came
> back.

AFAIK LCDs always only support upscaling. So why should VBE offer video modes your LCD can't handle? Dropping also 1600x1200 might a BIOS bug related to >/>=.

---
Forum admin

RayeR

Homepage

CZ,
08.01.2009, 00:45

@ rr
 

nVidia-disable LCD scaling, refresh rates

> AFAIK LCDs always only support upscaling. So why should VBE offer video
> modes your LCD can't handle? Dropping also 1600x1200 might a BIOS bug
> related to >/>=.

Yes, I would accept if it drop modes >1600x1200. I tested LCD with ASTRA for DOS to dump EDID and see that 1600x1200 mode is included in the list so if VGA BIOS do some enumeration according to EDID it will see that LCD support this mode. Maybe it's a bug. But I cannot expect nvidiots will fix it, it's obsolete anyway.

---
DOS gives me freedom to unlimited HW access.

RayeR

Homepage

CZ,
12.01.2009, 10:04

@ RayeR
 

nVidia-disable LCD scaling, refresh rates

Hi, I found easy way how to control on-chip scaler:

mov ax,4F14h ;VESA VBE OEM function
mov bl,2     ;Subfunction 02 = Set Panel Expansion/Centering
mov bh,1     ;00 = Return Current Setting, 01 = Set Centering/Expansion
mov cx,0000h ;Exp. mode: 00 = Scaled, 01 = Centered 1:1, 02 = Left Corner 1:1
int 10h      ;call VGA/VBE service
int 20h      ;exit


This should work on all nVidia cards but it is not exactly what I'm looking for. It always sends native resolution to LCD - if no expansion then just black borders are added around instead lowering resolution. But better than nothing. I can use it in batch files to customize mode for different programs.

---
DOS gives me freedom to unlimited HW access.

RayeR

Homepage

CZ,
15.01.2009, 12:21

@ RayeR
 

nVidia-disable LCD scaling, refresh rates

BearWindows has implemented this feature in his VBEMP NT/XP driver beta. I tested it in NT 4.0 and it works fine so I hope it will be officially added in next release.

---
DOS gives me freedom to unlimited HW access.

Laaca

Homepage

Czech republic,
07.01.2009, 21:21

@ RayeR
 

nVidia-disable LCD scaling, refresh rates

I personaly also don't need the ColibriOS refresh rate setting because on my machine with VESA3 card I have a CRT monitor and on the VESA2 machine I have LCD display.
However I would like to add this feature in my VenomGFX library because it would be useful for some people. So I would be happy if Bear Windows make such DOS utility especially if he release the source.

---
DOS-u-akbar!

RayeR

Homepage

CZ,
08.01.2009, 00:49

@ Laaca
 

nVidia-disable LCD scaling, refresh rates

> However I would like to add this feature in my VenomGFX library because it
> would be useful for some people. So I would be happy if Bear Windows make
> such DOS utility especially if he release the source.

He kindly offer me to send his DOS testing utility. If he couldn't make a TSR like VBEHz I will please him for sample code and hope someone of you will make TSR tool or utilize it gfx libraries.

---
DOS gives me freedom to unlimited HW access.

RayeR

Homepage

CZ,
09.01.2009, 02:38

@ RayeR
 

VBE3TEST

Here is the test program from BearWindows:

http://rayer.ic.cz/350d/VBE3TEST.ZIP

Select use real VBE functions: no and then you can choose 4 basic CRTC feqs and then it will probe graphics mode from 56 to 100 Hz, use your monitor OSD to check real timing and report it here please.

---
DOS gives me freedom to unlimited HW access.

RayeR

Homepage

CZ,
09.01.2009, 11:49

@ RayeR
 

VBE3TEST

> Select use real VBE functions: no and then you can choose 4 basic CRTC
> feqs and then it will probe graphics mode from 56 to 100 Hz, use your
> monitor OSD to check real timing and report it here please.

In my case it doesn't work on 7900GT. I got very low refresh rates that caused monitor out of sync. I reported it to BW and here's reply:


I'll make a mistake. PCLK is really divided by 2. I''l try to understand how to control refresh-

For example I take this line -
> freq  |  25MHz  |  28MHz  |  ext1  |  ext2
> ------+---------+---------+--------+--------
> 76    |  blank  | BL-44Hz |   60   |   60

When using 76Hz *fake* refresh (and ext1/ext2 clocks), *fake* PCLK (i.e.
pixel clock, dot clock) is 48.905 MHz
divide it by 2, we get 24.453 MHz, it is our *real* PCLK When *real* PCLK is 24.453 MHz *real* Refresh is ~ 60 Hz (using GTF formula) as in your table.

It is strange that when *fake* refresh rate is increased,  *real* refresh is decreased.
If you try to lower or higher *fake* half-PCLK formula is somewhat broken.
So to get needed refresh you just have to try any possible refresh/resolutions and see what *real* result is.
If you need higher refresh just set higher resolution.

You also can use non-round refreshes like 79.45 Hz, to precisely control output PCLK.

It easy to understand using GTF table - www.vesa.org/Public/GTF/GTF_V1R1.xls

---
DOS gives me freedom to unlimited HW access.

Laaca

Homepage

Czech republic,
10.01.2009, 12:02

@ RayeR
 

VBE3TEST

> Here is the test program from BearWindows:
>
> http://rayer.ic.cz/350d/VBE3TEST.ZIP
>
> Select use real VBE functions: no and then you can choose 4 basic CRTC
> feqs and then it will probe graphics mode from 56 to 100 Hz, use your
> monitor OSD to check real timing and report it here please.

Tried with ATI mach64 (VESA 2.0 compatility):

I tries all four timings but effect is always the same. Almost none.
The frequencies changes only in range of few hertz (60-65).
Suprisingly the "highes" rates I got when tried to set 56Hz and 60Hz. When program tried to set then higher ones, the real frequency decreased into 62Hz-60Hz

---
DOS-u-akbar!

RayeR

Homepage

CZ,
10.01.2009, 23:26
(edited by RayeR, 11.01.2009, 16:21)

@ Laaca
 

VBE3TEST

> I tries all four timings but effect is always the same. Almost none.
> The frequencies changes only in range of few hertz (60-65).
> Suprisingly the "highes" rates I got when tried to set 56Hz and 60Hz. When
> program tried to set then higher ones, the real frequency decreased into
> 62Hz-60Hz

Yes, something have to be fixed in sources. Now I don't have time to play with, my task is to fix my vesa bios an disable scaling... If anybody tries to mod it, then please report your result.

EDIT: nVidia BIOS editor (nibitor) can disable on-chip scaler but it still send always 1600x1200 with black frame to DVI. This force 1:1 but I cannot use monitor internal scaler. There must be another way.

---
DOS gives me freedom to unlimited HW access.

Back to index page
Thread view  Board view
22049 Postings in 2034 Threads, 396 registered users, 243 users online (1 registered, 242 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum