foxygit / xexkit Log in
commits tags

/docs/wiki/Getting-Started.md · 2.14 KB

raw

Getting started

What you need

  • A PC with Docker.
  • An RGH/JTAG Xbox 360 with Aurora (or FSD) and its FTP server, plus a

    controller.

  • Optionally Xenia Canary for

    quick smoke tests. See Xenia vs. hardware for its limits.

Build the tools (once)

xex-link turns the ELF that GCC links into a XEX. It is built from xenon-forge, with a patch that gives the main thread 1 MB of stack instead of 256 KB:

docker run --rm --user $(id -u):$(id -g) -e HOME=/tmp \
  -e CARGO_HOME=/usr/local/cargo -e RUSTUP_HOME=/usr/local/rustup \
  -v $PWD:/build_dir rust:latest /bin/sh -e /build_dir/tools/build-xex-link.sh

The compiler comes from the free60/libxenon image: xenon-gcc and xenon-g++ (GCC 16), newlib and libstdc++ for 32-bit PowerPC. xexkit uses the compiler and C/C++ libraries. libxenon itself is not linked: titles run under the retail kernel, not bare metal.

Build

docker run --rm --user $(id -u):$(id -g) -e HOME=/tmp -v $PWD:/src -w /src \
  free60/libxenon:latest bash -lc make

Always pass --user $(id -u):$(id -g). Otherwise the build directories belong to root, and later uploads into them (logs fetched from the console) fail with "permission denied". See Pitfalls.

Run on the console

  1. Make a folder for the title, for example Hdd1:\Apps\MyTitle\, and copy

    default.xex into it over FTP.

  2. In Aurora, add the folder (or rescan) and start the title.
  3. Leave through the Guide: press the Xbox button, then choose Xbox Home.

Logs and reports that the runtime writes to game:/ land in that folder; fetch them over FTP.

A first title

Copy examples/minimal/. Its main.cpp shows the usual loop:

xex_video_init();
xex_audio_open();
for (;;) {
    xex_pad pad; xex_input_get(0, &pad);
    // ... fill audio frames while xex_audio_queued() is low
    xex_frame f = xex_video_begin();     // waits until the last flip is on screen
    // ... draw into f.pixels with xex_video_tiled_index()
    xex_video_present();                 // flips at the next vertical blank
}

Next: the Porting guide.