Jump to content


Photo

Xbox Gpu Drivers


  • Please log in to reply
3 replies to this topic

#1 evanRogers

evanRogers

    X-S Enthusiast

  • Members
  • 2 posts

Posted 08 October 2004 - 09:54 PM

Hi,
I'm looking into extracting the xbox's GPU driver and porting it to xbox linux. I haven't found anyone else expressing an interest in doing this, but I have some questions for anyone who is knowledgeable. Also, please tell me if you have read about anyone doing this or something similar.

First, how legal is this? Will MS or nvidia try to sue the pants off of me? (This will be a non-profit project.)

Second, how should I go about doing this? So far the best resrouce i've found is Caustik's CXBX emulator project (http://www.caustik.com/cxbx/progress.htm) He writes that the gpu driver is a statically linked library packaged with every game binary. His emulator finds the library's address in the code segment so it can intercept calls to its functions. He has written source to do this which is available here:

http://cvs.sourcefor...1.1&view=markup

Theoretically, could I use the same method to extract the library binary code so I could port it to a linux shared library?

---
Here's a variety of other technical questions:

Have there been similar projects in the past I could use as a reference, perhaps using different but similar binary executable file formats?

The source appears to only identify the Direct3D 8 library. I assume this means that games using OpenGL or later versions of Direct3D wouldn't work. Is this true? What other limitations or compatability issues might the driver have? I know the xbox can't handle high resolutions, for example. Would the Direct3D API be at all changed or extended to make use of the xbox's hardware? (like the unified memory, for example.)

Any ideas on what other parts of the .xbe would I need to extract? Like the kernel image thunk table or the Thread Local Storage structure? (The .XBE file format can be found below)

http://sourceforge.n...&group_id=56780

- Evan

#2 fghjj

fghjj

    X-S X-perience

  • Members
  • PipPip
  • 455 posts

Posted 09 October 2004 - 05:08 AM

QUOTE
First, how legal is this? Will MS or nvidia try to sue the pants off of me? (This will be a non-profit project.)

Depends on you local law. On bottom of Xbox-Linux page (which has a lot of reverse-engineered info) it says "Everything done on this project is for the sole purpose of writing interoperable software under Sect. 1201 (f) Reverse Engineering exception of the DMCA.". Violating copyright (ex. by copying and spreading code from Xbox's libraries) is offcourse illegal.

QUOTE
Theoretically, could I use the same method to extract the library binary code so I could port it to a linux shared library?

From what I know CXBX basically captures calls to the main Direct3D interface and passes them to a normal Windows Direct3D interface. I don't see how this Direct3D stuff would help in writing a driver for the Xbox Nvidia GeForce "2.5" (or "MX 3" as some call it smile.gif). DirectX is merely an API, the Nvidia GPU is the hardware.

QUOTE
I assume this means that games using OpenGL or later versions of Direct3D wouldn't work. Is this true?

All native Xbox games are DirectX 8 _only_. It's the only API in the XDK.

QUOTE
Would the Direct3D API be at all changed or extended to make use of the xbox's hardware?

Compared to the Windows one it has extra (Xbox-specific) functions, but not a lot of changes it terms of using the interface as a developer.

QUOTE
Any ideas on what other parts of the .xbe would I need to extract?

Why extract code from compiled and linked and optimized .XBEs when you can take "more raw" version of it from the XDK (if you have access to it)?

I have an idea you don't know exactly what you want. Do you want to
1) Run the MS driver for Nvidia on Linux? (impossible, different OS/kernel/everything/whatever)
2) Document the Nvidia GPU? (is being done already by reverse-engineering, but not finished)
3) Make DirectX on Linux possible? (see Wine).

Edited by fghjj, 09 October 2004 - 05:10 AM.


#3 evanRogers

evanRogers

    X-S Enthusiast

  • Members
  • 2 posts

Posted 09 October 2004 - 07:42 AM

QUOTE
From what I know CXBX basically captures calls to the main Direct3D interface and passes them to a normal Windows Direct3D interface. I don't see how this Direct3D stuff would help in writing a driver for the Xbox Nvidia GeForce "2.5" (or "MX 3" as some call it ). DirectX is merely an API, the Nvidia GPU is the hardware.


I don't plan on writing a driver, but finding the address of the driver library in the .xbe. CXBX appears to search the code segment for the functions in the library, but couldn't i theoretically also find the beginning and end of the library itself?

QUOTE
have an idea you don't know exactly what you want. Do you want to
1) Run the MS driver for Nvidia on Linux? (impossible, different OS/kernel/everything/whatever)
2) Document the Nvidia GPU? (is being done already by reverse-engineering, but not finished)
3) Make DirectX on Linux possible? (see Wine).


I want to run the ms driver for nvidia on linux. Aren't the OS and the kernel the same thing? Couldn't I emulate calls to the kernel the same way CXBX does?

QUOTE
Why extract code from compiled and linked and optimized .XBEs when you can take "more raw" version of it from the XDK (if you have access to it)?

You're right, I hadn't considered that, but it would probably be easier. I figured using a pirated copy of the xdk would destroy any chance that this might be considered legal reverse engineering. But if you're right about copying and distributing code (even compiled code?) from xbox libraries being illegal, then I guess I'm screwed anyways. If that were true, wouldn't distributing xbox games as roms be considered illegal then too?

#4 TOOGAM

TOOGAM

    X-S Young Member

  • Members
  • Pip
  • 49 posts
  • Xbox Version:v1.1

Posted 11 October 2004 - 09:48 PM

QUOTE (evanRogers @ Oct 9 2004, 08:45 AM)

I figured using a pirated copy of the xdk would destroy any chance that this might be considered legal reverse engineering.


That is true.

QUOTE (evanRogers @ Oct 9 2004, 08:45 AM)

But if you're right about copying and distributing code (even compiled code?) from xbox libraries being illegal, then I guess I'm screwed anyways.


That is also true.

QUOTE (evanRogers @ Oct 9 2004, 08:45 AM)

If that were true, wouldn't distributing xbox games as roms be considered illegal then too?


And yes, that is true too (assuming that by "xbox games" you are referring to official, commercial Xbox games). In fact, that statement is the most blatantly true statement of any of these.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users