LCD, fresh rate & DOS games

Emulation of old PCs, PC hardware, or PC peripherals.

LCD, fresh rate & DOS games

Postby retro games 100 » 2008-6-29 @ 16:46

If I run an old VESA-based DOS game, I find that my LCD monitor sets its refresh rate to 60Hz, making the image quality appear good. If I run other old DOS games, such as Dark Forces or Hexen (which I don't think are "VESA games"), I find that my monitor's resolution is set to 720x400 @ 70Hz refresh rate, making the image quality not quite so good..

I would like all of my old DOS games to run at 60Hz, and to run at a "4:3" ratio such as 640x480 or 800x600 for example.

My "2D" graphics card is a Matrox G2+ (sometimes called a G200). How can I instruct both my graphics card and my monitor (a fairly modern 19" LG model) to run games at the resolution and refresh rate that I want?

Thank you for any help.

Best regards, Robert.
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Re: LCD, fresh rate & DOS games

Postby bugs_bugger » 2008-6-29 @ 18:35

You could use Dosbox. Dosbox has many options for scaling, so your LCD wouldnt mess up anymore if it was fed with its native resolution @ 60 Hz.
bugs_bugger
Member
 
Posts: 127
Joined: 2006-1-23 @ 15:11
Location: Germany

Re: LCD, fresh rate & DOS games

Postby Davros » 2008-6-30 @ 05:44

dont matrox provide any dos utilities ?
you could try univbe
Guardian of the Sacred Five Terabyte's of Gaming Goodness
User avatar
Davros
l33t
 
Posts: 2532
Joined: 2004-3-01 @ 03:08

Re: LCD, fresh rate & DOS games

Postby retro games 100 » 2008-6-30 @ 07:45

I did download quite a few Matrox driver and BIOS update packages (their website is badly organised, and it took a few downloads to obtain the correct one for the G2+), but there didn't appear to be anything there to alter the refresh rate.

However, I will try univbe later on today. Thanks a lot.
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Re: LCD, fresh rate & DOS games

Postby Silent Loon » 2008-6-30 @ 22:10

Okay, this is from my own experience, and as there are so many LCD displays on the market, it may be not applicable to all of them:

For dos games that use a native (VGA) resolution of 320x240 or 320x200 my LCD also uses a 720x400 resolution which is in fact the VGA text mode resolution instead of the orignal one and seems to be somehow interpolated, maybe because the lcd is not able to display resolutions lower than 640x480 but has to be capable to show the vga text mode.
I don't know which native resolution your display has, but as it is not a "first generation" lcd it should be higher than 800x600 and therefore all resolutions lower than the native one , including 640x480 and 800x600 will be interpolated.

Exceptions:
- Some (expensive) lcds offer the option to choose the way interpolation is done in hardware. So you can choose if the image is expanded over the whole screen, or if it keeps the aspect ratio, or if there is no expansion at all (which would result in a very sharp but tiny image).
- As mentioned above, dosbox offers similar features.
- Additionally the nvidia drivers allow you to choose (in windows) the way expansion is done, as long as card and display use a digital output/input.

I doubt that there is any way to force the lcd to display a 320x200 resolution in 60hz due to hardware limitations. But you can try different graphic cards, as lcds seem to depend more on the signal/ramdac quality than crts do. You can also try the digital connection if card and display have one. It usually gives better image quality, even in dos.

- Aspect ratio: as long as the image is expanded over the whole screen (no black bars or columns) you get the physical aspect ratio of the lcd.
User avatar
Silent Loon
Member
 
Posts: 272
Joined: 2007-3-06 @ 09:58

Re: LCD, fresh rate & DOS games

Postby retro games 100 » 2008-7-01 @ 12:47

To "bugs_bugger" re: DOSBox -

DOSBox is brilliant. But please note that right now, I'd like to get some old legacy PCs working with some old DOS games. Afterwards, I will concentrate much more on DOSBox. Thanks.

To "Silent Loon" -

Your post was very helpful, thanks a lot.

I need to do some more hardware testing over the next couple of days, then I may have a question or two regarding screen resolutions, etc... Thanks!
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Re: LCD, fresh rate & DOS games

Postby Miki Maus » 2008-7-01 @ 13:21

You could try using UniRefresh or VBEHz to force refresh rate to 60Hz.
User avatar
Miki Maus
Member
 
Posts: 197
Joined: 2004-10-18 @ 22:19
Location: Cave

Re: LCD, fresh rate & DOS games

Postby retro games 100 » 2008-7-02 @ 06:48

I DL'd those two apps (UniRefresh or VBEHz) last night, and tried to get them to work with my 19" LG LCD, but unfortunately I was not successful.

Perhaps it is because my LCD is (PnP) DCC compliant, and so it picks whatever refresh rate it wants, and ignores any software-based requests to alter the refresh rate?

Whatever options I chose inside UniRefresh or VBEHz, they wouldn't "stick" - in other words, they appeared not to be "saved" and subsequently used by my monitor.

For my testing purposes, I used the old DOS game called Hexen. When it initially loads up, I noticed that the monitor res+refresh were 640x480 @ 60Hz, which for me was perfect. However, a few moments later when the main title screen appears for you to begin playing the game, the res+refresh alters to 720x400 @ 70Hz, and remains that way throughout the game.

Perhaps I need to buy a very expensive LCD, where you are allowed to change the resolution+refresh in DOS?

Thanks a lot anyway. Best regards, Robert.
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Re: LCD, fresh rate & DOS games

Postby gulikoza » 2008-7-02 @ 07:12

720x400 is 70Hz, I never heard you could change text mode refresh rate. Retro games 100, why is refresh rate so important? Having 60Hz won't make the picture any better since it is the resolution that is causing the problems. LCDs have fixed size pixels (unlike CRTs) and any resolution that is not native is being interpolated. The *only* way to (well, not avoid but rather) improve it is to use dosbox and use fixedresolution and scalers.
User avatar
gulikoza
Oldbie
 
Posts: 1705
Joined: 2004-6-25 @ 14:53

Re: LCD, fresh rate & DOS games

Postby retro games 100 » 2008-7-02 @ 07:32

Re: "Retro games 100, why is refresh rate so important?" (from post by "gulikoza")

I'm a thicko, and I thought that changing the refresh rate to 60 (from 70) would improve the quality of the image. Learning from your post, I realise I need to abandon this idea. As you and Vogons users "bugs bugger" and "Silent Loon" have pointed out, I can use DOSBox.

But please note that I would still *really* like to try and get some old legacy hardware working, with the best possible image quality. You mention in your post about fixed resolution and scalers. Could you please enlighten me - what are these two topics, and do they apply to LCDs?

I'm currently "in the market" for a new LCD. Do you know if any exist whereby I can run my old (non-VESA) DOS games on them (like Hexen), but not in typical text-mode 720x400@70Hz, but in something more appropriate such as 640x480@60Hz?

*THANKS* Best regards, Robert.
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Re: LCD, fresh rate & DOS games

Postby gulikoza » 2008-7-02 @ 07:40

No, LCDs can't change the resolution, neither can games (well, they can, but only the resolutions they support, you can't force a 320x200 game to run at 640x480). The only way to truly recreate the retro feeling is to use a CRT monitor (for instance, some larger CRTs had black scanlines between lines in low res modes, no LCD can recreate that effect :happyhappy:)
Fixed resolution and scalers are dosbox options. When properly configured, dosbox will scale the image instead of LCD. This usually looks better that LCD interpolation.
User avatar
gulikoza
Oldbie
 
Posts: 1705
Joined: 2004-6-25 @ 14:53

Re: LCD, fresh rate & DOS games

Postby dvwjr » 2008-7-02 @ 12:52

retro games 100 wrote:"I'm currently "in the market" for a new LCD. Do you know if any exist whereby I can run my old (non-VESA) DOS games on them (like Hexen), but not in typical text-mode 720x400@70Hz, but in something more appropriate such as 640x480@60Hz?"


When you are using actual IBM PC-DOS or MS-DOS with your video card and LCD monitor, the vBIOS for VGA and VESA modes does not care about EDID values returned by your LCD monitor. This is not a Windows or Linux video driver, it is rather a bit of frozen code embedded in the vBIOS to maintain IBM VGA and some version of VESA compatibility. Your LCD monitor will simply try to sync to the closest 'dot clock' value that it recognizes. Since most VESA 3.0 compliant vBIOS have removed support for Int 10h/AX=4F02h VESA enhancements to set the VESA VBE CRTC Information Block parameters, (which includes the video refresh rate), that means that you are stuck using the 'dot clock' values in the vBIOS provided by the video card maker.

What does that mean to you? The various VESA refresh utilities found on this thread will not help you change the refresh rate for the VESA video modes supported by your Matrox video adapter. Typically the IBM VGA mode dot-clocks are locked in the vBIOS and can NOT be changed with any video utility. This locks the IBM defined VGA video modes to the video card vBIOS version of the IBM defined dot-clocks and pixel definitions of the IBM VGA standard.

So what are those IBM VGA standards when it comes to the dot-clock, polarity, pixels, buffer addresses and the refresh rates?

The following table has the actual VGA video mode values from various tables in the video BIOS of an NVidia 7950GT (BFG version) which should be similar to most Matrox, ATI and NVidia video adapters. From this example table you should be able to take the VGA video mode of your application or game and determine the pixel definitions and Vertical refresh rate of any standard VGA video mode. In addition, the VESA defined video mode of 640x400x8 (mode 100h) has a 70Hz vertical refresh rate and the VESA defined 640x480 video modes have a 60Hz vertical refresh rate in the vBIOS of most modern video adapters. Most all other VESA defined video modes are locked to a 60Hz vertical refresh rate in the vBIOS.

So if you are playing a DOS video game which uses IBM mode 13h (320x200x256 colors), then it will display with a vertical refresh rate of ~69.9Hz, which your LCD monitor may 'see' as 720x400 @70Hz (dot clock 28.322MHz) because it is 'broken'. The LCD monitor should 'see' the video input as 640x400 @70Hz (dot clock 25.125MHz) but it may be that LCD monitor manufacturers would display VGA text modes 03h/07h and graphics mode 13h identically by hardware scaling.

The bottom line: do not expect to have Vertical refresh values other than either 60Hz or 70Hz for any VGA mode as defined in the table below. If you want a constant 60Hz refresh rate for your LCD monitor, use Dosbox...


NVidia 7950GT vBIOS values for VGA video modes only:
Code: Select all
Video  Graphics  Buffer   Horizontal  Vertical  Horizontal  Vertical  Horizontal  Vertical   Bits/
 Mode   or Text  Address    Rate      Refresh    Polarity   Polarity    Pixels     Pixels    Pixel     Notes
(Hex)    Mode     (Hex)    (kHz)        (Hz)                          (Visible)  (Visible)  (Color)
********************************************************************************************************************
* 01      T       B8000     31.4        69.9        +          -         320        350        4        EGA        *
* 03      T       B8000     31.4        69.9        +          -         640        350        4        EGA        *
* 01      T       B8000     31.4        69.9        -          +         320        200        4        CGA        *
* 03      T       B8000     31.4        69.9        -          +         640        200        4        CGA        *
* 01      T       B8000     31.4        69.9        -          +         360        400        4        VGA        *
* 03      T       B8000     31.4        69.9        -          +         720        400        4        VGA        *
* 04      G       B8000     31.4        69.9        -          +         320        200        2                   *
* 05      G       B8000     31.4        69.9        -          +         320        200        2                   *
* 06      G       B8000     31.4        69.9        -          +         640        200        1        color      *
* 07      T       B0000     31.4        69.9        +          -         720        350        1        EGA - mono *
* 07      T       B0000     31.4        69.9        -          +         720        400        1        VGA - mono *
* 0D      G       A0000     31.4        69.9        -          +         320        200        4                   *
* 0E      G       A0000     31.4        69.9        -          +         640        200        4                   *
* 0F      G       A0000     31.4        69.9        +          -         640        350        1        mono       *
* 10      G       A0000     31.4        69.9        +          -         640        350        4                   *
* 11      G       A0000     31.4        59.8        -          -         640        480        1        color      *
* 12      G       A0000     31.4        59.8        -          -         640        480        4                   *
* 13      G       A0000     31.4        69.9        -          +         320        200        8                   *
********************************************************************************************************************


Note: There are multiple Mode 01h (40x25 Text) and Mode 03h (80x25) values for the NVidia video BIOS to allow for the CGA, EGA and VGA versions of those video text modes.

Note: The IBM standard 31.5kHz Horizontal and 60/70Hz Vertical refresh rates are approximated by most modern video card vBIOS, but most every multisync monitors would not display any differences if an actual IBM VGA adapter were the input source.

Note: The VGA Horizontal and Vertical refresh rates are based on the default IBM-defined VGA pixel clocks that are usually hard-coded on the Video card. Given most Video adapters round to the nearest factor of 8, the pixel clocks are as follows:


Code: Select all
12.59 MHz
25.18 MHz  (IBM 25.175 MHz)
28.32 MHz  (IBM 28.322 MHz) - Used for 720x400 VGA mono/color text mode(s)




Hope this helps,

dvwjr

edit: fix text errors
edit: fix text errors
Last edited by dvwjr on 2008-8-12 @ 04:35, edited 2 times in total.
dvwjr
Member
 
Posts: 359
Joined: 2002-11-23 @ 23:32

Re: LCD, fresh rate & DOS games

Postby Miki Maus » 2008-7-02 @ 13:30

Can vBIOS be dumped, patched and flashed back on the video card? Is this even remotely possible?
User avatar
Miki Maus
Member
 
Posts: 197
Joined: 2004-10-18 @ 22:19
Location: Cave

Re: LCD, fresh rate & DOS games

Postby retro games 100 » 2008-7-02 @ 16:46

WOW! :exclamation: :lol:

Are you saying that, if a DOS PC game is a 320x200x8 (mode 13h) VGA game, its vertical refresh rate is "hard-coded" @ 70Hz?

When I run one of these old "mode 13h" DOS games, do you know why my LCD monitor does not select a resolution such as 640x480(x8)? (I know it is capable of 640x480 resolution, because when Hexen initially loads up, this is the resolution that it picks. But when the game is about to begin, it changes resolution to 720x400, which seems to be not as good a choice as 640x480 would be.)

(I really hope I haven't asked a stupid question.)

Thank you!, best regards, Robert.
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Re: LCD, fresh rate & DOS games

Postby retro games 100 » 2008-7-02 @ 16:49

Correction:

The bit of text in my message that says -

640x480(x "cool face" ?

should read -

640x480( x 8 )?

(The "cool face" was inserted by the website by accident.)
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Re: LCD, fresh rate & DOS games

Postby ripa » 2008-7-02 @ 21:29

Would it be possible to reprogram the CRTC to switch to another refresh rate after the mode has been set via the usual interrupt?
ripa
Oldbie
 
Posts: 551
Joined: 2005-4-18 @ 00:53
Location: Finland

Re: LCD, fresh rate & DOS games

Postby WIN-Jiggi » 2008-7-03 @ 05:38

retro games 100 wrote:When I run one of these old "mode 13h" DOS games, do you know why my LCD monitor does not select a resolution such as 640x480(xCool? (I know it is capable of 640x480 resolution, because when Hexen initially loads up, this is the resolution that it picks. But when the game is about to begin, it changes resolution to 720x400, which seems to be not as good a choice as 640x480 would be.)


Please send me a screenie of Hexen @ 720x400. I've never seen a Classic doom engine game run no higher than 320x240 in the original port.
WIN-Jiggi
Newbie
 
Posts: 23
Joined: 2006-1-23 @ 02:10

Re: LCD, fresh rate & DOS games

Postby dvwjr » 2008-7-03 @ 09:11

retro games 100 wrote:"Are you saying that, if a DOS PC game is a 320x200x8 (mode 13h) VGA game, its vertical refresh rate is "hard-coded" @ 70Hz?"


Correct. The 'game' is not hard-coded to a 70Hz vertical refresh rate, the IBM VGA mode 13h (320x200x8bpp) video mode has an inherent 70Hz vertical refresh rate due to the 25.175Mhz 'dot-clock'. If you change the 'dot-clock' and the CRTC parameters you can then change the implied vertical refresh rate. However, most video adapter vBIOS will not allow changes to the IBM standard VGA modes, there is leeway with some VESA 3.0 vBIOS code implementations which allow the various VESA utilities which change VESA video mode parameters (including refresh rate) to function. Some of the VESA utilities will work with VESA 1.2 and 2.0 implementations when the utility detects certain SVGA chipsets...


I should clarify that there is a difference in the way an LCD monitor detects the VGA video mode by way of just how the LCD monitor is connected to the video adapter. You could be connected with either an analog VGA cable (HD-15) or a digital DVI cable. The 'dot-clock' is part of the DVI specification and allows for possible 'pixel perfect' display at the native LCD monitor resolution and lets the monitor know the 'dot-clock' directly when using a digital DVI cable. With an analog VGA cable connecting the video adapter and the LCD monitor, there is only an implied 'dot-clock', which is detected (just as with CRT monitors) from the horizontal and vertical sync pulses that are used by a particular video-mode and refresh rate by the LCD (or CRT) monitor's electronics.


From what I read about the 'Hexen' video game technical requirements, it appears that it only uses IBM VGA resolutions, so that it might display an opening title/credits panel with VGA mode 12h (640x480x4bpp) @60Hz, then shift to the actual game-play VGA video mode 13h (320x200x8bpp) @70Hz. To a monitor this game-playing VGA video mode 13h 'looks' like a pixel resolution of 640x400 @70Hz (dot-clock of 25.175 MHz) to the LCD monitor, since any 200 line resolution is actually 400 lines due to line doubling necessary to satisfy the 'dot-clock' rate.


If I had to guess, I would say that the LCD monitor is connected via a VGA HD-15 cable and is displaying (740x400 @70Hz) for your 'Hexen' in-game screen, since the VGA text mode 03h horizontal sync pulse of ~3.81(µs) and the vertical sync pulse of ~63.0(µs) are the same values as those for VGA graphics mode 13h (320x200 @70Hz) [which is the same as VGA 640x400 @70Hz], and the total number of lines for both VGA video modes is 449 lines. The only difference is the number of total pixels per line (visible and blank) which is 800 pixels for VGA mode 13h and 900 pixels for VGA text mode 03h. If the LCD monitor display on the game (320x200x8bpp) screen has black borders only on the left and right, then this might be what is happening. The 'dot-clocks' are different, 25.175MHz for VGA text mode 03h and 28.322MHz for VGA graphics mode 13h. The LCD monitor should not be 'confused', especially if connected via a DVI cable.




Miki Maus wrote:"Can vBIOS be dumped, patched and flashed back on the video card? Is this even remotely possible?"


Sure, it's just code. There are both DOS and Win32 applications which can be used to dump and Flash the vBIOS for Matrox, NVidia and ATI video adapters. Here are some links for information about the vBIOS of the two video cards lines that I have owned, Matrox and NVidia:

Matrox:
1.) Matrox Mystique G200 PINS data
2.) MURC thread on hacking Matrox BIOS PINS values for DOS refresh rate


NVidia
1.) The NiBiTor v4.2 BIOS editor from MVKTECH.NET
2.) The NVidia VGABios Test utility used to test NVidia vBIOS before Flashing


Once you dump the vBIOS, then you do have to either follow the Matrox PINS pixel-clock modifications and re-Flash the vBIOS or for NVidia video adapters one must dis-assemble the vBIOS code to determine the location of the various tables which determine the VGA and VESA modes and 'dot-clock' values to change refresh rates. The data and vBIOS locations vary by NVidia video adapter model. After patching and re-checksumming the vBIOS, you may test under DOS with the NVidia VGABios.exe v1.10 test utility before you Flash the vBIOS on the NVidia video adapter.

Have fun! :evil:




ripa wrote:"Would it be possible to reprogram the CRTC to switch to another refresh rate after the mode has been set via the usual interrupt?"


Once you program the CRTC registers directly, you can do almost anything in DOS... However, if you are going to use the standard VGA or VESA modes defined in the vBIOS via the Int 10h interface, the VESA video mode refresh rate might as well be changed with the standard VESA 3.0 vBIOS API, which is supported via the Int 10h/AX=4F02h ES:DI->CRTC information block with bit 11 of the BX=requested video mode bit set. However, many vendors have eliminated this functionality in their VESA 3.0 vBIOS code. I am not aware of any specific CRTC register which can change the vertical refresh rate since the CRTC defines the display in terms of timings in character clocks (horizontal) and scan-lines (vertical) against a known 'dot-clock' value.

It appears that the Matrox vBIOS might have an undocumented vBIOS Int 10h/AX=4F14h, subfunction BL=04h API that might program one of the pixel clocks? The NVidia vBIOS must have the various table values changed to support VESA vertical refresh rates > 60Hz and any desired custom VESA video modes. The NVidia IBM standard VGA modes are locked at the 60/70Hz vertical refresh rates listed in the table in my previous post.

The advantage of modifying the vBIOS and re-Flashing is that those vBIOS modifications are then available in DOS, the Windows NTVDM and Linux frame-buffer... Currently this is the only way to get 85Hz VESA vertical refresh rates for CRT monitors, like my Lacie Electron Blue IV 22" monitor. :happyhappy:



Hope this helps,

dvwjr

edit: fix text error
edit: fix text error
Last edited by dvwjr on 2008-8-12 @ 04:41, edited 2 times in total.
dvwjr
Member
 
Posts: 359
Joined: 2002-11-23 @ 23:32

Re: LCD, fresh rate & DOS games

Postby retro games 100 » 2008-7-03 @ 12:37

dvwjr, thank you so much for taking the time to explain this topic in such amazing detail.

I hope I can this right -

If you play an old IBM VGA game, on a CRT, you have no choice but to view it at 70Hz refresh rate. No utility exists to alter this specific refresh rate. The image onscreen also seems as if it is 640x400 resolution, but in fact it is using a "blocky-looking" graphical resolution of just 320x200.

If my above paragraph is correct, then what would happen if I go and buy a 20" CRT monitor, and load-up the old DOS game "Hexen"? It would run using the IBM VGA 13h graphics mode, but visually what would I see - would the in-game image fill the whole screen, and subsequently show its "inherant 320x200 blockiness" quite noticably?

Many thanks, best regards, Robert.
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Re: LCD, fresh rate & DOS games

Postby retro games 100 » 2008-7-03 @ 12:39

Message to WIN-Jiggi, regarding Hexen screen.

I'm sorry, but it looks roughly the same as you always remember Hexen to be. Running it at 720x400 on an LCD does not increase the graphical quality of the resolution. It just makes it look slightly worse.
User avatar
retro games 100
l33t
 
Posts: 4585
Joined: 2008-5-03 @ 17:46

Next

Return to PC Emulation

Who is online

Users browsing this forum: Nitram78 and 1 guest