Xbox Development Resources for XBMC
#1
hi all, i'm starting this topic thread for developers in the hopes it will grow into a good collection of tips, tricks, articles/tutorials, code snipplets related to xbox programming. so if you have got something related to aiding xbox/xbmc programming please put it in this thread, hopefully it will help existing and future xbmc developers.

note! please do not ask any questions or request support here!, this thread is only for posting link, tips and tricks, etc.

tip ex: *pbl (pheonix bios loader) can be used to setup a debug xbox for development, read more on pbl here (link) and here (link),
(pbl is used to load debug-bios into ram instead of instead of flashing to modchips, so can debug when mod or tsop bios is only 256kb and/or can't be flashed).

happy coding / frodo

how-to compile xbmc source code from cvs (build source to xbox executable) can be found here (link).
how-to compile mplayer.dll from cvs (build source into xbmc loadable dll) can be found here (link).
xbmc visualisation plugin interface specs and development information here (link).
xbmc screensaver interface (based on xbmc vis interface) specs and development information here (link).
xbmc python interpreter specs and development information (not the scrips) can be found here (link).

xbox programming for xbmc; what will you need to know/learn:
good knowledge of the c++ language as well as experince of the visual c++ 6.0 or .net ide by microsoft. directx 8.0/8.1 api programmers will quickly pick up the workings of the xbox sdk (xbox software development kit, a.k.a. xdk) as programming for xbox is very similar to programming for a pc when dealing with directx 8, (and uses the directx sdk 8.1 which also needs to be installed on your pc with the xdk and vs.net). the xbmc gui source code is in c++ for the directx api. xbmc is developed under microsoft visual studio .net 7.1 and requires a copy of the latest xbox sdk/xdk to be compiled. also know that xbmc's audio/video playback core is based on mplayer (which in turn uses ffmpeg avcodec library to decode most a/v codecs, both mplayer and ffmpeg are coded in the c programming language). some assembly code is also used within xbmc to gain direct access to the 'metal' that is the xbox-console (gpu, apu, cpu, etc.) and various modchips hardware. note! xbox does not support opengl (open graphics library), nor does it support vb (visual basic), nor c#, nor java, ...so forget about those and learn c++ and directx as those are the only languages supported by the xdk!

things to think about and know before/when developing xbmc for the xbox:
- the xbox only has a 733mhz pentium-iii cpu @ 133mhz fsb (supports mmx and see).
- the xbox only has 64mb of shared ram (memory is shared between cpu and gpu).
*(the limit memory of the xbox play a big part and hindarence of the xbmc development).
- xbox gpu is a nvidia nv2a @ 233mhz (so somewhere between gforce 2 and gforce 3)
- the apu is a nvidia mpc (designed for xbox so a.k.a. mpcx) only support 48khz-out.
*(the apu is integrated to the apu and it can encode to ac3 on-the-fly in hardware).
- the xbox-chipset could be described in layman terms as something similar to "nforce",
*it's designed by nvidia and makes up a southbridge (the mpcx-1) and the gpu (nv2a).
- the xbox does not have a operating-system per-say, instead it only has a basic bios,
*everything else must go into the xbmc executable and it's (xdk and own-made) libraries.
- only a single process-thread (program/executable) can run at any one time on the xbox.
- xbox sdk (a.k.a. xdk) software development kit (libraries) is required to compile xbmc.
*what is also required to compile (and code in) xbmc is microsoft visual studio .net 7.1
- xbmc's source code is c++, assembly, and directx, (the xbox does not support opengl),
*(some of the xbmc libraries are also in c but they are loaded by our own wrapper/loader).
- the xbox "os/bios" is win32 based but does not most of the resources or capabilities
*of a windows operating-system, (ex. directshow, nor dll is nativly supported on xbox).
- xbmc's core is based on mplayer (which uses ffmpeg to decode most a/v formats).
XBMC Project Founder (Retired), now head programmer of MediaPortal
Reply
#2
Exclamation 
books recommended by the xbmc-team devs, (covers c++, directx and gpu programming):
- effective c++ (scott meyers) (note! get the latest edition of this one, today that is currently the third edition)
- sams teach yourself windows game programming with directx in 21 days (sams teach yourself s.) (directx 8.1)
- programming role-playing games with directx (jim adams)
- special effects game programming with directx (mason mccuskey)
- focus on 2d in direct3d (ernest pazera)
- directx 2002 custom interface (j de goes)
- directx 9 user interfaces: design and implementation (alan thorn)
- directx, rdx, rsx and mmx technology (1997) (rohan coehlo, mike hawash)
- the direct3d graphics pipeline (rich thomson)
- direct3d shaderx (wolfgang engel, wolfgang f engel) (note! the first edition, not the second because the second focuses on directx 9.0 and not directx 8.0)
- real-time rendering  (tomas akenine-moeller, eric haines) (note! the first edition, not the second because the second focuses on directx 9.0 and not directx 8.0)
- gpu gems (david kirk, randima fernando) (note! the first edition, not the second because the second focuses on directx 9.0 and not directx 8.0)

xbox programming (and related subjects) for beginners online-sites:
- xbox programming tutorial by olivier crapez
- xbdev.net (xbox tutorials and samples)
- x-factor development team (utorials and samples)
- microsoft's directx 8.0 graphics c/c++ tutorials
- andy pike's directx 8 2d/3d basics tutorials
- game programming with directx 7.0

also the xdk have loads of examples. tutorials and documentations:
x:\program files\ms xbox sdk\samples\xbox\graphics\tutorials

online-documentation recommended by the xbmc-team devs:
- microsoft directx reference and links for developers
- programmable shaders for directx 8.0 (msdn)
- directx 9.0 sdk update (comes with documentation and samples) <= must have docs!
- microsoft directx 8 developer faq
- microsoft msdn library online (probebely the most important knowlagebase for any visual studio developer)
- x-zone also has developers faq and tutorials on directx
- microsoft developer-only forum for directx programming issues
- microsoft developer-only forum for directx directx audio and video programming
- drunken hyena online directx / direct3d tutorials
- nvidia's list of recommended developer sites and documentation
- standard library extensions tr1 (technical report 1) technical report on c++ library extensions
- direct3d/directx 8.1 and 9.0 graphics tutorials (basic framework, pixel shaders and vertex shaders)

other online-resources recommended by team-xbmc:
- freeprogrammingresources.com (free programming resources like: programming tutorials, online-books, source code, libraries and tools).
- codeproject.com (the code project) (free progamming articles, code snippets, discussions/community-forums, news and more).
- direct3d graphics pipeline poster with referenses.
- nvidia's developers websites (developer.nvidia.com and nvdeveloper.nvidia.com), could be used by for gpu and apu optimizations and more:
     fast math routines for nvidea gpushttp://developer.nvidia.com/object/fast_...tines.html (possible use the gpu as a co-processor?)
     nvidia directx8 sdk 5.0 http://developer.nvidia.com/object/nvidia_dx8_sdk.html
     nvidia audio sdk http://developer.nvidia.com/object/nvidi...o_sdk.html
     nvidia audio http://developer.nvidia.com/object/docs_audio.html (generate compelling audio effects or code a hardware equalizer).
- math/algorithm, assembly and graphics sites for programmers/developers, could be used for cpu optimizations:
     the aggregate magic algorithms (link) - efficient low-level optimization programming for x86 processors, (floating point uses and more).
     intel architecture optimization reference manual (link) - very x86-oriented (including mmx, sse, and sse2).´
     paul hsieh's assembly language lab (link) - x86 optimizations (mostly mmx related).
     wolfram research (link) - an extensive mathematics resource.
     platonic realms (link) - interactive mathematics encyclopedia and more!
     visual dictionary of special plane curves (link) (inc. good links to other math sites)
     the geometry junkyard - a large collection of math related stuff.
-  cdx library (cdxlib) - a  free open source c++ gdk (game development kit) and set of wrapper classes for writing directx windows games.

gpgpu (link) - general-purpose computation using graphics hardware, ("with the increasing programmability of commodity graphics processing units (gpus), these chips are capable of performing more than the specific graphics computations for which they were designed. they are now capable coprocessors, and their high speed makes them useful for a variety of applications, (as they are much faster at floating-point than cpu). the goal of this page is to catalog the current and historical use of gpus for general-purpose computation"). also checkout siggraph 2003 papers and unc chapel hill's page on the subject. they discuss using the gpu for implementing classical numerical algorithms, such as sparse matrix solvers, and using gpus to rapidly solve non-graphical problems.



Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
"how-to compile xbmc source code" link is dead, anywhere else to help me get started
Reply
#4
Most of those links are probably dead now, please refer to these development sections of the XBMC manual:
http://xboxmediacenter.com/wiki/index.ph...ment_Notes
http://www.xboxmediacenter.com/wiki/inde...evelopment
http://www.xboxmediacenter.com/wiki/inde...r_Workings
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
Exclamation 
Hi, this site links to a page on my website but the url has now changed.

OLD LINK: http://hydras-world.com/index.php?page=x...ailtodebug
NEW LINK: http://hydras-world.com/gaming/xbox/retail-to-debug

Please can you change the link in the first post on this thread, thanks.

Note: a 301 moved permanently redirect is currently in place, but this will disappear at some point in the future.
Reply
#6
done. thanks for the heads-up
Reply

Logout Mark Read Team Forum Stats Members Help
Xbox Development Resources for XBMC2