VOGONS


First post, by aVd

User metadata
Rank Member
Rank
Member

Here is what I have about so called "S3 BIOS bright bug". The information is gathered form different sources (including one related thread in this forum and not using a.i. slop/web-searches):

For the older S3 video cards based on Trio64V2/DX (86C775), Trio64V2/GX (86C785), ViRGE/DX (86C375), ViRGE/GX (86C385) chips the "pedestal bit" in 0x03C5 register is this one: x x B x x x x x (the sixth bit, if we count from the least significant bit starting from one).

So, to cure the "bright bug" in the safest way, we have to use bitwise operation "AND 0xDF" (oxDF = 1 1 0 1 1 1 1 1) applied to the register 0x03C5. This way we don't change any other previously set bit values in the register:

Working assembly code for disabling "bright bug" on S3 Trio64V2/DX, Trio64V2/GX, ViRGE/DX, ViRGE/GX
MOV	DX,3C4
MOV AL,8
OUT DX,AL
INC DX
MOV AL,6
OUT DX,AL
DEC DX
MOV AL,1A
OUT DX,AL
INC DX
IN AL,DX
AND AL,DF ; dis. BB
OUT DX,AL

The safest reverse bitwise operation enabling "bright bug" for the same older S3 card is with "OR 0x20" (0x20 = 0 0 1 0 0 0 0 0) applied to the same register 0x03C5. This way we don't change any other previously set bit values in the register:

Working assembly code for enabling "bright bug" on S3 Trio64V2/DX, Trio64V2/GX, ViRGE/DX, ViRGE/GX
MOV	DX,3C4
MOV AL,8
OUT DX,AL
INC DX
MOV AL,6
OUT DX,AL
DEC DX
MOV AL,1A
OUT DX,AL
INC DX
IN AL,DX
OR AL,20 ; en. BB
OUT DX,AL

Important note: The above doesn't apply to the very first ViRGE/325 (86C325) chip! Possibly due to different register's settings.

For the newer S3 cards based on ViRGE/GX2 (86C357), Trio3D (86C365) and possibly even Savage3D, Savage4 chips the "pedestal bit" in 0x03C5 register is this one: x x x x B x x x (the fourth bit, if we count from the least significant bit starting from one).

In this case, to cure the "bright bug" in the safest way, we have to use bitwise operation "AND 0xF7" (oxF7 = 1 1 1 1 0 1 1 1). We don't change any other previously set bit values in this register:

Working assembly code for disabling "bright bug" on S3 ViRGE/GX2, Trio3D
MOV	DX,3C4
MOV AL,8
OUT DX,AL
INC DX
MOV AL,6
OUT DX,AL
DEC DX
MOV AL,27
OUT DX,AL
INC DX
IN AL,DX
AND AL,F7 ; dis. BB
OUT DX,AL

The safest reverse bitwise operation enabling "bright bug" for the same newer S3 cards is with "OR 0x08" (0x08 = 0 0 0 0 1 0 0 0):

Working assembly code for enabling "bright bug" on S3 ViRGE/GX2, Trio3D
MOV	DX,3C4
MOV AL,8
OUT DX,AL
INC DX
MOV AL,6
OUT DX,AL
DEC DX
MOV AL,27
OUT DX,AL
INC DX
IN AL,DX
OR AL,8 ; en. BB
OUT DX,AL

The pre-build DOS com-executables along with the source code for MASM and NASM will be attached in the next post.

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 1 of 1, by aVd

User metadata
Rank Member
Rank
Member

DOS binaries for the older S3 video cards based on Trio64V2/DX (86C775), Trio64V2/GX (86C785), ViRGE/DX (86C375), ViRGE/GX (86C385) chips:

The attachment DARK_VRG LIT_VRG.zip is no longer available

DOS binaries for the newer S3 cards based on ViRGE/GX2 (86C357), Trio3D (86C365) and possibly even Savage3D, Savage4 chips:

The attachment DARK_TRI LIT_TRI.zip is no longer available

NASM source code:

The attachment S3 Bright Bug NASM src.zip is no longer available

MASM 6.11 source code:

The attachment S3 Bright Bug MASM 6_11 src.zip is no longer available

MASM 5.10 source code (for building also needs m$ EXE2BIN, as this older version of MASM can not build com-executable directly):

The attachment S3 Bright Bug MASM 5_10 src.zip is no longer available

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!