NVIDIA NV1: Anyone with info/docs/hardware specs? Want to write a wrapper.

Discussion in 'Off Topic Discussion' started by blueshogun96, Jun 17, 2011.

  1. blueshogun96

    blueshogun96 Robust Member

    Joined:
    Jul 29, 2010
    Messages:
    296
    Likes Received:
    11
    Honestly, I wasn't sure where to post this, so I'm posting it here in the off topic forum, and hopefully a staff member could move it if necessary.

    I doubt anyone would really take much interest in this, but I'm going to ask anyway, and this forum would probably be the best place to ask. Does anyone have any docs, code or any other useful information pertaining to the NV1 (http://en.wikipedia.org/wiki/NV1)? You're probably wondering "What on earth do you want to do with NV1? It was a terrible product!" Yeah yeah yeah, I know, I know. I'm just trying to write an NV1 wrapper for those PC games that actually used the NV1 exclusively. I know that there weren't many of these games, but I think it would make a good alternative to the low res software accelerated versions.

    I do have one doc on the NV1, but I can't find it anywhere. :banghead: It's mainly information on the PCI registers and stuff. I actually found it on accident when looking for NV3 (Riva128) docs. Maybe it's on another HDD, I dunno. I'll look later. Other than that, it looks like the only hope I have of finding documentation is XFree86.

    I know that there was an SDK that NVIDIA had once released called NVlib (http://web.archive.org/web/19961112163937/http://www.nvidia.com/nventing/index.html). Does anyone here have that? If I had that, then it would make all of my problems here go away, but finding someone that has it is hard enough; finding someone who's willing to share it is even harder. While I don't know much about the API it uses, I do know that the function set is rather small, and it gives the game access to the hardware and allows you to write to the hardware directly by giving you a pointer to the hardware. At least that's what I've interpreted so far. I loaded up a copy of Panzer Dragoon and nvapi.dll from the NV1 driver package and took a look at the APIs. My reverse engineering skills suck, but at least I was able to list the functions and get a general idea of what's going on. This appears to be the complete function set:

    1. NvOpen
    2. NvClose
    3. NvNotifyMsg
    4. NvErrorMsg
    5. NvWait
    6. NvGetFlatDataSelector
    7. NvGetFlatCodeSelector
    8. NvConfigVersion
    9. NvConfigGet
    10. NvConfigSet
    11. NvConfigUpdate
    12. NvGetHardwarePointers
    13. NvDeviceBaseGet
    14. NvDeviceLimitGet
    15. NvDeviceSelectorGet
    16. NvSysOpen
    17. NvSysClose

    Not very long, but this is what nvapi.dll exports (the NV1 version). I have yet to dive into the actual SYS part. So basically, the key is to understand how these functions work and how the hardware is interacted with. Even if these APIs were documented, then we'd still have to emulate the hardware to a certain extent. Some things are already obvious like the fact that the card uses quadratic surfaces and NURBS to form geometry much like the Sega Saturn VDP. I can't even remember if the card is even VGA compatible (the PCI doc mentioned whether it was or not).

    This guy mentions having seen docs on this card: http://www.flickr.com/photos/54299812@N06/5398009862/
    Maybe I can contact him. Never used flickr before.

    So, with all of you that have managed to get all of these rare items and games and stuff, did anyone here by chance have anything on the NV1? If so, then I can write an NV1 wrapper and we'll have a hardware accelerated PC version of Panzer Dragoon via OpenGL, plus have better texture filtering. I don't know if this has been asked before here, but it has been asked on another forum before.

    http://vogons.zetafleet.com/viewtopic.php?t=1546&sid=d945f7a40d35235793e13024c3308c10
    http://vogons.zetafleet.com/viewtopic.php?t=14

    Thanks.
     
    Last edited: Jun 17, 2011
  2. tails92

    tails92 Spirited Member

    Joined:
    Sep 29, 2008
    Messages:
    197
    Likes Received:
    3
    I have a NV1 PCI card and if I'm not wrong it can be used as a simple soundcard as well, it can't record but it is supposed to play audio just fine.

    Never could get audio to work with the DOS TSR for the sound card integrated on the NV1, though. I've never tested audio on Windows because I dislike the operating system ;)

    I don't know of any publicly available documentation for the NV1... I'm sorry I can't help you on the DLL because I do not use Windows but still documentation would be useful and interesting. Yeah, I know about thinking small, but with today's computers one can add NV1 support to QEMU and play those NV1 specific games directly on an emulated machine.
     
  3. WolverineDK

    WolverineDK music lover

    Joined:
    Mar 14, 2004
    Messages:
    5,611
    Likes Received:
    8
    blueshogun96: What about asking on vogons ? cause I know the people there, and they are a great bunch. And if that is not enough, then you could ask at The Vintage Computer Forums they know a lot too.
     
    Last edited: Jun 17, 2011
  4. blueshogun96

    blueshogun96 Robust Member

    Joined:
    Jul 29, 2010
    Messages:
    296
    Likes Received:
    11
    I found the datasheet I was talking about earlier! It was on my USB flash drive. It says SGS Thompson on it, but they were the ones that manufactured the chipset for NVIDIA.

    http://www.megaupload.com/?d=IB9I44C0

    The only downside is that this documentation only covers the PCI, DSP, Audio and VGA registers, the actual 3D GPU registers are not listed. I'll keep looking, but so far, the best information I could find on 3D was XFree86.

    For now, it's more feasable to write a wrapper since no known dumped BIOS exists, unless someone creates one, which won't be easy. I'd rather emulate it, but for now, a drop-in nvapi.dll wrapper would work just fine (or were any games on Linux supporting NV1?).

    Never heard of the vintage computer forum. It's worth a try. Thanks. I figured that this place would be one of a few good places to start.
     
  5. derekb

    derekb Well Known Member

    Joined:
    Jan 7, 2009
    Messages:
    1,964
    Likes Received:
    44
    goodluck, would be pretty cool if you can get something going
     
  6. MattyHusted

    MattyHusted Rising Member

    Joined:
    Apr 28, 2007
    Messages:
    72
    Likes Received:
    0
    i had one of the NV1 cards many years ago when i had my first pc with the daugterboard/card to use saturn controllers
     
  7. blueshogun96

    blueshogun96 Robust Member

    Joined:
    Jul 29, 2010
    Messages:
    296
    Likes Received:
    11
    Sorry to bump an old thread, but I did want to see if anyone would find interest in this. I started attempting to add NV1 support to dosbox a while ago since reverse engineering the NV1 API without the SDK would be an absolute nightmare without the hardware itself (a drop in wrapper would be 2 seperate .dlls with specific APIs for both). So far, I did make some minor progress on that and so far it recognizes the Diamond Edge3D as a PCI VGA compatible device under Windows 95 and Battle Arena Toshinden detects the card (but crashes because the card is only partially emulated).

    Just wanted wanted let anyone who was interested know that some progress is coming along. I also started a thread on the vogons forums: http://vogons.zetafleet.com/viewtopic.php?p=243015#243015

    Thanks.

    Shogun.
     
  8. kame60

    kame60 Newly Registered

    Joined:
    Nov 11, 2012
    Messages:
    1
    Likes Received:
    0
    I designed NVLib for NV1 15 years ago. The list above is showing naked access to NV architecture and NVLib is a wrapper on top of these calls.
    Unfortunately it would be close to impossible to remember all calls but something I may still remember. Enjoy it :)
     
  9. blueshogun96

    blueshogun96 Robust Member

    Joined:
    Jul 29, 2010
    Messages:
    296
    Likes Received:
    11
    Really? Wow, that's awesome. Sorry for the slow response, I've been busy working on my game(s) source code.

    Basically what I did was reverse nvapi.dll and nvvidmod.dll to get those APIs. My assumption is that it would be safer to do the wrapper at the lower level. Coincidently, my instincts told me to google NV1 wrapper and find my old posts, and here I am replying to someone who worked on NV1! I can't believe it. I did manage to uncover a bit more about the APIs, but not much except params and return types. Needless to say, I am still interested in this.

    I hope you come back to the forums sometime soon, I'd be happy to discuss if you are willing.
     
    Last edited: Nov 16, 2012
  10. CodeAsm

    CodeAsm ohci_write: Bad offset 30

    Joined:
    Dec 22, 2010
    Messages:
    1,504
    Likes Received:
    178
    Ow Wow, Nice. I realy have to search here on AG for older posts about this and more. Blue, can you reup or PM me the documents you upped to Megauploud? :p
     
  11. blueshogun96

    blueshogun96 Robust Member

    Joined:
    Jul 29, 2010
    Messages:
    296
    Likes Received:
    11
    Yeah, give me some time to find them.
     
  12. blueshogun96

    blueshogun96 Robust Member

    Joined:
    Jul 29, 2010
    Messages:
    296
    Likes Received:
    11
    Okay, here it is. http://code.shogun3d.net/coolstuff/nv1.rar

    Re-upped it to my domain (or should I say my domain's subdomain). Now it should stay there as long as my hosting plan gets paid for.

    Bonus: I've included two versions of the .pdf. One is for revision A, and the other is revision C. I haven't compared the differences between the two data sheets closely, but I included them both just in case. I also threw in some sources that were part of XFree86 years ago. That way, we can at least see some registers in action.
     
  13. Stiletto

    Stiletto Member

    Joined:
    Jul 21, 2013
    Messages:
    10
    Likes Received:
    0
    Annnnnd it's live (for now).

    NVidia NV1 SDK 1.50 has been uploaded:
    http://www.vogonsdrivers.com/getfile.php?fileid=706

    Includes NVLIB. Fairly high-level SDK, not much hardware info to be found.

    This is the conclusion of a twelve-year quest for me:
    http://www.vogons.org/viewtopic.php?f=9&t=14&p=37

    I asked kame60 about this a long long time ago (and left empty-handed), I wonder if he remembers.
    Apologies, hope this doesn't anger any current or former NVidia employees (or lawyers).

    Many thanks to my source (no, he doesn't have anything else NV1-related, and nothing Sega-related for that matter)
     
    Last edited: Oct 22, 2014
  14. Druidic teacher

    Druidic teacher Officer at Arms

    Joined:
    Jun 6, 2006
    Messages:
    3,643
    Likes Received:
    129
    x
     
    Last edited: Jun 22, 2017
  15. blueshogun96

    blueshogun96 Robust Member

    Joined:
    Jul 29, 2010
    Messages:
    296
    Likes Received:
    11
    Since I've been MIA from the scene for quite some time now, I didn't know that this had surfaced until Stiletto emailed me directly. So here I am.

    I've taken a look and I'm quite surprised how detailed the SDK is so far. While I haven't taken an in depth look, I can see what kame60 was talking about. The functions located inside the .dlls that come with the driver package are not exposed in the SDK. Fortunately, the inner workings of the GPU registers appear to be (at least the ones that have to do with rendering are). Since my reverse engineering skills still kinda suck (even after all these years reversing Xbox stuff), writing an NV1 wrapper will still be a bit of a challenge. I also looked at some of the audio stuff, and it appears that there's some special flags for waveOut functions that only work on the NV1. After loading up the NV1 version of PD1 in IDA, it tells me that it uses waveOut instead of DirectSound. For those who wonder what waveOut is, it's a Windows API for sound which, unlike DirectSound, does not support mixing IIRC (Example). The bottom line is that this is going to be harder than I thought. Not impossible, at least.

    Having the SDK to test low level samples is a great help. Although I doubt that I could use a modern C/C++ compiler to link the libraries (imagine the linker errors I'd get), I'm sure I could use VC++ 6.0. If not, I'd try using a compiler like Borland C 3.1 or Digital Mars (had pretty good success with the latter when dealing with 32-bit DOS programming; accessed my NV3 (Riva128) PCI registers with ease). Fortunately, I still have my retro PC up and running which dual boots Win98 SE and WinXP. I also have an NV1, but never could get it to install under Win98.

    Now that I remember, I did start working on NV1 emulation for DOSBox once. It didn't get very far because I didn't have enough hardware documentation, but I was able to at least get Win95 to recognize the card, drivers installed properly, and even the Toshinden demo started booting in NV1 mode but crashed shortly after (the thread on Vogons). I really miss working on this. Maybe if I have time, I can try it again.

    Shogun.
     
  16. blueshogun96

    blueshogun96 Robust Member

    Joined:
    Jul 29, 2010
    Messages:
    296
    Likes Received:
    11
    Somebody let me know if you ever get any of the tutorials to compile. I tried using Digital Mars, which pretty much builds anything you throw at it, but it doesn't like the .LIB format, so it generates linker errors. The sooner I figure that out, the sooner I can get back to work on it.

    Shogun.
     

Share This Page