Description:
This program sets chipset CPU-to-PCI Bridge (PCI bus#0, function#0 and device#0) latency timer to 0 clks (according VIA's documents there is still fixed granularity of 8 clks in MVP3 chipset). 
Setting latency timer to 0 might fix graphics card caused sound crackling.

How to use:
Copy program to %WinDir%\Start Menu\Programs\StartUp (where %WinDir% is drive and directory where Windows is installed), so it's run every time when Windows start (not in safe mode).
 
Supported OS's and chipset's:
This program work's only in Windows9x. Only VIA MVP3 chipset tested by the author.
  
Test system:
FIC VA-503+ 1.2a ECN:2600
CL Annihilator (NVIDIA GeForce 256)
SB Live! (CT4670)
Win98SE 

v1.0.1.3
Latency.exe rewritten so that latency timer value can be changed.

v1.0.1.2a
Latency.txt was changed to readme.txt and rewritten & microFAQ added.
No changes in latency.exe.
 
v1.0.1.2
Made using MASM 6.15. About 47k smaller file. 

v1.0.1.1  
Made using C++ Builder 4 Pro.

v0.0.0.0-v1.0.1.0
Alpha's Alpha, Alpha, Beta, Beta2, Beta3, RC1, RC2, totally rewritten, Alpha... 

MicroFAQ:
Q: Are you going to make Windows 2000 version?
A: No. Here is partial source if someone want to make W2k version:

 mov  dx,0CF8H       ;dx=configuration address (CFB-CF8)
 in  eax,dx          ;Get current state
 mov  ecx,eax         ;Save current state to ecx
 mov  eax,08000000cH  ;Latency timer's offset is 0DH but we  
                                 ;get same dword back as offset 0CH
 out  dx,eax          ;Enable configuration space & set offset to register
 mov  dx,0CFCH       ;dx=configuration data (CFF-CFC)
 in  eax,dx          ;Get current data
 mov      ah, 00H         ;Latency timer value
 mov  dx,0CFCH       
 out  dx,eax          ;Set new latency to the chipset 
 mov  dx,0CF8H       
 mov  eax,ecx         
 out  dx,eax          ;restore orginal conf.add. data
 xor      eax,eax

Q: 0 clks doesn't work, can you sent me latency.exe with different value?
A: You can get different latency timer value by little hex-editing, instructions:
Get a hex-editor and change byte in offset 413H to desired latency value.

Jari Korhonen
parru@mbnet.fi
http://koti.mbnet.fi/parru/ 