OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:45 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: nvidia stuff
PostPosted: Sat Apr 02, 2016 3:21 pm 
Offline
Member
Member

Joined: Sat Oct 16, 2010 3:38 pm
Posts: 587
Does anyone have any information about nvidia cards? Anything basic, such as switching video modes, maybe 2D acceleration.
There should be more information about those things on the wiki.
If nobody here has this information... is it legal for me to post such information if i reverse engineer the cards myself?


Top
 Profile  
 
 Post subject: Re: nvidia stuff
PostPosted: Sun Apr 03, 2016 2:36 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
Save yourself the effort of redoing all the existing research:
https://nouveau.freedesktop.org/wiki/

Edit: and perhaps clicking through links would've been prudent as well.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: nvidia stuff
PostPosted: Sun Apr 03, 2016 11:21 am 
Offline
Member
Member

Joined: Sat Oct 16, 2010 3:38 pm
Posts: 587
Combuster wrote:
Save yourself the effort of redoing all the existing research:
https://nouveau.freedesktop.org/wiki/

Edit: and perhaps clicking through links would've been prudent as well.

This article does not specify how to do anything, just points to some docs. The documentatino for the nvidia cards (from envytools) is very complex, and is not really intended for beginners. It would be nice to have an article explaining the basics, such as switching video modes.


Top
 Profile  
 
 Post subject: Re: nvidia stuff
PostPosted: Mon Apr 04, 2016 8:26 pm 
Offline
Member
Member

Joined: Mon Jan 03, 2011 6:58 pm
Posts: 283
mariuszp wrote:
Combuster wrote:
...

This article does not specify how to do anything, just points to some docs. The documentatino for the nvidia cards (from envytools) is very complex, and is not really intended for beginners. It would be nice to have an article explaining the basics, such as switching video modes.


Writing an OS isn't for beginners. (Nor is writing video drivers) Maybe your question would be better received at StackOverflow (or similar sites)...

- Monk


Top
 Profile  
 
 Post subject: Re: nvidia stuff
PostPosted: Tue Apr 05, 2016 3:24 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
There's at least some amount of documentation on the wiki, mostly centered around the VGA, that actually deals with how graphics hardware interfaces a plug on the outside and a CPU in the inside. If you are able to set 720x400 16-color graphics mode on a VGA with your own driver, then you probably know enough of the basics to follow through with more complicated hardware.

And yes, that resolution is important, because it's 1) a valid mode on VGA CRTs and 2) there are no register files for that, so you have to calculate them by hand. There should be enough information on the wiki alone to solve this particular problem.

Once you're done with that, you probably have the basic terminology level you need to make at least some sense of graphics documentation. Diving straight into nvidia is essentially a form of sadomasochism and the best education for that is probably to let you fail first. And even then, writing a mode-setter using only documentation without other sources of reference is an exceptionally difficult task to pull off.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: nvidia stuff
PostPosted: Tue Apr 05, 2016 5:54 am 
Offline
Member
Member

Joined: Wed Oct 26, 2011 12:00 pm
Posts: 202
mariuszp wrote:
Combuster wrote:
Save yourself the effort of redoing all the existing research:
https://nouveau.freedesktop.org/wiki/

Edit: and perhaps clicking through links would've been prudent as well.

This article does not specify how to do anything, just points to some docs. The documentatino for the nvidia cards (from envytools) is very complex, and is not really intended for beginners. It would be nice to have an article explaining the basics, such as switching video modes.


So you'd rather try to reverse engineer the cards by yourself as you mentioned than you'd try to follow the actual documentation (even if sparse)? Getting any native video driver working, even just in basic 2D is a really complex task. I'd advise you to start with other drivers and stick to VESA/VGA as long as possible. ;-)

_________________
mollenos | gracht (protocol library) | vioarr (window-manager) | bake (package manager)


Top
 Profile  
 
 Post subject: Re: nvidia stuff
PostPosted: Tue Apr 05, 2016 8:03 am 
Offline
Member
Member

Joined: Sat Oct 16, 2010 3:38 pm
Posts: 587
MollenOS wrote:
mariuszp wrote:
Combuster wrote:
Save yourself the effort of redoing all the existing research:
https://nouveau.freedesktop.org/wiki/

Edit: and perhaps clicking through links would've been prudent as well.

This article does not specify how to do anything, just points to some docs. The documentatino for the nvidia cards (from envytools) is very complex, and is not really intended for beginners. It would be nice to have an article explaining the basics, such as switching video modes.


So you'd rather try to reverse engineer the cards by yourself as you mentioned than you'd try to follow the actual documentation (even if sparse)? Getting any native video driver working, even just in basic 2D is a really complex task. I'd advise you to start with other drivers and stick to VESA/VGA as long as possible. ;-)


Well, my idea was to essentially translate the VESA BIOS code from a nVidia card into C.

I may have incorrectly assumed that mode setting is just a specific command supported by the card (since each card has specific modes it supports).

The envytools docs seem to be talking mostly talking about how to control the GPU (the processor, not the graphics card itself), which is what lead me to think that said documentation is perhaps only interested on the operation of the GPU.

And as for setting VGA modes manually: is there actually a standard way to do this without the BIOS? There are tons of documentation on the VGA on the internet, and they all use the BIOS for mode switching, and it is non-trivial to set the mode by just playing around with VGA registers. I did see code for switching to mode 13h etc without the BIOS, but it relied on register dumps, which suggests that the author themself did not know what they were doing.

What starting point should I then take? Is it the CRT registers that I need to understand first?


Top
 Profile  
 
 Post subject: Re: nvidia stuff
PostPosted: Tue Apr 05, 2016 8:18 am 
Online
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Just do it and prove everybody wrong.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group