xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Xbox Gpu Drivers, extracting static libraries from games
evanRogers
post Oct 8 2004, 09:54 PM
Post #1


X-S Enthusiast


Group: Members
Posts: 2
Joined: 8-October 04
Member No.: 154222



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.sourceforge.net/viewcvs.py/cxbx...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.net/docman/display_doc....&group_id=56780

- Evan
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
fghjj
post Oct 9 2004, 05:08 AM
Post #2


X-S X-perience
**

Group: Members
Posts: 455
Joined: 27-April 04
Member No.: 116723



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).

This post has been edited by fghjj: Oct 9 2004, 05:10 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
evanRogers
post Oct 9 2004, 07:42 AM
Post #3


X-S Enthusiast


Group: Members
Posts: 2
Joined: 8-October 04
Member No.: 154222



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?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
TOOGAM
post Oct 11 2004, 09:48 PM
Post #4


X-S Young Member
*

Group: Members
Posts: 49
Joined: 9-September 03
Member No.: 61492
Xbox Version: v1.1



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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 19th June 2013 - 10:45 AM