RayeR 
        
  
  CZ,  25.01.2009, 23:32   | 
     NVClock 0.8 beta 4 for DOS and Win32 (Announce) | 
    
    
     Hi, 
during my nvidia hacking journey I remembered linux tool NVclock which can do various O'C settings and also display debug info about nV cards. So I decided to make Win32 and DOS port. They are not ideal but works. A question for DOS/DJGPP programmers about memory mapping - see bottom of readme: 
 
 
NVClock 0.8 beta 4 DOS & WIN32 port by RayeR, 25.1.2009 
******************************************************* 
 
This ports are based on NVClock sources downloaded from: 
http://www.linuxhardware.org/nvclock/#download. 
 
There already existed win32 port but it was too obsolete 
and disabled in configure. I had to tweak configure and 
make scripts to reenable it. Also some fixes of sources 
was needed. I did code clean-up to fix all warnings that 
appeared on -Wall. Then I added a feature to read softstrap 
bits from NV4x BIOS (appended to BIOS info, see -i option). 
 
To run and compile win32 version you need to download 
and install MemAccess Library 1.4 from: 
http://www.zealsoftstudio.com/memaccess/download.html 
This will install NT KMD or VXD to enable physical 
memory access to MMIO registers. Warnig: not available 
for Windows Vista/7. To compile sources I used MinGW32 
with GCC 3.4.5 from: 
http://www.mingw.org 
 
Because I'm a DOS fan I also created DOS port of NVClock. 
I need to write own PCI and physical memory handling 
routines, see BACKEND\back_dos.c. Accessing PCI is quite 
easy, I go directly thorugh PCI IO ports. To map the MMIO 
registers I used DPMI wrapper __djgpp_map_physical_memory() 
that maps physical memory over your page-aligned allocated 
virtual memory buffer. This requires DPMI 1.0 server or 
support of DPMI function 0508h - CWSDPMI has it but e.g. 
Win9x not. Then I'm not sure about unmapping this memory 
and because freeing of allocated buffers caused problems 
I leaved it mapped but I seems to work. I tested it on my 
Asus 7900GT PCI-E VGA. 
 
To compile sources I used DJGPP 2.04 from: 
http://www.delorie.com/djgpp 
with GCC 4.3.2. Because of DJGPP is missing getopt_long() 
function I bundled BACKEND\getopt.h, BACKEND\getopt.c, 
BACKEND\getopt1.c from findutils 4.17 sources. 
If you want to compile with short file names use 
MAKEFILE.DJ instead. 
 
 
http://rayer.ic.cz/programm/programe.htm#NVCLOCK --- DOS gives me freedom to unlimited HW access.  | 
    
               
             RayeR 
        
  
  CZ,  28.01.2009, 14:04                        
  @ RayeR
         | 
     NVClock 0.8 beta 4 for DOS and Win32 | 
    
    
     Aha, according to DPMI 1.0 doc it is not needed to unmap physmem, it will be done automatically at exit by DPMI server... --- DOS gives me freedom to unlimited HW access.  | 
     
                
             Laaca 
        
  
  Czech republic,  29.01.2009, 20:11                        
  @ RayeR
         | 
     NVClock 0.8 beta 4 for DOS and Win32 | 
    
    
     Hi! Thanks for your utility. 
It works but could you add some measuring function to check how much the performance increased/decreased? 
 
BTW: The changed settings will remain also after turning the computer off and on? --- DOS-u-akbar!  | 
     
                
             RayeR 
        
  
  CZ,  29.01.2009, 22:49                        
  @ Laaca
         | 
     NVClock 0.8 beta 4 for DOS and Win32 | 
    
    
     > Hi! Thanks for your utility. 
> It works but could you add some measuring function to check how much the 
> performance increased/decreased? 
 
I think nobody needs to overclock his GPU under DOS (I don't know any DOS program that would use advanced accelerated 3D that utilize it). 
But it may be very usefull if you need to slow-down your VGA cooler fan. Fortunatelly I modded my 7900GT to use big heatpipe passive cooling so I don't need fan control anymore but someone else would like it. If I remember when I had 6600GT it has so dummy BIOS that it set maximum RPM on system start and you can slow down it only under windows or linux. I then siply add an resistor in series with fan to decrease noise level from jet engine to something acceptable :) Also nvclock provide interesting debug info and source shows how nvchips are controlled. 
 
> BTW: The changed settings will remain also after turning the computer off 
> and on? 
 
It only touch nvidia GPU registers, not any nvram so you lost your changes on reboot. It also stores some config file that maybe reloaded - I didn't tried. BTW set environment variable "HOME=path" to store config files in specified directory. This way is used in original NVclock which looks in user's home dir or this var. --- DOS gives me freedom to unlimited HW access.  |