Help - Search - Members - Calendar
Full Version: Pbkit
Scenyx Entertainment Community > Xbox1 Forums > Software Forums > Development
openxdkman
pbKit is a project for openxdk library users and its objective is to bring graphic hardware acceleration. 'pb' is 'Push Buffer' (GPU commands buffer).

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

May 2007 openxdk pre-compiled libraries (for Cygwin) :
http://minilgos.perso.sfr.fr/openxdk.zip (1.8 Mb, .a+.h, +480i patch)
(1st version directly compatible with pbKit -no need to patch openxdk-)

Other links :
http://minilgos.perso.sfr.fr/pbkit/archivelog.txt
http://minilgos.perso.sfr.fr/pbkit/inner.txt
http://minilgos.perso.sfr.fr/pbkit/outer.txt
http://minilgos.perso.sfr.fr/pbkit/openxdk_patch.zip (no longer needed)http://minilgos.perso.sfr.fr/pbkit/pbkit_core.zip
http://minilgos.perso.sfr.fr/pbkit/pbkit_demos.zip

EDIT:
Thanks to Maturion you can download all this from sourceforge.net now!
Look for openxdk project, all packages download link, click left side of table.
_zlinky
I wish you the best on this. I'd like to contribute, but I'm too busy with other things right now.
ugenn
Seems like something really great in the making.

Any plans for getting hw accel to work into the xorg /
dri drivers for xbox-linux?
openxdkman
I've sent all my study results to d0wnlab (open dash author) who is fond of linux (I'm not). Anyway, I'm sure anyone will be able to insert the push buffer engine src in existing mesa, dri, whatever src skeletons. I'm not using linux and I don't plan to work on it. My hobby is to create code for os-less pc's (pc0). But I'm interested in porting to xb1 and ps2 too, but not for added os'es, just the raw consoles.
I want people to be able to do things by just pushing a power on button. Nothing more. Without harddisk weakness leading to damaged configuration (whatever is the reason) leading to huge time waste.
openxdkman
You can play with push buffer engine now (see changelog).
But unless you are a NVidia employee, you won't be able to draw a thing.
My first attempts to draw something failed, but I will work on it until it works...
The hardest (first) step, to be able to reach inner registers, is done. Be happy...
Let's the knowledge hunt begin...
openxdkman
I have tears in my eyes...
IT DRAWS! IT DRAWS! IT DRAWS!!! (Theory : 1 rectangle fill in 1 GPU cycle, whatever is rectangle size!!!)

Demo 01 - Hardware accelerated Pong ...is on its way!!!
(probably with optional wiimote support thru PC, and VBlank synchronization over 3 frame buffers of course : will be a nice starter kit!)

Expect a release in a few days (will be QUICK!).

6 months ago I made the insane bet I could do it... I still don't believe it... I did it.

The way to legal professional 3D & Video homebrew is now wide open on xb1, guys! (and girls?)...
(I feel it will be a GREAT and long adventure... Especially when we will compare pbKit stuff with xn/a stuff)
old engineer
This is great to hear, keep us informed and congrat's for getting this far this soon!

rolleyes.gif
openxdkman
Thx. Pong src is coming very soon. I'm finishing the Vblank synced triple buffering technic rotations.
I realize there might be trouble for people using an interlaced signal. (I'm using 480p on HDTV).
Openxdk will autodetect things nicely, but my screen swapping may happen twice faster than needed if the IRQ3 interrupt fires for each half frame. So if it's your case, just report the issue and I will try to adapt code for your specific configuration (describe it).
openxdkman
I've released a "puck motion" test program (controlled by right stick of joypad for now). See changelog.
You can create your own 2D programs now.
(but antialiasing and some hardware accelerated copy function are still missing for total fun)

I made two functions to toggle between new and old framebuffers for debugging purpose.
But since openxdk&sdl framebuffer is not really allocated, they overlap a bit but not totally.
Can be used to keep an eye on static debug text while 2D or 3D smooth scene is running.

Now I will focus on pong game itself (will be quick) and the wiimote support...
Sirmatto
Amazing, you've turned the OpenXDK from something of a concept, almost to an complete alternative to the XDK. I look forward to reading more progress. You should consider setting up a blogish type webpage...it would be much easier to read and would display your progress a lot better.
openxdkman
My final objective is to support my own free operating system for pc0, xb1 & ps2. I'm doing pbKit because it's missing. Once it's done I will reuse it in my operating system source and I will spend my time only doing strong technical support (for companies or individuals, optional, not free) in order to make a living from it (pc0=pc without harddisk, in other words, a nc).
I will leave the zip files where they are and if openxdk.org or ps2dev.org domain owners want to grab it and put it in svn or cvs and accept new contributers I will let them do, gladly. I won't have time to maintain a blog.
A website exists presenting this operating system, but I won't advertise it here (since OS is not finished yet and commercial ads are not allowed).

I strongly suggest you just bookmark the changelog.txt directly and check it often. The growing list of demo and what they demonstrate will immediately tell you what can be done with current pbKit version.

That fact that my work is noticed only by serious developpers pleases me.
PedrosPad
QUOTE(openxdkman @ Jan 7 2007, 09:40 AM) *

My final objective is to support my own free operating system for pc0, xb1 & ps2. I'm doing pbKit because it's missing. Once it's done I will reuse it in my operating system source and I will spend my time only doing strong technical support (for companies or individuals, optional, not free) in order to make a living from it (pc0=pc without harddisk, in other words, a nc).
<snip />
A website exists presenting this operating system, but I won't advertise it here (since OS is not finished yet and commercial ads are not allowed).

Very interesting work indeed. beerchug.gif

I dreamt of producing something similar - a custom XBOX1 kernel that simply contained a networking stack, a Flash content player, and a root URL in Flash memory.

(Bunnie's Chumby is a more refined implementation of the same idea.)

My interest was find a use for the mountain of legacy XBOX1's. Sure, an XBOX1 booting to an XBMC which included a full Web Browser is more capable, but I wanted something my ageing granny could plug-in-and-go with.
openxdkman
Thx.
Yes... XBMC... a kind of species in danger... I keep it in a corner of my head. But will take time...
For now I must finish pbKit. I've finished Pong for ps2 with all wiimote support (by accelerometer or IR camera). So, tomorrow I just port the game to xb1 and I release both Pong versions & mse2eth. Tonight, I need a break...

Then will come the antialiasing adventure... It involves pixel shaders... Quite the big chunk of mystery...
(I must also see if I can do a pixel copy function so people wanting to do just 2D sprites can start working)

openxdkman
Demo 01-Harware accelerated Pong is released!

Optional wiimote support. You can either use inp2eth (accelerometers) or mse2eth (IR camera, needs 2 sources, please don't use candles!)

There is an issue at the moment. You will see only a few letters in the main menu, but you should be able to understand the menu entries. Menu text can be found in readme.txt file.
Issue doesn't affect gameplay at all. Have fun!

This issue affects menu and all future demos, I will work on it now...
openxdkman
Mmm... I was a bit naive about the legend saying 1 GPU command is executed in 1 GPU cycle...
(though you may claim you trigger it with 1 CPU cycle when you write last parameter of command)

I just forgot we are in unified memory model, so beloved by developpers who wrote articles in the xbox360-ps3 war... But, especially in the case of xbox1 which has ony one data bus, it's obvious that even if GPU has inner data caches, many commands sent by CPU toward GPU through DMA must not last too long. There must be some break time, because GPU itself needs DMA access to read data from frame buffers, add pixels to the data and send back data to frame buffer (later with 3D, that will be pixel buffer + depth stencil buffer). So time on the data bus must be shared between commands stream sent by CPU and data stream read and written by GPU...

So, I'm slowly thinking that the NON unified memory model of PC graphic cards (VRAM) and PS1/PS2/PS3 is maybe more interesting even if it's more complicated for developpers...

At least that gives me a clue about the current issue in pbKit... I need to add automatic DMA "breaks" when FIFO is full (can't be emptied by GPU since data bus is too busy with commands sending)... At least it's my best guess at the moment.

openxdkman
Adding delays doesn't change a thing.
Too many small rectangle fills in a frame lead to strange dma interferences it seems...

I will put this issue aside (until I get ideas) and I will add more drawing functions. To avoid issue we will have to call a limited number of drawing function per frame for now... (unless it's an issue only related to rectangle fill, which is usually called only once per frame to clear frame)
openxdkman
Full screen Anti-Aliasing was my next planned feature addition, but I've found out that performing full screen anti aliasing is just drawing a huge triangle with a mapped texture which is the back buffer (with minification filters activated).

So... my next logical step is probably to draw a triangle list... then attach a mapped texture to it.
If I succeed, I will see the effect of replacing rectangle fill with triangles in Pong. Maybe issue will vanish.
openxdkman
Woot! It draws triangles!!! Passthru vertex shader initialization worked!

But... I don't feel confident about publishing a vertex shader code I'm not even able to disassemble or comment... I rather like understanding it and modify it a bit, just for the principle.

EDIT : No more help wanted about shaders. XB1 shaders knowledge gained!
openxdkman
HURRAY!!! Unstability issue has been understood and slaughtered!!! pbKit*.zip updated! You can now use Pong as a starter kit in order to design 2D ultra fast drawing code!!!

(I will check if there is a way to bitblt pixels areas without going through shaders. Otherwise you will have to wait until shaders encoding is understood in order to have textures drawing).
openxdkman
Temporarily, triangle experimental code is written at the bottom of changelog.
Feel free to try it. I will start some serious research about shaders encoding now.
Feel free to create benchmarks too. The top speed is available. Just miss some colored textures...
openxdkman
Woot!
Texture mapping still resists me (in pixel shader), but I fully understand vertex shader now.
(see bottom of changelog)
openxdkman
What I've understood so far :
- CG toolkit is great for creating vertex shaders (in NVidia SDK 9.5, for free)
- The result of compilation/assembly is a binary called "pseudo-code" (.vso).
- It can be a .h with the .vso data declared as a DWORD array. Include it.
- In pbKit, function pb_pcode2mcode() will convert it into gpu "micro-code".
- You upload the micro-code into inner registers (see cursors in inner.txt).
- "Vertex feed configuration" registers are like dcl_* (what goes where).
- "Fixed function pipeline" is just a default VS set by official libraries. Useless.
- Pixel shader in xbox is just a few values targetting a few inner registers.

In pbKit, when a VS is used, you will have in comments everything you need to know in order to recreate your own vertex shader with CG toolkit. PS will be just a sequence of inner registers initialization.

Official libraries lose a lots (really a lots) of time, saving previous values, VS, etc... then executing your calls, then restoring stuff to keep on going complex and necessary preriodic tasks such as full screen AntiAliasing. I won't do the same mistake. It will be up to you to know that a periodic useful call needs prepared values in specific inner registers. If you know you didn't change any of them then there won't be any time lost in saving/restoring them. You will be in control of everything and free to optimize speed madly.

I will post here a warning when "Demo 02 - Antialiased Pong" is published (need to create pb_pcode2mcode and master pixel shader related inner registers to have that damn texture mapping work finally). It will demonstrate when and how to call functions in order to do full screen antialiasing once per frame. It won't be automatic code hidden inside pbKit but commented inner registers handling in the game source itself (so you know what inner registers values are needed and need to be preserved or saved/restored if you upload your own VS or change the PS related inner registers between two full screen Antialiasing updates.
openxdkman
Demo 02-AntiAliased Pong released!!! (see changelog)

pb_pcode2mcode is finished and fully supports vertex shaders created with Cg toolkit. Pixel shaders partially (but it's not important because of the way it's encoded. Many things can be encoded manually on pixel shader side in a few registers).

Beside 2D rectangle fills you can now draw 2D triangles with mapped textures inside with or without filtering.
Now that vertex shader is easy to create and use, possibilities are infinite... Dunno yet what will be next demo. Maybe some 2D game with transparency for sprites... A colorful game for sure. No more black&white!

Other thing to do is to try to integrate pbKit in SDL or to integrate SDL in pbKit... Many possibilities...

Also, 3D and lighting won't be hard with NVidia Cg toolkit ready to use...

I won't push pbKit towards complex and numerous APIs. I wish it remains simple and small.
Other developers have to use it and build up other things like mesa, opengl, xorg, whatever...

Numeric constants have been replaced with constants coming from "Nouveau" project (see wiki), with permission of project leader. Headers in pbKit and "Renouveau" directory will be kept identical over time. That will make possible future ports of pbKit to other NVidia chips easier.

Stay tuned for Demo 03... whatever it is!
openxdkman
Good news. I've finally found out what is damn DMA channel 11 for...
(9 is used by GPU to draw in back buffer, 10 is used by GPU to draw in depth stencil buffer).
11 is used by GPU to copy rectangle regions from anywhere to anywhere.
Probably interesting for video and hardware bitblt (fast copy of a window contents when you move it).
Surely faster than drawing with a mapped texture... I guess next Demo-03 will demonstrate it.

openxdkman
I've updated "core" and "Demo 02-AntiAliased Pong" in order to demonstrate hardware image bitblt.
Just press X/B in menu or while playing to swap between AntiAliased texture copy and image bitblt
(image bitblt is an ultra ultra fast identical copy so you will see that way the antialiasing effect)
openxdkman
Demo 03 - Q*bert released! (Demonstrates 2D sprites with transparentcy -3 different methods-)
A to start game during demo or pause game during play
Y to quit
X/B to swap AA/Bitblt
Move analog right stick into diagonals to actually make Q*bert jump

Demo 04 will be real 3D... finally!
openxdkman
Demo 03 updated (Lives decrement fixed)
fghjj
Demo03 - very impressive!

I noticed this:
http://digg.com/linux_unix/World_s_First_M...uxBIOS_Released

First modern motherboard with a GPL-licensed BIOS: GigaByte GA-M57SLI-S4
- Socket AM2 / Nforce 570 chipset
- SATA2
- Sound/NIC
- 4 Mbit Flash

Might be interesting for your pc0 project? I think there is great demand for a useful (HTPC-like) device that:
- Powers on and off "instantly", like a regular dvd-player or console
- Has a strong CPU to decode H.264 / HDTV material
- No noisy HDD, boot direct in OS from FlashROM and a supporting CompactFlash card
- Has a slick bootanimation like the Xbox, no crappy AWARD BiOS messages
openxdkman
Thanks for the tip. Actually, all existing bioses should be fine.
I've used my very last bucks to invest in the typical pc0 configuration I'm targetting.
(pretty close to the one you are refering to, except the SLI support...).
Once Demo 04 (3D) is finished, I will switch to the study of Nv40 Nvidia chips (more or less the GeForce7xxx serie). I thought about talking about it later, but well...
Here is the kind of hardware check list I've made from the pieces I've purchased.

pc0 (PC without hard disk, used as silent NC, video game console or HTPC):

First, try to reuse any recycled PC you have (just remove hard disk).

If you want to purchase one, here is a "silent" configuration :
(I promote silence versus power for obvious reason, and it's cheaper,
but I try to select last NVidia GeForce 7000 or ATI X1000 series)

Motherboard MSI K9N ULTRA, 90 euros (AM2 socket, 1 pci-express x16 slot)
512 Mo DDR2-SDRAM DDR533, 50 euros (no ram near cooler or it fries)
Sempron 3200+ 2Ghz AM2socket , 60 euros (discard the noisy AMD cooler)
Thermaltake tr2-r1 cooler, 10 euros (works better and is VERY silent)
Arctic Silver 5 thermal paste, 5 euros (1.5 rice grain needed)
ArcticClean surface purifier, ? euros (couldn't find it)
Gigabyte GeForce 7300 GT, 100 euros (pci-e, passive cooler 100% silent)
ATX Dexlan case with 400W PSU, 30 euros (audio panel not compatible)
Realtek 8139 PCI ethernet, 5 euros (cheapest, packet driver owned)
Recycled IDE CD-ROM drive, 0 euros (compatible with El Torito standard)
Recycled PS/2 keyboard, 0 euros (avoid USB keyboards or mouses)
Recycled optical PS/2 mouse, 0 euros (no need to clean it, works well)

Total : 350 euros (+ 20-30 euros/month for internet, for entire family)

(to convert into dollars just replace euro with dollar and lower cost a bit)

Upgrade possibilities :
NVidia or ATI high end graphic cards require pci-express 16x, so you're ready.
Their price can reach up to 600 euros for several times more speed.
Be careful, powerful graphic card cooler may use a very noisy cooler.
A more powerful CPU may require a more massive & powerful silent cooler.
SATA 2 hard disk and operating system will raise price by 200 euros.

Advantages of Network Computer configuration (no hard disk) :
No hard disk means less vulnerability to local data corruption because of :
- unexpected power shutdown
- thunder
- not yet identified viruses attacks
Saves your time (no need to repair, reinstall or fight against viruses and spyware)
Saves 200 euros! (40% of total cost!)
Removes piracy temptation (sounds silly, but wise persons will understand).
Globally, allows you to spend less time in front of a screen, in your life.

Xbox 360 controller : 30 euros

I've got an ATI PRO X1300 but the cooler on it does more noise than the xbox360...
Crap... but there is still hope for ATI fanboys... I'm equipped! (low priority)

HQ, Pro, 3D on ps2 and xb1 were all I was missing to start doing business
with an operating system for pc0 platform. Kids gain entertainment time
reading lessons and completing exercices on a pc0 (or parents' pc with
locked local hard disk operating system) and then switch to living room on
modded console to spend the earned entertainment time (you need
to have your pc and consoles connected to internet -no local storage-,
let's say through homeplug boxes -ethernet to power line adapters-,
I really hate wi-fi because of all health bad effects it 'may' have on kids)
So, this, free, kids oriented operating system will be released this year.
If I manage to make a living with its technical support (optional and cheap),
I will be able to work on a pbKit port for nv40. If nv40 gets unlocked
it will become possible to port XBMC to pc0. H264 is of course my target.
(the royalties free baseline)

Even if it's mainly for kids, this OS will allow anyone to develop with
just a notepad and access full power of GPU's and I think, also, DSP's
(can't publish stuff for kids without going through support/validation,
but what you create, even interpreted, can access any hardware part)
Canonic (Simplest) Code is plain text, stored on FTP/Personal web pages.

I've kept a SB Live! and a SB ES preciously. They have FX8010 DSP onboard and the drivers -I've ported them to my OS- do all the programming of the DSP. So we can change program like we want. I'm pretty sure a programmable sound DSP is what is horribly missing in xbox 360 and prevents xn/a developpers to do any decent sound processing.
I mean... jited, interpreted stuff is interesting. Console manufacturers use it to protect their console, but for me it will be great to allow a developper to write a unique version of code in notepad and have it immediatelly executed (interpreted) on pc0, xb1 and ps2. API's will be unified but will allow micro code programming of GPU's and sound DSP's through a pseudo code intermediate step (just see how Cg Toolkit can be used to program different GPU's not compatible between them at micro code level).
Slow interpreted code is not a problem if all the heavy work can be handled by micro code running on coprocessors.

It will be an OS very "hacker scene friendly" (after all, the consoles versions will be mainly based on ps2dev+gsKit and openxdk+pbKit). That means, any request made by serious developpers willing an update, will be probably approved even in inner OS core. If takes time, through support (cheap but not free).

The free public version will be 100% secure for kids. It will be a charity part
that will be still maintained even if all my other ideas or projects get ruined
by bad luck... Because I'm not happy to see the youth not helped at all by
current stuff running on PC's and consoles... (too much ads, sex and blood... not really an appropriate addiction for kids, I think...)

If OS works well, that will give me enough experience to attempt a XBMC port or just supply tools to XBMC current maintainer) in order to obtain, let's say, a minimal ISO image to burn on cd-r on wich pc0 boots and gives instantly what everyone is currently using on xb1. I need this OS to work and bring some money otherwise I will have to find a janitor's job somewhere soon...

I can't hide it, the problem is low level control of GPU's (in my case nv40 serie).
GPU manufacturers will be tempted more and more to keep all info secret in order to create an instant monopoly to raise profit. M$ claiming ONLY Vista with DirectX10 can unlock high end graphic cards power... hurts a lots...
But to prove the contrary requires a lots of painful hacking time...
(nv20 took 6 months of my life away, 8 hours a day. I don't regret it but it hurts. Little big secret like the parameters A & B "bridge" registers used to pass parameters to interrupt-driven subroutines -fired by push buffer sequence, necessary for triple buffering technic- is not something that could be found if a new, global, fresh, long study was not done by a volunteer...)

I'm a member of "Nouveau" project now, thanks to its leader. So maybe it will be easier for the next GPU unlocking... I mean nv20 was a bit 'old' to attract researchers... but there are plenty of smart guys in the "Nouveau" project willing to unlock recent GPU's. If any one wants to help, search "Nouveau" on Wikipedia.

cvs -d:pserver:anonymous@nouveau.cvs.sourceforge.net:/cvsroot/nouveau export -r HEAD nouveau

cvs -d:pserver:anonymous@nouveau.cvs.sourceforge.net:/cvsroot/nouveau export -r HEAD renouveau

Nouveau is an attempt to create a clean driver for xorg under linux for all Nvidia chips.

Renouveau is mainly a storage for headers that can be reused for any platform. It's where you can put your recent discoveries.

Currently two headers in pbKit core are shared with their counter part in renouveau folder.

I hope that's enough for filling up your dreams for now!
(at least, XBMC is not doomed to disappear with xb1...)
openxdkman
I've updated pbKit_demos.zip.
You will find there a very early preview of Demo 04-Initial Fantasy
It will become a little RPG, but for now, it's only a preview of the 3D engine.

Feel free to try it. It's full of mistakes (I've troubles with projection, culling and clipping).
But something shows up (read from .3ds & .bmp files) with correct texture mapping, at least.

Y: Quit
X/B: raise/lower vertices
Right stick : Up/Down (go close, go away, witout projections no change) Left/Right (rotate)

openxdkman
Hurray! Thanks to my ps2 version that allowed me to compare where values got wrong, I could track and kill all the issues...

3D engine working great!!! Texture mapping, sophisticated vertex shader, clipping, 1 light!
(you need last version of pbKit_core.zip if you want to recompile demo 04 in pbkit_demos.zip)
But you have binaries ready to run for demo 03 (q*bert) and demo 04 (3D engine) for now.

Commands:

Y: quit
X/B: raise/lower number of vertices
Left stick: Up/Down (get closer/go away)
Right stick: Right/Left/Up/Down (Rotate around according axis)
Start : toggle on/off depth stencil screen (quite nice, allows to see depth stencil buffer)
Back : toggle on/off debug screen (default text screen of openxdk+sdl, overlapping a fb...)
(.3ds & .bmp files will be read from directory /meshes, so create it in executable directory)

I will now optimize speed madly.
Best thing to do is to allow user to insert a "branch jump" in push buffer sequence to just have the dma engine continue reading the prepared sub-push buffer sequence. This way you don't even need to copy data.
The jump is done with a bit in the command dword and the return can be done through an interruption fired at end of the prepared sub-push buffer sequence.

We will soon know the real maximum power of xbox1 GPU!!!

Have fun with NVidia nv2A GPU low level programming on XB1!!! FINALLY!!!
openxdkman
pbKit_demos.zip updated.
Speed optimization done (either by vertex batches or index batches) :
330000 vertices/frame (or indices/frame)
On ps2 I've obtained 250000 vertices/frame (no way to do index batches)
(ps2 demo is named "gsKit+vulib starter kit" in ps2dev development forum)

Hint: Phong can be done easily by customizing ps and obtaining the normal from vs. (but normals are indenticals for a same triangle at the moment, so, you will have to improve the way normals are calculated so they become different and thus become interesting to use either in gouraud or phong technic)

That's all folks.

I will now work on many other things...
(my kids oriented OS for pc0+nv40/ps2/xb1, but also ps3 & 360 homebrew)

Keep a backup of pbKit nv2A archives and use them well.

I will finish Demo 04 much later, once I secure some business with my OS (can't work for free forever!).
sakir2000
nice work man keep it up

hope that some body will be able to add C++ support to the openxdk.Then it will be a full
XDK with 3D ,2d and C++ support

_zlinky
openxdkman = xbox martyr smile.gif
openxdkman
Little bump to warn you that I've successfully ported Demo 04 (still lighting to do, though) from XB1 to 360, by using a pre-release of a 360 3D demo C source that will be released by its author -not me- soon!

I've posted more details in the 360 development/exploit forum :
http://forums.xbox-scene.com/index.php?showtopic=620515

(3.900.000 vertex/frame at 60fps on 360, so far, instead of 330.000 on XB1... 3D Paradise!)

EDIT: In order to save disk space, biplane.3ds (big big file) has been removed from pbkit_demos.zip. You can either get it from xenkit_core.zip (360 tmbinc's 3D demo for Gentoo LiveCD Beta 2) or you can load the (very well compressed) biplane.max file in 3DSMax and export it as .3ds file yourself.
Mi©®os∞ft
Do I patch this over CVS version of openXDK or openXDK 0.07?

---

I'm mostly interested in Networking functions of Pbkit. Is there any development going? love.gif

--

CVS denies anonymous user access. Can anyone please upload PreCompiled Latest version of OpenXDK/pbkit here? Thanks.
openxdkman
See 1st post. Maybe "May 2007 openxdk pre-compiled files" will be enough for you.

Nothing in pbkit overlaps openxdk sources. So if source is not younger than May 2007, just compiling your own program with pbkit modules or packet driver module inserted in your own source is enough.
The reason is that before May 2007, irq 3 was locked. From May 2007, it's free until it's really used. So, if you init pbkit first, pbkit will grab it. irq 3 is the gpu irq.

Above packet driver module, just add your favorite tcp/ip stack. I've added an old modified version of wattcp 16 bits on it for my own private projects (can't publish that stack because of special license on it).
It shouldn't be hard to add any tcp/ip stack on it, once you have played a bit with the packet driver (pong controlled thru wiimote is a good example to study). Craig wanted to do it, but he's now MIA.

Since license problem is only for publishing source and not binaries, I will still be able to publish some unified library binary later, for the multi-platform project minidash, that will include the modified wattcp 16 bits stack (Compiles well for pc0, xb1 & ps2 at the moment. Useful for pc0 real mode).
Mi©®os∞ft
Thanks for clearing that up.

I tried compiling ping(pong) sample.

It behaves wierdly [I get a split screen (half to the left and some to right). [But I can still see the text and pong ball moving around]

I do have (ps2dev.org) PSPSDK configured. Could that be a problem?

Are the binaries posted on first post Newer or this one Coz, that got me confused.
Mi©®os∞ft
+ Prev

This is the XBE (pong / ping demo)
http://www.sendspace.com/file/z496kl Does this work fine for you?

Please let me know if there's anything wrong with above file. [coz, it doesn't run perfectly on my XBOX]
Mi©®os∞ft
This pong sample created by Today's fresh cygwin install + Pre-compiled binaries from first post of this thread

Flickers a LOT MORE [everything unreadble; ]

http://www.sendspace.com/file/e68dvq

Mi©®os∞ft
Please disregard the 2 Above post But not the third one [regarding newest version].

---

I have figured out the problem; The pbkit demo sample seems to output 480p video hence the jumping and flickering.

Is there anyway to make it output 480i? sad.gif
openxdkman
Just pbkit samples? Theoretically any program you do (even a basic hello world) will output bad signal for you...

It's inside openxdk source, a function tries to auto-detect your configuration, and fails it seems, in your case.

On the other hand, it won't kill you to adopt a components to vga box...
(better graphics, for games too, and any cheap box does the job well)

Try to switch your console to NTSC, also, if you aren't already in that mode.
Mi©®os∞ft
QUOTE(openxdkman @ Feb 19 2008, 03:45 PM) *

Just pbkit samples? Theoretically any program you do (even a basic hello world) will output bad signal for you...

It's inside openxdk source, a function tries to auto-detect your configuration, and fails it seems, in your case.

On the other hand, it won't kill you to adopt a components to vga box...
(better graphics, for games too, and any cheap box does the job well)

Try to switch your console to NTSC, also, if you aren't already in that mode.


Exactly, Every sample. sad.gif

I have a NTSC (USA [J or M?]). The signal is 720x480i. I use a Component cable.

Sorry but I can't invest for a VGA box sad.gif Is there alternative?

This "Patch for OpenXDK", the author claims, it should detect settings from XBOX Dashboard and run accordingly. Has it been commited to SVN?

Any help? sad.gif
openxdkman
Your answer is not clear.

Forget pbkit for now. Did you try to compile a small "hello world" program? How was the signal?

"I can't invest..." ... 20 euros/dollars is so high?

Actually, I think 480i is not supported at all, in May 2007 version.
Mainly because it's impossible for code to know that you want 480i instead of 480p...
But you may try to replace the 480p hardware code in the list with the 480i hardware code.
The list is below, from C:\cygwin\usr\home\OpenXDK\src\hal\video.c

QUOTE

VIDEO_MODE_SETTING vidModes[] =
{
{0x44030307,640,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_COMPOSITE}, //640x480 PAL 50Hz
{0x44040408,720,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_COMPOSITE}, //720x480 PAL 50Hz
{0x0401010B,640,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_COMPOSITE}, //640x480 PAL 60Hz
{0x0402020C,720,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_COMPOSITE}, //720x480 PAL 60Hz
{0x04010101,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_COMPOSITE}, //640x480 NTSCM 60Hz
{0x04020202,720,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_COMPOSITE}, //720x480 NTSCM 60Hz
{0x04010103,640,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_COMPOSITE}, //640x480 NTSCJ 60Hz
{0x04020204,720,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_COMPOSITE}, //720x480 NTSCJ 60Hz

{0x44030307,640,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_RCA}, //640x480 PAL 50Hz
{0x44040408,720,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_RCA}, //720x480 PAL 50Hz
{0x0401010B,640,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_RCA}, //640x480 PAL 60Hz
{0x0402020C,720,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_RCA}, //720x480 PAL 60Hz
{0x04010101,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_RCA}, //640x480 NTSCM 60Hz
{0x04020202,720,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_RCA}, //720x480 NTSCM 60Hz
{0x04010103,640,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_RCA}, //640x480 NTSCJ 60Hz
{0x04020204,720,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_RCA}, //720x480 NTSCJ 60Hz

{0x44030307,640,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_SVIDEO}, //640x480 PAL 50Hz
{0x44040408,720,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_SVIDEO}, //720x480 PAL 50Hz
{0x0401010B,640,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_SVIDEO}, //640x480 PAL 60Hz
{0x0402020C,720,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_SVIDEO}, //720x480 PAL 60Hz
{0x04010101,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_SVIDEO}, //640x480 NTSCM 60Hz
{0x04020202,720,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_SVIDEO}, //720x480 NTSCM 60Hz
{0x04010103,640,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_SVIDEO}, //640x480 NTSCJ 60Hz
{0x04020204,720,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_SVIDEO}, //720x480 NTSCJ 60Hz

{0x60030307,640,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_RGBSCART}, //640x480 PAL 50Hz RGB
{0x60040408,720,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_RGBSCART}, //720x480 PAL 50Hz RGB
{0x2001010B,640,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_RGBSCART}, //640x480 PAL 60Hz RGB
{0x2002020C,720,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_RGBSCART}, //720x480 PAL 60Hz RGB
{0x20010101,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_RGBSCART}, //640x480 NTSCM 60Hz RGB
{0x20020202,720,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_RGBSCART}, //720x480 NTSCM 60Hz RGB
{0x20010103,640,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_RGBSCART}, //640x480 NTSCJ 60Hz RGB
{0x20020204,720,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_RGBSCART}, //720x480 NTSCJ 60Hz RGB

{0x88070701,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //640x480p NTSCM 60Hz
{0x88080801,720,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //720x480p NTSCM 60Hz
{0x880B0A02,1280,720,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //1280x720p NTSCM 60Hz
{0x880E0C03,1920,1080,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //1920x1080i NTSCM 60Hz
{0x88070701,640,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //640x480p NTSCJ 60Hz
{0x88080801,720,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //720x480p NTSCJ 60Hz
{0x880B0A02,1280,720,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //1280x720p NTSCJ 60Hz
{0x880E0C03,1920,1080,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //1920x1080i NTSCJ 60Hz

{0xC0060601,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_VGA_SOG}, //640x480 SVGA 60Hz
{0xC0030303,800,600,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_VGA_SOG}, //800x600 SVGA 60Hz
{0xC0040404,1024,768,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_VGA_SOG}, //1024x768 SVGA 60Hz
};


Now the question is what can be the 480i hardware code? The 480p hardware code is 0x88070701

All I can give you is a full list of hardware code known by xbox kernel itself :
Try some values, sharing same Hz, width, height, etc... Hardware code is 3rd column
The exact coding of first column is not fully understood
(50-60Hz, widescreen, adapter code, region...etc are coded in it)

QUOTE

//_Hz_RegionAdapter,HeightWidth,VideoMode
0x00400105,0x01e00280,0x88070701,
0x00400105,0x01e002d0,0x88080801,
0x00400105,0x02d00500,0x880b0a02,
0x00400105,0x04380780,0x880e0c03,
0x00480104,0x01e00280,0x88070701,
0x00490104,0x01e00280,0x88070701,
0x00480104,0x01e002d0,0x88080801,
0x00490104,0x01e002d0,0x88080801,
0x02480104,0x01e00280,0x88110f01,
0x02490104,0x01e00280,0x88110f01,
0x00430104,0x02d00500,0x880b0a02,
0x00600104,0x01e00280,0x0801010d,
0x00610104,0x01e00280,0x1801010d,
0x00600104,0x01e002d0,0x0802020e,
0x00610104,0x01e002d0,0x1802020e,
0x01400104,0x00f00280,0x0801010d,
0x01410104,0x00f00280,0x1801010d,
0x01400104,0x00f002d0,0x0802020e,
0x01410104,0x00f002d0,0x1802020e,
0x02600104,0x01e00280,0x080f0d12,
0x02610104,0x01e00280,0x180f0d12,
0x03400104,0x00f00280,0x080f0d12,
0x03410104,0x00f00280,0x180f0d12,
0x00650104,0x04380780,0x880e0c03,
0x01450104,0x021c0780,0x880e0c03,
0x00600103,0x01e00280,0x20010101,
0x00610103,0x01e00280,0x30010101,
0x00600103,0x01e002d0,0x20020202,
0x00610103,0x01e002d0,0x30020202,
0x01400103,0x00f00280,0x20010101,
0x01410103,0x00f00280,0x30010101,
0x01400103,0x00f002d0,0x20020202,
0x01410103,0x00f002d0,0x30020202,
0x02600103,0x01e00280,0x200f0d0f,
0x02610103,0x01e00280,0x300f0d0f,
0x03400103,0x00f00280,0x200f0d0f,
0x03410103,0x00f00280,0x300f0d0f,
0x00600100,0x01e00280,0x04010101,
0x00610100,0x01e00280,0x14010101,
0x00600100,0x01e002d0,0x04020202,
0x00610100,0x01e002d0,0x14020202,
0x01400100,0x00f00280,0x04010101,
0x01410100,0x00f00280,0x14010101,
0x01400100,0x00f002d0,0x04020202,
0x01410100,0x00f002d0,0x14020202,
0x02600100,0x01e00280,0x040f0d0f,
0x02610100,0x01e00280,0x140f0d0f,
0x03400100,0x00f00280,0x040f0d0f,
0x03410100,0x00f00280,0x140f0d0f,
0x00400205,0x01e00280,0x88070701,
0x00400205,0x01e002d0,0x88080801,
0x00400205,0x02d00500,0x880b0a02,
0x00400205,0x04380780,0x880e0c03,
0x00480204,0x01e00280,0x88070701,
0x00490204,0x01e00280,0x88070701,
0x00480204,0x01e002d0,0x88080801,
0x00490204,0x01e002d0,0x88080801,
0x00430204,0x02d00500,0x880b0a02,
0x00600204,0x01e00280,0x0801010d,
0x00610204,0x01e00280,0x1801010d,
0x00600204,0x01e002d0,0x0802020e,
0x00610204,0x01e002d0,0x1802020e,
0x01400204,0x00f00280,0x0801010d,
0x01410204,0x00f00280,0x1801010d,
0x01400204,0x00f002d0,0x0802020e,
0x01410204,0x00f002d0,0x1802020e,
0x02600204,0x01e00280,0x080f0d12,
0x02610204,0x01e00280,0x180f0d12,
0x03400204,0x00f00280,0x080f0d12,
0x03410204,0x00f00280,0x180f0d12,
0x00650204,0x04380780,0x880e0c03,
0x01450204,0x021c0780,0x880e0c03,
0x00600203,0x01e00280,0x20010103,
0x00610203,0x01e00280,0x30010103,
0x00600203,0x01e002d0,0x20020204,
0x00610203,0x01e002d0,0x30020204,
0x01400203,0x00f00280,0x20010103,
0x01410203,0x00f00280,0x30010103,
0x01400203,0x00f002d0,0x20020204,
0x01410203,0x00f002d0,0x30020204,
0x02600203,0x01e00280,0x200f0d10,
0x02610203,0x01e00280,0x300f0d10,
0x03400203,0x00f00280,0x200f0d10,
0x03410203,0x00f00280,0x300f0d10,
0x00600200,0x01e00280,0x04010103,
0x00610200,0x01e00280,0x14010103,
0x00600200,0x01e002d0,0x04020204,
0x00610200,0x01e002d0,0x14020204,
0x01400200,0x00f00280,0x04010103,
0x01410200,0x00f00280,0x14010103,
0x01400200,0x00f002d0,0x04020204,
0x01410200,0x00f002d0,0x14020204,
0x02600200,0x01e00280,0x040f0d10,
0x02610200,0x01e00280,0x140f0d10,
0x03400200,0x00f00280,0x040f0d10,
0x03410200,0x00f00280,0x140f0d10,
0x00400305,0x01e00280,0x88070701,
0x00400305,0x01e002d0,0x88080801,
0x00400305,0x02d00500,0x880b0a02,
0x00400305,0x04380780,0x880e0c03,
0x00a00304,0x01e00280,0x48030314,
0x00a10304,0x01e00280,0x58030314,
0x00a00304,0x01e002d0,0x48040415,
0x00a10304,0x01e002d0,0x58040415,
0x00a00304,0x02400280,0x48050516,
0x00a10304,0x02400280,0x58050516,
0x00a00304,0x024002d0,0x48060617,
0x00a10304,0x024002d0,0x58060617,
0x01800304,0x01200280,0x48050516,
0x01810304,0x01200280,0x58050516,
0x01800304,0x012002d0,0x48060617,
0x01810304,0x012002d0,0x58060617,
0x02a00304,0x01e00280,0x48100e18,
0x02a10304,0x01e00280,0x58100e18,
0x02a00304,0x02400280,0x4812101d,
0x02a10304,0x02400280,0x5812101d,
0x03800304,0x01200280,0x4812101d,
0x03810304,0x01200280,0x5812101d,
0x00600304,0x01e00280,0x08010119,
0x00610304,0x01e00280,0x18010119,
0x00600304,0x01e002d0,0x0802021a,
0x00610304,0x01e002d0,0x1802021a,
0x01400304,0x00f00280,0x08010119,
0x01410304,0x00f00280,0x18010119,
0x01400304,0x00f002d0,0x0802021a,
0x01410304,0x00f002d0,0x1802021a,
0x02600304,0x01e00280,0x080f0d1b,
0x02610304,0x01e00280,0x180f0d1b,
0x03400304,0x00f00280,0x080f0d1b,
0x03410304,0x00f00280,0x180f0d1b,
0x00a00303,0x01e00280,0x60030307,
0x00a10303,0x01e00280,0x70030307,
0x00a00303,0x01e002d0,0x60040408,
0x00a10303,0x01e002d0,0x70040408,
0x00a00303,0x02400280,0x60050509,
0x00a10303,0x02400280,0x70050509,
0x00a00303,0x024002d0,0x6006060a,
0x00a10303,0x024002d0,0x7006060a,
0x01800303,0x01200280,0x60050509,
0x01810303,0x01200280,0x70050509,
0x01800303,0x012002d0,0x6006060a,
0x01810303,0x012002d0,0x7006060a,
0x02a00303,0x01e00280,0x60100e13,
0x02a10303,0x01e00280,0x70100e13,
0x02a00303,0x02400280,0x6012101c,
0x02a10303,0x02400280,0x7012101c,
0x03800303,0x01200280,0x6012101c,
0x03810303,0x01200280,0x7012101c,
0x00600303,0x01e00280,0x2001010b,
0x00610303,0x01e00280,0x3001010b,
0x00600303,0x01e002d0,0x2002020c,
0x00610303,0x01e002d0,0x3002020c,
0x01400303,0x00f00280,0x2001010b,
0x01410303,0x00f00280,0x3001010b,
0x01400303,0x00f002d0,0x2002020c,
0x01410303,0x00f002d0,0x3002020c,
0x02600303,0x01e00280,0x200f0d11,
0x02610303,0x01e00280,0x300f0d11,
0x03400303,0x00f00280,0x200f0d11,
0x03410303,0x00f00280,0x300f0d11,
0x00a00300,0x01e00280,0x44030307,
0x00a10300,0x01e00280,0x54030307,
0x00a00300,0x01e002d0,0x44040408,
0x00a10300,0x01e002d0,0x54040408,
0x00a00300,0x02400280,0x44050509,
0x00a10300,0x02400280,0x54050509,
0x00a00300,0x024002d0,0x4406060a,
0x00a10300,0x024002d0,0x5406060a,
0x01800300,0x01200280,0x44050509,
0x01810300,0x01200280,0x54050509,
0x01800300,0x012002d0,0x4406060a,
0x01810300,0x012002d0,0x5406060a,
0x02a00300,0x01e00280,0x44100e13,
0x02a10300,0x01e00280,0x54100e13,
0x02a00300,0x02400280,0x4412101c,
0x02a10300,0x02400280,0x5412101c,
0x03800300,0x01200280,0x4412101c,
0x03810300,0x01200280,0x5412101c,
0x00600300,0x01e00280,0x0401010b,
0x00610300,0x01e00280,0x1401010b,
0x00600300,0x01e002d0,0x0402020c,
0x00610300,0x01e002d0,0x1402020c,
0x01400300,0x00f00280,0x0401010b,
0x01410300,0x00f00280,0x1401010b,
0x01400300,0x00f002d0,0x0402020c,
0x01410300,0x00f002d0,0x1402020c,
0x02600300,0x01e00280,0x040f0d11,
0x02610300,0x01e00280,0x140f0d11,
0x03400300,0x00f00280,0x040f0d11,
0x03410300,0x00f00280,0x140f0d11,
0xFFFFFFFF,0x00000000,0x00000000


For sure the patch you are pointing to is promising for 480i.
Just get the hardware code from the patch for 480i and do some testing by just replaceing the 480p hardware code:

QUOTE

+ {0x48030314,640,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_HDTV}, //640x480i PAL 50Hz
+ {0x48040415,720,480,50,VIDEO_REGION_PAL,VIDEO_ADAPTER_HDTV}, //720x480i PAL 50Hz
+ {0x08010119,640,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_HDTV}, //640x480i PAL 60Hz
+ {0x0802021a,720,480,60,VIDEO_REGION_PAL,VIDEO_ADAPTER_HDTV}, //720x480i PAL 60Hz
+ {0x0801010d,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //640x480i NTSCM 60Hz
+ {0x0802020e,720,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //720x480i NTSCM 60Hz
+ {0x0801010d,640,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //640x480i NTSCJ 60Hz
+ {0x0802020e,720,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //720x480i NTSCJ 60Hz


In the meanwhile, I will see if I can apply the patch to the May 2007 precompiled set.
openxdkman
I've added a folder named "Zagon patch for 480i" in openxdk.zip archive (May 2007 precompiled set). You will find a precompiled libhal.a and patched May 2007 source files in there, that will allow to test Zargon patch. (Thanks Zagon).

I can't test it myself, so I count on all to report if it works or if it breaks something else.

Don't test with pbKit first. Test first with some hello world program (recompile it of course). With Zagon patch it should appear correctly. Then recompile a sample with pbKit and try.
Dunno if interlaced mode implies a change in the back buffers structures (possible).
It probably affects also the way pbKit syncs with VBL...
I doubt I will support interlaced mode if it doesn't work (lots of work for not so much)...
Mi©®os∞ft
QUOTE(openxdkman @ Feb 20 2008, 06:33 AM) *

I've added a folder named "Zagon patch for 480i" in openxdk.zip archive (May 2007 precompiled set). You will find a precompiled libhal.a and patched May 2007 source files in there, that will allow to test Zargon patch. (Thanks Zagon).

I can't test it myself, so I count on all to report if it works or if it breaks something else.

Don't test with pbKit first. Test first with some hello world program (recompile it of course). With Zagon patch it should appear correctly. Then recompile a sample with pbKit and try.
Dunno if interlaced mode implies a change in the back buffers structures (possible).
It probably affects also the way pbKit syncs with VBL...
I doubt I will support interlaced mode if it doesn't work (lots of work for not so much)...


Thanks to you and Zargon. WORKS GREAT on my TV!

No more VGA box rolleyes.gif

---

Will let you know if I have any problems with packet driver. Can't wait to get started on Cross- Platform project PSP-XBOX biggrin.gif
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.