Using NVidia drivers on ReactOS How-to

1. Introduction

There is little support for changing video drivers (or any other driver for that matter) in ReactOS at the moment. You have to know how to access the CVS repository and how to compile (simple) programs. If this is too complicated, please wait a few months, we should have better installation tools then.

2. Supported hardware

The NVidia drivers were tested on the following video card: However, according to the NVidia website, the same driver supports a whole series of video cards. If you find this driver works under ReactOS with other cards, please let us know on the ros-general mailing list

3. Download the drivers

First, go to the NVidia website, www.nvidia.com, choose "DOWNLOAD DRIVERS" from the menu at the top of the page (and "Download Drivers" again from the drop-down menu). Choose "Graphics Driver" in the first box, "GeForce and TNT2" in the second box and "Windows NT4" in the third box, then click "Go!". This How-to assumes you see a page identifying the driver you are about to download as version 43.45, release on April 10, 2003. Download the English version.
(This is a direct link to the download page.)

4. Unpack the drivers

Start the file you just downloaded (note: you need to do this on a MS-Windows computer, doesn't work on ReactOS yet). It will ask you for a directory where to save the files. You can accept the default of C:\NVIDIA\WinNT4\43.45 or change it to your liking, just remember where you put them.... After the files are unpacked, the install wizard will start. Just press "Cancel" on the Welcome screen and tell the thing that, yes, you are quite sure you want to cancel the installation.
Open a Command Prompt window and cd to C:\NVIDIA\WinNT4\43.45 (or wherever you put the files). You should have a nv4_mini.sy_ and a nv4_disp.dl_ file. Issue the following commands:
expand nv4_mini.sy_ nv4_mini.sys
expand nv4_disp.dl_ nv4_disp.dll
After this, you should have a nv4_mini.sys file of 1511936 bytes and a nv4_disp.dll file of 569807 bytes.

5. Patch the miniport driver

Since ReactOS is not 100% binary compatible with MS-Windows yet, the miniport driver (nv4_mini.sys) needs to be patched. There is a small patch program in the ReactOS CVS tree at reactos/apps/utils/patchnv4 which you need to compile. Copy the patchnv4.exe to the directory where you have your nv4_mini.sys file and run it. Afterwards, you should have a nv4_mini.sys.orig (the original) and a nv4_mini.sys (the patched version).
Note that we're working towards binary compatibility, so if you're not reading this on the ReactOS website, please go there and check if the patching is still necessary (ReactOS might have been fixed...).

6. Install the drivers

The first step is simple, copy the (patched) nv4_mini.sys file to \ReactOS\System32\drivers and the nv4_disp.dll file to \ReactOS\System32. The second step is to update the registry to actually load the driver. Check out the CVS tree and edit the file reactos/bootdata/hivesys.inf. Add the following lines:
; NVidia driver
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","ErrorControl",0x00010001,0x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","Group",0x00000000,"Video"
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","ImagePath",0x00020000,"system32\drivers\nv4_mini.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","Start",0x00010001,0x00000004
HKLM,"SYSTEM\CurrentControlSet\Services\nv4","Type",0x00010001,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Services\nv4\Device0","CapabilityOverride",0x00010001,0x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\nv4\Device0","EnableVia4x",0x00010001,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Services\nv4\Device0","InstalledDisplayDrivers",0x00010000,"nv4_disp"
HKLM,"SYSTEM\CurrentControlSet\Services\nv4\Device0","NVREGSWITCHES",0x00000001,43,52,54,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,2c,36,30,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,\
  2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,\
  34,38,30,2c,38,2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,36,34,30,2c,34,38,30,2c,38,2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,2c,36,30,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,2c,36,30,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,34,38,30,2c,38,\
  2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,34,30,2c,\
  34,38,30,2c,38,2c,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,36,30,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,36,30,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,36,30,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,44,4d,54,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,01,00,\
  00,00,00,04,00,00,40,00,00,00,00,04,00,00,00,06,00,00,00,00,00,00,01,00,00,\
  00,00,00,00,00,00,00,00,00,05,00,00,00,00,00,04,00,00,00,50,00,00,00,01,00,\
  00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,99,99,99,99,99,\
  99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,00,00,\
  00,00
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","Attach.ToDesktop",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","Attach.RelativeX",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","Attach.RelativeY",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.BitsPerPel",0x00010001,16
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.XResolution",0x00010001,1152
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.YResolution",0x00010001,864
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.VRefresh",0x00010001,85
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.Flags",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.XPanning",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\nv4\Device0","DefaultSettings.YPanning",0x00010001,0
Feel free to adjust the DefaultSettings.BitsPerPel, DefaultSettings.XResolution, DefaultSettings.YResolution and DefaultSettings.VRefresh (check the Display control panel applet in MS-Windows for available settings for your card/monitor combo).
Search that same file for the "VGA miniport driver" section and change the "Start" line in that section to:
HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Start",0x00010001,0x00000004
(i.e. set the last value on that line to 4).
Rebuild the registry with the command "make registry" and copy the resulting SYSTEM file to /ReactOS/System32/config. Reboot and enjoy.