Next Generation Emulation banner

1 - 8 of 8 Posts

·
Registered
Joined
·
3 Posts
Discussion Starter #1
Hey, I'm interested in extracting the xbox's nvidia gpu driver and porting it to xbox linux. I've looked everywhere but no one seems to be pursuing this, though it has obvious advantages. Maybe there are legal issues? Anyways, you say "Xbox games use statically linked libraries that directly access the NVidia chip and other hardware components." I haven't looked at your souce yet, but do you think I can use the same method you used to locate the library address? Also, have you read about anyone else trying to do this?
 

·
Administrator
Joined
·
8,200 Posts
evanRogers said:
Hey, I'm interested in extracting the xbox's nvidia gpu driver and porting it to xbox linux. I've looked everywhere but no one seems to be pursuing this, though it has obvious advantages. Maybe there are legal issues? Anyways, you say "Xbox games use statically linked libraries that directly access the NVidia chip and other hardware components." I haven't looked at your souce yet, but do you think I can use the same method you used to locate the library address? Also, have you read about anyone else trying to do this?
you would have better chance if you asked at
http://forums.xbox-scene.com/index.php
im not sure how legal it would be to extract nVidia's drivers (im guessing it should be OK since nVidia's PC drivers are available for everyone and some people modify them)
nway, like i said, check out xbox-scene. only emu authors could possibly answer you here.
 

·
Shadow of nothing...
Joined
·
6,071 Posts
evanRogers said:
Hey, I'm interested in extracting the xbox's nvidia gpu driver and porting it to xbox linux. I've looked everywhere but no one seems to be pursuing this, though it has obvious advantages. Maybe there are legal issues? Anyways, you say "Xbox games use statically linked libraries that directly access the NVidia chip and other hardware components." I haven't looked at your souce yet, but do you think I can use the same method you used to locate the library address? Also, have you read about anyone else trying to do this?
It would be great if you could extract the audio drivers from xbox's nVidia nForce. It would really help the OpenXDK project alot. Caustik is looking for someone who can do that. If you can, please do. And yeah, xbox-scene should be able to help you with this if you are having trouble.
 

·
Premium Member
Joined
·
53 Posts
Hmm, what do you mean with extracting xbox's nvidia driver? The XDK uses a Direct3D to nVidia driver which is only for the XDK. It is a part of it and it cannot be "extracted" as it is designed to work only with all the XDK components. It's like if you compile a project with 20 .cpp files and after this you say: let's try to extract 7 of the files and use them for a driver on linux.

So that means you need to decompile the whole XDK and then you could rewrite it to a Direct3D driver for linux. But I don't know any Direct3D application for linux ;-)

So you would need to rewrite it to OpenGL.
And publishing all this stuff is illegal (use of parrts of M$ source code). It's the same you would use parts of the windows source code.

What you could do is to write your own nVidia driver by using info you got from some papers or other drivers. That's really much of work.
==> In your case porting means completely new writing by using some info from the GPU driver.

Answer to 2nd question: Use a decompiler to locate XDK functions.
Or if you want to call the functions, so they access the hardware: Then you need to compile the libraries in a application and using these XDK libraries is illegal.
 

·
Registered
Joined
·
3 Posts
Discussion Starter #5
i was hoping the driver code would be modular - as in the static library handling the direct3D to nvidia part wouldn't be dependent on anything except the nvidia hardware and the standard directx 8 libraries.

however, if it's impossible to pull the library out of the .xbe without pulling the rest of the xdk libraries out with it, couldn't I just use the whole compiled .xbe? Why not write a directx or opengl library that passes all api calls to existing functions in the .xbe? Executing these functions would require that the xbox kernel be emulated, I suppose, which CXBX already does, right?

the idea here is to allow games in linux to use the xbox hardware without actually writing a whole new driver.

Is the possible, legally or illegally?
 

·
Premium Member
Joined
·
53 Posts
I think you try to mix up stuff which is not compatible:
1. Cxbx runs not on linux.
2. Cxbx's kernel emulation is not good enough to emulate the hardware access functions (we have only stuff like open/read/write files, etc., no SMBus/PCI/AGP read/write functions)
3. You can port a OpenGL to DirectX wrapper to the XBOX using the XDK, but publishing apps which are compiled with the XDK is illegal
4. You want to do a hack which uses the XDK to run 3D stuff on a linux system on the Xbox.
I recomend you writing a new driver for nv2a. It is not that difficult, but it is almost as much work as doing what you want to.
 

·
Registered
Joined
·
3 Posts
Discussion Starter #7
I am mixing up OS's. I hoped Wine might help with that, but I guess I could just port this to windows instead of linux. It just needs to run on an xbox.

By hardware access functions do you mean calls to the kernel, to the bios, or to the actual hardware? If it were the actual hardware I wouldn't see a problem. If they were calls to the bios, there would probably be problems because when you install a different OS on the xbox i think it bypasses the bios. (is this true?) If you are talking about kernel calls then I guess I would be stuck emulating the bus access, which does almost sound as hard as just writing an nvidia driver. I've been told that a project to document to the xbox's gpu is in the works, but I can't find it anywhere on xbox-scene or google. Any help?
 

·
Premium Member
Joined
·
53 Posts
The XDK uses calls to the kernel functions to access the hardware. Although there are parts which do it without the kernel, in most cases you need the kernel functions.
You could try to write your own driver, but using the XDK libs is not possible! You would need a wrapper who translates the xbox kernel calls to linux kernel calls.

Hmm, a project to document the xbox gpu? Never heard about it, but I think it is almost everything known. At least I know the following:

It is nv2a chip, works almost like the nv30 chip, but has some slight differences.
For VGA mode, etc. look at the xbox-linux project (www.xbox-linux.org).
The 3D stuff works via a push buffer technology. They use DMA channels to submit write combined buffers containing write offsets and the data. This fills a special 3D structure which is parsed by the GPU and as a result you get a picture on your screen.

But that is not that easy. You have many registers, interrupts, data formats (for example there's are 4 texture stages and the texture format is a 8bit integer, so you need a lookup table to know what kind of format (A8R8G8B8/R5G6B5, etc.).

Hmm, and porting to windows makes no sense, there are nvidia drivers for windows and also for linux. Wine is too slow.
You can try to write a driver for the nv2a which works on the xbox. Or try the nvidia driver on the xbox with linux.
 
1 - 8 of 8 Posts
Top