VOGONS


S3 ViRGE BIOS RAM timings

Topic actions

Reply 20 of 30, by RichB93

User metadata
Rank Oldbie
Rank
Oldbie

Apologies for necroing an old thread but I've been playing around with an original S3 ViRGE and I asked ChatGPT whether it could write a small C program that automatically checks and corrects invalid checksums for ROM files. After a little back and forth it came up with the attached which worked for me- much quicker than doing it manually. Included is the C file as well as a macOS (Intel) and a Win32 console versions.

auq80m-99.png

Reply 21 of 30, by Nemo1985

User metadata
Rank Oldbie
Rank
Oldbie

Very useful thank you!

Reply 22 of 30, by Nemo1985

User metadata
Rank Oldbie
Rank
Oldbie

Sorry for the bump.
I have revised interest on s3 older cards.
So far what we know is this:

Bios 1.01.03 has the brightness bug at least the version I have and it supports just VBE 1.2.

Bios 2.01.07 hasn't brightness bug and it supports VBE 2.0
Bios layout and mclkconv from wbc: Re: How do I flash VBIOS on an S3 card?
One more thing, v3/4/5 with VBE 2.0 disable 8x14 font which SimAnt and SimCity require to show fonts right.
Bios v1 (1.01.03, VBE 1.2) has 8x14 fonts compatibility, while newer ones do not.
Source: Re: S3 AGP Cards (and possibly others) Too Bright

Bios 2.01.16 is the latest bios released for ViRGE/DX and GX which has the brightness bug and apparently it doesn't follow the general structure of the 07 bios, according to my previous test the frequency is 45mhz 55mhz. I'm trying to tamper it to fix the brightness bug without success so far. The mclk values are located at CD-CE (still unclear) instead of C2-C3.

This is how the frequency is obtained using m, n, r: MCLK = (M+2) / (N+2) × 14.31818 / 2^R MHz
Those are the limits for the values:
135MHz < 2^R × 14.31818MHz < 270MHz
1 ≤ M ≤ 127
1 ≤ N ≤ 31
0 ≤ R ≤ 3
Apparently the fastest cards (35ns memory) are able to handle 83mhz, but it's important to check for memory errors on windows (95\98) since it's more demanding than the old dos and look for memory character corruption.

In my opinion it would be important to be able to have bios versions without the britghtness bug. The problem is that apparently noone so far was able (or willing) to fix the bios bits to correct it and the only solutions are software.

Some utilities for s3 cards:
S3VBEFIX: https://github.com/wbcbz7/S3VBEFIX
MCLK 094a to overclock s3 cards: https://www.geocities.ws/liaor2/myutil/myutil.html
MCLK Useful information: https://www.geocities.ws/liaor2/myutil/mclk.html
SVBL (Shadow Video BIOS loader), a small utility which loads video BIOS from image to shadow memory: Re: S3 AGP Cards (and possibly others) Too Bright
S3 Trio bios collection and information: https://dosdays.co.uk/topics/Manufacturers/s3_trio.php
S3 Virge bios collection and information: https://dosdays.co.uk/topics/Manufacturers/s3_virge.php

Various vogons forum topics on the matter:
S3 AGP Cards (and possibly others) Too Bright: S3 AGP Cards (and possibly others) Too Bright
How do I flash VBIOS on an S3 card? How do I flash VBIOS on an S3 card?
S3 ViRGE BIOS RAM timings S3 ViRGE BIOS RAM timings
S3VBEFIX topic: S3VBEFIX - PC\MS-DOS TSR fix for S3 VESA 2.0 video BIOS

Reply 23 of 30, by aVd

User metadata
Rank Member
Rank
Member
Nemo1985 wrote on 2026-03-04, 22:14:
Bios 2.01.16 is the latest bios released for ViRGE/DX and GX which has the brightness bug and apparently it doesn't follow the g […]
Show full quote

Bios 2.01.16 is the latest bios released for ViRGE/DX and GX which has the brightness bug and apparently it doesn't follow the general structure of the 07 bios, according to my previous test the frequency is 45mhz 55mhz. I'm trying to tamper it to fix the brightness bug without success so far. The mclk values are located at CD-CE (still unclear) instead of C2-C3.

This is how the frequency is obtained using m, n, r: MCLK = (M+2) / (N+2) × 14.31818 / 2^R MHz
Those are the limits for the values:
135MHz < 2^R × 14.31818MHz < 270MHz
1 ≤ M ≤ 127
1 ≤ N ≤ 31
0 ≤ R ≤ 3
Apparently the fastest cards (35ns memory) are able to handle 83mhz, but it's important to check for memory errors on windows (95\98) since it's more demanding than the old dos and look for memory character corruption.

In my opinion it would be important to be able to have bios versions without the britghtness bug. The problem is that apparently noone so far was able (or willing) to fix the bios bits to correct it and the only solutions are software.

Hi, @Nemo1985,
I have S3 ViRGE/GX video card with BIOS version 2.01.16 with VBE 2.0 and I managed to fix the "bright bug" for it. The stock frequency for my card is 75MHz: M = 61, N = 1, K = 2 -> 75.1695 MHz -> 0x3D41. VRAM chips are SGRAM NPNX NN5283206QF-12, but I can't find any datasheet for them. It may be of use to you and others, so I'm attaching both the original and the modified (fixed) BIOS.

Modified BIOS (75MHz, no bright bug):

The attachment Jaton S3 ViRGE-GX-ver.2.01.16J-MOD.zip is no longer available

Original BIOS (75MHz, bright bug):

The attachment Jaton S3 ViRGE-GX-ver.2.01.16J.zip is no longer available

For those, who can not program and replace the BIOS chip on their S3 Trio64V2/DX (86C775), Trio64V2/GX (86C785), ViRGE/DX (86C375), ViRGE/GX (86C385), ViRGE/GX2 (86C357), Trio3D (86C365) and possibly even Savage3D, Savage4 cards, I have a software solutions for the bright bug: Software solutions for BIOS bright bug in S3 cards based on 86C775, 86C785, 86C375, 86C385, 86C357, 86C365... chips

SvarDOS fan :: artificial "intelligence" bots - not a fan at all :: say NO to systemd :: is freeware a lie, when human freedom is a fundamental lie? :: f00ck €u!

Reply 24 of 30, by Nemo1985

User metadata
Rank Oldbie
Rank
Oldbie
aVd wrote on Today, 07:13:
Hi, @Nemo1985, I have S3 ViRGE/GX video card with BIOS version 2.01.16 with VBE 2.0 and I managed to fix the "bright bug" for it […]
Show full quote

Hi, @Nemo1985,
I have S3 ViRGE/GX video card with BIOS version 2.01.16 with VBE 2.0 and I managed to fix the "bright bug" for it. The stock frequency for my card is 75MHz: M = 61, N = 1, K = 2 -> 75.1695 MHz -> 0x3D41. VRAM chips are SGRAM NPNX NN5283206QF-12, but I can't find any datasheet for them. It may be of use to you and others, so I'm attaching both the original and the modified (fixed) BIOS.

Modified BIOS (75MHz, no bright bug):

The attachment Jaton S3 ViRGE-GX-ver.2.01.16J-MOD.zip is no longer available

Original BIOS (75MHz, bright bug):

The attachment Jaton S3 ViRGE-GX-ver.2.01.16J.zip is no longer available

For those, who can not program and replace the BIOS chip on their S3 Trio64V2/DX (86C775), Trio64V2/GX (86C785), ViRGE/DX (86C375), ViRGE/GX (86C385), ViRGE/GX2 (86C357), Trio3D (86C365) and possibly even Savage3D, Savage4 cards, I have a software solutions for the bright bug: Software solutions for BIOS bright bug in S3 cards based on 86C775, 86C785, 86C375, 86C385, 86C357, 86C365... chips

Thank you very much!
After the very educative bits and bolts guides has become much easier to modify the bios to correct the bug, I modified all my bios but still didn't try them.
I checked on my excel file and my GX is clocked at 60 mhz.
I will gladly try your bios.

Reply 25 of 30, by aVd

User metadata
Rank Member
Rank
Member
Nemo1985 wrote on Today, 07:30:
Thank you very much! After the very educative bits and bolts guides has become much easier to modify the bios to correct the bug […]
Show full quote

Thank you very much!
After the very educative bits and bolts guides has become much easier to modify the bios to correct the bug, I modified all my bios but still didn't try them.
I checked on my excel file and my GX is clocked at 60 mhz.
I will gladly try your bios.

Sorry, that I saw this thread so late. Sill, it's nice to share some useful information and experience.

I can't overclock my card with this BIOS more than 79MHz without artifacts to appear. Could you share your 60MHz BIOS 2.01.16 version to compare them? Maybe the bytes for setting the VRAM timings will pop-up at last.

SvarDOS fan :: artificial "intelligence" bots - not a fan at all :: say NO to systemd :: is freeware a lie, when human freedom is a fundamental lie? :: f00ck €u!

Reply 26 of 30, by Nemo1985

User metadata
Rank Oldbie
Rank
Oldbie
aVd wrote on Today, 07:56:
Nemo1985 wrote on Today, 07:30:
Thank you very much! After the very educative bits and bolts guides has become much easier to modify the bios to correct the bug […]
Show full quote

Thank you very much!
After the very educative bits and bolts guides has become much easier to modify the bios to correct the bug, I modified all my bios but still didn't try them.
I checked on my excel file and my GX is clocked at 60 mhz.
I will gladly try your bios.

Sorry, that I saw this thread so late. Sill, it's nice to share some useful information and experience.

I can't overclock my card with this BIOS more than 79MHz without artifacts to appear. Could you share your 60MHz BIOS 2.01.16 version to compare them? Maybe the bytes for setting the VRAM timings will pop-up at last.

I agree, sharing is very important. I just checked and I was able to overclock my card to 85 mhz (with MCLK094A) back in time.
I just checked and I noticed I didn't correct the bios of the GX, I also have two bios versions 66 and 81 mhz.

Reply 27 of 30, by aVd

User metadata
Rank Member
Rank
Member
Nemo1985 wrote on Today, 08:33:

I agree, sharing is very important. I just checked and I was able to overclock my card to 85 mhz (with MCLK094A) back in time.
I just checked and I noticed I didn't correct the bios of the GX, I also have two bios versions 66 and 81 mhz.

Thank you very much! I'll try to find the bytes related to VRAM timings setting in our ViRGE/GX 2.01.16 BIOSes.

SvarDOS fan :: artificial "intelligence" bots - not a fan at all :: say NO to systemd :: is freeware a lie, when human freedom is a fundamental lie? :: f00ck €u!

Reply 28 of 30, by Nemo1985

User metadata
Rank Oldbie
Rank
Oldbie
aVd wrote on Today, 08:41:
Nemo1985 wrote on Today, 08:33:

I agree, sharing is very important. I just checked and I was able to overclock my card to 85 mhz (with MCLK094A) back in time.
I just checked and I noticed I didn't correct the bios of the GX, I also have two bios versions 66 and 81 mhz.

Thank you very much! I'll try to find the bytes related to VRAM timings setting in our ViRGE/GX 2.01.16 BIOSes.

Sorry I forgot to say that mclk also helps with memory settings, I remember there is a setting about 1 cycle or 2 cycle, if you have a dos rig give it a look it could prove useful.
I'm looking forward to know your reports

Reply 29 of 30, by aVd

User metadata
Rank Member
Rank
Member
Nemo1985 wrote on Today, 08:44:

Sorry I forgot to say that mclk also helps with memory settings, I remember there is a setting about 1 cycle or 2 cycle, if you have a dos rig give it a look it could prove useful.
I'm looking forward to know your reports

Yes, I do have a suitable DOS rig for experiments. Thanks for reminding me, that MCLK can read the VRAM timings set by the BIOS. I have to play with my ViRGE/GX and these BIOSes to find out which bytes could possibly contain these settings.

Looking at the three 2.01.16 BIOSes, that now I have, I just came with some 2D/3D clock frequency settings theory. I have to test it on my GX card:

The attachment 66-81.jpg is no longer available
The attachment 66-my.jpg is no longer available
The attachment 81-my.jpg is no longer available

According to MCLKCONV 0x3D41 gives 75MHz - the two bytes in the yellow rectangles. MCLK reports this as 75MHz frequency for my card.

In the other hand, the frequency setting bytes, that differ between the BIOSes, are the previous two bytes (in the green rectangles). From MCLKCONV: 0x4142 gives 60MHz, 0x5942 gives 81MHz and for my ViRGE/GX 0x2C41 gives 55MHz (I always had a feeling, that it is too slow in 3D even for S3 "deccelerator").

The bytes that differ, but does not belong to text strings, are marked in black rectangles. Possibly one of these may be related to VRAM timings.

I have to check if "green" and "yellow" frequency bytes are related to 2D and 3D frequency settings.

P.S. No other byte differences noticed, except the last byte for the checksum, which is fine.

I have a ViRGE(325) card and these byte pairs (28 41 28 41) give 50MHz (in 3D it's even slower than my slow ViRGE/GX, 0x2841 = 50MHz according to MCLKCONV and possibly both 2D and 3D frequencies are set to 50MHz), but they are located at another address in the BIOS.

SvarDOS fan :: artificial "intelligence" bots - not a fan at all :: say NO to systemd :: is freeware a lie, when human freedom is a fundamental lie? :: f00ck €u!

Reply 30 of 30, by aVd

User metadata
Rank Member
Rank
Member

Found two more 2.01.16 BIOSes named for 66 and 45MHz from unknown cards. The bytes for frequencies are in strange pairs. I really have to test all of these to check my 2D/3D frequencies theory:

The attachment 66-45.jpg is no longer available

0x5645 ~ 45MHz
0x4842 = 66MHz (as stated in the dump file name)

0x3D43 = 45MHz (3D 43 3D 43 - probably both 2D and 3D frequencies are set to 45MHz as stated in the dump file name)

With all those pictures I'm thinking that MCLK in DOS reports only second "yellow" bytes pair - probably for 2D frequency. And the more important for our ViRGE/GX "deccelerators" is the first "green" bytes pair.

So, to me seems like your two BIOSes are set to 60MHz and 81MHz in 3D mode and mine is not 75MHz, but 55MHz in 3D mode.

SvarDOS fan :: artificial "intelligence" bots - not a fan at all :: say NO to systemd :: is freeware a lie, when human freedom is a fundamental lie? :: f00ck €u!