Help - Search - Members - Calendar
Full Version: Xenkit
Scenyx Entertainment Community > Xbox360 Forums > Xbox 360 Hacking Forums > Software Exploits Development / Research
openxdkman
xenKit (based on tmbinc's gpu demo) brings graphic hardware acceleration to 360 homebrewers!

IPB Image

Here is the link to the project changelog (bookmark it and check it often) :
http://minilgos.perso.sfr.fr/xenkit/changelog.txt


Divided into 3 parts (3 contributors). First and third part are not my work...
(tmbinc did the hard work. Tser found a way to reuse xn/a shader compiler)

3 parts :

1) A complete fullscreen 3D demo source for Linux, by tmbinc : "gpu" demo
Look for gpu-0.0.3.tar.gz and romextract-0.0.1.tar.gz on tmbinc's blog :
http://debugmo.de (Warning: works under Debian & crashes under Gentoo)

2) Gentoo support & X11 addon files for windowed mode :
(brings instantly keyboard and mouse easy management under X11)
First, I've merged gpu-0.0.3, romextract-0.0.1 and Demo 04 together, so, now, it's really running and decrypting firmware automatically! Amazing!
By declaring MESH1 or MESH2 you can see a space fighter or a biplane.
I've adjusted it so it compiles immediately, without warning under Gentoo!
http://minilgos.perso.sfr.fr/xenkit/xenkit_core.zip
EDIT : Thanks to happy_bunny the version below works on falcon motherboards now (or xelllaunched linux, more likely) -edram init added-
http://minilgos.perso.sfr.fr/xenkit/xenkit_core_fixed.zip

And now X11 support (just overwrite these files into gpu-0.0.3_merge):
http://minilgos.perso.sfr.fr/xenkit/xenkit_x11.zip
You can now control your 3D meshes with mouse or keyboard!
And now gouraud lighting shaders:
http://minilgos.perso.sfr.fr/xenkit/xenk...11_lighting.zip
(I may have messed up with light rotations, but looks nice anyway...)
Have fun, Gentoo LiveCD Beta 2 users!

3) Tser's xn/a based 360 native shader compiler source (Thanks a lot Tser!)
http://minilgos.perso.sfr.fr/xenkit/rshadercompiler.zip

Technical details :
- Standard C language
- Low level API's (it's quite the same programming style I've used in pbkit)
- Can run under Gentoo Live Beta 2, Debian and probably other distros
- No hard disk necessary (since Gentoo Live Beta 2 doesn't need one)
- Pure standard X11 calls in order to create a standard window (in Part 2)
- 3D rendering via Xenos chipset, in frame buffer (Part 2: over window)
- Full screen rendering in Part 1 (a desktop display will cause flickering)
- Possibly slowed down, for now, until we adjust kernel (Gentoo Beta 3?)
- Customizable pixel and vertex shaders (via a "xn/a for windows" program)
- For now, requires to set root password ("sudo passwd") and login as root

EDIT: I pushed tmbinc hard to get a release before fall update because I was sure MS would change 2bl and prevent reflashing of older firmware. I wanted to convice people that 3D homebrew on 360 was not just a dream. I was wrong, since fall update didn't change 2bl. Sorry tmbinc, for being so pushy!

If you don't like X11 and you don't have any desktop that would cause screen to flicker (Xenos drawing and desktop drawing at same time), part 1 alone is enough, but becareful about the needed or not needed constant in romextract.c (see readmetoo.txt).

Otherwise, especially if you are using Gentoo LiveCD Beta 2, use part 2.
You can perfectly enlarge the window size in code to cover all screen, all that matters is that you avoid screen flickering by having Xenos and Desktop or other windows draw at separate areas of screens.

EDIT : Couldn't stop screen flickering under Gentoo. More study needed.

Many thanks to tmbinc and Tser! Dream becomes reality!
zouzzz
hello,
for the gentoo question, go here ----> http://forums.gentoo.org/index.php

wink.gif

Have a nice day.
Sonic-NKT
sounds very intresting, but do i get it right?
this is no new xdriver but a homebrew solution to get more hardware access/acceleration in linux for special applications?
openxdkman
Source is small. Just like pbKit, once you understand fully how GPU works, you can do whatever you want :
- Create clean drivers for Linux
- Create modules for non-linux homebrew solutions
(solutions like openxdk, ps2link, etc... -minidash!-)

And yes, the XBMC port can happen now on 360...
(at least interface and codecs with open sources)
Sonic-NKT
this is awesome!!!
cant wait for a first homebrew dash or even XBMC wink.gif
Great Work!!

PS: who is behind this project?
openxdkman
You will know when it's released (if he doesn't want to stay anonymous)

I'm progressing fast, I hope I can submit a cleaned up version to him saturday or sunday.

Unfortunately, Print Screen key doesn't capture the Xenos overlay. No snapshot.

It's a colored triangle (3 different colors at each corner, with color interpolation applied to intermediate pixels), surrounded by a big green rotating distorted tube that does several loops...

Background is plain flashy orange...

I'm cleaning up, I'm cleaning up...
zouzzz
Good. Very good.
rolleyes.gif
openxdkman
Cleaning up is almost done (just 1 file to treat).
I've asked its author to start reviewing the package (100Kb of C sources).
Shouldn't be long now before you can grab it...
thegardner
This is great news,

Thank you openxdkman smile.gif
openxdkman
Last file is troublesome, but there might be a way to read that data directly from firmware and upload it into GPU...

About shader compiler (just a "xn/a for windows" project), I think it's legal stuff and it may be published by its author (another different person) soon...
zouzzz
ok, we wait sunday evening biggrin.gif
openxdkman
Got a word from demo author. He wants to clean up things a bit more in src.
Unfortunately he needs more time to do it.

On the other hand, Tser allowed me to publish his little XNA wrapper.
You have the link to it in the first post of this thread. Thanks Tser!
(btw, Tser is not the author of the 3D demo, so don't bother him about that)
openxdkman
The last troublesome file is some data that need to be uploaded into GPU in order to have it work properly.

But, in order to have a 100% legal set of C source files, it's better to read that small amount of data from firmware and upload it into GPU. You certainly realize the amount of work needed to read something from firmware... automatically...

Will take time. Until then, you can start learning hlsl... (xn/a tutorials can help)

It's a shame that we won't be able to do enough buzz to prevent people from upgrading to fall update and miss nice incoming 360 homebrew, but it's worthy to wait more...

But I realize, anyway, that not a lots of people will take the risk to push the GPU horsepower to its extreme limit through homebrew... Since the risk of overheating their console is very high, unless... it's water cooled...

So... final number of 360 homebrewers may be low, whatever are our efforts.

The cherry on the cake would be to find a way to display GPU and CPU temperatures with simple software calls... I wonder if it's possible...

On the other hand we can set a constant in source, that will limit the horsepower, and warn people they should lift this limit only on water cooled consoles...

I think future 360 homebrew code should come as source and not as binary, so people can verify this limit. Also, since flashing can be done in code, it's better to check what a homebrew is doing...
Sonic-NKT
its a bit strange that this news wont get spread... not even on xboxhacker or the front page...

hmm now i have to save some money to mod my 360, remove those damn x-clamps and exchange those with a watercooling system smile.gif
how much did you spend openxdkman on your setup?
openxdkman
If there wasn't the risk of losing many potential 360 homebrew users,
I wouldn't care if xenKit wasn't noticed by public (like pbKit).
It's not the large public who will invest time tuning a shader...
So, as long as GPU specialists know about it, that would be enough.

If some homebrew coder use these low level API to create something great,
it's their program that will be shown on front pages. That's ok.
For people looking for hidden knowledge, fame is, sometimes, the enemy.

So, need to make something out of this before fall update. That will be tricky.
(I guess we have only 2 weeks before fall update and halo 3 release)

With the intermediate version I have, I can start porting pbKit Demo 04.
(3D renderer accepting textured meshes from 3DSMax files)

About the cost of my water cooling mod, here is the link to the details :
http://forums.xbox-scene.com/index.php?showtopic=610938
To be short : 350 euros (without VAT, in US, that's $300 maybe)
- I wanted a silent cooled tank (reserator 1 v2, 210 euros)
- I wanted something simple for water blocks (X-Matic, 90 euros)
Of course, that's the easiest deluxe solution, you can probably lower cost,
if you tinker a bit more cheap spare parts.

X-Matic was great since it reuses original heat sinks legs.
(So all dimensions are perfect. Distance between surfaces are perfect, etc...)
It covers the 4 ram chipsets, GPU and CPU at once. Tubes location is great.
Mod is reversible (no heat sink or Xclamp were damaged during the show).
Result is amazingly silent, so, I don't regret spending so much money.
openxdkman
I've updated Tser's rshadercompiler archive (link in first post of thread).
I've put inside the shader sources used in the coming 3D demo :

- basic_ps.hlsl & basic_vs.hlsl
They allow to render the non-textured triangle in the middle of screen
- texture_ps.hlsl & texture_vs.hlsl
They render textured triangles (for distorted tubes).

Actually, the simplest shaders you can do (non textured, and textured version).

If you know a bit pbKit, it's the same kind of shaders used in :
- Demo 03 (pixel shader does a 2D texture mapping operation)
- Demo 04 (same as above, plus multiplication of matrix in vertex shader, plus lighting)
pbKit thread :
http://forums.xbox-scene.com/index.php?sho...573524&st=0

I've set the Project to compile the 4 files if you run it under xn/a environment.

The result are .psu & .vsu files, native microcode for Xenos GPU chipset.

Still no ETA for the 3D Demo. Keep faith (just need to finish the fw reading).

EDIT: I've updated shaders files names to match a new intermediate version I've just received. Now constants generated by shader compiler are correctly parsed and uploaded into GPU. That's extremely usefuly when compiler optimizes madly and you don't want to manually change a constant setting in code after each little change made in the shader source.
openxdkman
Updated first post. xenKit is now officially divided into 3 parts :
Part 1 allows full screen rendering (*) and doesn't require X11 or any desktop
Part 2 allows windowed mode and will help you greatly if you have X11
Part 3 is required if you want to compile your own modified shaders

(You HAVE to use Part 1 + Part 2 under Gentoo LiveCD Beta 2, because
of screen flickering issue : desktop and Xenos drawing into same surface.
Also Part 1 has no way to quit, so you will have to reboot after you are
finished watching the demo. Part 2 can detect key strokes with X11 events
detection and exit nicely)

* : 1024x720 (if you have 1280x720, it will be displayed on left part of screen)
I ran into troubles when attempting the resolve with a width > 1024 pixels.
openxdkman
Part 2 done, but pretty useless without part 1.

I'm working hard, atm, on porting pbKit Demo 04 to 360 (gouraud, 1 light).
(pbKit mesh.c, reading textured mesh from .3ds+.bmp file, may be in part 1).

Still no ETA for the legal GPU initialization of part 1, but work is in progress...

(It's very hard to stop playing Blue Dragon... But I'll resist until port is done)
openxdkman
Success!!!
(just need to add lighting, shouldn't be hard with Tser's wonderful rshadercompiler...)

IPB Image

Temporary performance estimation :

Gouraud, 1 light

PS2 : 250.000 vertex/frame at 60fps (vertex batch=3 vertex par face)
XB1 : 330.000 vertex/frame
360 : 3.100.000 vertex/frame (that's 62 Millions faces -triangles- per second)
PS3 : not yet measured (need a virtual gpu or improved rsx access hack)

No lighting

360 : 3.900.000 vertex/frame at 60fps (using Gentoo LiveCD Beta 2, uncached)
(that's 78 Millions faces -triangles- per second)

Minimum 10 times faster than XB1... Sweet!


What is a vertex? :

In short, 3 vertex = 1 face -triangle or polygon with 3 corners-, but if your meshes are well optimized that can go down to around 1 vertex = 1 face (strips, i.e chains of contiguous triangles).

1 vertex is usually a group of floats, for example : (px,py,pz,nx,ny,nz,tu,tv)
p:polygon corner coordinates
n:normal to the face, from this corner (used for gouraud or phong lighting calculation)
t:associated mapping point coordinates in the mapped texture


Demo author says in the readme file that if uncached is replaced with write combined memory access speed gain can be enormous (10x-100x) for commands. Since I've tested with Biplane mesh (30000 faces, thus 90000 vertices), it's possible the largest part of frame time is used by GPU for direct dma accesses (and thus no possible speed gain there, but I may be wrong).


Many thanks to "Xenos 3D Library demo" author for letting me play with it before its release!!!
(I bet he will sign his readme file. So you will know who is its author at release time).

Keep faith, it should be released soon (but no ETA, decyphering fw automatically is tricky, so be patient), either in this thread, or on author's favorite site (in which case I will just post the link to there).
openxdkman
Great News!

Tmbinc (Yeah, it's him again), allowed me to publish 99% of his 3D demo source for 360 !
(mixed with Demo 04 port, i.e the function that extracts data from .3ds & .bmp files)

The remaining 1% is the GPU initialization code that still needs to be read from fw.
So it won't compile yet, but you can start learning from the source.

Many thanks, tmbinc! You rock! (You can read the readme file, where he explains all)

(Link to preview archive updated in first post of this thread)
Cedric2911
smile.gif great news smile.gif and great job !!
amazing work !
eta for openxdk360 ?^^ lol
that will be a nice day smile.gif
Cpas
Hehe, viva tmbinc smile.gif
TheLegace
openxdkman, you are awesome fellow, and really great for the scene, just no one knows it yet, and trust me they will.


And trust me, there will be a homebrew solution coming in months... I know wink.gif . I know my opinion is useless, but I guess your gonna have to trust me......
Cedric2911
anynews ?
openxdkman
On tmbinc side, no final release yet. He had to take a look to the changes brought by the tiny lastest firmware update. He noticed comparisons in HV are being turned into instructions that take exactly the same time if comparison fails or succeeds....
Definitely a response to the time attack hack...
(not necessarily blocking time attack done at boot time, but will prevent time attack at HV level)

On my side, I won't be able to add lighting until next week, I have too much work to handle with my current job. I should have free time again next weekend.

So becarefull with the lastest tiny firmware update... If you can, stick to 5766 or below.
However, once you got your CPU keys, ivc reports that upgrade to it, then downgrade from it, is still possible (blows up one additional efuse, as usual).
LIVE Prophet
Awesome guys, I had been absent for a while from homebrew and Im still taking in all this, especially with the now downgradeable kernel!
openxdkman
There are reports that Halo 3 discs will have only firmware 5766 update on them.

That means that if you are strong enough to resist the envy to connect to Live (I know... will be hard), your firmware will still be ok for time attack and upgrade-downgrade infectus trick.

Let the people from xbh study firmware updates and give their opinion before accepting them.
openxdkman
Automatic fw reading (for legal GPU initialization) is 90% done
The waiting is paying off... Shouldn't be long now.

Also another gift may come along... a way to use a bluetooth dongle directly plugged into 360 usb port, in order to support... wiimote...

_zlinky
Hey openxdkman! Great work, thanks alot!

I was wondering if you plan on writing a tech doc on xenos like you did nv2a? Thanks.
openxdkman
Don't forget it's tmbinc's work, not mine (porting Demo 04 was not hard nor long, so ignore it).
I'm just encouraging him (and harassing him) so it becomes usable by all as soon as possible.
All credits must go to tmbinc and Tser.

What do you call a "tech doc"? The description of a "push buffer"? Well, maybe, much later. I don't pretend I understand what is written in tmbinc's 3D demo... yet.
_zlinky
Actually, I was reffering to things like the GPU registers, memory mappings, etc. I can understand perfectly if you don't have the time or see the need to do so, just asking smile.gif
openxdkman
It took me 6 months to gather these infos for nv2a... You will have to be patient for extra infos...
However there are open source radeon drivers out there... That may help to understand stuff...
(it seems they cover 2D but not 3D, but that's a start)

For gaming, we have what we need already (just sound is missing).
openxdkman
Final version of tmbinc's "gpu" 3D demo released!!!

tmbinc's blog :
http://x226.org/
EDIT: (updated url)
http://debugmo.de/

(Automatically reads gpu initialisation sequence from firmware!!! Amazing!!!)

Thanks a lot tmbinc!!! 360 homebrew is taking a wonderful boost now!


PS: My personal goal now, is to try to create a coherent xenKit set, based on tmbinc's "gpu" demo, allowing easy port of xb1 pbkit Demos or ps2 gskit+vulib starter kits. I will use X11 for mouse and keyboard events. I hope I will be able to publish something next weekend.
openxdkman
Updated Tser's rshadercompiler archive with better matching shaders names.
The .vsu and .psu binary shaders files you will generate, just by running the solution file with xn/a 1.0, are the ones expected by tmbinc's demo gpu-0.0.3.

Right now, I'm trying to find missing parts in order to compile under Gentoo.
Need to add mspack headers and I will try to merge gpu-0.0.3 with romextract.
openxdkman
Good news, Gentoo LiveCD Beta 2 users!
I've released a first complete version of xenkit_core.zip (see link in first post of thread). It decyphered all my 4532 firmware like a charm! Amazing!
Just copy files, type in "make" then "./gpu" (under root login).
Technically it's a merge of gpu-0.0.3, romextract-0.0.1 and pbkit Demo 04 (.3ds files support). See file readmetoo.txt for details.

Now you have it all, all legal and all working... Can't do more...
Well done tmbinc! (And before fall update! We will get more homebrewers!)
pacman24
sorry for the ignorance, but does this mean we gots linux?
luther349
3d acell working on xbox linux 360 thats just to frigen sweet.
Mr_Milenko
Funny.. the box thats locked up tighter than a nuns vagina gets hacked and has 3D acceleration under Linux.. The box that is as loose as my neighbors daughter.. no 3D acceleration.. Good work but its still a damn shame :-/
PirateElf
QUOTE(luther349 @ Oct 1 2007, 04:44 AM) *

3d acell working on xbox linux 360 thats just to frigen sweet.



Oh sweet sweet support.

Dude I think I just filled the cup.
openxdkman
I've just added in first post the link to xenkit_x11.zip. A few files to overwrite into gpu-0.0.3_merge, so you get mouse and keyboard support in windowed mode.

Now, you can control your 3D meshes with mouse or keyboard!
Have fun!
Murder Inc.
FREAKING SWEET!!!
Acer1985
this is awesome.... I cant believe i just found this for the first time!

Does this all mean that we can make our own games without needing XNA? Also, would we be able to use the 360 controller? or is there just mouse and keyboard support for now?
Sonic-NKT
I think there is allready a linux driver for the USB controller but i think the wireless doesnt work yet
ZASADAR
does this mean we can play linux games like quake in opengl?
openxdkman
Friendly graphic libraries (like opengl) are high level apis, made with several api layers inside it.
This thread will give you the lowest level api layer. Feel free to write and publish upper layers.
openxdkman
Little update!

I've added, in first post of this thread, a link to xenkit_x11_lighting.zip.
They are new and replacement files to add to xenkit_core.zip + xenkit_x11.zip files.
Non-x11 users shouldn't have too much problem removing x11 references.

This patch will show you gouraud lighting shaders and how to adapt code to use them.

Have fun!

PS: I surely messed up the light rotations... but looks nice anyway...
Performance goes down from 3.900.000 v/f to 3.100.000 v/f (at 60fps)
_zlinky
It would be nice to see an OpenGL Driver for both Xbox1 and Xbox360 linux smile.gif But I need to actually learn more about how unix works in general.
openxdkman
Thanks to happy_bunny the version below works on falcon motherboards now (or xelllaunched linux, more likely) -edram init added-

http://minilgos.perso.sfr.fr/xenkit/xenkit_core_fixed.zip
hack.rid
does this mean there is now hardware acceleration for 3d or at least 2d in linux??

best regards
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.