First post, by blueshogun96
Hey everyone, blueshogun here. I've been interested in writing an NV1 wrapper (or at least attempt one) so I can play some of those old NV1 based games such as Panzer Dragoon. I know this isn't going to be an easy thing to do here, but I wanted to at least try. So far, I've managed to write some basic wrapper .dlls required for the game to run. Fortunately, I have a copy of IDA pro laying around so I was able to dissassemble the required .dll files (which come with the nv1 driver package: NVAPI.DLL and NVVIDMON.DLL) and find out which functions are being exported and such. So far, There are 19 total functions, and one pointer variable (string?) being exported from both DLLs. Here's what I found:
- NvClose( Unknown1 );
- NvNotifyMsg( Unknown1, Unknown2, Unknown3 );
- NvErrorMsg( Unknown1, Unknown2, Unknown3 );
- NvConfigGet( Unknown1 );
- NvConfigSet( Unknown1, Unknown2 );
- NvConfigUpdate( Unknown );
- NvGetHardwarePointers( Unknown1, Unknown2, Unknown3, Unknown4 );
- NvDeviceBaseGet( Unknown );
- NvDeviceLimitGet( Unknown );
- NvDeviceSelectorGet( Unknown );
- NvSysOpen( Unknown );
- NvSysClose( Unknown );
- THK_ThunkData32 (36 bytes)
- NvRequestVideoMode( DEVMODE* _devicemodeA, Unknown1, DWORD Unknown2, Unknown3 );
So I wrote my own empty implementations of these functions inside of the aptly named fake .DLLs, and I got a prompt from the game to put in the CD. Now, if any of you have ever tried running this game on Windows running a higher end GeForce card, you might get an error message pertaining to ThunkConnect32 not being found in NVAPI.DLL. That's because the game was expecting to find the NV1 version of NVAPI.DLL; the newer cards do contain a NVAPI.DLL in the driver package. Just thought I'd throw that in there as it took me a moment to find out about the .DLL referencing problem. In order for the wrapper to work, we have to have 2 .DLLs, not just one. While the .DLLs don't do anything but crash the game atm, I'm slowly but surely learning how these .dlls function, as well as how Panzer Dragoon uses them.
As far as documentation goes, I don't have much at all. All I have is the specs on the PCI registers that I found some years ago (don't remember where I found it), but it's here: http://www.megaupload.com/?d=IB9I44C0 Take it and run with it! The document also explains how the VGA, DSP and audio registers work, but nothing on 3D quadratic rendering. Another thing, since I don't have the old NVSDK (NVlib, was it?), it's going to be tough trying to document the APIs and how they work since my reverse engineering skills aren't the greatest. I had a book on the subject, but it's in another state 🙁
So far, I haven't found anything on how the card handles quads/NURBS at all. I was hoping to use OpenGL for this, but without any documentation on how it works, I'm at a loss. I checked XFree86, but there was minimal information in the archived source code. I'm not sure where else to look and any open source drivers supporting NV1 are far and few.
With that being said, I was wondering if anyone else knew where to turn to. There aren't many forums that specialize in this sort of thing, and this place along side of assembler games appears to be the best place to start. I've seen only 3 threads where NV1 was mentioned, but nothing conclusive happened in any of those. So I was hoping that the work I've done so far would help generate a bit of interest.
Any ideas? Thanks.