VOGONS


Reply 20 of 56, by blueshogun96

User metadata
Rank Newbie
Rank
Newbie

Sorry I haven't said anything in about a week, I have to work on this in what spare time I have from week to week. So far, I did figure out how to attach PCI devices to DOSBox (not too bad once you look over the code a few times), but the problem is that it's identified as a "Early PCI non-VGA device". I think I may have gotten the endianness of the PCI registers wrong (I used a 256-byte aligned structure and copied it into the 256 byte array; probably a stupid thing to do) so I'll have to try and fix that later. Once the card is successfully detected, then I can see what else it may take to emulate this card.

EDIT: Keep in mind that the NV1 is a "multi-function" device, meaning it has more than one function. I think it's safe to only emulate the VGA compatible function. If not, then I guess this is going to be a bit harder than I thought. Not sure if I'd have to add them both as seperate PCI_Device classes, but we'll see.

Other than that, I did find a bloke somewhere in the UK on the falconfly 3Dfx forums willing to sell me his NV1 card. When he gets back to me, I can buy it and hopefully ease the pain of reverse engineering the card's inner GPU registers.

madcrow wrote:

Don't listen to the naysayers. I, for one, am looking forward to the ability to play Panzer Dragoon with the best image quality.

That's the spirit! 😏

swaaye wrote:
NV1 was one of those chips that didn't do bilinear filtering so the games look a lot like CPU rendering but with some extras. […]
Show full quote

NV1 was one of those chips that didn't do bilinear filtering so the games look a lot like CPU rendering but with some extras.

Games
3D Accelerated Games List (Proprietary APIs - No 3DFX/Direct3D))

Most are OEM releases and really hard to find.

Appreciate the list (further fuels my cause!), I knew there were more games, but I guess I didn't search hard enough, heh.

EDIT2: I was right, I just got the endianness wrong. Wow, I feel stupid as that's normally a rookie/newbie mistake (and I don't claim to be the best of emu authors either as I'm probably one of the least skilled, 🤣). So now the card is officially recognized and Win95 acknowledges that it's an Diamond Edge 3D. Toshinden also recognizes it, but since I haven't added any of the registers, it just crashes.

One more random bit of information; I'm assuming anyone reading this already knows this, but I'll outline it just in case. The NV1 has two valid vendor IDs (for both PCI functions 0 and 1):

- NVIDIA: 0x10DE
- SGS Thompson: 0x104A

I'm using the SGS Thompson one for the time being, but in the end, I don't think it really matters. So that's why it says Edge3D instead of NV1. I'll start adding support for MMIO registers next time I start working on this. Thanks.

Attachments

Reply 21 of 56, by robertmo

User metadata
Rank l33t++
Rank
l33t++
swaaye wrote:

NV1 was one of those chips that didn't do bilinear filtering so the games look a lot like CPU rendering but with some extras.

I am shocked now. If it doesn't do bilinear filtering so what does it do? As i thought bilinear filtering was the most basic feature of 3D accelerators, apart from speeding up, but i guess dosbox already doesn't have speed problems with this early 3D games.

Reply 22 of 56, by nextvolume

User metadata
Rank Newbie
Rank
Newbie

Not to sound inappropriate, but wouldn't QEMU have been a better choice as platform to do this work on? PCI has been implemented since almost day one and using it as an emulator is both much easier and much faster. I really use DOSBox only to quickly run DOS programs and little else.

Reply 23 of 56, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

To run games Dosbox is the better choice.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 24 of 56, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

And you registered just to post that? Wow. But you could at least have mentioned Bochs (nicer reading of their code than Qemu) and VirtualBox (certainly more solid and structured for x86 target emulation).

Reply 26 of 56, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

maybe we can move the troll and the following discussion aside...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 27 of 56, by blueshogun96

User metadata
Rank Newbie
Rank
Newbie

Okay, please... Everyone is entitled to their opinion and what not, but really, if you have nothing good/useful/constructive to say, please just don't say it at all! This is REALLY getting old fast. Don't need it? Don't use it. Quite frankly, I don't see the addition of ANY 3D accelerator chipset to be a necessary feature in DOSBox because hey, we have Glide wrappers for Windows and DOS, don't we? Same goes for other games using proprietary APIs, right? So it isn't exactly a NEED for 3Dfx or PowerVR support, it's clearly a WANT or should I say "bonus feature". How can people seriously complain about that? I'm not trying to be smug or anything because I don't own this project, but I don't see a single one of you bitching with the same arguments in the 3Dfx emulation thread because many of the same claims you all make here pretty much apply there too if you think about it (except for the obvious small choice of games). So please, don't complain about some minor contribution someone is trying to make. Just because YOU don't want/need it personally DOESN'T mean that others don't. Is that so much to ask? Because face it, I'm going to attempt this whether anyone likes it or not.

And thanks to everyone that have been helpful so far.

nextvolume wrote:

Not to sound inappropriate, but wouldn't QEMU have been a better choice as platform to do this work on? PCI has been implemented since almost day one and using it as an emulator is both much easier and much faster. I really use DOSBox only to quickly run DOS programs and little else.

For starters, if you don't want/need this functionality, then just don't use it. Simple as that. Second, I chose dosbox because it's much easier to work with since QEMU wasn't designed to compile with visual studio (afaik, I haven't found any vc++ compatible source projects yet). Third, I don't care you or anyone else doesn't find this to be "useful" as it is highly useful to me and if you were paying attention to this entire thread (or any other NV1 releated thread in this forum), then you'd know that there are DOS games that support this functionality.

Dominus wrote:

To run games Dosbox is the better choice.

This.

h-a-l-9000 wrote:

And I thought Bochs code was difficult to read 😮

It is. QEMU and Bochs are nightmares to deal with. It's hard enough understanding uncommented code you didn't right, isn't it? 😵

Reply 28 of 56, by robertmo

User metadata
Rank l33t++
Rank
l33t++

IIRC this is the first dosbox feature people don't want 😉
The reason is some people think you would be able to make PoverVR emu or some other 3Dcard emu that would be more usefull for them (or more useful generally and you agree with that too). In the 3dfx emu there were also post suggesting making other 3dcards emus, in the MT32 thread suggestions about making SC emu, etc. And cause 3dfx and MT32 are obviously most useful nobody said: "stop developing MT32/3dfx emu and make a SC/PoverVR instead".

I am also sure nobody would complain about making NV1 emu if all more usefull cards emus were already done. Nobody complained about making sbmidi emu cause mpu-401 was already done, nobody complained about making innovision emu as sb, gus and other sound cards emus were already done.

The situation with NV1 is different. You are trying to implement features in the wrong/unusual/unexpected order so just get used to these post appearing from time to time. Nothing you can do about it. Oh well.. you can start working on PowerVR, then Rendition, then S3 Virge, don't know if there are any other more useful cards (not sure if Matrox is) and i guess at the end there will be place for NV1 and nobody would complain then for sure 😉 And after NV1 maybe even some other less useful cars 😉

Reply 29 of 56, by blueshogun96

User metadata
Rank Newbie
Rank
Newbie

Well, your post is rather well written and quite logical in many ways, but lets face it, if I don't do it then, no one will. 😀

Anyway, I have no problem emulating other hardware (and I wouldn't be surprised of PowerVR was easier), but like I said before, I'm doing this because I can and I'm doing it for my own gratification. I definitely plan on looking into PowerVR sometime, but at the moment, my expertise is NVx GPUs and since I'm knowledgeable in this area, I thought I'd see what I could do. I don't mean to be selfish, but I don't like being told what I should and shouldn't do. 😀

Btw, what about the Creative 3D Blaster? I don't know much about it, but some games used it afaik.

Reply 31 of 56, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I don't mean to be selfish, but I don't like being told what I should and shouldn't do.

As first step you should stop replying to the useless comments, saves time and trouble 😉

Reply 32 of 56, by blueshogun96

User metadata
Rank Newbie
Rank
Newbie

Heh, yeah. Best off devoting that time to coding!

I'd say that a few posters suggesting I do other hardware posted some worthwhile opinions, but quite frankly, I think it's best that I stick with a video card arch that I'm familiar with (in this case it's NVx) before attempting another. Would like to look at PowerVR in the near future too though.

Reply 33 of 56, by VoodooFX

User metadata
Rank Newbie
Rank
Newbie

Don't listen to the naysayers blueshogun, if you want to emulate NV1, than I'm all for it, even though I don't own most of the games that support it.

I see emulation a way of preservation not only old games, but the hardware as well.

You're trying to make something that hasn't been done before and if in the end a single game (like often mentioned Panzer Dragoon) benefits from it and even becomes playable for the first time on any emulator, than the trouble is more than worth it, IMHO.

Hey and you're not asking devs to do it for you or instead of you, so I really can't see what the fuss is about.
And I'm also pretty sure, none of them will deny you an advice or help here or three, should you need it.

We may have years, we may have hours but sooner or later we all push up flowers.

Reply 34 of 56, by blueshogun96

User metadata
Rank Newbie
Rank
Newbie

Well, it took me a while to finally realize it, but it turns out that I do indeed have to emulate both PCI functions for this device to work properly. I guess I'll find out whether I have to emulate the rest of the hardware later, but since dosbox already supports MPU-401, I won't have to worry about that. So I added that, and now the nvapi can get the card's base address for mmio registers/memory access. At least I learned not to cut corners, heh.

Right now, my biggest problem is getting dosbox to use my pagehandler 😠 I don't know why it isn't working, and I wouldn't be surprised if it was something simple either.

// Base addresses
#define NV1_MMIO_BASE (0x6E000000) // 0x6E000000
#define NV1_VRAM_BASE (NV1_MMIO_BASE+0x1000000) // 0x6F000000

#define NV1_VRAM_SIZE_2MB 1024*1024*2
#define NV1_VRAM_SIZE_4MB 1024*1024*4

....

PageHandler * MEM_GetPageHandler(Bitu phys_page) {
if (phys_page<memory.pages) {
return memory.phandlers[phys_page];
} else if ((phys_page>=memory.lfb.start_page) && (phys_page<memory.lfb.end_page)) {
return memory.lfb.handler;
} else if ((phys_page>=memory.lfb.start_page+0x01000000/4096) &&
(phys_page<memory.lfb.start_page+0x01000000/4096+16)) {
return memory.lfb.mmiohandler;
} else if ((phys_page>=NV1_MMIO_BASE) && (phys_page<(NV1_VRAM_BASE+NV1_VRAM_SIZE_2MB))) {
return (PageHandler*) nv1_pagehandler;
}
return &illegal_page_handler;
}

The code direcing dosbox to use my pagehandler obvious enough, and I can't quite figure out why it isn't working. Looking at the console, it says that it's actually accessing that memory range too, but it never reaches my page handler. There's a screen of the error generated below, and just in case anyone is curious, that's Battle Arena Toshinden (Demo version) trying to access GPU channel 0, subchannel 0 for something.

So until I can get that going, I can't do any real work on this project. Dying to move forward here...

EDIT: Fixed it. Just forgot to divide the addresses by the size of each page (4096kb). Sorry about that, I knew I was just being stupid 😅. Now I can get down to the nitty gritty for real.

VoodooFX wrote:
Don't listen to the naysayers blueshogun, if you want to emulate NV1, than I'm all for it, even though I don't own most of the g […]
Show full quote

Don't listen to the naysayers blueshogun, if you want to emulate NV1, than I'm all for it, even though I don't own most of the games that support it.

I see emulation a way of preservation not only old games, but the hardware as well.

You're trying to make something that hasn't been done before and if in the end a single game (like often mentioned Panzer Dragoon) benefits from it and even becomes playable for the first time on any emulator, than the trouble is more than worth it, IMHO.

Hey and you're not asking devs to do it for you or instead of you, so I really can't see what the fuss is about.

And I'm also pretty sure, none of them will deny you an advice or help here or three, should you need it.

I agree with the bolded statements 100%. The true purpose of emulation is the preservation of games and it's required hardware. Being able to play your favourite games again is a bonus! 😀

Attachments

  • dosbox_nv1_support_alpha3.png
    Filename
    dosbox_nv1_support_alpha3.png
    File size
    12.29 KiB
    Views
    3660 views
    File comment
    Battle Arena Toshinden properly detecting the NV1's base address.
    File license
    Fair use/fair dealing exception
  • dosbox_nv1_support_alpha4.png
    Filename
    dosbox_nv1_support_alpha4.png
    File size
    23.53 KiB
    Views
    3660 views
    File comment
    Errors generated by dosbox because it's not reading my pagehandler.
    File license
    Fair use/fair dealing exception

Reply 36 of 56, by swaaye

User metadata
Rank l33t++
Rank
l33t++
robertmo wrote:

I am shocked now. If it doesn't do bilinear filtering so what does it do? As i thought bilinear filtering was the most basic feature of 3D accelerators, apart from speeding up, but i guess dosbox already doesn't have speed problems with this early 3D games.

It's a quadratic-based 3D renderer without bilinear filtering. The whole point was to do it a lot faster than a CPU, which made sense when CPUs were 486 and Pentium. It also does audio and 2D. Lots of integrated hardware for the manufacturing capabilities of the time.

http://web.archive.org/web/19970228083039/htt … escription.html

Reply 37 of 56, by blueshogun96

User metadata
Rank Newbie
Rank
Newbie

Going to be getting an actual NV1 soon. Found a guy on the falconfly forums who's willing to part with it for $50 USD. So I'll probably won't get too much positive results for the Windows side until I get it. Testing against Toshinden is much easier and more informative.

swaaye wrote:
robertmo wrote:

I am shocked now. If it doesn't do bilinear filtering so what does it do? As i thought bilinear filtering was the most basic feature of 3D accelerators, apart from speeding up, but i guess dosbox already doesn't have speed problems with this early 3D games.

It's a quadratic-based 3D renderer without bilinear filtering. The whole point was to do it a lot faster than a CPU, which made sense when CPUs were 486 and Pentium. It also does audio and 2D. Lots of integrated hardware for the manufacturing capabilities of the time.

http://web.archive.org/web/19970228083039/htt … escription.html

Well said, but I'd like to expand on this a bit more. Not only did it use quadratic rendering, but those quads were used in the form of NURBs (from what I was told). NURBs (at least back then) weren't ideally calculated and drawn in software.

One of the biggest features this card had was the fact that it used GR "channels" to access the inner GPU registers (the ones that make it draw) instead of having the registers at a fixed address like 3Dfx Voodoo did. The advantage was that each window would have access to it's own channel while not having to worry about what any other applications are doing with the hardware (at least not as much). The card has 16 channels, and each channel has 8 "subchannels". The subchannels themselves are what are used to access the GPU registers. The application or the driver can set each subchannel to whatever it needs it to be (i.e. rectangle, line, bitblt surface, raster-operation (ROP3), etc.) allowing you to have greater control at the sacrifice of simplicity.

Overall, it appears that NVIDIA and SEGA had a motive to make it easier for Sega Saturn games to be ported to the PC, and STILL have exclusive content and ownership of what hardware the game was run on (which is what they preferred since the Sega Genesis was released).

Hopefully that explains what makes this card so "special"... heh.

Reply 38 of 56, by keropi

User metadata
Rank l33t++
Rank
l33t++

Awesome, can't wait for it to be completed!
And to think I had a 4MB edge card unused and sold it at the beginning of the year, I would gladly have donated it to you blueshogun96 for your cause... 🙁

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website