VOGONS


First post, by CkRtech

User metadata
Rank Oldbie
Rank
Oldbie

Just for the fun of it, I decided to mess with a Diamond Viper VLB (E4) card I have had kicking around for a few years. I threw it in my 486DX2 66 MHz build. I know that the Viper's DOS performance is terrible because it uses the built-in OAK chip for basic VGA work.

However...

If I could kick things over to the Weitek Power 9000 chip normally used for acceleration in Windows, perhaps I could get better performance in several DOS applications. I elected to use Fastdoom and Duke3D for testing.

This wasn't just a univbe operation. You also have to run either Diamond's own Viper VESA utility to jump the first gap or a third party utility like Vprvesa.

After wrestling univbe versions with this card, I hit upon version 6.5. It identifies the card and adds various modes without going bonkers.

Unfortunately, the main mode I wanted - 320x200 - was not available. 320x400 was.

OK. Forget Univbe.

Now I have only really programmed in Mode 13h, and that was in the late 90s. I am unfamiliar with VGA programming in general - to say nothing of VESA modes. I am not sure if scan doubling is available on the P9000 the way it is on something like the Oak chip, but I did manage to create a 320x200 mode using vprvesa's setmode utility and entering the following information to try to time out 640x400:

The attachment Hacked Mode.png is no longer available

This does create an image on my test bench monitor (LCD). I centered it, and it looks like this:

The attachment windowboxed.png is no longer available

After saving the mode and loading the TSR, 320x200 VESA was now available... window boxed... on my monitor. Fastdoom and Duke3d treat it as normal.

So I ran Fastdoom VBR with the status bar at the bottom, benchmarked with demo 3, and hit 35.098 fps. I mean it ran REALLY well versus the Oak using Mode 13h on Fastdoom @ 22.847 fps.

The attachment fastdoomvbr.jpg is no longer available

Fastdoom VBD (triple buffered) clocked even higher as it managed 42.285 fps but had glitches. This mode is designed for LFB (Triple Buffered), and this 320x200 hack is basically VBE1.2 w/o LFB.

Hopping over to Duke3D and running it at this hacked up VESA 320x200 Mode also showcased a noticeable performance boost. The second demo where Duke runs through this enclosed area normally tops out at 13-16 fps in the short stretch on the OAK, but averaged 18-25 fps and peaked @ 30+ fps several times in VESA mode.

The attachment Duke3dvesa.jpg is no longer available

The rooftop of a new game averages 13 fps on the Oak. For VESA, it was 19-20 fps.

The attachment DukeRoof.jpg is no longer available

Dropping down into the ground area outside has a rather choppy 13-15 fps on the Oak but 22-25 fps on the VESA.

If I entered a smaller, contained area, the Oak topped out at 17 fps while the VESA hit 30-32 fps.

So I often fire up univbe to use VESA 320x200 on the Cirrus Logic, S3, or Trident VLB cards all the time. The resolution is there from the start, and it doubles in size to fit the monitor as usual.

The last couple of days messing with VESA utilities for this Viper VLB have been an adventure. It would be nice to scan double this hacked 320x200 mode to improve DOS gaming for people that own the card. I am not sure if I can do that via VIPER.INI or need to use something else entirely... assuming it is possible at all. Of course, maybe there is some other utility that can get it done.

Anyway - I am interested in feedback or recommendations.

Reply 1 of 3, by CkRtech

User metadata
Rank Oldbie
Rank
Oldbie

Running several other applications like X-VESA after adding modes via the vbeplus utility (among others) would seem to suggest (or confirm) that double scan mode is not supported by the P9000. This would make sense for its intended use, of course. Still...

I don't know if chips can have undocumented/unsupported features. For example if you programmatically did a query to the chip for VBE information and it said double scan isn't supported... but you attempted to switch to a mode with the double scan flag set... what happens?

In any case - if you have a Diamond Viper VLB and want faster performance in DOOM via FastDOOM or Build engine games, you can always use this hacked, non-double scanned mode paired with a scaler. Extra work, but - perhaps a solution if you already have a scaler in your video output chain.

Reply 2 of 3, by clb

User metadata
Rank Oldbie
Rank
Oldbie

Hi CkRtech,

if I try to summarize your issue, I understand you have:

- standard VGA Mode 13h works correctly (fills the full screen), but has low FPS performance in 320x200 DOOM (presumably due to going through the Oak 2D chip),
- using a VESA TSR extension program to set up a custom 320x200 video mode in VESA improves FPS performance in VESA-enabled games (like Fastdoom and Duke3D), but results in a small window centered in full screen? (e.g. as if you had a 320x200 window centered inside a 640x400 resolution?) So you are looking for a double-scanning mode to be able to get the 320x200 window fill the whole screen?

The unfortunate challenge with VESA is that it only standardizes a software-level programming API and BIOS procedure calls; but it does not standardize any register level features.

For example, double-scanning is not a feature present in VESA. So there is no software API to specify double-scanning.

Standard VGA does have a hardware register to set double-scanning (CRTC register 0x3D4h/0x3D5h index 09h: Maximum Scan Line Register, bit 7, Scan Doubling), but VESA does not guarantee any hardware register compatibility with VGA. This means that there is no guarantee that adjusting that register after having set a VESA mode would result in the scan doubling taking any effect. It all depends on the graphics hardware.

They might have a separate custom register space to control Scan Doubling feature when a VESA mode is set, and this register might not live in the ISA I/O port address space, or there might not exist a register to achieve such a feature in VESA mode. There is unfortunately no telling without getting deep into the internals of the graphics card in question. You might try to see if you can locate a hardware/programmer reference for the Diamond Viper VLB.

If this were VGA and not VESA, then in addition to double-scanning 320x200 to 320x400, you would need to activate the 1:2 halved dot clock rate (VGA Sequencer Register 0x3C4h/0x3C5h index 01h: Clocking Mode Register, bit 3, Dot Clock Rate). This is because the 25.2 MHz pixel clock generates a 640x400 image, but to output 320x400, you'll have to divide the clock by two to get 12.5 MHz effective pixel clock. (otherwise with 25.2 MHz pixel clock, you'd get 640 pixels sequenced for every scanline)

But again there is a challenge with VESA, since there is no guarantee that this register takes any effect in VESA modes. If the engineers were very compatibility friendly towards programs that don't understand anything about VESA, they might implement VESA support "overlaid" on top of the VGA register space, in which case the 1:2 halved dot clock rate register might be honored. Or if they were eyeing to implement modern VESA support only and forget about legacy VGA stuff, they might ignore all VGA register writes whenever in a VESA video mode.

One way to probe here might be to write another TSR that force-sets the 1:2 Dot Clock Rate and Scan Doubling register bits and see if that does anything.

Or maybe locating the programming docs for the card might give some clues of what the extent of possibilities here might be.

Reply 3 of 3, by CkRtech

User metadata
Rank Oldbie
Rank
Oldbie

Your summary sounds perfect.

I have found the P9100 documentation, but not the P9000. https://bitsavers.computerhistory.org/compone … inary_Nov93.pdf

As for the Diamond Viper VLB, I don't have any sort of technical documentation on it. Considering the P9000 application to win 3.1 and how Diamond went about using it, I wouldn't be surprised if there is some functionality for the P9000 - documented or not - that Diamond wouldn't have bothered to use on the card. It was designed as a Windows 3.1 accelerator, and anything fancy for DOS was an afterthought.

What is interesting is that some older versions of univbe as well as vogon's own Mumak's HWInfo version 6.2.6 will attempt to access VESA modes or attempt to query modes only to leave the card in a broken state. Flashing graphics or garbage graphics appear with a flashing cursor at the same time. You can cls to return the cursor to the top of the screen. You can change directories to move the cursor further to the right, but the text doesn't show up. Sometimes changing to a different VGA mode will fix it, but sometimes the problem remains. It takes a cold boot to fix the issue in that case.

Anyway - that has me curious as to just how the VGA Oak component interfaces with the P9000 chip.